[chronojump] Windows: Updated R to 2.15.2



commit d0716d1b6939495a0b046385397ddd15704f32ab
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Feb 8 16:00:11 2013 +0100

    Windows: Updated R to 2.15.2

 win32/deps/bin/R.dll                               |  Bin 2955264 -> 0 bytes
 win32/deps/bin/R.exe                               |  Bin 39424 -> 19456 bytes
 win32/deps/bin/Rblas.dll                           |  Bin 169749 -> 0 bytes
 win32/deps/bin/Rgraphapp.dll                       |  Bin 269617 -> 0 bytes
 win32/deps/bin/Riconv.dll                          |  Bin 31526 -> 0 bytes
 win32/deps/bin/Rscript.exe                         |  Bin 31232 -> 19456 bytes
 win32/deps/bin/Rterm.exe                           |  Bin 28160 -> 0 bytes
 win32/deps/bin/Rzlib.dll                           |  Bin 92857 -> 0 bytes
 win32/deps/bin/i386/R.dll                          |  Bin 0 -> 3491840 bytes
 win32/deps/bin/i386/R.exe                          |  Bin 0 -> 34816 bytes
 win32/deps/bin/i386/RSetReg.exe                    |  Bin 0 -> 20480 bytes
 win32/deps/bin/i386/Rblas.dll                      |  Bin 0 -> 238241 bytes
 win32/deps/bin/i386/Rcmd.exe                       |  Bin 0 -> 34304 bytes
 win32/deps/bin/i386/Rgraphapp.dll                  |  Bin 0 -> 348963 bytes
 win32/deps/bin/i386/Rgui.exe                       |  Bin 0 -> 17920 bytes
 win32/deps/bin/i386/Riconv.dll                     |  Bin 0 -> 102975 bytes
 win32/deps/bin/i386/Rlapack.dll                    |  Bin 0 -> 1914368 bytes
 win32/deps/bin/i386/Rscript.exe                    |  Bin 0 -> 21504 bytes
 win32/deps/bin/i386/Rterm.exe                      |  Bin 0 -> 18432 bytes
 win32/deps/bin/i386/Rzlib.dll                      |  Bin 0 -> 154877 bytes
 win32/deps/bin/i386/open.exe                       |  Bin 0 -> 12800 bytes
 win32/deps/etc/Rcmd_environ                        |   37 +-
 win32/deps/etc/Rdevga                              |    4 +-
 win32/deps/etc/Rprofile.site                       |   23 +
 win32/deps/etc/i386/Makeconf                       |  219 +
 win32/deps/etc/repositories                        |   20 +
 win32/deps/library/Cairo/DESCRIPTION               |   32 +
 win32/deps/library/Cairo/INDEX                     |   10 +
 win32/deps/library/Cairo/MD5                       |   23 +
 win32/deps/library/Cairo/Meta/Rd.rds               |  Bin 0 -> 558 bytes
 win32/deps/library/Cairo/Meta/hsearch.rds          |  Bin 0 -> 576 bytes
 win32/deps/library/Cairo/Meta/links.rds            |  Bin 0 -> 232 bytes
 win32/deps/library/Cairo/Meta/nsInfo.rds           |  Bin 0 -> 186 bytes
 win32/deps/library/Cairo/Meta/package.rds          |  Bin 0 -> 1205 bytes
 win32/deps/library/Cairo/NAMESPACE                 |    1 +
 win32/deps/library/Cairo/NEWS                      |  224 +
 win32/deps/library/Cairo/R/Cairo                   |    9 +
 win32/deps/library/Cairo/R/Cairo.rdb               |  Bin 0 -> 7271 bytes
 win32/deps/library/Cairo/R/Cairo.rdx               |  Bin 0 -> 525 bytes
 win32/deps/library/Cairo/help/AnIndex              |   15 +
 win32/deps/library/Cairo/help/Cairo.rdb            |  Bin 0 -> 24254 bytes
 win32/deps/library/Cairo/help/Cairo.rdx            |  Bin 0 -> 309 bytes
 win32/deps/library/Cairo/help/aliases.rds          |  Bin 0 -> 181 bytes
 win32/deps/library/Cairo/help/paths.rds            |  Bin 0 -> 167 bytes
 win32/deps/library/Cairo/html/00Index.html         |   58 +
 win32/deps/library/Cairo/html/R.css                |   57 +
 win32/deps/library/Cairo/libs/i386/Cairo.dll       |  Bin 0 -> 1009152 bytes
 win32/deps/library/Cairo/libs/i386/symbols.rds     |  Bin 0 -> 2398 bytes
 win32/deps/library/Cairo/libs/x64/Cairo.dll        |  Bin 0 -> 1046016 bytes
 win32/deps/library/Cairo/libs/x64/symbols.rds      |  Bin 0 -> 2373 bytes
 win32/deps/library/EMD/DESCRIPTION                 |   25 +-
 win32/deps/library/EMD/INDEX                       |   12 +-
 win32/deps/library/EMD/MD5                         |  118 +-
 win32/deps/library/EMD/Meta/Rd.rds                 |  Bin 879 -> 961 bytes
 win32/deps/library/EMD/Meta/data.rds               |  Bin 217 -> 214 bytes
 win32/deps/library/EMD/Meta/hsearch.rds            |  Bin 835 -> 910 bytes
 win32/deps/library/EMD/Meta/links.rds              |  Bin 0 -> 405 bytes
 win32/deps/library/EMD/Meta/nsInfo.rds             |  Bin 0 -> 215 bytes
 win32/deps/library/EMD/Meta/package.rds            |  Bin 746 -> 855 bytes
 win32/deps/library/EMD/NAMESPACE                   |   10 +
 win32/deps/library/EMD/R/EMD                       |   27 +-
 win32/deps/library/EMD/R/EMD.rdb                   |  Bin 14649 -> 21138 bytes
 win32/deps/library/EMD/R/EMD.rdx                   |  Bin 374 -> 499 bytes
 win32/deps/library/EMD/data/beryllium.rda          |  Bin 0 -> 1765 bytes
 win32/deps/library/EMD/data/datalist               |    7 +
 win32/deps/library/EMD/data/kospi200.rda           |  Bin 0 -> 5036 bytes
 win32/deps/library/EMD/data/lena.rda               |  Bin 0 -> 188871 bytes
 win32/deps/library/EMD/data/lennon.rda             |  Bin 0 -> 38130 bytes
 win32/deps/library/EMD/data/solar.hs.rda           |  Bin 0 -> 1436 bytes
 win32/deps/library/EMD/data/solar.lean.rda         |  Bin 0 -> 2346 bytes
 win32/deps/library/EMD/data/sunspot.rda            |  Bin 0 -> 1850 bytes
 win32/deps/library/EMD/help/AnIndex                |    3 +
 win32/deps/library/EMD/help/EMD.rdb                |  Bin 0 -> 51544 bytes
 win32/deps/library/EMD/help/EMD.rdx                |  Bin 0 -> 586 bytes
 win32/deps/library/EMD/help/aliases.rds            |  Bin 0 -> 304 bytes
 win32/deps/library/EMD/help/paths.rds              |  Bin 0 -> 260 bytes
 win32/deps/library/EMD/html/00Index.html           |   32 +-
 win32/deps/library/EMD/html/R.css                  |   57 +
 win32/deps/library/EMD/libs/i386/EMD.dll           |  Bin 0 -> 20992 bytes
 win32/deps/library/EMD/libs/i386/symbols.rds       |  Bin 0 -> 286 bytes
 win32/deps/library/EMD/libs/x64/EMD.dll            |  Bin 0 -> 23040 bytes
 win32/deps/library/EMD/libs/x64/symbols.rds        |  Bin 0 -> 284 bytes
 win32/deps/library/KernSmooth/DESCRIPTION          |   40 +-
 win32/deps/library/KernSmooth/INDEX                |   15 +-
 win32/deps/library/KernSmooth/LICENCE              |    2 +-
 win32/deps/library/KernSmooth/Meta/Rd.rds          |  Bin 452 -> 449 bytes
 win32/deps/library/KernSmooth/Meta/hsearch.rds     |  Bin 468 -> 462 bytes
 win32/deps/library/KernSmooth/Meta/links.rds       |  Bin 0 -> 165 bytes
 win32/deps/library/KernSmooth/Meta/nsInfo.rds      |  Bin 335 -> 344 bytes
 win32/deps/library/KernSmooth/Meta/package.rds     |  Bin 765 -> 852 bytes
 win32/deps/library/KernSmooth/R-ex/bkde.R          |   14 -
 win32/deps/library/KernSmooth/R-ex/bkde2D.R        |   15 -
 win32/deps/library/KernSmooth/R-ex/bkfe.R          |   13 -
 win32/deps/library/KernSmooth/R-ex/dpih.R          |   15 -
 win32/deps/library/KernSmooth/R-ex/dpik.R          |   15 -
 win32/deps/library/KernSmooth/R-ex/dpill.R         |   17 -
 win32/deps/library/KernSmooth/R-ex/locpoly.R       |   21 -
 win32/deps/library/KernSmooth/R/KernSmooth         |    2 +-
 win32/deps/library/KernSmooth/R/KernSmooth.rdb     |  Bin 13198 -> 33968 bytes
 win32/deps/library/KernSmooth/R/KernSmooth.rdx     |  Bin 415 -> 433 bytes
 win32/deps/library/KernSmooth/help/KernSmooth.rdb  |  Bin 0 -> 26530 bytes
 win32/deps/library/KernSmooth/help/KernSmooth.rdx  |  Bin 0 -> 283 bytes
 win32/deps/library/KernSmooth/help/aliases.rds     |  Bin 0 -> 102 bytes
 win32/deps/library/KernSmooth/help/bkde            |   88 -
 win32/deps/library/KernSmooth/help/bkde2D          |   81 -
 win32/deps/library/KernSmooth/help/bkfe            |   68 -
 win32/deps/library/KernSmooth/help/dpih            |   84 -
 win32/deps/library/KernSmooth/help/dpik            |   88 -
 win32/deps/library/KernSmooth/help/dpill           |   91 -
 win32/deps/library/KernSmooth/help/locpoly         |  100 -
 win32/deps/library/KernSmooth/help/paths.rds       |  Bin 0 -> 154 bytes
 win32/deps/library/KernSmooth/html/00Index.html    |   37 +
 win32/deps/library/KernSmooth/html/R.css           |   57 +
 win32/deps/library/KernSmooth/libs/KernSmooth.dll  |  Bin 15360 -> 0 bytes
 .../library/KernSmooth/libs/i386/KernSmooth.dll    |  Bin 0 -> 25600 bytes
 .../KernSmooth/po/de/LC_MESSAGES/R-KernSmooth.mo   |  Bin 0 -> 1276 bytes
 .../po/en quot/LC_MESSAGES/R-KernSmooth.mo         |  Bin 0 -> 1170 bytes
 .../KernSmooth/po/pl/LC_MESSAGES/R-KernSmooth.mo   |  Bin 0 -> 1446 bytes
 win32/deps/library/KernSmooth/tests/bkfe.R         |    8 +
 win32/deps/library/MASS/CITATION                   |    2 +-
 win32/deps/library/MASS/DESCRIPTION                |   52 +-
 win32/deps/library/MASS/INDEX                      |   13 +-
 win32/deps/library/MASS/LICENCE                    |    5 +-
 win32/deps/library/MASS/Meta/Rd.rds                |  Bin 6497 -> 6435 bytes
 win32/deps/library/MASS/Meta/data.rds              |  Bin 2328 -> 2310 bytes
 win32/deps/library/MASS/Meta/hsearch.rds           |  Bin 5984 -> 5915 bytes
 win32/deps/library/MASS/Meta/links.rds             |  Bin 0 -> 2468 bytes
 win32/deps/library/MASS/Meta/nsInfo.rds            |  Bin 1402 -> 1421 bytes
 win32/deps/library/MASS/Meta/package.rds           |  Bin 994 -> 1034 bytes
 win32/deps/library/MASS/NAMESPACE                  |    6 +-
 win32/deps/library/MASS/NEWS                       |   30 +-
 win32/deps/library/MASS/R-ex/Rex.zip               |  Bin 43519 -> 0 bytes
 win32/deps/library/MASS/R/MASS                     |    2 +-
 win32/deps/library/MASS/R/MASS.rdb                 |  Bin 121806 -> 323730 bytes
 win32/deps/library/MASS/R/MASS.rdx                 |  Bin 2774 -> 2893 bytes
 win32/deps/library/MASS/data/Rdata.rdb             |  Bin 167747 -> 140875 bytes
 win32/deps/library/MASS/data/Rdata.rds             |  Bin 768 -> 766 bytes
 win32/deps/library/MASS/data/Rdata.rdx             |  Bin 1205 -> 1203 bytes
 win32/deps/library/MASS/help/AnIndex               |    3 -
 win32/deps/library/MASS/help/MASS.rdb              |  Bin 0 -> 441807 bytes
 win32/deps/library/MASS/help/MASS.rdx              |  Bin 0 -> 3253 bytes
 win32/deps/library/MASS/help/Rhelp.zip             |  Bin 172062 -> 0 bytes
 win32/deps/library/MASS/help/aliases.rds           |  Bin 0 -> 1778 bytes
 win32/deps/library/MASS/help/paths.rds             |  Bin 0 -> 1170 bytes
 win32/deps/library/MASS/html/00Index.html          |  645 +++
 win32/deps/library/MASS/html/R.css                 |   57 +
 win32/deps/library/MASS/libs/MASS.dll              |  Bin 16384 -> 0 bytes
 win32/deps/library/MASS/libs/i386/MASS.dll         |  Bin 0 -> 29696 bytes
 .../deps/library/MASS/po/de/LC_MESSAGES/R-MASS.mo  |  Bin 0 -> 17842 bytes
 .../library/MASS/po/en quot/LC_MESSAGES/R-MASS.mo  |  Bin 0 -> 16844 bytes
 .../deps/library/MASS/po/fr/LC_MESSAGES/R-MASS.mo  |  Bin 0 -> 17848 bytes
 .../deps/library/MASS/po/pl/LC_MESSAGES/R-MASS.mo  |  Bin 0 -> 18323 bytes
 win32/deps/library/MASS/scripts/ch01.R             |    4 +-
 win32/deps/library/MASS/scripts/ch02.R             |    6 +-
 win32/deps/library/MASS/scripts/ch03.R             |    4 +-
 win32/deps/library/MASS/scripts/ch04.R             |   17 +-
 win32/deps/library/MASS/scripts/ch05.R             |   20 +-
 win32/deps/library/MASS/scripts/ch06.R             |   54 +-
 win32/deps/library/MASS/scripts/ch07.R             |   47 +-
 win32/deps/library/MASS/scripts/ch08.R             |   52 +-
 win32/deps/library/MASS/scripts/ch09.R             |    4 +-
 win32/deps/library/MASS/scripts/ch10.R             |   50 +-
 win32/deps/library/MASS/scripts/ch11.R             |   70 +-
 win32/deps/library/MASS/scripts/ch12.R             |   54 +-
 win32/deps/library/MASS/scripts/ch13.R             |   48 +-
 win32/deps/library/MASS/scripts/ch14.R             |   24 +-
 win32/deps/library/MASS/scripts/ch15.R             |   52 +-
 win32/deps/library/MASS/scripts/ch16.R             |   10 +-
 win32/deps/library/MASS/tests/BankWages.rda        |  Bin 0 -> 1985 bytes
 .../library/MASS/tests/Examples/MASS-Ex.Rout.save  | 5231 ++++++++++++++++++
 win32/deps/library/MASS/tests/confint.R            |   26 +
 win32/deps/library/MASS/tests/fitdistr.R           |   30 +
 win32/deps/library/MASS/tests/fitdistr.Rout.save   |   76 +
 win32/deps/library/MASS/tests/glm.nb.R             |   49 +
 win32/deps/library/MASS/tests/hubers.R             |    5 +
 win32/deps/library/MASS/tests/lme.R                |   16 +
 win32/deps/library/MASS/tests/polr.R               |   48 +
 win32/deps/library/MASS/tests/profile.R            |   10 +
 win32/deps/library/MASS/tests/regression.R         |    9 +
 win32/deps/library/MASS/tests/regression.Rout.save |   47 +
 win32/deps/library/MASS/tests/rlm.R                |   91 +
 win32/deps/library/MASS/tests/scripts.R            |   36 +
 win32/deps/library/Matrix/DESCRIPTION              |   55 +-
 win32/deps/library/Matrix/Doxyfile                 |  669 ++-
 win32/deps/library/Matrix/INDEX                    |   37 +-
 win32/deps/library/Matrix/Meta/Rd.rds              |  Bin 11515 -> 13215 bytes
 win32/deps/library/Matrix/Meta/data.rds            |  Bin 239 -> 205 bytes
 win32/deps/library/Matrix/Meta/hsearch.rds         |  Bin 11919 -> 13733 bytes
 win32/deps/library/Matrix/Meta/links.rds           |  Bin 0 -> 11118 bytes
 win32/deps/library/Matrix/Meta/nsInfo.rds          |  Bin 1354 -> 1530 bytes
 win32/deps/library/Matrix/Meta/package.rds         |  Bin 1101 -> 1118 bytes
 win32/deps/library/Matrix/Meta/vignette.rds        |  Bin 431 -> 380 bytes
 win32/deps/library/Matrix/NAMESPACE                |   78 +-
 win32/deps/library/Matrix/R-ex/Rex.zip             |  Bin 58046 -> 0 bytes
 win32/deps/library/Matrix/R/Matrix                 |    2 +-
 win32/deps/library/Matrix/R/Matrix.rdb             |  Bin 969713 -> 1923241 bytes
 win32/deps/library/Matrix/R/Matrix.rdx             |  Bin 11708 -> 11141 bytes
 win32/deps/library/Matrix/doc/Announce.txt         |    4 +
 win32/deps/library/Matrix/doc/Comparisons.R        |   38 +-
 win32/deps/library/Matrix/doc/Comparisons.Rnw      |    2 +-
 win32/deps/library/Matrix/doc/Comparisons.pdf      |  Bin 169195 -> 76267 bytes
 win32/deps/library/Matrix/doc/DSC2009_abstract.pdf |  Bin 27207 -> 0 bytes
 win32/deps/library/Matrix/doc/DSC2009_abstract.tex |   80 -
 win32/deps/library/Matrix/doc/DSC2009_abstract.txt |   51 -
 win32/deps/library/Matrix/doc/Design-issues.R      |   14 +-
 win32/deps/library/Matrix/doc/Design-issues.Rnw    |    2 +-
 win32/deps/library/Matrix/doc/Design-issues.pdf    |  Bin 135360 -> 59895 bytes
 win32/deps/library/Matrix/doc/Intro2Matrix.R       |   28 +-
 win32/deps/library/Matrix/doc/Intro2Matrix.Rnw     |    2 +-
 win32/deps/library/Matrix/doc/Intro2Matrix.pdf     |  Bin 247762 -> 128938 bytes
 win32/deps/library/Matrix/doc/Introduction.R       |    4 +-
 win32/deps/library/Matrix/doc/Introduction.Rnw     |    2 +-
 win32/deps/library/Matrix/doc/Introduction.pdf     |  Bin 126973 -> 70547 bytes
 win32/deps/library/Matrix/doc/SuiteSparse/AMD.txt  |  213 +
 .../library/Matrix/doc/SuiteSparse/CHOLMOD.txt     |   81 +
 .../deps/library/Matrix/doc/SuiteSparse/COLAMD.txt |  118 +
 .../Matrix/doc/{UFsparse => SuiteSparse}/SPQR.txt  |    0
 .../Matrix/doc/SuiteSparse/SuiteSparse_config.txt  |   44 +
 .../doc/{UFsparse => SuiteSparse}/UserGuides.txt   |    0
 win32/deps/library/Matrix/doc/UFsparse/AMD.txt     |  215 -
 win32/deps/library/Matrix/doc/UFsparse/CHOLMOD.txt |   84 -
 win32/deps/library/Matrix/doc/UFsparse/COLAMD.txt  |  127 -
 .../deps/library/Matrix/doc/UFsparse/UFconfig.txt  |   35 -
 win32/deps/library/Matrix/doc/fullpage.sty         |   78 -
 win32/deps/library/Matrix/doc/index.html           |   59 +-
 win32/deps/library/Matrix/doc/myVignette.sty       |   79 -
 win32/deps/library/Matrix/doc/sparseModels.R       |   49 +-
 win32/deps/library/Matrix/doc/sparseModels.Rnw     |   81 +-
 win32/deps/library/Matrix/doc/sparseModels.pdf     |  Bin 1787777 -> 98855 bytes
 win32/deps/library/Matrix/help/AnIndex             |  349 ++-
 win32/deps/library/Matrix/help/Matrix.rdb          |  Bin 0 -> 471121 bytes
 win32/deps/library/Matrix/help/Matrix.rdx          |  Bin 0 -> 2354 bytes
 win32/deps/library/Matrix/help/Rhelp.zip           |  Bin 118848 -> 0 bytes
 win32/deps/library/Matrix/help/aliases.rds         |  Bin 0 -> 12034 bytes
 win32/deps/library/Matrix/help/paths.rds           |  Bin 0 -> 861 bytes
 win32/deps/library/Matrix/html/00Index.html        | 1411 +++++
 win32/deps/library/Matrix/html/R.css               |   57 +
 win32/deps/library/Matrix/include/Matrix.h         |   55 +-
 win32/deps/library/Matrix/include/Matrix_stubs.c   |  388 +-
 win32/deps/library/Matrix/include/cholmod.h        |  249 +-
 win32/deps/library/Matrix/libs/Matrix.dll          |  Bin 505344 -> 0 bytes
 win32/deps/library/Matrix/libs/i386/Matrix.dll     |  Bin 0 -> 684544 bytes
 .../library/Matrix/po/de/LC_MESSAGES/Matrix.mo     |  Bin 0 -> 23301 bytes
 .../library/Matrix/po/de/LC_MESSAGES/R-Matrix.mo   |  Bin 0 -> 22982 bytes
 .../Matrix/po/en quot/LC_MESSAGES/Matrix.mo        |  Bin 0 -> 22282 bytes
 .../Matrix/po/en quot/LC_MESSAGES/R-Matrix.mo      |  Bin 0 -> 24228 bytes
 .../library/Matrix/po/pl/LC_MESSAGES/Matrix.mo     |  Bin 0 -> 24212 bytes
 .../library/Matrix/po/pl/LC_MESSAGES/R-Matrix.mo   |  Bin 0 -> 26518 bytes
 win32/deps/library/Matrix/test-tools-1.R           |  200 +
 win32/deps/library/Matrix/test-tools-Matrix.R      |  633 +++
 win32/deps/library/Matrix/test-tools.R             |  535 +--
 win32/deps/library/Matrix/tests/Class+Meth.R       |  348 ++
 win32/deps/library/Matrix/tests/Simple.R           |  837 +++
 win32/deps/library/Matrix/tests/abIndex-tsts.R     |  121 +
 win32/deps/library/Matrix/tests/base-matrix-fun.R  |   45 +
 win32/deps/library/Matrix/tests/bind.R             |  131 +
 win32/deps/library/Matrix/tests/bind.Rout.save     |  385 ++
 win32/deps/library/Matrix/tests/dg_Matrix.R        |   95 +
 win32/deps/library/Matrix/tests/dpo-test.R         |  171 +
 win32/deps/library/Matrix/tests/dtpMatrix.R        |   63 +
 win32/deps/library/Matrix/tests/factorizing.R      |  399 ++
 win32/deps/library/Matrix/tests/group-methods.R    |  272 +
 win32/deps/library/Matrix/tests/indexing.R         |  839 +++
 win32/deps/library/Matrix/tests/indexing.Rout.save | 1634 ++++++
 win32/deps/library/Matrix/tests/matprod.R          |  435 ++
 win32/deps/library/Matrix/tests/matr-exp.R         |   79 +
 win32/deps/library/Matrix/tests/other-pkgs.R       |  139 +
 win32/deps/library/Matrix/tests/spModel.matrix.R   |  190 +
 win32/deps/library/Matrix/tests/validObj.R         |  177 +
 win32/deps/library/Matrix/tests/write-read.R       |   57 +
 win32/deps/library/base/CITATION                   |   25 +-
 win32/deps/library/base/DESCRIPTION                |    8 +-
 win32/deps/library/base/INDEX                      |   92 +-
 win32/deps/library/base/Meta/Rd.rds                |  Bin 19253 -> 20020 bytes
 win32/deps/library/base/Meta/demo.rds              |  Bin 213 -> 244 bytes
 win32/deps/library/base/Meta/hsearch.rds           |  Bin 19874 -> 20612 bytes
 win32/deps/library/base/Meta/links.rds             |  Bin 0 -> 11724 bytes
 win32/deps/library/base/Meta/package.rds           |  Bin 482 -> 464 bytes
 win32/deps/library/base/R-ex/Rex.zip               |  Bin 132376 -> 0 bytes
 win32/deps/library/base/R/Rprofile                 |   38 +-
 win32/deps/library/base/R/base                     |   21 +-
 win32/deps/library/base/R/base.rdb                 |  Bin 281153 -> 729357 bytes
 win32/deps/library/base/R/base.rdx                 |  Bin 11411 -> 12444 bytes
 win32/deps/library/base/demo/error.catching.R      |   36 +
 win32/deps/library/base/demo/is.things.R           |   16 +-
 win32/deps/library/base/demo/recursion.R           |    1 +
 win32/deps/library/base/demo/scoping.R             |    2 +
 win32/deps/library/base/help/AnIndex               |  204 +-
 win32/deps/library/base/help/Rhelp.zip             |  Bin 534157 -> 0 bytes
 win32/deps/library/base/help/aliases.rds           |  Bin 0 -> 10955 bytes
 win32/deps/library/base/help/base.rdb              |  Bin 0 -> 1853302 bytes
 win32/deps/library/base/help/base.rdx              |  Bin 0 -> 8590 bytes
 win32/deps/library/base/help/paths.rds             |  Bin 0 -> 2894 bytes
 win32/deps/library/base/html/00Index.html          | 2458 +++++++++
 win32/deps/library/base/html/R.css                 |   57 +
 .../deps/library/base/po/da/LC_MESSAGES/R-base.mo  |  Bin 0 -> 30956 bytes
 .../deps/library/base/po/de/LC_MESSAGES/R-base.mo  |  Bin 0 -> 56538 bytes
 .../library/base/po/en quot/LC_MESSAGES/R-base.mo  |  Bin 0 -> 54616 bytes
 .../deps/library/base/po/fr/LC_MESSAGES/R-base.mo  |  Bin 0 -> 59345 bytes
 .../deps/library/base/po/it/LC_MESSAGES/R-base.mo  |  Bin 0 -> 29168 bytes
 .../deps/library/base/po/ja/LC_MESSAGES/R-base.mo  |  Bin 0 -> 66795 bytes
 .../deps/library/base/po/ko/LC_MESSAGES/R-base.mo  |  Bin 0 -> 62254 bytes
 .../deps/library/base/po/nn/LC_MESSAGES/R-base.mo  |  Bin 0 -> 55876 bytes
 .../deps/library/base/po/pl/LC_MESSAGES/R-base.mo  |  Bin 0 -> 59276 bytes
 .../library/base/po/pt_BR/LC_MESSAGES/R-base.mo    |  Bin 0 -> 45775 bytes
 .../deps/library/base/po/ru/LC_MESSAGES/R-base.mo  |  Bin 0 -> 55858 bytes
 .../deps/library/base/po/tr/LC_MESSAGES/R-base.mo  |  Bin 0 -> 882 bytes
 .../library/base/po/zh_CN/LC_MESSAGES/R-base.mo    |  Bin 0 -> 49375 bytes
 win32/deps/library/boot/CITATION                   |    5 +-
 win32/deps/library/boot/DESCRIPTION                |   46 +-
 win32/deps/library/boot/INDEX                      |   37 +-
 win32/deps/library/boot/Meta/Rd.rds                |  Bin 3431 -> 3407 bytes
 win32/deps/library/boot/Meta/data.rds              |  Bin 1333 -> 1322 bytes
 win32/deps/library/boot/Meta/hsearch.rds           |  Bin 3103 -> 3089 bytes
 win32/deps/library/boot/Meta/links.rds             |  Bin 0 -> 1164 bytes
 win32/deps/library/boot/Meta/nsInfo.rds            |  Bin 485 -> 493 bytes
 win32/deps/library/boot/Meta/package.rds           |  Bin 867 -> 1003 bytes
 win32/deps/library/boot/NAMESPACE                  |    1 +
 win32/deps/library/boot/R-ex/Rex.zip               |  Bin 21115 -> 0 bytes
 win32/deps/library/boot/R/boot                     |    2 +-
 win32/deps/library/boot/R/boot.rdb                 |  Bin 54852 -> 156279 bytes
 win32/deps/library/boot/R/boot.rdx                 |  Bin 1222 -> 1290 bytes
 win32/deps/library/boot/data/Rdata.rdb             |  Bin 87271 -> 52441 bytes
 win32/deps/library/boot/data/Rdata.rds             |  Bin 468 -> 469 bytes
 win32/deps/library/boot/data/Rdata.rdx             |  Bin 757 -> 749 bytes
 win32/deps/library/boot/help/AnIndex               |    1 +
 win32/deps/library/boot/help/Rhelp.zip             |  Bin 124652 -> 0 bytes
 win32/deps/library/boot/help/aliases.rds           |  Bin 0 -> 744 bytes
 win32/deps/library/boot/help/boot.rdb              |  Bin 0 -> 316922 bytes
 win32/deps/library/boot/help/boot.rdx              |  Bin 0 -> 1967 bytes
 win32/deps/library/boot/help/paths.rds             |  Bin 0 -> 730 bytes
 win32/deps/library/boot/html/00Index.html          |  221 +
 win32/deps/library/boot/html/R.css                 |   57 +
 .../deps/library/boot/po/de/LC_MESSAGES/R-boot.mo  |  Bin 0 -> 8552 bytes
 .../library/boot/po/en quot/LC_MESSAGES/R-boot.mo  |  Bin 0 -> 8187 bytes
 .../deps/library/boot/po/fr/LC_MESSAGES/R-boot.mo  |  Bin 0 -> 8639 bytes
 .../deps/library/boot/po/pl/LC_MESSAGES/R-boot.mo  |  Bin 0 -> 7329 bytes
 .../deps/library/boot/po/ru/LC_MESSAGES/R-boot.mo  |  Bin 0 -> 6520 bytes
 .../library/boot/tests/Examples/boot-Ex.Rout.save  | 2029 +++++++
 win32/deps/library/class/CITATION                  |    2 +-
 win32/deps/library/class/DESCRIPTION               |   41 +-
 win32/deps/library/class/LICENCE                   |   11 +-
 win32/deps/library/class/Meta/Rd.rds               |  Bin 673 -> 667 bytes
 win32/deps/library/class/Meta/hsearch.rds          |  Bin 650 -> 640 bytes
 win32/deps/library/class/Meta/links.rds            |  Bin 0 -> 270 bytes
 win32/deps/library/class/Meta/nsInfo.rds           |  Bin 381 -> 387 bytes
 win32/deps/library/class/Meta/package.rds          |  Bin 975 -> 745 bytes
 win32/deps/library/class/R-ex/SOM.R                |   23 -
 win32/deps/library/class/R-ex/batchSOM.R           |   24 -
 win32/deps/library/class/R-ex/condense.R           |   17 -
 win32/deps/library/class/R-ex/knn.R                |   15 -
 win32/deps/library/class/R-ex/knn.cv.R             |   14 -
 win32/deps/library/class/R-ex/knn1.R               |   14 -
 win32/deps/library/class/R-ex/lvq1.R               |   19 -
 win32/deps/library/class/R-ex/lvq2.R               |   19 -
 win32/deps/library/class/R-ex/lvq3.R               |   19 -
 win32/deps/library/class/R-ex/lvqinit.R            |   17 -
 win32/deps/library/class/R-ex/lvqtest.R            |   12 -
 win32/deps/library/class/R-ex/multiedit.R          |   22 -
 win32/deps/library/class/R-ex/olvq1.R              |   17 -
 win32/deps/library/class/R-ex/reduce.nn.R          |   17 -
 win32/deps/library/class/R/class                   |    2 +-
 win32/deps/library/class/R/class.rdb               |  Bin 9569 -> 22898 bytes
 win32/deps/library/class/R/class.rdx               |  Bin 460 -> 480 bytes
 win32/deps/library/class/help/SOM                  |   82 -
 win32/deps/library/class/help/aliases.rds          |  Bin 0 -> 176 bytes
 win32/deps/library/class/help/batchSOM             |   69 -
 win32/deps/library/class/help/class.rdb            |  Bin 0 -> 39440 bytes
 win32/deps/library/class/help/class.rdx            |  Bin 0 -> 437 bytes
 win32/deps/library/class/help/condense             |   58 -
 win32/deps/library/class/help/knn                  |   65 -
 win32/deps/library/class/help/knn.cv               |   66 -
 win32/deps/library/class/help/knn1                 |   48 -
 win32/deps/library/class/help/lvq1                 |   63 -
 win32/deps/library/class/help/lvq2                 |   67 -
 win32/deps/library/class/help/lvq3                 |   68 -
 win32/deps/library/class/help/lvqinit              |   65 -
 win32/deps/library/class/help/lvqtest              |   43 -
 win32/deps/library/class/help/multiedit            |   60 -
 win32/deps/library/class/help/olvq1                |   61 -
 win32/deps/library/class/help/paths.rds            |  Bin 0 -> 213 bytes
 win32/deps/library/class/help/reduce.nn            |   56 -
 win32/deps/library/class/help/somgrid              |   54 -
 win32/deps/library/class/html/00Index.html         |   58 +
 win32/deps/library/class/html/R.css                |   57 +
 win32/deps/library/class/libs/class.dll            |  Bin 10240 -> 0 bytes
 win32/deps/library/class/libs/i386/class.dll       |  Bin 0 -> 17920 bytes
 .../library/class/po/de/LC_MESSAGES/R-class.mo     |  Bin 0 -> 1920 bytes
 .../class/po/en quot/LC_MESSAGES/R-class.mo        |  Bin 0 -> 1736 bytes
 .../library/class/po/fr/LC_MESSAGES/R-class.mo     |  Bin 0 -> 1891 bytes
 .../library/class/po/pl/LC_MESSAGES/R-class.mo     |  Bin 0 -> 2040 bytes
 .../class/tests/Examples/class-Ex.Rout.save        |  580 ++
 win32/deps/library/cluster/CITATION                |   47 +-
 win32/deps/library/cluster/DESCRIPTION             |   42 +-
 win32/deps/library/cluster/Meta/Rd.rds             |  Bin 2195 -> 2236 bytes
 win32/deps/library/cluster/Meta/data.rds           |  Bin 347 -> 344 bytes
 win32/deps/library/cluster/Meta/hsearch.rds        |  Bin 2101 -> 2143 bytes
 win32/deps/library/cluster/Meta/links.rds          |  Bin 0 -> 945 bytes
 win32/deps/library/cluster/Meta/nsInfo.rds         |  Bin 584 -> 692 bytes
 win32/deps/library/cluster/Meta/package.rds        |  Bin 831 -> 869 bytes
 win32/deps/library/cluster/NAMESPACE               |    9 +-
 win32/deps/library/cluster/R-ex/Rex.zip            |  Bin 17805 -> 0 bytes
 win32/deps/library/cluster/R/cluster               |    2 +-
 win32/deps/library/cluster/R/cluster.rdb           |  Bin 43161 -> 119608 bytes
 win32/deps/library/cluster/R/cluster.rdx           |  Bin 1092 -> 1208 bytes
 win32/deps/library/cluster/data/Rdata.rdb          |  Bin 48790 -> 43277 bytes
 win32/deps/library/cluster/data/Rdata.rds          |  Bin 164 -> 166 bytes
 win32/deps/library/cluster/data/Rdata.rdx          |  Bin 268 -> 268 bytes
 win32/deps/library/cluster/help/AnIndex            |    7 +-
 win32/deps/library/cluster/help/Rhelp.zip          |  Bin 75318 -> 0 bytes
 win32/deps/library/cluster/help/aliases.rds        |  Bin 0 -> 666 bytes
 win32/deps/library/cluster/help/cluster.rdb        |  Bin 0 -> 228260 bytes
 win32/deps/library/cluster/help/cluster.rdx        |  Bin 0 -> 1307 bytes
 win32/deps/library/cluster/help/paths.rds          |  Bin 0 -> 530 bytes
 win32/deps/library/cluster/html/00Index.html       |  187 +
 win32/deps/library/cluster/html/R.css              |   57 +
 win32/deps/library/cluster/libs/cluster.dll        |  Bin 41472 -> 0 bytes
 win32/deps/library/cluster/libs/i386/cluster.dll   |  Bin 0 -> 59904 bytes
 .../library/cluster/po/de/LC_MESSAGES/R-cluster.mo |  Bin 0 -> 10744 bytes
 .../cluster/po/en quot/LC_MESSAGES/R-cluster.mo    |  Bin 0 -> 10590 bytes
 .../library/cluster/po/pl/LC_MESSAGES/R-cluster.mo |  Bin 0 -> 11053 bytes
 win32/deps/library/cluster/tests/agnes-ex.R        |   35 +
 .../deps/library/cluster/tests/agnes-ex.Rout.save  |  610 +++
 win32/deps/library/cluster/tests/clara-NAs.R       |   46 +
 .../deps/library/cluster/tests/clara-NAs.Rout.save |  635 +++
 win32/deps/library/cluster/tests/clara-ex.R        |   23 +
 win32/deps/library/cluster/tests/clara.R           |  107 +
 win32/deps/library/cluster/tests/clara.Rout.save   | 1491 ++++++
 win32/deps/library/cluster/tests/clusplot-out.R    |   29 +
 .../library/cluster/tests/clusplot-out.Rout.save   |  121 +
 win32/deps/library/cluster/tests/daisy-ex.R        |  110 +
 .../deps/library/cluster/tests/daisy-ex.Rout.save  |  927 ++++
 win32/deps/library/cluster/tests/diana-boots.R     |   31 +
 win32/deps/library/cluster/tests/diana-ex.R        |   31 +
 .../deps/library/cluster/tests/diana-ex.Rout.save  |  545 ++
 win32/deps/library/cluster/tests/ellipsoid-ex.R    |   27 +
 .../library/cluster/tests/ellipsoid-ex.Rout.save   |  207 +
 win32/deps/library/cluster/tests/fanny-ex.R        |   72 +
 win32/deps/library/cluster/tests/mona.R            |   23 +
 win32/deps/library/cluster/tests/mona.Rout.save    |  118 +
 win32/deps/library/cluster/tests/pam.R             |  165 +
 win32/deps/library/cluster/tests/pam.Rout.save     | 1343 +++++
 .../library/cluster/tests/silhouette-default.R     |   83 +
 .../cluster/tests/silhouette-default.Rout.save     |  616 +++
 win32/deps/library/cluster/tests/sweep-ex.R        |   69 +
 win32/deps/library/codetools/DESCRIPTION           |   24 +-
 win32/deps/library/codetools/Meta/Rd.rds           |  Bin 534 -> 528 bytes
 win32/deps/library/codetools/Meta/hsearch.rds      |  Bin 579 -> 571 bytes
 win32/deps/library/codetools/Meta/links.rds        |  Bin 0 -> 301 bytes
 win32/deps/library/codetools/Meta/nsInfo.rds       |  Bin 340 -> 341 bytes
 win32/deps/library/codetools/Meta/package.rds      |  Bin 562 -> 587 bytes
 win32/deps/library/codetools/R-ex/checkUsage.R     |   13 -
 win32/deps/library/codetools/R-ex/findGlobals.R    |   12 -
 win32/deps/library/codetools/R-ex/showTree.R       |   13 -
 win32/deps/library/codetools/R/codetools           |    2 +-
 win32/deps/library/codetools/R/codetools.rdb       |  Bin 24976 -> 54615 bytes
 win32/deps/library/codetools/R/codetools.rdx       |  Bin 1416 -> 1509 bytes
 win32/deps/library/codetools/help/aliases.rds      |  Bin 0 -> 266 bytes
 win32/deps/library/codetools/help/checkUsage       |   81 -
 win32/deps/library/codetools/help/codetools        |   84 -
 win32/deps/library/codetools/help/codetools.rdb    |  Bin 0 -> 9580 bytes
 win32/deps/library/codetools/help/codetools.rdx    |  Bin 0 -> 235 bytes
 win32/deps/library/codetools/help/findGlobals      |   38 -
 win32/deps/library/codetools/help/paths.rds        |  Bin 0 -> 147 bytes
 win32/deps/library/codetools/help/showTree         |   29 -
 win32/deps/library/codetools/html/00Index.html     |   63 +
 win32/deps/library/codetools/html/R.css            |   57 +
 win32/deps/library/codetools/tests/tests.R         |   90 +
 win32/deps/library/compiler/DESCRIPTION            |    9 +
 win32/deps/library/compiler/INDEX                  |    1 +
 win32/deps/library/compiler/Meta/Rd.rds            |  Bin 0 -> 300 bytes
 win32/deps/library/compiler/Meta/hsearch.rds       |  Bin 0 -> 369 bytes
 win32/deps/library/compiler/Meta/links.rds         |  Bin 0 -> 207 bytes
 win32/deps/library/compiler/Meta/nsInfo.rds        |  Bin 0 -> 250 bytes
 win32/deps/library/compiler/Meta/package.rds       |  Bin 0 -> 477 bytes
 win32/deps/library/compiler/NAMESPACE              |    4 +
 win32/deps/library/compiler/R/compiler             |    9 +
 win32/deps/library/compiler/R/compiler.rdb         |  Bin 0 -> 112850 bytes
 win32/deps/library/compiler/R/compiler.rdx         |  Bin 0 -> 2989 bytes
 win32/deps/library/compiler/help/AnIndex           |    9 +
 win32/deps/library/compiler/help/aliases.rds       |  Bin 0 -> 143 bytes
 win32/deps/library/compiler/help/compiler.rdb      |  Bin 0 -> 6867 bytes
 win32/deps/library/compiler/help/compiler.rdx      |  Bin 0 -> 148 bytes
 win32/deps/library/compiler/help/paths.rds         |  Bin 0 -> 100 bytes
 win32/deps/library/compiler/html/00Index.html      |   41 +
 win32/deps/library/compiler/html/R.css             |   57 +
 .../compiler/po/da/LC_MESSAGES/R-compiler.mo       |  Bin 0 -> 3490 bytes
 .../compiler/po/de/LC_MESSAGES/R-compiler.mo       |  Bin 0 -> 3616 bytes
 .../compiler/po/en quot/LC_MESSAGES/R-compiler.mo  |  Bin 0 -> 3426 bytes
 .../compiler/po/fr/LC_MESSAGES/R-compiler.mo       |  Bin 0 -> 3948 bytes
 .../compiler/po/ja/LC_MESSAGES/R-compiler.mo       |  Bin 0 -> 4282 bytes
 .../compiler/po/ko/LC_MESSAGES/R-compiler.mo       |  Bin 0 -> 3902 bytes
 .../compiler/po/pl/LC_MESSAGES/R-compiler.mo       |  Bin 0 -> 3889 bytes
 .../compiler/po/pt_BR/LC_MESSAGES/R-compiler.mo    |  Bin 0 -> 3824 bytes
 .../compiler/po/ru/LC_MESSAGES/R-compiler.mo       |  Bin 0 -> 5000 bytes
 .../compiler/po/zh_CN/LC_MESSAGES/R-compiler.mo    |  Bin 0 -> 3327 bytes
 win32/deps/library/compiler/tests/assign.R         |  148 +
 win32/deps/library/compiler/tests/basics.R         |  101 +
 win32/deps/library/compiler/tests/const.R          |   65 +
 win32/deps/library/compiler/tests/envir.R          |   90 +
 win32/deps/library/compiler/tests/jit.R            |   16 +
 win32/deps/library/compiler/tests/loop.R           |   26 +
 win32/deps/library/compiler/tests/switch.R         |   86 +
 win32/deps/library/datasets/DESCRIPTION            |    8 +-
 win32/deps/library/datasets/INDEX                  |   12 +-
 win32/deps/library/datasets/Meta/Rd.rds            |  Bin 3592 -> 3593 bytes
 win32/deps/library/datasets/Meta/data.rds          |  Bin 2666 -> 2641 bytes
 win32/deps/library/datasets/Meta/hsearch.rds       |  Bin 3199 -> 3197 bytes
 win32/deps/library/datasets/Meta/links.rds         |  Bin 0 -> 1343 bytes
 win32/deps/library/datasets/Meta/nsInfo.rds        |  Bin 0 -> 179 bytes
 win32/deps/library/datasets/Meta/package.rds       |  Bin 483 -> 465 bytes
 win32/deps/library/datasets/NAMESPACE              |    2 +
 win32/deps/library/datasets/R-ex/Rex.zip           |  Bin 27923 -> 0 bytes
 win32/deps/library/datasets/R/datasets             |   20 -
 win32/deps/library/datasets/data/Rdata.rdb         |  Bin 139015 -> 111904 bytes
 win32/deps/library/datasets/data/Rdata.rds         |  Bin 1047 -> 1043 bytes
 win32/deps/library/datasets/data/Rdata.rdx         |  Bin 1509 -> 1509 bytes
 win32/deps/library/datasets/help/Rhelp.zip         |  Bin 71530 -> 0 bytes
 win32/deps/library/datasets/help/aliases.rds       |  Bin 0 -> 885 bytes
 win32/deps/library/datasets/help/datasets.rdb      |  Bin 0 -> 191772 bytes
 win32/deps/library/datasets/help/datasets.rdx      |  Bin 0 -> 1999 bytes
 win32/deps/library/datasets/help/paths.rds         |  Bin 0 -> 818 bytes
 win32/deps/library/datasets/html/00Index.html      |  367 ++
 win32/deps/library/datasets/html/R.css             |   57 +
 win32/deps/library/fields/DESCRIPTION              |   38 +-
 win32/deps/library/fields/INDEX                    |  247 +-
 win32/deps/library/fields/LICENSE                  |   11 +
 win32/deps/library/fields/MD5                      |  152 +-
 win32/deps/library/fields/Meta/Rd.rds              |  Bin 5215 -> 4959 bytes
 win32/deps/library/fields/Meta/data.rds            |  Bin 580 -> 639 bytes
 win32/deps/library/fields/Meta/hsearch.rds         |  Bin 5056 -> 4834 bytes
 win32/deps/library/fields/Meta/links.rds           |  Bin 0 -> 2476 bytes
 win32/deps/library/fields/Meta/nsInfo.rds          |  Bin 0 -> 367 bytes
 win32/deps/library/fields/Meta/package.rds         |  Bin 997 -> 1267 bytes
 win32/deps/library/fields/NAMESPACE                |   12 +
 win32/deps/library/fields/R/fields                 |   27 +-
 win32/deps/library/fields/R/fields.rdb             |  Bin 155455 -> 131217 bytes
 win32/deps/library/fields/R/fields.rdx             |  Bin 3561 -> 2972 bytes
 win32/deps/library/fields/data/CO2.rda             |  Bin 206014 -> 455372 bytes
 win32/deps/library/fields/data/COmonthlyMet.rda    |  Bin 1206004 -> 681966 bytes
 .../library/fields/data/NorthAmericanRainfall.rda  |  Bin 0 -> 74279 bytes
 win32/deps/library/fields/data/PRISMelevation.rda  |  Bin 1451127 -> 667593 bytes
 win32/deps/library/fields/data/RCMexample.rda      |  Bin 197751 -> 161424 bytes
 win32/deps/library/fields/data/RMelevation.rda     |  Bin 180721 -> 94458 bytes
 win32/deps/library/fields/data/US.dat.rda          |  Bin 66120 -> 44988 bytes
 win32/deps/library/fields/data/WorldBankCO2.rda    |  Bin 0 -> 3214 bytes
 win32/deps/library/fields/data/datalist            |   11 +
 win32/deps/library/fields/data/lennon.rda          |  Bin 72602 -> 38012 bytes
 win32/deps/library/fields/data/ozone2.rda          |  Bin 31891 -> 22876 bytes
 win32/deps/library/fields/data/rat.diet.rda        |  Bin 0 -> 579 bytes
 win32/deps/library/fields/data/world.dat.rda       |  Bin 25231 -> 15254 bytes
 win32/deps/library/fields/help/AnIndex             |   93 +-
 win32/deps/library/fields/help/aliases.rds         |  Bin 0 -> 2255 bytes
 win32/deps/library/fields/help/fields.rdb          |  Bin 0 -> 356112 bytes
 win32/deps/library/fields/help/fields.rdx          |  Bin 0 -> 1911 bytes
 win32/deps/library/fields/help/paths.rds           |  Bin 0 -> 734 bytes
 win32/deps/library/fields/html/00Index.html        |  133 +-
 win32/deps/library/fields/html/R.css               |   57 +
 win32/deps/library/fields/libs/i386/fields.dll     |  Bin 0 -> 39424 bytes
 win32/deps/library/fields/libs/i386/symbols.rds    |  Bin 0 -> 878 bytes
 win32/deps/library/fields/libs/x64/fields.dll      |  Bin 0 -> 46592 bytes
 win32/deps/library/fields/libs/x64/symbols.rds     |  Bin 0 -> 867 bytes
 win32/deps/library/foreign/COPYING                 |  340 --
 win32/deps/library/foreign/DESCRIPTION             |   67 +-
 win32/deps/library/foreign/LICENCE                 |    4 +-
 win32/deps/library/foreign/Meta/Rd.rds             |  Bin 741 -> 739 bytes
 win32/deps/library/foreign/Meta/hsearch.rds        |  Bin 726 -> 716 bytes
 win32/deps/library/foreign/Meta/links.rds          |  Bin 0 -> 287 bytes
 win32/deps/library/foreign/Meta/nsInfo.rds         |  Bin 388 -> 392 bytes
 win32/deps/library/foreign/Meta/package.rds        |  Bin 867 -> 1176 bytes
 win32/deps/library/foreign/R-ex/lookup.xport.R     |   13 -
 win32/deps/library/foreign/R-ex/read.S.R           |   13 -
 win32/deps/library/foreign/R-ex/read.dbf.R         |   13 -
 win32/deps/library/foreign/R-ex/read.dta.R         |   13 -
 win32/deps/library/foreign/R-ex/read.epiinfo.R     |   13 -
 win32/deps/library/foreign/R-ex/read.mtp.R         |   13 -
 win32/deps/library/foreign/R-ex/read.spss.R        |   18 -
 win32/deps/library/foreign/R-ex/read.ssd.R         |   28 -
 win32/deps/library/foreign/R-ex/read.systat.R      |   14 -
 win32/deps/library/foreign/R-ex/read.xport.R       |   13 -
 win32/deps/library/foreign/R-ex/write.arff.R       |   11 -
 win32/deps/library/foreign/R-ex/write.dbf.R        |   30 -
 win32/deps/library/foreign/R-ex/write.dta.R        |   12 -
 win32/deps/library/foreign/R-ex/write.foreign.R    |   17 -
 win32/deps/library/foreign/R/foreign               |    2 +-
 win32/deps/library/foreign/R/foreign.rdb           |  Bin 22591 -> 66577 bytes
 win32/deps/library/foreign/R/foreign.rdx           |  Bin 652 -> 672 bytes
 win32/deps/library/foreign/help/aliases.rds        |  Bin 0 -> 194 bytes
 win32/deps/library/foreign/help/foreign.rdb        |  Bin 0 -> 49842 bytes
 win32/deps/library/foreign/help/foreign.rdx        |  Bin 0 -> 468 bytes
 win32/deps/library/foreign/help/lookup.xport       |   43 -
 win32/deps/library/foreign/help/paths.rds          |  Bin 0 -> 228 bytes
 win32/deps/library/foreign/help/read.S             |   62 -
 win32/deps/library/foreign/help/read.arff          |   33 -
 win32/deps/library/foreign/help/read.dbf           |   70 -
 win32/deps/library/foreign/help/read.dta           |   95 -
 win32/deps/library/foreign/help/read.epiinfo       |   68 -
 win32/deps/library/foreign/help/read.mtp           |   37 -
 win32/deps/library/foreign/help/read.octave        |   45 -
 win32/deps/library/foreign/help/read.spss          |  140 -
 win32/deps/library/foreign/help/read.ssd           |   82 -
 win32/deps/library/foreign/help/read.systat        |   65 -
 win32/deps/library/foreign/help/read.xport         |   52 -
 win32/deps/library/foreign/help/write.arff         |   49 -
 win32/deps/library/foreign/help/write.dbf          |   92 -
 win32/deps/library/foreign/help/write.dta          |   98 -
 win32/deps/library/foreign/help/write.foreign      |   65 -
 win32/deps/library/foreign/html/00Index.html       |   59 +
 win32/deps/library/foreign/html/R.css              |   57 +
 win32/deps/library/foreign/libs/foreign.dll        |  Bin 107008 -> 0 bytes
 win32/deps/library/foreign/libs/i386/foreign.dll   |  Bin 0 -> 120832 bytes
 .../library/foreign/po/de/LC_MESSAGES/R-foreign.mo |  Bin 0 -> 4986 bytes
 .../library/foreign/po/de/LC_MESSAGES/foreign.mo   |  Bin 0 -> 21879 bytes
 .../foreign/po/en quot/LC_MESSAGES/R-foreign.mo    |  Bin 0 -> 4615 bytes
 .../foreign/po/en quot/LC_MESSAGES/foreign.mo      |  Bin 0 -> 20384 bytes
 .../library/foreign/po/fr/LC_MESSAGES/R-foreign.mo |  Bin 0 -> 5260 bytes
 .../library/foreign/po/fr/LC_MESSAGES/foreign.mo   |  Bin 0 -> 23301 bytes
 .../library/foreign/po/pl/LC_MESSAGES/R-foreign.mo |  Bin 0 -> 5189 bytes
 .../library/foreign/po/pl/LC_MESSAGES/foreign.mo   |  Bin 0 -> 22061 bytes
 win32/deps/library/foreign/tests/Alfalfa.xpt       |  Bin 0 -> 3520 bytes
 win32/deps/library/foreign/tests/S3.R              |    9 +
 win32/deps/library/foreign/tests/S3.Rout.save      |   59 +
 win32/deps/library/foreign/tests/arff.R            |    5 +
 win32/deps/library/foreign/tests/arff.Rout.save    |   36 +
 win32/deps/library/foreign/tests/auto8.dta         |  Bin 0 -> 5781 bytes
 win32/deps/library/foreign/tests/compressed.dta    |  Bin 0 -> 38646 bytes
 .../deps/library/foreign/tests/contact-lenses.arff |   85 +
 win32/deps/library/foreign/tests/create-dumpdata.S |    5 +
 win32/deps/library/foreign/tests/datefactor.dta    |  Bin 0 -> 1205 bytes
 win32/deps/library/foreign/tests/download.R        |    9 +
 win32/deps/library/foreign/tests/dumpdata          |   60 +
 win32/deps/library/foreign/tests/electric.por      |  123 +
 win32/deps/library/foreign/tests/electric.sav      |  Bin 0 -> 12388 bytes
 win32/deps/library/foreign/tests/ex1-51.mtp        |   15 +
 win32/deps/library/foreign/tests/minitab.R         |    7 +
 win32/deps/library/foreign/tests/minitab.Rout.save |   37 +
 win32/deps/library/foreign/tests/mySobj            |  Bin 0 -> 293 bytes
 win32/deps/library/foreign/tests/octave.R          |    5 +
 win32/deps/library/foreign/tests/octave.Rout.save  |   61 +
 win32/deps/library/foreign/tests/octave.dat        |  122 +
 win32/deps/library/foreign/tests/octave.m          |   22 +
 win32/deps/library/foreign/tests/pbc.por           |  340 ++
 win32/deps/library/foreign/tests/pbc.sav           |  Bin 0 -> 35232 bytes
 win32/deps/library/foreign/tests/pbc.sys           |  Bin 0 -> 42040 bytes
 win32/deps/library/foreign/tests/pbcold.sav        |  Bin 0 -> 35232 bytes
 win32/deps/library/foreign/tests/pc5.dta           |  Bin 0 -> 65013 bytes
 win32/deps/library/foreign/tests/sample100.por     |  106 +
 win32/deps/library/foreign/tests/sample100.sav     |  Bin 0 -> 11260 bytes
 win32/deps/library/foreign/tests/sas.R             |   11 +
 win32/deps/library/foreign/tests/spss.R            |   52 +
 win32/deps/library/foreign/tests/spss.Rout.save    |  327 ++
 win32/deps/library/foreign/tests/spss_long.sav     |  Bin 0 -> 497 bytes
 win32/deps/library/foreign/tests/stata.R           |   33 +
 win32/deps/library/foreign/tests/stata.Rout.save   |  308 ++
 win32/deps/library/foreign/tests/stata7se.dta      |  Bin 0 -> 603 bytes
 win32/deps/library/foreign/tests/stata8mac.dta     |  Bin 0 -> 603 bytes
 win32/deps/library/foreign/tests/sun6.dta          |  Bin 0 -> 37242 bytes
 win32/deps/library/foreign/tests/test.xpt          |  Bin 0 -> 1280 bytes
 win32/deps/library/foreign/tests/tsdumpdata        |  455 ++
 win32/deps/library/foreign/tests/xport.R           |    9 +
 win32/deps/library/foreign/tests/xport.Rout.save   |  115 +
 win32/deps/library/grDevices/DESCRIPTION           |    8 +-
 win32/deps/library/grDevices/INDEX                 |   22 +-
 win32/deps/library/grDevices/Meta/Rd.rds           |  Bin 2708 -> 3089 bytes
 win32/deps/library/grDevices/Meta/hsearch.rds      |  Bin 2653 -> 3033 bytes
 win32/deps/library/grDevices/Meta/links.rds        |  Bin 0 -> 1534 bytes
 win32/deps/library/grDevices/Meta/nsInfo.rds       |  Bin 1004 -> 1221 bytes
 win32/deps/library/grDevices/Meta/package.rds      |  Bin 530 -> 521 bytes
 win32/deps/library/grDevices/NAMESPACE             |   58 +-
 win32/deps/library/grDevices/R-ex/Rex.zip          |  Bin 20972 -> 0 bytes
 win32/deps/library/grDevices/R/grDevices           |    2 +-
 win32/deps/library/grDevices/R/grDevices.rdb       |  Bin 56184 -> 154510 bytes
 win32/deps/library/grDevices/R/grDevices.rdx       |  Bin 1962 -> 2501 bytes
 .../deps/library/grDevices/afm/CM_boldx_10.afm.gz  |  Bin 3053 -> 3053 bytes
 .../grDevices/afm/CM_boldx_italic_10.afm.gz        |  Bin 3149 -> 3149 bytes
 .../deps/library/grDevices/afm/CM_italic_10.afm.gz |  Bin 3048 -> 3048 bytes
 .../library/grDevices/afm/CM_regular_10.afm.gz     |  Bin 2953 -> 2953 bytes
 .../deps/library/grDevices/afm/CM_symbol_10.afm.gz |  Bin 2254 -> 2254 bytes
 .../deps/library/grDevices/afm/Courier-Bold.afm.gz |  Bin 3984 -> 3984 bytes
 .../grDevices/afm/Courier-BoldOblique.afm.gz       |  Bin 4112 -> 4112 bytes
 .../library/grDevices/afm/Courier-Oblique.afm.gz   |  Bin 4102 -> 4102 bytes
 win32/deps/library/grDevices/afm/Courier.afm.gz    |  Bin 3973 -> 3973 bytes
 .../library/grDevices/afm/Helvetica-Bold.afm.gz    |  Bin 13003 -> 13003 bytes
 .../grDevices/afm/Helvetica-BoldOblique.afm.gz     |  Bin 13213 -> 13213 bytes
 .../library/grDevices/afm/Helvetica-Oblique.afm.gz |  Bin 13825 -> 13825 bytes
 win32/deps/library/grDevices/afm/Helvetica.afm.gz  |  Bin 13638 -> 13638 bytes
 win32/deps/library/grDevices/afm/Symbol.afm.gz     |  Bin 3443 -> 3443 bytes
 win32/deps/library/grDevices/afm/Times-Bold.afm.gz |  Bin 12329 -> 12329 bytes
 .../library/grDevices/afm/Times-BoldItalic.afm.gz  |  Bin 11711 -> 11711 bytes
 .../deps/library/grDevices/afm/Times-Italic.afm.gz |  Bin 12658 -> 12658 bytes
 .../deps/library/grDevices/afm/Times-Roman.afm.gz  |  Bin 11845 -> 11845 bytes
 .../deps/library/grDevices/afm/ZapfDingbats.afm.gz |  Bin 2544 -> 2544 bytes
 win32/deps/library/grDevices/afm/a010013l.afm.gz   |  Bin 10225 -> 10225 bytes
 win32/deps/library/grDevices/afm/a010015l.afm.gz   |  Bin 10048 -> 10048 bytes
 win32/deps/library/grDevices/afm/a010033l.afm.gz   |  Bin 10273 -> 10273 bytes
 win32/deps/library/grDevices/afm/a010035l.afm.gz   |  Bin 10190 -> 10190 bytes
 win32/deps/library/grDevices/afm/agd_____.afm.gz   |  Bin 4903 -> 4903 bytes
 win32/deps/library/grDevices/afm/agdo____.afm.gz   |  Bin 4978 -> 4978 bytes
 win32/deps/library/grDevices/afm/agw_____.afm.gz   |  Bin 5059 -> 5059 bytes
 win32/deps/library/grDevices/afm/agwo____.afm.gz   |  Bin 5139 -> 5139 bytes
 win32/deps/library/grDevices/afm/b018012l.afm.gz   |  Bin 10253 -> 10253 bytes
 win32/deps/library/grDevices/afm/b018015l.afm.gz   |  Bin 10087 -> 10087 bytes
 win32/deps/library/grDevices/afm/b018032l.afm.gz   |  Bin 10361 -> 10361 bytes
 win32/deps/library/grDevices/afm/b018035l.afm.gz   |  Bin 10359 -> 10359 bytes
 win32/deps/library/grDevices/afm/bkd_____.afm.gz   |  Bin 4254 -> 4254 bytes
 win32/deps/library/grDevices/afm/bkdi____.afm.gz   |  Bin 4369 -> 4369 bytes
 win32/deps/library/grDevices/afm/bkl_____.afm.gz   |  Bin 4257 -> 4257 bytes
 win32/deps/library/grDevices/afm/bkli____.afm.gz   |  Bin 4331 -> 4331 bytes
 win32/deps/library/grDevices/afm/c059013l.afm.gz   |  Bin 10343 -> 10343 bytes
 win32/deps/library/grDevices/afm/c059016l.afm.gz   |  Bin 10247 -> 10247 bytes
 win32/deps/library/grDevices/afm/c059033l.afm.gz   |  Bin 10540 -> 10540 bytes
 win32/deps/library/grDevices/afm/c059036l.afm.gz   |  Bin 10474 -> 10474 bytes
 win32/deps/library/grDevices/afm/cmbxti10.afm.gz   |  Bin 2937 -> 2937 bytes
 win32/deps/library/grDevices/afm/cmti10.afm.gz     |  Bin 2915 -> 2915 bytes
 win32/deps/library/grDevices/afm/cob_____.afm.gz   |  Bin 3973 -> 3973 bytes
 win32/deps/library/grDevices/afm/cobo____.afm.gz   |  Bin 4084 -> 4084 bytes
 win32/deps/library/grDevices/afm/com_____.afm.gz   |  Bin 3972 -> 3972 bytes
 win32/deps/library/grDevices/afm/coo_____.afm.gz   |  Bin 4092 -> 4092 bytes
 win32/deps/library/grDevices/afm/hv______.afm.gz   |  Bin 4826 -> 4826 bytes
 win32/deps/library/grDevices/afm/hvb_____.afm.gz   |  Bin 4691 -> 4691 bytes
 win32/deps/library/grDevices/afm/hvbo____.afm.gz   |  Bin 4833 -> 4833 bytes
 win32/deps/library/grDevices/afm/hvn_____.afm.gz   |  Bin 4810 -> 4810 bytes
 win32/deps/library/grDevices/afm/hvnb____.afm.gz   |  Bin 4675 -> 4675 bytes
 win32/deps/library/grDevices/afm/hvnbo___.afm.gz   |  Bin 4826 -> 4826 bytes
 win32/deps/library/grDevices/afm/hvno____.afm.gz   |  Bin 4963 -> 4963 bytes
 win32/deps/library/grDevices/afm/hvo_____.afm.gz   |  Bin 4977 -> 4977 bytes
 win32/deps/library/grDevices/afm/n019003l.afm.gz   |  Bin 10217 -> 10217 bytes
 win32/deps/library/grDevices/afm/n019004l.afm.gz   |  Bin 10045 -> 10045 bytes
 win32/deps/library/grDevices/afm/n019023l.afm.gz   |  Bin 10484 -> 10484 bytes
 win32/deps/library/grDevices/afm/n019024l.afm.gz   |  Bin 10323 -> 10323 bytes
 win32/deps/library/grDevices/afm/n019043l.afm.gz   |  Bin 10095 -> 10095 bytes
 win32/deps/library/grDevices/afm/n019044l.afm.gz   |  Bin 9785 -> 9785 bytes
 win32/deps/library/grDevices/afm/n019063l.afm.gz   |  Bin 10284 -> 10284 bytes
 win32/deps/library/grDevices/afm/n019064l.afm.gz   |  Bin 10166 -> 10166 bytes
 win32/deps/library/grDevices/afm/n021003l.afm.gz   |  Bin 10539 -> 10539 bytes
 win32/deps/library/grDevices/afm/n021004l.afm.gz   |  Bin 10355 -> 10355 bytes
 win32/deps/library/grDevices/afm/n021023l.afm.gz   |  Bin 10545 -> 10545 bytes
 win32/deps/library/grDevices/afm/n021024l.afm.gz   |  Bin 10525 -> 10525 bytes
 win32/deps/library/grDevices/afm/n022003l.afm.gz   |  Bin 5477 -> 5477 bytes
 win32/deps/library/grDevices/afm/n022004l.afm.gz   |  Bin 5574 -> 5574 bytes
 win32/deps/library/grDevices/afm/n022023l.afm.gz   |  Bin 5872 -> 5872 bytes
 win32/deps/library/grDevices/afm/n022024l.afm.gz   |  Bin 5854 -> 5854 bytes
 win32/deps/library/grDevices/afm/ncb_____.afm.gz   |  Bin 4281 -> 4281 bytes
 win32/deps/library/grDevices/afm/ncbi____.afm.gz   |  Bin 4921 -> 4921 bytes
 win32/deps/library/grDevices/afm/nci_____.afm.gz   |  Bin 4519 -> 4519 bytes
 win32/deps/library/grDevices/afm/ncr_____.afm.gz   |  Bin 4453 -> 4453 bytes
 win32/deps/library/grDevices/afm/p052003l.afm.gz   |  Bin 10421 -> 10421 bytes
 win32/deps/library/grDevices/afm/p052004l.afm.gz   |  Bin 10230 -> 10230 bytes
 win32/deps/library/grDevices/afm/p052023l.afm.gz   |  Bin 10524 -> 10524 bytes
 win32/deps/library/grDevices/afm/p052024l.afm.gz   |  Bin 10281 -> 10281 bytes
 win32/deps/library/grDevices/afm/pob_____.afm.gz   |  Bin 4395 -> 4395 bytes
 win32/deps/library/grDevices/afm/pobi____.afm.gz   |  Bin 4432 -> 4432 bytes
 win32/deps/library/grDevices/afm/poi_____.afm.gz   |  Bin 4454 -> 4454 bytes
 win32/deps/library/grDevices/afm/por_____.afm.gz   |  Bin 4486 -> 4486 bytes
 win32/deps/library/grDevices/afm/s050000l.afm.gz   |  Bin 3383 -> 3383 bytes
 win32/deps/library/grDevices/afm/sy______.afm.gz   |  Bin 3398 -> 3398 bytes
 win32/deps/library/grDevices/afm/tib_____.afm.gz   |  Bin 5005 -> 5005 bytes
 win32/deps/library/grDevices/afm/tibi____.afm.gz   |  Bin 5102 -> 5102 bytes
 win32/deps/library/grDevices/afm/tii_____.afm.gz   |  Bin 5107 -> 5107 bytes
 win32/deps/library/grDevices/afm/tir_____.afm.gz   |  Bin 4983 -> 4983 bytes
 win32/deps/library/grDevices/help/AnIndex          |   22 +
 win32/deps/library/grDevices/help/Rhelp.zip        |  Bin 87423 -> 0 bytes
 win32/deps/library/grDevices/help/aliases.rds      |  Bin 0 -> 1291 bytes
 win32/deps/library/grDevices/help/grDevices.rdb    |  Bin 0 -> 310263 bytes
 win32/deps/library/grDevices/help/grDevices.rdx    |  Bin 0 -> 1596 bytes
 win32/deps/library/grDevices/help/paths.rds        |  Bin 0 -> 646 bytes
 win32/deps/library/grDevices/html/00Index.html     |  455 ++
 win32/deps/library/grDevices/html/R.css            |   57 +
 win32/deps/library/grDevices/icc/srgb              |  200 +
 win32/deps/library/grDevices/icc/srgb.flate        |  Bin 0 -> 2680 bytes
 win32/deps/library/grDevices/libs/Rbitmap.dll      |  Bin 483328 -> 0 bytes
 win32/deps/library/grDevices/libs/grDevices.dll    |  Bin 214528 -> 0 bytes
 win32/deps/library/grDevices/libs/i386/Rbitmap.dll |  Bin 0 -> 536576 bytes
 .../deps/library/grDevices/libs/i386/grDevices.dll |  Bin 0 -> 239616 bytes
 .../deps/library/grDevices/libs/i386/winCairo.dll  |  Bin 0 -> 993280 bytes
 .../grDevices/po/da/LC_MESSAGES/R-grDevices.mo     |  Bin 0 -> 12591 bytes
 .../grDevices/po/da/LC_MESSAGES/grDevices.mo       |  Bin 0 -> 13555 bytes
 .../grDevices/po/de/LC_MESSAGES/R-grDevices.mo     |  Bin 0 -> 13006 bytes
 .../grDevices/po/de/LC_MESSAGES/grDevices.mo       |  Bin 0 -> 14960 bytes
 .../po/en quot/LC_MESSAGES/R-grDevices.mo          |  Bin 0 -> 12352 bytes
 .../grDevices/po/en quot/LC_MESSAGES/grDevices.mo  |  Bin 0 -> 13930 bytes
 .../grDevices/po/en_GB/LC_MESSAGES/R-grDevices.mo  |  Bin 0 -> 506 bytes
 .../grDevices/po/en_GB/LC_MESSAGES/grDevices.mo    |  Bin 0 -> 847 bytes
 .../grDevices/po/fr/LC_MESSAGES/R-grDevices.mo     |  Bin 0 -> 13623 bytes
 .../grDevices/po/fr/LC_MESSAGES/grDevices.mo       |  Bin 0 -> 15459 bytes
 .../grDevices/po/it/LC_MESSAGES/R-grDevices.mo     |  Bin 0 -> 7454 bytes
 .../grDevices/po/it/LC_MESSAGES/grDevices.mo       |  Bin 0 -> 7834 bytes
 .../grDevices/po/ja/LC_MESSAGES/R-grDevices.mo     |  Bin 0 -> 15081 bytes
 .../grDevices/po/ja/LC_MESSAGES/grDevices.mo       |  Bin 0 -> 17700 bytes
 .../grDevices/po/ko/LC_MESSAGES/R-grDevices.mo     |  Bin 0 -> 14623 bytes
 .../grDevices/po/ko/LC_MESSAGES/grDevices.mo       |  Bin 0 -> 16637 bytes
 .../grDevices/po/pl/LC_MESSAGES/R-grDevices.mo     |  Bin 0 -> 13806 bytes
 .../grDevices/po/pl/LC_MESSAGES/grDevices.mo       |  Bin 0 -> 15395 bytes
 .../grDevices/po/pt_BR/LC_MESSAGES/R-grDevices.mo  |  Bin 0 -> 12083 bytes
 .../grDevices/po/pt_BR/LC_MESSAGES/grDevices.mo    |  Bin 0 -> 2888 bytes
 .../grDevices/po/ru/LC_MESSAGES/R-grDevices.mo     |  Bin 0 -> 13215 bytes
 .../grDevices/po/ru/LC_MESSAGES/grDevices.mo       |  Bin 0 -> 14500 bytes
 .../grDevices/po/zh_CN/LC_MESSAGES/R-grDevices.mo  |  Bin 0 -> 11631 bytes
 .../grDevices/po/zh_CN/LC_MESSAGES/grDevices.mo    |  Bin 0 -> 13271 bytes
 win32/deps/library/grDevices/tests/ps-tests.R      |   39 +
 .../library/grDevices/tests/ps-tests.Rout.save     |   95 +
 win32/deps/library/grDevices/tests/xfig-tests.R    |   84 +
 .../library/grDevices/tests/xfig-tests.Rout.save   |  102 +
 win32/deps/library/graphics/DESCRIPTION            |    8 +-
 win32/deps/library/graphics/INDEX                  |   10 +-
 win32/deps/library/graphics/Meta/Rd.rds            |  Bin 3142 -> 3161 bytes
 win32/deps/library/graphics/Meta/demo.rds          |  Bin 261 -> 261 bytes
 win32/deps/library/graphics/Meta/hsearch.rds       |  Bin 3113 -> 3125 bytes
 win32/deps/library/graphics/Meta/links.rds         |  Bin 0 -> 1310 bytes
 win32/deps/library/graphics/Meta/nsInfo.rds        |  Bin 828 -> 869 bytes
 win32/deps/library/graphics/Meta/package.rds       |  Bin 530 -> 511 bytes
 win32/deps/library/graphics/NAMESPACE              |   22 +-
 win32/deps/library/graphics/R-ex/Rex.zip           |  Bin 38310 -> 0 bytes
 win32/deps/library/graphics/R/graphics             |    2 +-
 win32/deps/library/graphics/R/graphics.rdb         |  Bin 84702 -> 246572 bytes
 win32/deps/library/graphics/R/graphics.rdx         |  Bin 1669 -> 1770 bytes
 win32/deps/library/graphics/demo/Hershey.R         |    2 +
 win32/deps/library/graphics/demo/Japanese.R        |    2 +
 win32/deps/library/graphics/demo/graphics.R        |    2 +
 win32/deps/library/graphics/demo/image.R           |    2 +
 win32/deps/library/graphics/demo/persp.R           |    7 +-
 win32/deps/library/graphics/demo/plotmath.R        |    2 +
 win32/deps/library/graphics/help/AnIndex           |   25 +-
 win32/deps/library/graphics/help/Rhelp.zip         |  Bin 137048 -> 0 bytes
 win32/deps/library/graphics/help/aliases.rds       |  Bin 0 -> 988 bytes
 win32/deps/library/graphics/help/figures/mai.pdf   |  Bin 0 -> 2541 bytes
 win32/deps/library/graphics/help/figures/mai.png   |  Bin 0 -> 4667 bytes
 win32/deps/library/graphics/help/figures/oma.pdf   |  Bin 0 -> 3763 bytes
 win32/deps/library/graphics/help/figures/oma.png   |  Bin 0 -> 5114 bytes
 win32/deps/library/graphics/help/figures/pch.pdf   |  Bin 0 -> 4994 bytes
 win32/deps/library/graphics/help/figures/pch.png   |  Bin 0 -> 9287 bytes
 win32/deps/library/graphics/help/figures/pch.svg   |  185 +
 win32/deps/library/graphics/help/graphics.rdb      |  Bin 0 -> 451705 bytes
 win32/deps/library/graphics/help/graphics.rdx      |  Bin 0 -> 1642 bytes
 win32/deps/library/graphics/help/paths.rds         |  Bin 0 -> 608 bytes
 win32/deps/library/graphics/html/00Index.html      |  220 +
 win32/deps/library/graphics/html/R.css             |   57 +
 .../graphics/po/da/LC_MESSAGES/R-graphics.mo       |  Bin 0 -> 1255 bytes
 .../graphics/po/de/LC_MESSAGES/R-graphics.mo       |  Bin 0 -> 14924 bytes
 .../graphics/po/en quot/LC_MESSAGES/R-graphics.mo  |  Bin 0 -> 14366 bytes
 .../graphics/po/fr/LC_MESSAGES/R-graphics.mo       |  Bin 0 -> 15267 bytes
 .../graphics/po/it/LC_MESSAGES/R-graphics.mo       |  Bin 0 -> 10368 bytes
 .../graphics/po/ja/LC_MESSAGES/R-graphics.mo       |  Bin 0 -> 17179 bytes
 .../graphics/po/ko/LC_MESSAGES/R-graphics.mo       |  Bin 0 -> 16882 bytes
 .../graphics/po/pl/LC_MESSAGES/R-graphics.mo       |  Bin 0 -> 15486 bytes
 .../graphics/po/pt_BR/LC_MESSAGES/R-graphics.mo    |  Bin 0 -> 13893 bytes
 .../graphics/po/ru/LC_MESSAGES/R-graphics.mo       |  Bin 0 -> 15030 bytes
 .../graphics/po/zh_CN/LC_MESSAGES/R-graphics.mo    |  Bin 0 -> 13422 bytes
 win32/deps/library/grid/DESCRIPTION                |    8 +-
 win32/deps/library/grid/INDEX                      |   14 +-
 win32/deps/library/grid/Meta/Rd.rds                |  Bin 2878 -> 3246 bytes
 win32/deps/library/grid/Meta/hsearch.rds           |  Bin 2816 -> 3159 bytes
 win32/deps/library/grid/Meta/links.rds             |  Bin 0 -> 1732 bytes
 win32/deps/library/grid/Meta/nsInfo.rds            |  Bin 1669 -> 1847 bytes
 win32/deps/library/grid/Meta/package.rds           |  Bin 601 -> 597 bytes
 win32/deps/library/grid/Meta/vignette.rds          |  Bin 667 -> 603 bytes
 win32/deps/library/grid/NAMESPACE                  |   69 +-
 win32/deps/library/grid/R-ex/Rex.zip               |  Bin 15242 -> 0 bytes
 win32/deps/library/grid/R/grid                     |    2 +-
 win32/deps/library/grid/R/grid.rdb                 |  Bin 143405 -> 346827 bytes
 win32/deps/library/grid/R/grid.rdx                 |  Bin 6759 -> 8002 bytes
 win32/deps/library/grid/doc/changes.txt            | 1374 +++++
 win32/deps/library/grid/doc/displaylist.R          |  130 +
 win32/deps/library/grid/doc/displaylist.Rnw        |  243 +
 win32/deps/library/grid/doc/displaylist.pdf        |  Bin 0 -> 157254 bytes
 win32/deps/library/grid/doc/frame.R                |  148 +
 win32/deps/library/grid/doc/frame.Rnw              |  384 ++
 win32/deps/library/grid/doc/frame.pdf              |  Bin 0 -> 155783 bytes
 win32/deps/library/grid/doc/grid.R                 |  329 ++
 win32/deps/library/grid/doc/grid.Rnw               |  751 +++
 win32/deps/library/grid/doc/grid.pdf               |  Bin 0 -> 251352 bytes
 win32/deps/library/grid/doc/grobs.R                |  313 ++
 win32/deps/library/grid/doc/grobs.Rnw              |  482 ++
 win32/deps/library/grid/doc/grobs.pdf              |  Bin 0 -> 107015 bytes
 win32/deps/library/grid/doc/index.html             |   87 +
 win32/deps/library/grid/doc/interactive.R          |   90 +
 win32/deps/library/grid/doc/interactive.Rnw        |  132 +
 win32/deps/library/grid/doc/interactive.pdf        |  Bin 0 -> 90763 bytes
 win32/deps/library/grid/doc/locndimn.R             |   72 +
 win32/deps/library/grid/doc/locndimn.Rnw           |  117 +
 win32/deps/library/grid/doc/locndimn.pdf           |  Bin 0 -> 89405 bytes
 win32/deps/library/grid/doc/moveline.R             |   30 +
 win32/deps/library/grid/doc/moveline.Rnw           |   64 +
 win32/deps/library/grid/doc/moveline.pdf           |  Bin 0 -> 87188 bytes
 win32/deps/library/grid/doc/nonfinite.R            |   73 +
 win32/deps/library/grid/doc/nonfinite.Rnw          |  135 +
 win32/deps/library/grid/doc/nonfinite.pdf          |  Bin 0 -> 79443 bytes
 win32/deps/library/grid/doc/plotexample.R          |  465 ++
 win32/deps/library/grid/doc/plotexample.Rnw        |  582 ++
 win32/deps/library/grid/doc/plotexample.pdf        |  Bin 0 -> 223488 bytes
 win32/deps/library/grid/doc/rotated.R              |  188 +
 win32/deps/library/grid/doc/rotated.Rnw            |  156 +
 win32/deps/library/grid/doc/rotated.pdf            |  Bin 0 -> 121860 bytes
 win32/deps/library/grid/doc/saveload.R             |   40 +
 win32/deps/library/grid/doc/saveload.Rnw           |  110 +
 win32/deps/library/grid/doc/saveload.pdf           |  Bin 0 -> 133777 bytes
 win32/deps/library/grid/doc/sharing.R              |  140 +
 win32/deps/library/grid/doc/sharing.Rnw            |  110 +
 win32/deps/library/grid/doc/sharing.pdf            |  Bin 0 -> 70754 bytes
 win32/deps/library/grid/doc/viewports.R            |  288 +
 win32/deps/library/grid/doc/viewports.Rnw          |  332 ++
 win32/deps/library/grid/doc/viewports.pdf          |  Bin 0 -> 162850 bytes
 win32/deps/library/grid/help/AnIndex               |   22 +
 win32/deps/library/grid/help/Rhelp.zip             |  Bin 71956 -> 0 bytes
 win32/deps/library/grid/help/aliases.rds           |  Bin 0 -> 1385 bytes
 win32/deps/library/grid/help/grid.rdb              |  Bin 0 -> 248821 bytes
 win32/deps/library/grid/help/grid.rdx              |  Bin 0 -> 1890 bytes
 win32/deps/library/grid/help/paths.rds             |  Bin 0 -> 725 bytes
 win32/deps/library/grid/html/00Index.html          |  504 ++
 win32/deps/library/grid/html/R.css                 |   57 +
 win32/deps/library/grid/libs/grid.dll              |  Bin 105984 -> 0 bytes
 win32/deps/library/grid/libs/i386/grid.dll         |  Bin 0 -> 135680 bytes
 .../deps/library/grid/po/da/LC_MESSAGES/R-grid.mo  |  Bin 0 -> 2664 bytes
 win32/deps/library/grid/po/da/LC_MESSAGES/grid.mo  |  Bin 0 -> 2397 bytes
 .../deps/library/grid/po/de/LC_MESSAGES/R-grid.mo  |  Bin 0 -> 16996 bytes
 win32/deps/library/grid/po/de/LC_MESSAGES/grid.mo  |  Bin 0 -> 2487 bytes
 .../library/grid/po/en quot/LC_MESSAGES/R-grid.mo  |  Bin 0 -> 16420 bytes
 .../library/grid/po/en quot/LC_MESSAGES/grid.mo    |  Bin 0 -> 2284 bytes
 .../deps/library/grid/po/fr/LC_MESSAGES/R-grid.mo  |  Bin 0 -> 17214 bytes
 win32/deps/library/grid/po/fr/LC_MESSAGES/grid.mo  |  Bin 0 -> 2528 bytes
 win32/deps/library/grid/po/it/LC_MESSAGES/grid.mo  |  Bin 0 -> 1775 bytes
 .../deps/library/grid/po/ja/LC_MESSAGES/R-grid.mo  |  Bin 0 -> 19899 bytes
 win32/deps/library/grid/po/ja/LC_MESSAGES/grid.mo  |  Bin 0 -> 2874 bytes
 .../deps/library/grid/po/ko/LC_MESSAGES/R-grid.mo  |  Bin 0 -> 18913 bytes
 win32/deps/library/grid/po/ko/LC_MESSAGES/grid.mo  |  Bin 0 -> 2876 bytes
 .../deps/library/grid/po/pl/LC_MESSAGES/R-grid.mo  |  Bin 0 -> 17543 bytes
 win32/deps/library/grid/po/pl/LC_MESSAGES/grid.mo  |  Bin 0 -> 2711 bytes
 .../library/grid/po/pt_BR/LC_MESSAGES/R-grid.mo    |  Bin 0 -> 16197 bytes
 .../deps/library/grid/po/pt_BR/LC_MESSAGES/grid.mo |  Bin 0 -> 2634 bytes
 .../deps/library/grid/po/ru/LC_MESSAGES/R-grid.mo  |  Bin 0 -> 16563 bytes
 win32/deps/library/grid/po/ru/LC_MESSAGES/grid.mo  |  Bin 0 -> 2519 bytes
 .../library/grid/po/zh_CN/LC_MESSAGES/R-grid.mo    |  Bin 0 -> 15473 bytes
 .../deps/library/grid/po/zh_CN/LC_MESSAGES/grid.mo |  Bin 0 -> 2331 bytes
 win32/deps/library/grid/tests/bugs.R               |   30 +
 win32/deps/library/grid/tests/reg.R                |  433 ++
 win32/deps/library/grid/tests/testls.R             |  158 +
 win32/deps/library/grid/tests/testls.Rout.save     |  340 ++
 win32/deps/library/grid/tests/units.R              |  135 +
 win32/deps/library/lattice/CITATION                |   17 +
 win32/deps/library/lattice/COPYING                 |  340 --
 win32/deps/library/lattice/DESCRIPTION             |   45 +-
 win32/deps/library/lattice/INDEX                   |  138 +-
 win32/deps/library/lattice/LICENSE                 |   16 +
 win32/deps/library/lattice/Meta/Rd.rds             |  Bin 3281 -> 3521 bytes
 win32/deps/library/lattice/Meta/data.rds           |  Bin 257 -> 252 bytes
 win32/deps/library/lattice/Meta/demo.rds           |  Bin 164 -> 160 bytes
 win32/deps/library/lattice/Meta/hsearch.rds        |  Bin 3198 -> 3582 bytes
 win32/deps/library/lattice/Meta/links.rds          |  Bin 0 -> 1938 bytes
 win32/deps/library/lattice/Meta/nsInfo.rds         |  Bin 1646 -> 1751 bytes
 win32/deps/library/lattice/Meta/package.rds        |  Bin 816 -> 983 bytes
 win32/deps/library/lattice/NAMESPACE               |  134 +-
 win32/deps/library/lattice/NEWS                    |  169 +-
 win32/deps/library/lattice/R-ex/Rex.zip            |  Bin 20864 -> 0 bytes
 win32/deps/library/lattice/R/lattice               |    2 +-
 win32/deps/library/lattice/R/lattice.rdb           |  Bin 166001 -> 504538 bytes
 win32/deps/library/lattice/R/lattice.rdx           |  Bin 3589 -> 3999 bytes
 win32/deps/library/lattice/data/Rdata.rdb          |  Bin 5126 -> 4076 bytes
 win32/deps/library/lattice/data/Rdata.rds          |  Bin 122 -> 125 bytes
 win32/deps/library/lattice/data/Rdata.rdx          |  Bin 201 -> 203 bytes
 win32/deps/library/lattice/demo/lattice.R          |   51 +-
 win32/deps/library/lattice/help/AnIndex            |   14 +-
 win32/deps/library/lattice/help/Rhelp.zip          |  Bin 132536 -> 0 bytes
 win32/deps/library/lattice/help/aliases.rds        |  Bin 0 -> 1756 bytes
 win32/deps/library/lattice/help/lattice.rdb        |  Bin 0 -> 450617 bytes
 win32/deps/library/lattice/help/lattice.rdx        |  Bin 0 -> 1562 bytes
 win32/deps/library/lattice/help/paths.rds          |  Bin 0 -> 639 bytes
 win32/deps/library/lattice/html/00Index.html       |  591 ++
 win32/deps/library/lattice/html/R.css              |   57 +
 win32/deps/library/lattice/libs/i386/lattice.dll   |  Bin 0 -> 20480 bytes
 win32/deps/library/lattice/libs/lattice.dll        |  Bin 11776 -> 0 bytes
 .../library/lattice/po/de/LC_MESSAGES/R-lattice.mo |  Bin 0 -> 13307 bytes
 .../lattice/po/en quot/LC_MESSAGES/R-lattice.mo    |  Bin 0 -> 9746 bytes
 .../library/lattice/po/fr/LC_MESSAGES/R-lattice.mo |  Bin 0 -> 7959 bytes
 win32/deps/library/lattice/tests/MASSch04.R        |  179 +
 win32/deps/library/lattice/tests/dates.R           |   25 +
 win32/deps/library/lattice/tests/dotplotscoping.R  |   13 +
 win32/deps/library/lattice/tests/levelplot.R       |  115 +
 win32/deps/library/lattice/tests/scales.R          |  174 +
 win32/deps/library/lattice/tests/temp.R            |  141 +
 win32/deps/library/lattice/tests/test.R            |  137 +
 win32/deps/library/lattice/tests/wireframe.R       |  113 +
 win32/deps/library/methods/DESCRIPTION             |   17 +-
 win32/deps/library/methods/INDEX                   |   26 +-
 win32/deps/library/methods/Meta/Rd.rds             |  Bin 4991 -> 5499 bytes
 win32/deps/library/methods/Meta/hsearch.rds        |  Bin 5023 -> 5575 bytes
 win32/deps/library/methods/Meta/links.rds          |  Bin 0 -> 3898 bytes
 win32/deps/library/methods/Meta/nsInfo.rds         |  Bin 1572 -> 1700 bytes
 win32/deps/library/methods/Meta/package.rds        |  Bin 667 -> 631 bytes
 win32/deps/library/methods/NAMESPACE               |   40 +-
 win32/deps/library/methods/R-ex/Rex.zip            |  Bin 27635 -> 0 bytes
 win32/deps/library/methods/R/methods               |    2 +-
 win32/deps/library/methods/R/methods.rdb           |  Bin 456919 -> 1076889 bytes
 win32/deps/library/methods/R/methods.rdx           |  Bin 11297 -> 13552 bytes
 win32/deps/library/methods/help/AnIndex            |   55 +-
 win32/deps/library/methods/help/Rhelp.zip          |  Bin 140773 -> 0 bytes
 win32/deps/library/methods/help/aliases.rds        |  Bin 0 -> 4004 bytes
 win32/deps/library/methods/help/methods.rdb        |  Bin 0 -> 476158 bytes
 win32/deps/library/methods/help/methods.rdx        |  Bin 0 -> 1838 bytes
 win32/deps/library/methods/help/paths.rds          |  Bin 0 -> 779 bytes
 win32/deps/library/methods/html/00Index.html       |  703 +++
 win32/deps/library/methods/html/R.css              |   57 +
 win32/deps/library/methods/libs/i386/methods.dll   |  Bin 0 -> 35840 bytes
 win32/deps/library/methods/libs/methods.dll        |  Bin 41984 -> 0 bytes
 .../library/methods/po/da/LC_MESSAGES/R-methods.mo |  Bin 0 -> 3178 bytes
 .../library/methods/po/da/LC_MESSAGES/methods.mo   |  Bin 0 -> 5891 bytes
 .../library/methods/po/de/LC_MESSAGES/R-methods.mo |  Bin 0 -> 70618 bytes
 .../library/methods/po/de/LC_MESSAGES/methods.mo   |  Bin 0 -> 6219 bytes
 .../methods/po/en quot/LC_MESSAGES/R-methods.mo    |  Bin 0 -> 66548 bytes
 .../methods/po/en quot/LC_MESSAGES/methods.mo      |  Bin 0 -> 5908 bytes
 .../library/methods/po/fr/LC_MESSAGES/R-methods.mo |  Bin 0 -> 73672 bytes
 .../library/methods/po/fr/LC_MESSAGES/methods.mo   |  Bin 0 -> 6643 bytes
 .../library/methods/po/ja/LC_MESSAGES/R-methods.mo |  Bin 0 -> 81510 bytes
 .../library/methods/po/ja/LC_MESSAGES/methods.mo   |  Bin 0 -> 7131 bytes
 .../library/methods/po/ko/LC_MESSAGES/R-methods.mo |  Bin 0 -> 72400 bytes
 .../library/methods/po/ko/LC_MESSAGES/methods.mo   |  Bin 0 -> 6917 bytes
 .../library/methods/po/pl/LC_MESSAGES/R-methods.mo |  Bin 0 -> 69598 bytes
 .../library/methods/po/pl/LC_MESSAGES/methods.mo   |  Bin 0 -> 6246 bytes
 .../methods/po/pt_BR/LC_MESSAGES/R-methods.mo      |  Bin 0 -> 9875 bytes
 .../methods/po/pt_BR/LC_MESSAGES/methods.mo        |  Bin 0 -> 6366 bytes
 .../library/methods/po/ru/LC_MESSAGES/R-methods.mo |  Bin 0 -> 67565 bytes
 .../library/methods/po/ru/LC_MESSAGES/methods.mo   |  Bin 0 -> 6021 bytes
 .../methods/po/zh_CN/LC_MESSAGES/R-methods.mo      |  Bin 0 -> 49243 bytes
 .../methods/po/zh_CN/LC_MESSAGES/methods.mo        |  Bin 0 -> 5598 bytes
 win32/deps/library/methods/tests/S3.R              |   29 +
 win32/deps/library/methods/tests/basicRefClass.R   |  502 ++
 win32/deps/library/methods/tests/duplicateClass.R  |   27 +
 .../deps/library/methods/tests/fieldAssignments.R  |   30 +
 win32/deps/library/methods/tests/mixinInitialize.R |   65 +
 win32/deps/library/methods/tests/namesAndSlots.R   |   16 +
 win32/deps/library/methods/tests/nextWithDots.R    |   20 +
 win32/deps/library/methods/tests/refClassExample.R |   51 +
 .../deps/library/methods/tests/testConditionalIs.R |   38 +
 .../deps/library/methods/tests/testGroupGeneric.R  |   23 +
 win32/deps/library/methods/tests/testIs.R          |   31 +
 win32/deps/library/mgcv/CITATION                   |   35 +-
 win32/deps/library/mgcv/DESCRIPTION                |   37 +-
 win32/deps/library/mgcv/Meta/Rd.rds                |  Bin 3238 -> 4310 bytes
 win32/deps/library/mgcv/Meta/data.rds              |  Bin 0 -> 121 bytes
 win32/deps/library/mgcv/Meta/hsearch.rds           |  Bin 3024 -> 4267 bytes
 win32/deps/library/mgcv/Meta/links.rds             |  Bin 0 -> 1789 bytes
 win32/deps/library/mgcv/Meta/nsInfo.rds            |  Bin 1454 -> 1502 bytes
 win32/deps/library/mgcv/Meta/package.rds           |  Bin 869 -> 896 bytes
 win32/deps/library/mgcv/NAMESPACE                  |   72 +-
 win32/deps/library/mgcv/R-ex/Rex.zip               |  Bin 36485 -> 0 bytes
 win32/deps/library/mgcv/R/mgcv                     |    2 +-
 win32/deps/library/mgcv/R/mgcv.rdb                 |  Bin 130698 -> 710851 bytes
 win32/deps/library/mgcv/R/mgcv.rdx                 |  Bin 2152 -> 3621 bytes
 win32/deps/library/mgcv/data/columb.polys.rda      |  Bin 0 -> 8262 bytes
 win32/deps/library/mgcv/data/columb.rda            |  Bin 0 -> 2889 bytes
 win32/deps/library/mgcv/help/AnIndex               |   50 +-
 win32/deps/library/mgcv/help/Rhelp.zip             |  Bin 155523 -> 0 bytes
 win32/deps/library/mgcv/help/aliases.rds           |  Bin 0 -> 1374 bytes
 win32/deps/library/mgcv/help/mgcv.rdb              |  Bin 0 -> 525293 bytes
 win32/deps/library/mgcv/help/mgcv.rdx              |  Bin 0 -> 2263 bytes
 win32/deps/library/mgcv/help/paths.rds             |  Bin 0 -> 872 bytes
 win32/deps/library/mgcv/html/00Index.html          |  467 ++
 win32/deps/library/mgcv/html/R.css                 |   57 +
 win32/deps/library/mgcv/libs/i386/mgcv.dll         |  Bin 0 -> 216576 bytes
 win32/deps/library/mgcv/libs/mgcv.dll              |  Bin 260608 -> 0 bytes
 win32/deps/library/nlme/CITATION                   |    9 +-
 win32/deps/library/nlme/COPYING                    |  340 --
 win32/deps/library/nlme/DESCRIPTION                |   49 +-
 win32/deps/library/nlme/LICENCE                    |    2 +-
 win32/deps/library/nlme/Meta/Rd.rds                |  Bin 8777 -> 8585 bytes
 win32/deps/library/nlme/Meta/data.rds              |  Bin 1073 -> 1059 bytes
 win32/deps/library/nlme/Meta/hsearch.rds           |  Bin 8434 -> 8259 bytes
 win32/deps/library/nlme/Meta/links.rds             |  Bin 0 -> 4630 bytes
 win32/deps/library/nlme/Meta/nsInfo.rds            |  Bin 1953 -> 1937 bytes
 win32/deps/library/nlme/Meta/package.rds           |  Bin 837 -> 935 bytes
 win32/deps/library/nlme/NAMESPACE                  |   11 +-
 win32/deps/library/nlme/R-ex/Rex.zip               |  Bin 91485 -> 0 bytes
 win32/deps/library/nlme/R/nlme                     |    2 +-
 win32/deps/library/nlme/R/nlme.rdb                 |  Bin 273422 -> 732450 bytes
 win32/deps/library/nlme/R/nlme.rdx                 |  Bin 6032 -> 6207 bytes
 win32/deps/library/nlme/data/Rdata.rdb             |  Bin 271454 -> 157230 bytes
 win32/deps/library/nlme/data/Rdata.rds             |  Bin 459 -> 457 bytes
 win32/deps/library/nlme/data/Rdata.rdx             |  Bin 828 -> 824 bytes
 win32/deps/library/nlme/help/AnIndex               |    9 -
 win32/deps/library/nlme/help/Rhelp.zip             |  Bin 349840 -> 0 bytes
 win32/deps/library/nlme/help/aliases.rds           |  Bin 0 -> 3325 bytes
 win32/deps/library/nlme/help/nlme.rdb              |  Bin 0 -> 911546 bytes
 win32/deps/library/nlme/help/nlme.rdx              |  Bin 0 -> 5750 bytes
 win32/deps/library/nlme/help/paths.rds             |  Bin 0 -> 2004 bytes
 win32/deps/library/nlme/html/00Index.html          | 1230 +++++
 win32/deps/library/nlme/html/R.css                 |   57 +
 win32/deps/library/nlme/libs/i386/nlme.dll         |  Bin 0 -> 68608 bytes
 win32/deps/library/nlme/libs/nlme.dll              |  Bin 53760 -> 0 bytes
 .../deps/library/nlme/po/de/LC_MESSAGES/R-nlme.mo  |  Bin 0 -> 42667 bytes
 win32/deps/library/nlme/po/de/LC_MESSAGES/nlme.mo  |  Bin 0 -> 1715 bytes
 .../library/nlme/po/en quot/LC_MESSAGES/R-nlme.mo  |  Bin 0 -> 40211 bytes
 .../library/nlme/po/en quot/LC_MESSAGES/nlme.mo    |  Bin 0 -> 1584 bytes
 .../deps/library/nlme/po/fr/LC_MESSAGES/R-nlme.mo  |  Bin 0 -> 43909 bytes
 win32/deps/library/nlme/po/fr/LC_MESSAGES/nlme.mo  |  Bin 0 -> 1748 bytes
 .../deps/library/nlme/po/pl/LC_MESSAGES/R-nlme.mo  |  Bin 0 -> 43293 bytes
 win32/deps/library/nlme/po/pl/LC_MESSAGES/nlme.mo  |  Bin 0 -> 1862 bytes
 win32/deps/library/nlme/tests/anova.gls.R          |   22 +
 win32/deps/library/nlme/tests/augPred_lab.R        |   14 +
 win32/deps/library/nlme/tests/augPredmissing.R     |    7 +
 win32/deps/library/nlme/tests/coef.R               |   14 +
 win32/deps/library/nlme/tests/contrMat.R           |   40 +
 win32/deps/library/nlme/tests/data.frame.R         |    4 +
 win32/deps/library/nlme/tests/deparse.R            |  171 +
 win32/deps/library/nlme/tests/getData.R            |    8 +
 win32/deps/library/nlme/tests/gls.R                |   24 +
 win32/deps/library/nlme/tests/lmList.R             |   11 +
 win32/deps/library/nlme/tests/lme.R                |   37 +
 win32/deps/library/nlme/tests/lme.Rout.save        |  146 +
 win32/deps/library/nlme/tests/missing.R            |   26 +
 win32/deps/library/nlme/tests/missing.Rout.save    |  791 +++
 win32/deps/library/nlme/tests/nlme.R               |    7 +
 win32/deps/library/nlme/tests/nlme.Rout.save       |   61 +
 win32/deps/library/nlme/tests/predict.lme.R        |    8 +
 win32/deps/library/nlme/tests/ss2.rda              |  Bin 0 -> 4809 bytes
 win32/deps/library/nlme/tests/update.R             |    8 +
 win32/deps/library/nlme/tests/updateLme.R          |   12 +
 win32/deps/library/nlme/tests/varIdent.R           |    7 +
 win32/deps/library/nnet/CITATION                   |    2 +-
 win32/deps/library/nnet/DESCRIPTION                |   43 +-
 win32/deps/library/nnet/LICENCE                    |   11 +-
 win32/deps/library/nnet/Meta/Rd.rds                |  Bin 624 -> 616 bytes
 win32/deps/library/nnet/Meta/hsearch.rds           |  Bin 665 -> 658 bytes
 win32/deps/library/nnet/Meta/links.rds             |  Bin 0 -> 327 bytes
 win32/deps/library/nnet/Meta/nsInfo.rds            |  Bin 484 -> 490 bytes
 win32/deps/library/nnet/Meta/package.rds           |  Bin 1036 -> 808 bytes
 win32/deps/library/nnet/NEWS                       |    4 +-
 win32/deps/library/nnet/R-ex/class.ind.R           |   20 -
 win32/deps/library/nnet/R-ex/multinom.R            |   29 -
 win32/deps/library/nnet/R-ex/nnet.Hess.R           |   17 -
 win32/deps/library/nnet/R-ex/nnet.R                |   30 -
 win32/deps/library/nnet/R-ex/predict.nnet.R        |   29 -
 win32/deps/library/nnet/R-ex/which.is.max.R        |   13 -
 win32/deps/library/nnet/R/nnet                     |    2 +-
 win32/deps/library/nnet/R/nnet.rdb                 |  Bin 18475 -> 49662 bytes
 win32/deps/library/nnet/R/nnet.rdx                 |  Bin 641 -> 669 bytes
 win32/deps/library/nnet/help/aliases.rds           |  Bin 0 -> 297 bytes
 win32/deps/library/nnet/help/class.ind             |   39 -
 win32/deps/library/nnet/help/multinom              |  109 -
 win32/deps/library/nnet/help/nnet                  |  161 -
 win32/deps/library/nnet/help/nnet.Hess             |   51 -
 win32/deps/library/nnet/help/nnet.rdb              |  Bin 0 -> 20757 bytes
 win32/deps/library/nnet/help/nnet.rdx              |  Bin 0 -> 283 bytes
 win32/deps/library/nnet/help/paths.rds             |  Bin 0 -> 166 bytes
 win32/deps/library/nnet/help/predict.nnet          |   71 -
 win32/deps/library/nnet/help/which.is.max          |   40 -
 win32/deps/library/nnet/html/00Index.html          |   78 +
 win32/deps/library/nnet/html/R.css                 |   57 +
 win32/deps/library/nnet/libs/i386/nnet.dll         |  Bin 0 -> 23552 bytes
 win32/deps/library/nnet/libs/nnet.dll              |  Bin 14848 -> 0 bytes
 .../deps/library/nnet/po/de/LC_MESSAGES/R-nnet.mo  |  Bin 0 -> 2972 bytes
 .../library/nnet/po/en quot/LC_MESSAGES/R-nnet.mo  |  Bin 0 -> 2669 bytes
 .../deps/library/nnet/po/fr/LC_MESSAGES/R-nnet.mo  |  Bin 0 -> 3077 bytes
 .../deps/library/nnet/po/pl/LC_MESSAGES/R-nnet.mo  |  Bin 0 -> 3097 bytes
 win32/deps/library/parallel/DESCRIPTION            |   12 +
 win32/deps/library/parallel/INDEX                  |    8 +
 win32/deps/library/parallel/Meta/Rd.rds            |  Bin 0 -> 688 bytes
 win32/deps/library/parallel/Meta/hsearch.rds       |  Bin 0 -> 707 bytes
 win32/deps/library/parallel/Meta/links.rds         |  Bin 0 -> 369 bytes
 win32/deps/library/parallel/Meta/nsInfo.rds        |  Bin 0 -> 594 bytes
 win32/deps/library/parallel/Meta/package.rds       |  Bin 0 -> 565 bytes
 win32/deps/library/parallel/Meta/vignette.rds      |  Bin 0 -> 202 bytes
 win32/deps/library/parallel/NAMESPACE              |   44 +
 win32/deps/library/parallel/R/parallel             |    9 +
 win32/deps/library/parallel/R/parallel.rdb         |  Bin 0 -> 45249 bytes
 win32/deps/library/parallel/R/parallel.rdx         |  Bin 0 -> 1398 bytes
 win32/deps/library/parallel/doc/index.html         |   27 +
 win32/deps/library/parallel/doc/parallel.R         |  224 +
 win32/deps/library/parallel/doc/parallel.Rnw       |  803 +++
 win32/deps/library/parallel/doc/parallel.pdf       |  Bin 0 -> 291079 bytes
 win32/deps/library/parallel/help/AnIndex           |   31 +
 win32/deps/library/parallel/help/aliases.rds       |  Bin 0 -> 332 bytes
 win32/deps/library/parallel/help/parallel.rdb      |  Bin 0 -> 32556 bytes
 win32/deps/library/parallel/help/parallel.rdx      |  Bin 0 -> 328 bytes
 win32/deps/library/parallel/help/paths.rds         |  Bin 0 -> 194 bytes
 win32/deps/library/parallel/html/00Index.html      |   86 +
 win32/deps/library/parallel/html/R.css             |   57 +
 win32/deps/library/parallel/libs/i386/parallel.dll |  Bin 0 -> 17408 bytes
 .../parallel/po/da/LC_MESSAGES/R-parallel.mo       |  Bin 0 -> 2981 bytes
 .../library/parallel/po/da/LC_MESSAGES/parallel.mo |  Bin 0 -> 1704 bytes
 .../parallel/po/de/LC_MESSAGES/R-parallel.mo       |  Bin 0 -> 3576 bytes
 .../library/parallel/po/de/LC_MESSAGES/parallel.mo |  Bin 0 -> 1731 bytes
 .../parallel/po/en quot/LC_MESSAGES/R-parallel.mo  |  Bin 0 -> 3396 bytes
 .../parallel/po/en quot/LC_MESSAGES/parallel.mo    |  Bin 0 -> 1630 bytes
 .../parallel/po/fr/LC_MESSAGES/R-parallel.mo       |  Bin 0 -> 3795 bytes
 .../library/parallel/po/fr/LC_MESSAGES/parallel.mo |  Bin 0 -> 1869 bytes
 .../parallel/po/ko/LC_MESSAGES/R-parallel.mo       |  Bin 0 -> 4047 bytes
 .../library/parallel/po/ko/LC_MESSAGES/parallel.mo |  Bin 0 -> 2029 bytes
 .../parallel/po/pl/LC_MESSAGES/R-parallel.mo       |  Bin 0 -> 3846 bytes
 .../library/parallel/po/pl/LC_MESSAGES/parallel.mo |  Bin 0 -> 1926 bytes
 .../parallel/po/ru/LC_MESSAGES/R-parallel.mo       |  Bin 0 -> 3673 bytes
 .../library/parallel/po/ru/LC_MESSAGES/parallel.mo |  Bin 0 -> 1797 bytes
 .../parallel/po/zh_CN/LC_MESSAGES/R-parallel.mo    |  Bin 0 -> 3267 bytes
 .../parallel/po/zh_CN/LC_MESSAGES/parallel.mo      |  Bin 0 -> 1598 bytes
 win32/deps/library/parallel/tests/Master.R         |   36 +
 win32/deps/library/parallel/tests/multicore1.RR    |   10 +
 win32/deps/library/parallel/tests/multicore2.RR    |   14 +
 .../library/parallel/tests/multicore2.Rout.save    |   49 +
 win32/deps/library/parallel/tests/multicore3.RR    |    7 +
 win32/deps/library/parallel/tests/snow1.RR         |   40 +
 win32/deps/library/parallel/tests/snow2.RR         |   19 +
 win32/deps/library/parallel/tests/snow2.Rout.save  |   54 +
 win32/deps/library/rpart/DESCRIPTION               |   47 +-
 win32/deps/library/rpart/LICENCE                   |   33 -
 win32/deps/library/rpart/Meta/Rd.rds               |  Bin 1160 -> 1143 bytes
 win32/deps/library/rpart/Meta/data.rds             |  Bin 235 -> 234 bytes
 win32/deps/library/rpart/Meta/hsearch.rds          |  Bin 1115 -> 1090 bytes
 win32/deps/library/rpart/Meta/links.rds            |  Bin 0 -> 427 bytes
 win32/deps/library/rpart/Meta/nsInfo.rds           |  Bin 449 -> 457 bytes
 win32/deps/library/rpart/Meta/package.rds          |  Bin 857 -> 953 bytes
 win32/deps/library/rpart/R-ex/Rex.zip              |  Bin 8715 -> 0 bytes
 win32/deps/library/rpart/R/rpart                   |    2 +-
 win32/deps/library/rpart/R/rpart.rdb               |  Bin 33843 -> 95794 bytes
 win32/deps/library/rpart/R/rpart.rdx               |  Bin 760 -> 784 bytes
 win32/deps/library/rpart/data/Rdata.rdb            |  Bin 5491 -> 4715 bytes
 win32/deps/library/rpart/data/Rdata.rds            |  Bin 117 -> 117 bytes
 win32/deps/library/rpart/data/Rdata.rdx            |  Bin 183 -> 195 bytes
 win32/deps/library/rpart/help/AnIndex              |    1 -
 win32/deps/library/rpart/help/Rhelp.zip            |  Bin 30507 -> 0 bytes
 win32/deps/library/rpart/help/aliases.rds          |  Bin 0 -> 288 bytes
 win32/deps/library/rpart/help/paths.rds            |  Bin 0 -> 317 bytes
 win32/deps/library/rpart/help/rpart.rdb            |  Bin 0 -> 78392 bytes
 win32/deps/library/rpart/help/rpart.rdx            |  Bin 0 -> 699 bytes
 win32/deps/library/rpart/html/00Index.html         |   79 +
 win32/deps/library/rpart/html/R.css                |   57 +
 win32/deps/library/rpart/libs/i386/rpart.dll       |  Bin 0 -> 50688 bytes
 win32/deps/library/rpart/libs/rpart.dll            |  Bin 40448 -> 0 bytes
 .../library/rpart/po/de/LC_MESSAGES/R-rpart.mo     |  Bin 0 -> 6929 bytes
 .../deps/library/rpart/po/de/LC_MESSAGES/rpart.mo  |  Bin 0 -> 1436 bytes
 .../rpart/po/en quot/LC_MESSAGES/R-rpart.mo        |  Bin 0 -> 6419 bytes
 .../library/rpart/po/en quot/LC_MESSAGES/rpart.mo  |  Bin 0 -> 1318 bytes
 .../library/rpart/po/fr/LC_MESSAGES/R-rpart.mo     |  Bin 0 -> 6973 bytes
 .../deps/library/rpart/po/fr/LC_MESSAGES/rpart.mo  |  Bin 0 -> 1414 bytes
 .../library/rpart/po/pl/LC_MESSAGES/R-rpart.mo     |  Bin 0 -> 6636 bytes
 .../deps/library/rpart/po/pl/LC_MESSAGES/rpart.mo  |  Bin 0 -> 1539 bytes
 .../library/rpart/po/ru/LC_MESSAGES/R-rpart.mo     |  Bin 0 -> 6457 bytes
 .../deps/library/rpart/po/ru/LC_MESSAGES/rpart.mo  |  Bin 0 -> 1439 bytes
 .../rpart/tests/Examples/rpart-Ex.Rout.save        |  971 ++++
 win32/deps/library/rpart/tests/backticks.R         |    7 +
 win32/deps/library/rpart/tests/data.stagec         |  146 +
 win32/deps/library/rpart/tests/rpartco.R           |    6 +
 win32/deps/library/rpart/tests/surv_test.R         |    9 +
 win32/deps/library/rpart/tests/testall.R           |  330 ++
 win32/deps/library/rpart/tests/testall.Rout.save   | 1506 ++++++
 win32/deps/library/rpart/tests/usersplits.R        |  167 +
 .../deps/library/rpart/tests/usersplits.Rout.save  |  193 +
 win32/deps/library/spam/0NEWS                      |  404 ++
 win32/deps/library/spam/CITATION                   |   19 +
 win32/deps/library/spam/DESCRIPTION                |   15 +-
 win32/deps/library/spam/INDEX                      |   23 +-
 win32/deps/library/spam/MD5                        |  107 +-
 win32/deps/library/spam/Meta/Rd.rds                |  Bin 3378 -> 3971 bytes
 win32/deps/library/spam/Meta/data.rds              |  Bin 230 -> 229 bytes
 win32/deps/library/spam/Meta/demo.rds              |  Bin 304 -> 295 bytes
 win32/deps/library/spam/Meta/hsearch.rds           |  Bin 3452 -> 4073 bytes
 win32/deps/library/spam/Meta/links.rds             |  Bin 0 -> 2709 bytes
 win32/deps/library/spam/Meta/nsInfo.rds            |  Bin 834 -> 1090 bytes
 win32/deps/library/spam/Meta/package.rds           |  Bin 926 -> 924 bytes
 win32/deps/library/spam/NAMESPACE                  |   87 +-
 win32/deps/library/spam/NEWS                       |  399 +-
 win32/deps/library/spam/R/spam                     |    2 +-
 win32/deps/library/spam/R/spam.rdb                 |  Bin 378055 -> 369813 bytes
 win32/deps/library/spam/R/spam.rdx                 |  Bin 5960 -> 4730 bytes
 win32/deps/library/spam/data/Rdata.rdb             |  Bin 319804 -> 319762 bytes
 win32/deps/library/spam/data/Rdata.rds             |  Bin 126 -> 127 bytes
 win32/deps/library/spam/data/Rdata.rdx             |  Bin 210 -> 209 bytes
 .../deps/library/spam/demo/article-jss-example1.R  |   73 +-
 .../deps/library/spam/demo/article-jss-example2.R  |   49 +-
 win32/deps/library/spam/demo/article-jss.R         |   73 +-
 win32/deps/library/spam/demo/cholesky.R            |    2 +-
 win32/deps/library/spam/demo/spam.R                |    5 +-
 win32/deps/library/spam/demo/timing.R              |    2 +-
 win32/deps/library/spam/help/AnIndex               |  117 +-
 win32/deps/library/spam/help/aliases.rds           |  Bin 0 -> 2688 bytes
 win32/deps/library/spam/help/paths.rds             |  Bin 0 -> 491 bytes
 win32/deps/library/spam/help/spam.rdb              |  Bin 0 -> 159575 bytes
 win32/deps/library/spam/help/spam.rdx              |  Bin 0 -> 1263 bytes
 win32/deps/library/spam/html/00Index.html          |  548 +--
 win32/deps/library/spam/html/R.css                 |   57 +
 win32/deps/library/spam/libs/i386/spam.dll         |  Bin 0 -> 69632 bytes
 win32/deps/library/spam/libs/i386/symbols.rds      |  Bin 0 -> 1557 bytes
 win32/deps/library/spam/libs/x64/spam.dll          |  Bin 0 -> 81408 bytes
 win32/deps/library/spam/libs/x64/symbols.rds       |  Bin 0 -> 1551 bytes
 win32/deps/library/spatial/CITATION                |    2 +-
 win32/deps/library/spatial/DESCRIPTION             |   43 +-
 win32/deps/library/spatial/LICENCE                 |    8 +-
 win32/deps/library/spatial/Meta/Rd.rds             |  Bin 928 -> 928 bytes
 win32/deps/library/spatial/Meta/hsearch.rds        |  Bin 893 -> 889 bytes
 win32/deps/library/spatial/Meta/links.rds          |  Bin 0 -> 378 bytes
 win32/deps/library/spatial/Meta/nsInfo.rds         |  Bin 545 -> 554 bytes
 win32/deps/library/spatial/Meta/package.rds        |  Bin 989 -> 799 bytes
 win32/deps/library/spatial/R-ex/Rex.zip            |  Bin 8467 -> 0 bytes
 win32/deps/library/spatial/R/spatial               |    2 +-
 win32/deps/library/spatial/R/spatial.rdb           |  Bin 15325 -> 36844 bytes
 win32/deps/library/spatial/R/spatial.rdx           |  Bin 691 -> 696 bytes
 win32/deps/library/spatial/help/Rhelp.zip          |  Bin 17970 -> 0 bytes
 win32/deps/library/spatial/help/aliases.rds        |  Bin 0 -> 252 bytes
 win32/deps/library/spatial/help/paths.rds          |  Bin 0 -> 276 bytes
 win32/deps/library/spatial/help/spatial.rdb        |  Bin 0 -> 46796 bytes
 win32/deps/library/spatial/help/spatial.rdx        |  Bin 0 -> 583 bytes
 win32/deps/library/spatial/html/00Index.html       |   74 +
 win32/deps/library/spatial/html/R.css              |   57 +
 win32/deps/library/spatial/libs/i386/spatial.dll   |  Bin 0 -> 28672 bytes
 win32/deps/library/spatial/libs/spatial.dll        |  Bin 18432 -> 0 bytes
 .../library/spatial/po/de/LC_MESSAGES/R-spatial.mo |  Bin 0 -> 1518 bytes
 .../spatial/po/en quot/LC_MESSAGES/R-spatial.mo    |  Bin 0 -> 1380 bytes
 .../library/spatial/po/fr/LC_MESSAGES/R-spatial.mo |  Bin 0 -> 1547 bytes
 .../library/spatial/po/pl/LC_MESSAGES/R-spatial.mo |  Bin 0 -> 1674 bytes
 .../spatial/tests/Examples/spatial-Ex.Rout.save    |  514 ++
 win32/deps/library/splines/DESCRIPTION             |   10 +-
 win32/deps/library/splines/INDEX                   |    2 +-
 win32/deps/library/splines/Meta/Rd.rds             |  Bin 739 -> 724 bytes
 win32/deps/library/splines/Meta/hsearch.rds        |  Bin 730 -> 720 bytes
 win32/deps/library/splines/Meta/links.rds          |  Bin 0 -> 323 bytes
 win32/deps/library/splines/Meta/nsInfo.rds         |  Bin 475 -> 567 bytes
 win32/deps/library/splines/Meta/package.rds        |  Bin 598 -> 588 bytes
 win32/deps/library/splines/NAMESPACE               |    2 +
 win32/deps/library/splines/R-ex/Rex.zip            |  Bin 4778 -> 0 bytes
 win32/deps/library/splines/R/splines               |    2 +-
 win32/deps/library/splines/R/splines.rdb           |  Bin 16284 -> 39921 bytes
 win32/deps/library/splines/R/splines.rdx           |  Bin 778 -> 797 bytes
 win32/deps/library/splines/help/Rhelp.zip          |  Bin 12531 -> 0 bytes
 win32/deps/library/splines/help/aliases.rds        |  Bin 0 -> 229 bytes
 win32/deps/library/splines/help/paths.rds          |  Bin 0 -> 222 bytes
 win32/deps/library/splines/help/splines.rdb        |  Bin 0 -> 37096 bytes
 win32/deps/library/splines/help/splines.rdx        |  Bin 0 -> 447 bytes
 win32/deps/library/splines/html/00Index.html       |   67 +
 win32/deps/library/splines/html/R.css              |   57 +
 win32/deps/library/splines/libs/i386/splines.dll   |  Bin 0 -> 16384 bytes
 win32/deps/library/splines/libs/splines.dll        |  Bin 8704 -> 0 bytes
 .../library/splines/po/da/LC_MESSAGES/R-splines.mo |  Bin 0 -> 2495 bytes
 .../library/splines/po/da/LC_MESSAGES/splines.mo   |  Bin 0 -> 560 bytes
 .../library/splines/po/de/LC_MESSAGES/R-splines.mo |  Bin 0 -> 2689 bytes
 .../library/splines/po/de/LC_MESSAGES/splines.mo   |  Bin 0 -> 559 bytes
 .../splines/po/en quot/LC_MESSAGES/R-splines.mo    |  Bin 0 -> 2572 bytes
 .../splines/po/en quot/LC_MESSAGES/splines.mo      |  Bin 0 -> 510 bytes
 .../library/splines/po/fr/LC_MESSAGES/R-splines.mo |  Bin 0 -> 2778 bytes
 .../library/splines/po/fr/LC_MESSAGES/splines.mo   |  Bin 0 -> 582 bytes
 .../library/splines/po/ja/LC_MESSAGES/R-splines.mo |  Bin 0 -> 3233 bytes
 .../library/splines/po/ja/LC_MESSAGES/splines.mo   |  Bin 0 -> 527 bytes
 .../library/splines/po/ko/LC_MESSAGES/R-splines.mo |  Bin 0 -> 3104 bytes
 .../library/splines/po/ko/LC_MESSAGES/splines.mo   |  Bin 0 -> 666 bytes
 .../library/splines/po/pl/LC_MESSAGES/R-splines.mo |  Bin 0 -> 2847 bytes
 .../library/splines/po/pl/LC_MESSAGES/splines.mo   |  Bin 0 -> 686 bytes
 .../splines/po/pt_BR/LC_MESSAGES/R-splines.mo      |  Bin 0 -> 2628 bytes
 .../splines/po/pt_BR/LC_MESSAGES/splines.mo        |  Bin 0 -> 629 bytes
 .../library/splines/po/ru/LC_MESSAGES/R-splines.mo |  Bin 0 -> 2750 bytes
 .../library/splines/po/ru/LC_MESSAGES/splines.mo   |  Bin 0 -> 603 bytes
 .../splines/po/zh_CN/LC_MESSAGES/R-splines.mo      |  Bin 0 -> 2292 bytes
 .../splines/po/zh_CN/LC_MESSAGES/splines.mo        |  Bin 0 -> 496 bytes
 win32/deps/library/stats/COPYRIGHTS.modreg         |    2 +-
 win32/deps/library/stats/DESCRIPTION               |    8 +-
 win32/deps/library/stats/INDEX                     |   71 +-
 win32/deps/library/stats/Meta/Rd.rds               |  Bin 12604 -> 12828 bytes
 win32/deps/library/stats/Meta/demo.rds             |  Bin 267 -> 266 bytes
 win32/deps/library/stats/Meta/hsearch.rds          |  Bin 12687 -> 12897 bytes
 win32/deps/library/stats/Meta/links.rds            |  Bin 0 -> 6451 bytes
 win32/deps/library/stats/Meta/nsInfo.rds           |  Bin 4149 -> 4257 bytes
 win32/deps/library/stats/Meta/package.rds          |  Bin 505 -> 490 bytes
 win32/deps/library/stats/NAMESPACE                 |  103 +-
 win32/deps/library/stats/R-ex/Rex.zip              |  Bin 125658 -> 0 bytes
 win32/deps/library/stats/R/stats                   |    2 +-
 win32/deps/library/stats/R/stats.rdb               |  Bin 461818 -> 1248066 bytes
 win32/deps/library/stats/R/stats.rdx               |  Bin 9848 -> 10629 bytes
 win32/deps/library/stats/demo/glm.vr.R             |    2 +
 win32/deps/library/stats/demo/lm.glm.R             |   35 +-
 win32/deps/library/stats/demo/nlm.R                |   12 +-
 win32/deps/library/stats/demo/smooth.R             |    1 +
 win32/deps/library/stats/help/AnIndex              |   27 +-
 win32/deps/library/stats/help/Rhelp.zip            |  Bin 442427 -> 0 bytes
 win32/deps/library/stats/help/aliases.rds          |  Bin 0 -> 5364 bytes
 win32/deps/library/stats/help/paths.rds            |  Bin 0 -> 2317 bytes
 win32/deps/library/stats/help/stats.rdb            |  Bin 0 -> 1405408 bytes
 win32/deps/library/stats/help/stats.rdx            |  Bin 0 -> 6496 bytes
 win32/deps/library/stats/html/00Index.html         | 1348 +++++
 win32/deps/library/stats/html/R.css                |   57 +
 win32/deps/library/stats/libs/i386/stats.dll       |  Bin 0 -> 417280 bytes
 win32/deps/library/stats/libs/stats.dll            |  Bin 378880 -> 0 bytes
 .../library/stats/po/da/LC_MESSAGES/R-stats.mo     |  Bin 0 -> 5296 bytes
 .../deps/library/stats/po/da/LC_MESSAGES/stats.mo  |  Bin 0 -> 6484 bytes
 .../library/stats/po/de/LC_MESSAGES/R-stats.mo     |  Bin 0 -> 84095 bytes
 .../deps/library/stats/po/de/LC_MESSAGES/stats.mo  |  Bin 0 -> 6974 bytes
 .../stats/po/en quot/LC_MESSAGES/R-stats.mo        |  Bin 0 -> 81434 bytes
 .../library/stats/po/en quot/LC_MESSAGES/stats.mo  |  Bin 0 -> 6644 bytes
 .../library/stats/po/fr/LC_MESSAGES/R-stats.mo     |  Bin 0 -> 86777 bytes
 .../deps/library/stats/po/fr/LC_MESSAGES/stats.mo  |  Bin 0 -> 7108 bytes
 .../library/stats/po/it/LC_MESSAGES/R-stats.mo     |  Bin 0 -> 60627 bytes
 .../deps/library/stats/po/it/LC_MESSAGES/stats.mo  |  Bin 0 -> 3197 bytes
 .../library/stats/po/ja/LC_MESSAGES/R-stats.mo     |  Bin 0 -> 97532 bytes
 .../deps/library/stats/po/ja/LC_MESSAGES/stats.mo  |  Bin 0 -> 7981 bytes
 .../library/stats/po/ko/LC_MESSAGES/R-stats.mo     |  Bin 0 -> 96100 bytes
 .../deps/library/stats/po/ko/LC_MESSAGES/stats.mo  |  Bin 0 -> 7880 bytes
 .../library/stats/po/pl/LC_MESSAGES/R-stats.mo     |  Bin 0 -> 87528 bytes
 .../deps/library/stats/po/pl/LC_MESSAGES/stats.mo  |  Bin 0 -> 7253 bytes
 .../library/stats/po/pt_BR/LC_MESSAGES/R-stats.mo  |  Bin 0 -> 58125 bytes
 .../library/stats/po/pt_BR/LC_MESSAGES/stats.mo    |  Bin 0 -> 6692 bytes
 .../library/stats/po/ru/LC_MESSAGES/R-stats.mo     |  Bin 0 -> 83360 bytes
 .../deps/library/stats/po/ru/LC_MESSAGES/stats.mo  |  Bin 0 -> 6990 bytes
 .../library/stats/po/tr/LC_MESSAGES/R-stats.mo     |  Bin 0 -> 39906 bytes
 .../library/stats/po/zh_CN/LC_MESSAGES/R-stats.mo  |  Bin 0 -> 74953 bytes
 .../library/stats/po/zh_CN/LC_MESSAGES/stats.mo    |  Bin 0 -> 6109 bytes
 win32/deps/library/stats/tests/NLSstClosest.R      |   12 +
 win32/deps/library/stats/tests/cmdscale.R          |   10 +
 win32/deps/library/stats/tests/drop1-polr.R        |   32 +
 win32/deps/library/stats/tests/ig_glm.R            |   61 +
 win32/deps/library/stats/tests/ks-test.R           |   22 +
 win32/deps/library/stats/tests/ks-test.Rout.save   |  115 +
 win32/deps/library/stats/tests/nafns.R             |  135 +
 win32/deps/library/stats/tests/nls.R               |  263 +
 win32/deps/library/stats/tests/nls.Rout.save       |  662 +++
 win32/deps/library/stats/tests/offsets.R           |   27 +
 win32/deps/library/stats/tests/ppr.R               |    6 +
 win32/deps/library/stats/tests/ppr_test.csv        |  443 ++
 win32/deps/library/stats/tests/simulate.R          |   78 +
 win32/deps/library/stats/tests/simulate.Rout.save  |  407 ++
 win32/deps/library/stats/tests/smooth.spline.R     |   15 +
 win32/deps/library/stats/tests/ts-tests.R          |  143 +
 win32/deps/library/stats4/DESCRIPTION              |    9 +-
 win32/deps/library/stats4/INDEX                    |   17 +-
 win32/deps/library/stats4/Meta/Rd.rds              |  Bin 868 -> 790 bytes
 win32/deps/library/stats4/Meta/hsearch.rds         |  Bin 880 -> 816 bytes
 win32/deps/library/stats4/Meta/links.rds           |  Bin 0 -> 419 bytes
 win32/deps/library/stats4/Meta/nsInfo.rds          |  Bin 310 -> 328 bytes
 win32/deps/library/stats4/Meta/package.rds         |  Bin 585 -> 543 bytes
 win32/deps/library/stats4/NAMESPACE                |   18 +-
 win32/deps/library/stats4/R-ex/Rex.zip             |  Bin 1408 -> 0 bytes
 win32/deps/library/stats4/R/stats4                 |    2 +-
 win32/deps/library/stats4/R/stats4.rdb             |  Bin 50864 -> 94834 bytes
 win32/deps/library/stats4/R/stats4.rdx             |  Bin 985 -> 1035 bytes
 win32/deps/library/stats4/help/AnIndex             |    6 +-
 win32/deps/library/stats4/help/Rhelp.zip           |  Bin 9775 -> 0 bytes
 win32/deps/library/stats4/help/aliases.rds         |  Bin 0 -> 349 bytes
 win32/deps/library/stats4/help/paths.rds           |  Bin 0 -> 226 bytes
 win32/deps/library/stats4/help/stats4.rdb          |  Bin 0 -> 30377 bytes
 win32/deps/library/stats4/help/stats4.rdx          |  Bin 0 -> 460 bytes
 win32/deps/library/stats4/html/00Index.html        |   73 +
 win32/deps/library/stats4/html/R.css               |   57 +
 .../library/stats4/po/da/LC_MESSAGES/R-stats4.mo   |  Bin 0 -> 1287 bytes
 .../library/stats4/po/de/LC_MESSAGES/R-stats4.mo   |  Bin 0 -> 1294 bytes
 .../stats4/po/en quot/LC_MESSAGES/R-stats4.mo      |  Bin 0 -> 1208 bytes
 .../library/stats4/po/fr/LC_MESSAGES/R-stats4.mo   |  Bin 0 -> 1395 bytes
 .../library/stats4/po/it/LC_MESSAGES/R-stats4.mo   |  Bin 0 -> 1269 bytes
 .../library/stats4/po/ja/LC_MESSAGES/R-stats4.mo   |  Bin 0 -> 1475 bytes
 .../library/stats4/po/ko/LC_MESSAGES/R-stats4.mo   |  Bin 0 -> 1476 bytes
 .../library/stats4/po/pl/LC_MESSAGES/R-stats4.mo   |  Bin 0 -> 1491 bytes
 .../stats4/po/pt_BR/LC_MESSAGES/R-stats4.mo        |  Bin 0 -> 1354 bytes
 .../library/stats4/po/ru/LC_MESSAGES/R-stats4.mo   |  Bin 0 -> 1447 bytes
 .../library/stats4/po/tr/LC_MESSAGES/R-stats4.mo   |  Bin 0 -> 1275 bytes
 .../stats4/po/zh_CN/LC_MESSAGES/R-stats4.mo        |  Bin 0 -> 1199 bytes
 win32/deps/library/stats4/tests/confint.R          |   23 +
 win32/deps/library/survival/CITATION               |   15 +
 win32/deps/library/survival/COPYING                |  340 --
 win32/deps/library/survival/DESCRIPTION            |   39 +-
 win32/deps/library/survival/INDEX                  |  121 +-
 win32/deps/library/survival/Meta/Rd.rds            |  Bin 3118 -> 3411 bytes
 win32/deps/library/survival/Meta/data.rds          |  Bin 639 -> 654 bytes
 win32/deps/library/survival/Meta/hsearch.rds       |  Bin 3014 -> 3250 bytes
 win32/deps/library/survival/Meta/links.rds         |  Bin 0 -> 1618 bytes
 win32/deps/library/survival/Meta/nsInfo.rds        |  Bin 885 -> 930 bytes
 win32/deps/library/survival/Meta/package.rds       |  Bin 907 -> 860 bytes
 win32/deps/library/survival/Meta/vignette.rds      |  Bin 0 -> 213 bytes
 win32/deps/library/survival/NAMESPACE              |   16 +-
 win32/deps/library/survival/NEWS.Rd                |  702 +++
 win32/deps/library/survival/R-ex/Rex.zip           |  Bin 25915 -> 0 bytes
 win32/deps/library/survival/R/survival             |    2 +-
 win32/deps/library/survival/R/survival.rdb         |  Bin 155291 -> 516941 bytes
 win32/deps/library/survival/R/survival.rdx         |  Bin 2209 -> 2454 bytes
 win32/deps/library/survival/data/Rdata.rdb         |  Bin 1888959 -> 1415335 bytes
 win32/deps/library/survival/data/Rdata.rds         |  Bin 282 -> 281 bytes
 win32/deps/library/survival/data/Rdata.rdx         |  Bin 584 -> 572 bytes
 win32/deps/library/survival/data/leukemia.dat      |   24 -
 win32/deps/library/survival/data/minn2000.dat      |   16 -
 win32/deps/library/survival/data/minn2004.dat      |   16 -
 win32/deps/library/survival/data/minndecennial.dat | 1760 ------
 win32/deps/library/survival/data/minnpred.dat      |  116 -
 win32/deps/library/survival/data/pbcseq.dat        | 1945 -------
 win32/deps/library/survival/data/us1996.dat        |   46 -
 win32/deps/library/survival/data/us1997.dat        |   46 -
 win32/deps/library/survival/data/us1998.dat        |   45 -
 win32/deps/library/survival/data/us1999.dat        |   45 -
 win32/deps/library/survival/data/us2000.dat        |   45 -
 win32/deps/library/survival/data/us2001.dat        |   45 -
 win32/deps/library/survival/data/us2002.dat        |   45 -
 win32/deps/library/survival/data/us2003.dat        |   45 -
 win32/deps/library/survival/data/us2004.dat        |   45 -
 win32/deps/library/survival/data/usdecennial.dat   | 5651 --------------------
 win32/deps/library/survival/data/usinfant.dat      |   25 -
 win32/deps/library/survival/doc/index.html         |   27 +
 win32/deps/library/survival/doc/timedep.R          |  121 +
 win32/deps/library/survival/doc/timedep.Rnw        |  419 ++
 win32/deps/library/survival/doc/timedep.pdf        |  Bin 0 -> 125002 bytes
 win32/deps/library/survival/doc/validate.pdf       |  Bin 0 -> 144741 bytes
 win32/deps/library/survival/help/AnIndex           |   18 +-
 win32/deps/library/survival/help/Rhelp.zip         |  Bin 101262 -> 0 bytes
 win32/deps/library/survival/help/aliases.rds       |  Bin 0 -> 1287 bytes
 win32/deps/library/survival/help/paths.rds         |  Bin 0 -> 709 bytes
 win32/deps/library/survival/help/survival.rdb      |  Bin 0 -> 280357 bytes
 win32/deps/library/survival/help/survival.rdx      |  Bin 0 -> 1798 bytes
 win32/deps/library/survival/html/00Index.html      |  463 ++
 win32/deps/library/survival/html/R.css             |   57 +
 win32/deps/library/survival/libs/i386/survival.dll |  Bin 0 -> 120320 bytes
 win32/deps/library/survival/libs/survival.dll      |  Bin 88064 -> 0 bytes
 win32/deps/library/survival/tests/aareg.R          |  210 +
 win32/deps/library/survival/tests/aareg.Rout.save  |  381 ++
 win32/deps/library/survival/tests/anova.R          |   31 +
 win32/deps/library/survival/tests/anova.Rout.save  |   57 +
 win32/deps/library/survival/tests/bladder.R        |   37 +
 .../deps/library/survival/tests/bladder.Rout.save  |  154 +
 win32/deps/library/survival/tests/book1.R          |  106 +
 win32/deps/library/survival/tests/book1.Rout.save  |  222 +
 win32/deps/library/survival/tests/book2.R          |  105 +
 win32/deps/library/survival/tests/book2.Rout.save  |  214 +
 win32/deps/library/survival/tests/book3.R          |  109 +
 win32/deps/library/survival/tests/book3.Rout.save  |  254 +
 win32/deps/library/survival/tests/book4.R          |  101 +
 win32/deps/library/survival/tests/book4.Rout.save  |  242 +
 win32/deps/library/survival/tests/book5.R          |  124 +
 win32/deps/library/survival/tests/book5.Rout.save  |  206 +
 win32/deps/library/survival/tests/book6.R          |  114 +
 win32/deps/library/survival/tests/book6.Rout.save  |  190 +
 win32/deps/library/survival/tests/book7.R          |   55 +
 win32/deps/library/survival/tests/book7.Rout.save  |   90 +
 win32/deps/library/survival/tests/cancer.R         |   34 +
 win32/deps/library/survival/tests/cancer.Rout.save |  224 +
 win32/deps/library/survival/tests/clogit.R         |   28 +
 win32/deps/library/survival/tests/clogit.Rout.save |   58 +
 win32/deps/library/survival/tests/concordance.R    |  109 +
 .../library/survival/tests/concordance.Rout.save   |  153 +
 win32/deps/library/survival/tests/counting.R       |   47 +
 .../deps/library/survival/tests/counting.Rout.save |   76 +
 win32/deps/library/survival/tests/coxsurv.R        |   80 +
 .../deps/library/survival/tests/coxsurv.Rout.save  |  119 +
 win32/deps/library/survival/tests/coxsurv2.R       |   58 +
 .../deps/library/survival/tests/coxsurv2.Rout.save |   85 +
 win32/deps/library/survival/tests/coxsurv3.R       |   98 +
 .../deps/library/survival/tests/coxsurv3.Rout.save |  127 +
 win32/deps/library/survival/tests/coxsurv4.R       |   49 +
 .../deps/library/survival/tests/coxsurv4.Rout.save |   75 +
 win32/deps/library/survival/tests/data.capacitor   |  125 +
 win32/deps/library/survival/tests/data.cracks      |    9 +
 win32/deps/library/survival/tests/data.donnell     |  210 +
 win32/deps/library/survival/tests/data.fluid       |   41 +
 win32/deps/library/survival/tests/data.interval    |   30 +
 win32/deps/library/survival/tests/data.motor       |   40 +
 win32/deps/library/survival/tests/data.peterson    |   20 +
 win32/deps/library/survival/tests/data.rat2        |  253 +
 win32/deps/library/survival/tests/data.smoke       |   33 +
 win32/deps/library/survival/tests/data.turbine     |   23 +
 win32/deps/library/survival/tests/data.valve       |   89 +
 win32/deps/library/survival/tests/detail.R         |   69 +
 win32/deps/library/survival/tests/detail.Rout.save |   89 +
 win32/deps/library/survival/tests/difftest.R       |   56 +
 .../deps/library/survival/tests/difftest.Rout.save |   96 +
 win32/deps/library/survival/tests/doaml.R          |   64 +
 win32/deps/library/survival/tests/doaml.Rout.save  |  185 +
 win32/deps/library/survival/tests/doweight.R       |  240 +
 .../deps/library/survival/tests/doweight.Rout.save |  429 ++
 win32/deps/library/survival/tests/expected.R       |  286 +
 .../deps/library/survival/tests/expected.Rout.save |  329 ++
 win32/deps/library/survival/tests/expected2.R      |   16 +
 .../library/survival/tests/expected2.Rout.save     |   36 +
 win32/deps/library/survival/tests/factor.R         |   33 +
 win32/deps/library/survival/tests/factor.Rout.save |   56 +
 win32/deps/library/survival/tests/factor2.R        |   26 +
 .../deps/library/survival/tests/factor2.Rout.save  |   52 +
 win32/deps/library/survival/tests/fr_cancer.R      |   27 +
 .../library/survival/tests/fr_cancer.Rout.save     |  120 +
 win32/deps/library/survival/tests/fr_colon.R       |   58 +
 .../deps/library/survival/tests/fr_colon.Rout.save |  317 ++
 win32/deps/library/survival/tests/fr_kidney.R      |   70 +
 .../library/survival/tests/fr_kidney.Rout.save     |  302 ++
 win32/deps/library/survival/tests/fr_lung.R        |   29 +
 .../deps/library/survival/tests/fr_lung.Rout.save  |   51 +
 win32/deps/library/survival/tests/fr_ovarian.R     |   21 +
 .../library/survival/tests/fr_ovarian.Rout.save    |   74 +
 win32/deps/library/survival/tests/fr_rat1.R        |   24 +
 .../deps/library/survival/tests/fr_rat1.Rout.save  |  109 +
 win32/deps/library/survival/tests/fr_rat2.R        |   65 +
 .../deps/library/survival/tests/fr_rat2.Rout.save  |  156 +
 win32/deps/library/survival/tests/fr_resid.R       |   94 +
 .../deps/library/survival/tests/fr_resid.Rout.save |  358 ++
 win32/deps/library/survival/tests/fr_simple.R      |   62 +
 .../library/survival/tests/fr_simple.Rout.save     |   87 +
 win32/deps/library/survival/tests/frailty.R        |   22 +
 .../deps/library/survival/tests/frailty.Rout.save  |   44 +
 win32/deps/library/survival/tests/frank.R          |   23 +
 win32/deps/library/survival/tests/frank.Rout.save  |   45 +
 win32/deps/library/survival/tests/gray1.rda        |  Bin 0 -> 3055 bytes
 win32/deps/library/survival/tests/infcox.R         |   35 +
 win32/deps/library/survival/tests/infcox.Rout.save |   61 +
 win32/deps/library/survival/tests/jasa.R           |   89 +
 win32/deps/library/survival/tests/jasa.Rout.save   |  289 +
 win32/deps/library/survival/tests/model.matrix.R   |   31 +
 .../library/survival/tests/model.matrix.Rout.save  |   53 +
 win32/deps/library/survival/tests/mrtest.R         |   28 +
 win32/deps/library/survival/tests/mrtest.Rout.save |   48 +
 win32/deps/library/survival/tests/nested.R         |   16 +
 win32/deps/library/survival/tests/nested.Rout.save |   37 +
 win32/deps/library/survival/tests/ovarian.R        |   61 +
 .../deps/library/survival/tests/ovarian.Rout.save  |  319 ++
 win32/deps/library/survival/tests/prednew.R        |   73 +
 .../deps/library/survival/tests/prednew.Rout.save  |  115 +
 win32/deps/library/survival/tests/pspline.R        |   34 +
 .../deps/library/survival/tests/pspline.Rout.save  |   60 +
 win32/deps/library/survival/tests/pyear.R          |  211 +
 win32/deps/library/survival/tests/pyear.Rout.save  |  669 +++
 win32/deps/library/survival/tests/r_capacitor.R    |   18 +
 .../library/survival/tests/r_capacitor.Rout.save   |   88 +
 win32/deps/library/survival/tests/r_donnell.R      |   60 +
 .../library/survival/tests/r_donnell.Rout.save     |  114 +
 win32/deps/library/survival/tests/r_lung.R         |   49 +
 win32/deps/library/survival/tests/r_lung.Rout.save |  165 +
 win32/deps/library/survival/tests/r_peterson.R     |   44 +
 .../library/survival/tests/r_peterson.Rout.save    |  117 +
 win32/deps/library/survival/tests/r_resid.R        |  109 +
 .../deps/library/survival/tests/r_resid.Rout.save  |  348 ++
 win32/deps/library/survival/tests/r_sas.R          |  259 +
 win32/deps/library/survival/tests/r_sas.Rout.save  |  438 ++
 win32/deps/library/survival/tests/r_scale.R        |   30 +
 .../deps/library/survival/tests/r_scale.Rout.save  |   55 +
 win32/deps/library/survival/tests/r_stanford.R     |   71 +
 .../library/survival/tests/r_stanford.Rout.save    |  111 +
 win32/deps/library/survival/tests/r_strata.R       |   60 +
 .../deps/library/survival/tests/r_strata.Rout.save |  148 +
 win32/deps/library/survival/tests/r_tdist.R        |   41 +
 .../deps/library/survival/tests/r_tdist.Rout.save  |  200 +
 win32/deps/library/survival/tests/r_user.R         |   29 +
 win32/deps/library/survival/tests/r_user.Rout.save |   53 +
 win32/deps/library/survival/tests/ratetable.R      |   63 +
 .../library/survival/tests/ratetable.Rout.save     |  164 +
 win32/deps/library/survival/tests/rounding.R       |   14 +
 .../deps/library/survival/tests/rounding.Rout.save |   34 +
 win32/deps/library/survival/tests/singtest.R       |   22 +
 .../deps/library/survival/tests/singtest.Rout.save |   50 +
 win32/deps/library/survival/tests/strata2.R        |   17 +
 .../deps/library/survival/tests/strata2.Rout.save  |   45 +
 win32/deps/library/survival/tests/stratatest.R     |   43 +
 .../library/survival/tests/stratatest.Rout.save    |   68 +
 .../deps/library/survival/tests/summary_survfit.R  |    5 +
 .../survival/tests/summary_survfit.Rout.save       |   54 +
 win32/deps/library/survival/tests/surv.R           |   23 +
 win32/deps/library/survival/tests/surv.Rout.save   |   59 +
 win32/deps/library/survival/tests/survfit2.R       |   13 +
 .../deps/library/survival/tests/survfit2.Rout.save |   33 +
 win32/deps/library/survival/tests/survreg2.R       |   62 +
 .../deps/library/survival/tests/survreg2.Rout.save |   87 +
 win32/deps/library/survival/tests/survtest.R       |   60 +
 .../deps/library/survival/tests/survtest.Rout.save |   99 +
 win32/deps/library/survival/tests/testci.R         |   67 +
 win32/deps/library/survival/tests/testci.Rout.save |   91 +
 win32/deps/library/survival/tests/testci2.R        |   52 +
 .../deps/library/survival/tests/testci2.Rout.save  |   72 +
 win32/deps/library/survival/tests/testnull.R       |   19 +
 .../deps/library/survival/tests/testnull.Rout.save |   42 +
 win32/deps/library/survival/tests/testreg.R        |   79 +
 .../deps/library/survival/tests/testreg.Rout.save  |  301 ++
 win32/deps/library/survival/tests/tiedtime.R       |   23 +
 .../deps/library/survival/tests/tiedtime.Rout.save |   44 +
 win32/deps/library/survival/tests/ties.rda         |  Bin 0 -> 6060 bytes
 win32/deps/library/survival/tests/tt.R             |   38 +
 win32/deps/library/survival/tests/turnbull.R       |  156 +
 .../deps/library/survival/tests/turnbull.Rout.save |  194 +
 win32/deps/library/tcltk/DESCRIPTION               |    8 +-
 win32/deps/library/tcltk/Meta/Rd.rds               |  Bin 2342 -> 2336 bytes
 win32/deps/library/tcltk/Meta/demo.rds             |  Bin 266 -> 266 bytes
 win32/deps/library/tcltk/Meta/hsearch.rds          |  Bin 2401 -> 2399 bytes
 win32/deps/library/tcltk/Meta/links.rds            |  Bin 0 -> 2034 bytes
 win32/deps/library/tcltk/Meta/nsInfo.rds           |  Bin 464 -> 464 bytes
 win32/deps/library/tcltk/Meta/package.rds          |  Bin 503 -> 490 bytes
 win32/deps/library/tcltk/NAMESPACE                 |    1 +
 win32/deps/library/tcltk/R-ex/Rex.zip              |  Bin 4703 -> 0 bytes
 win32/deps/library/tcltk/R/tcltk                   |    2 +-
 win32/deps/library/tcltk/R/tcltk.rdb               |  Bin 43108 -> 77227 bytes
 win32/deps/library/tcltk/R/tcltk.rdx               |  Bin 3337 -> 3483 bytes
 win32/deps/library/tcltk/demo/tkcanvas.R           |    2 +
 win32/deps/library/tcltk/demo/tkdensity.R          |    6 +-
 win32/deps/library/tcltk/demo/tkfaq.R              |    2 +
 win32/deps/library/tcltk/demo/tkttest.R            |    2 +
 win32/deps/library/tcltk/exec/Tk-frontend.R        |   20 +-
 win32/deps/library/tcltk/exec/console.tcl          |    2 +-
 win32/deps/library/tcltk/help/AnIndex              |    2 +
 win32/deps/library/tcltk/help/Rhelp.zip            |  Bin 15191 -> 0 bytes
 win32/deps/library/tcltk/help/aliases.rds          |  Bin 0 -> 2030 bytes
 win32/deps/library/tcltk/help/paths.rds            |  Bin 0 -> 254 bytes
 win32/deps/library/tcltk/help/tcltk.rdb            |  Bin 0 -> 50332 bytes
 win32/deps/library/tcltk/help/tcltk.rdx            |  Bin 0 -> 491 bytes
 win32/deps/library/tcltk/html/00Index.html         |  664 +++
 win32/deps/library/tcltk/html/R.css                |   57 +
 win32/deps/library/tcltk/libs/i386/tcltk.dll       |  Bin 0 -> 25600 bytes
 win32/deps/library/tcltk/libs/tcltk.dll            |  Bin 34816 -> 0 bytes
 .../library/tcltk/po/da/LC_MESSAGES/R-tcltk.mo     |  Bin 0 -> 2388 bytes
 .../deps/library/tcltk/po/da/LC_MESSAGES/tcltk.mo  |  Bin 0 -> 1353 bytes
 .../library/tcltk/po/de/LC_MESSAGES/R-tcltk.mo     |  Bin 0 -> 2370 bytes
 .../deps/library/tcltk/po/de/LC_MESSAGES/tcltk.mo  |  Bin 0 -> 1394 bytes
 .../tcltk/po/en quot/LC_MESSAGES/R-tcltk.mo        |  Bin 0 -> 2284 bytes
 .../library/tcltk/po/en quot/LC_MESSAGES/tcltk.mo  |  Bin 0 -> 1288 bytes
 .../library/tcltk/po/fr/LC_MESSAGES/R-tcltk.mo     |  Bin 0 -> 2522 bytes
 .../deps/library/tcltk/po/fr/LC_MESSAGES/tcltk.mo  |  Bin 0 -> 1474 bytes
 .../library/tcltk/po/it/LC_MESSAGES/R-tcltk.mo     |  Bin 0 -> 916 bytes
 .../library/tcltk/po/ja/LC_MESSAGES/R-tcltk.mo     |  Bin 0 -> 2861 bytes
 .../deps/library/tcltk/po/ja/LC_MESSAGES/tcltk.mo  |  Bin 0 -> 1533 bytes
 .../library/tcltk/po/ko/LC_MESSAGES/R-tcltk.mo     |  Bin 0 -> 2769 bytes
 .../deps/library/tcltk/po/ko/LC_MESSAGES/tcltk.mo  |  Bin 0 -> 1516 bytes
 .../library/tcltk/po/pl/LC_MESSAGES/R-tcltk.mo     |  Bin 0 -> 2592 bytes
 .../deps/library/tcltk/po/pl/LC_MESSAGES/tcltk.mo  |  Bin 0 -> 1519 bytes
 .../library/tcltk/po/pt_BR/LC_MESSAGES/R-tcltk.mo  |  Bin 0 -> 2534 bytes
 .../library/tcltk/po/pt_BR/LC_MESSAGES/tcltk.mo    |  Bin 0 -> 1440 bytes
 .../library/tcltk/po/ru/LC_MESSAGES/R-tcltk.mo     |  Bin 0 -> 2468 bytes
 .../deps/library/tcltk/po/ru/LC_MESSAGES/tcltk.mo  |  Bin 0 -> 1442 bytes
 .../library/tcltk/po/zh_CN/LC_MESSAGES/R-tcltk.mo  |  Bin 0 -> 2239 bytes
 .../library/tcltk/po/zh_CN/LC_MESSAGES/tcltk.mo    |  Bin 0 -> 1285 bytes
 win32/deps/library/tools/DESCRIPTION               |   11 +-
 win32/deps/library/tools/INDEX                     |   34 +-
 win32/deps/library/tools/Meta/Rd.rds               |  Bin 1755 -> 2586 bytes
 win32/deps/library/tools/Meta/hsearch.rds          |  Bin 1721 -> 2540 bytes
 win32/deps/library/tools/Meta/links.rds            |  Bin 0 -> 1299 bytes
 win32/deps/library/tools/Meta/nsInfo.rds           |  Bin 904 -> 1375 bytes
 win32/deps/library/tools/Meta/package.rds          |  Bin 519 -> 495 bytes
 win32/deps/library/tools/NAMESPACE                 |  119 +-
 win32/deps/library/tools/R-ex/Rex.zip              |  Bin 6174 -> 0 bytes
 win32/deps/library/tools/R/tools                   |    2 +-
 win32/deps/library/tools/R/tools.rdb               |  Bin 250107 -> 1089871 bytes
 win32/deps/library/tools/R/tools.rdx               |  Bin 4668 -> 8703 bytes
 win32/deps/library/tools/help/AnIndex              |   48 +-
 win32/deps/library/tools/help/Rhelp.zip            |  Bin 33103 -> 0 bytes
 win32/deps/library/tools/help/aliases.rds          |  Bin 0 -> 1054 bytes
 win32/deps/library/tools/help/paths.rds            |  Bin 0 -> 599 bytes
 win32/deps/library/tools/help/tools.rdb            |  Bin 0 -> 168932 bytes
 win32/deps/library/tools/help/tools.rdx            |  Bin 0 -> 1345 bytes
 win32/deps/library/tools/html/00Index.html         |  363 ++
 win32/deps/library/tools/html/R.css                |   57 +
 win32/deps/library/tools/libs/i386/tools.dll       |  Bin 0 -> 23040 bytes
 win32/deps/library/tools/libs/tools.dll            |  Bin 12800 -> 0 bytes
 .../library/tools/po/da/LC_MESSAGES/R-tools.mo     |  Bin 0 -> 7100 bytes
 .../deps/library/tools/po/da/LC_MESSAGES/tools.mo  |  Bin 0 -> 977 bytes
 .../library/tools/po/de/LC_MESSAGES/R-tools.mo     |  Bin 0 -> 37421 bytes
 .../deps/library/tools/po/de/LC_MESSAGES/tools.mo  |  Bin 0 -> 985 bytes
 .../tools/po/en quot/LC_MESSAGES/R-tools.mo        |  Bin 0 -> 35950 bytes
 .../library/tools/po/en quot/LC_MESSAGES/tools.mo  |  Bin 0 -> 914 bytes
 .../library/tools/po/fr/LC_MESSAGES/R-tools.mo     |  Bin 0 -> 38744 bytes
 .../deps/library/tools/po/fr/LC_MESSAGES/tools.mo  |  Bin 0 -> 1038 bytes
 .../library/tools/po/it/LC_MESSAGES/R-tools.mo     |  Bin 0 -> 5734 bytes
 .../deps/library/tools/po/it/LC_MESSAGES/tools.mo  |  Bin 0 -> 661 bytes
 .../library/tools/po/ja/LC_MESSAGES/R-tools.mo     |  Bin 0 -> 44108 bytes
 .../deps/library/tools/po/ja/LC_MESSAGES/tools.mo  |  Bin 0 -> 1111 bytes
 .../library/tools/po/ko/LC_MESSAGES/R-tools.mo     |  Bin 0 -> 40547 bytes
 .../deps/library/tools/po/ko/LC_MESSAGES/tools.mo  |  Bin 0 -> 1167 bytes
 .../library/tools/po/pl/LC_MESSAGES/R-tools.mo     |  Bin 0 -> 38844 bytes
 .../deps/library/tools/po/pl/LC_MESSAGES/tools.mo  |  Bin 0 -> 1103 bytes
 .../library/tools/po/pt_BR/LC_MESSAGES/R-tools.mo  |  Bin 0 -> 2446 bytes
 .../library/tools/po/pt_BR/LC_MESSAGES/tools.mo    |  Bin 0 -> 809 bytes
 .../library/tools/po/ru/LC_MESSAGES/R-tools.mo     |  Bin 0 -> 36732 bytes
 .../deps/library/tools/po/ru/LC_MESSAGES/tools.mo  |  Bin 0 -> 1086 bytes
 .../library/tools/po/tr/LC_MESSAGES/R-tools.mo     |  Bin 0 -> 522 bytes
 .../library/tools/po/zh_CN/LC_MESSAGES/R-tools.mo  |  Bin 0 -> 33382 bytes
 .../library/tools/po/zh_CN/LC_MESSAGES/tools.mo    |  Bin 0 -> 874 bytes
 win32/deps/library/tools/tests/undoc.R             |    4 +
 win32/deps/library/utils/DESCRIPTION               |    8 +-
 win32/deps/library/utils/INDEX                     |   64 +-
 win32/deps/library/utils/Meta/Rd.rds               |  Bin 5561 -> 6170 bytes
 win32/deps/library/utils/Meta/hsearch.rds          |  Bin 5437 -> 5992 bytes
 win32/deps/library/utils/Meta/links.rds            |  Bin 0 -> 3110 bytes
 win32/deps/library/utils/Meta/nsInfo.rds           |  Bin 1911 -> 2141 bytes
 win32/deps/library/utils/Meta/package.rds          |  Bin 489 -> 470 bytes
 win32/deps/library/utils/Meta/vignette.rds         |  Bin 0 -> 208 bytes
 win32/deps/library/utils/NAMESPACE                 |  103 +-
 win32/deps/library/utils/R-ex/Rex.zip              |  Bin 31361 -> 0 bytes
 win32/deps/library/utils/R/utils                   |    2 +-
 win32/deps/library/utils/R/utils.rdb               |  Bin 186059 -> 632254 bytes
 win32/deps/library/utils/R/utils.rdx               |  Bin 4780 -> 6157 bytes
 win32/deps/library/utils/Sweave/Sweave-test-1.Rnw  |   20 +-
 win32/deps/library/utils/Sweave/example-1.Rnw      |   29 +
 win32/deps/library/utils/doc/Sweave.R              |   39 +
 win32/deps/library/utils/doc/Sweave.Rnw            |  814 +++
 win32/deps/library/utils/doc/Sweave.pdf            |  Bin 0 -> 321092 bytes
 win32/deps/library/utils/doc/index.html            |   27 +
 win32/deps/library/utils/help/AnIndex              |   71 +-
 win32/deps/library/utils/help/Rhelp.zip            |  Bin 154521 -> 0 bytes
 win32/deps/library/utils/help/aliases.rds          |  Bin 0 -> 2584 bytes
 win32/deps/library/utils/help/paths.rds            |  Bin 0 -> 1276 bytes
 win32/deps/library/utils/help/utils.rdb            |  Bin 0 -> 594322 bytes
 win32/deps/library/utils/help/utils.rdx            |  Bin 0 -> 3183 bytes
 win32/deps/library/utils/html/00Index.html         |  670 +++
 win32/deps/library/utils/html/R.css                |   57 +
 .../library/utils/po/da/LC_MESSAGES/R-utils.mo     |  Bin 0 -> 6289 bytes
 .../library/utils/po/de/LC_MESSAGES/R-utils.mo     |  Bin 0 -> 38513 bytes
 .../utils/po/en quot/LC_MESSAGES/R-utils.mo        |  Bin 0 -> 37238 bytes
 .../library/utils/po/fr/LC_MESSAGES/R-utils.mo     |  Bin 0 -> 40117 bytes
 .../library/utils/po/ja/LC_MESSAGES/R-utils.mo     |  Bin 0 -> 45377 bytes
 .../library/utils/po/ko/LC_MESSAGES/R-utils.mo     |  Bin 0 -> 43182 bytes
 .../library/utils/po/pl/LC_MESSAGES/R-utils.mo     |  Bin 0 -> 40363 bytes
 .../library/utils/po/pt_BR/LC_MESSAGES/R-utils.mo  |  Bin 0 -> 1407 bytes
 .../library/utils/po/ru/LC_MESSAGES/R-utils.mo     |  Bin 0 -> 38036 bytes
 .../library/utils/po/tr/LC_MESSAGES/R-utils.mo     |  Bin 0 -> 999 bytes
 .../library/utils/po/zh_CN/LC_MESSAGES/R-utils.mo  |  Bin 0 -> 33846 bytes
 win32/deps/library/utils/tests/Sexpr-verb-ex.Rnw   |   44 +
 win32/deps/library/utils/tests/Sweave-tst.R        |   84 +
 win32/deps/library/utils/tests/completion.R        |   29 +
 win32/deps/library/utils/tests/customgraphics.Rnw  |   20 +
 win32/deps/library/utils/tests/keepsource.Rnw      |   12 +
 win32/deps/library/utils/tests/swv-keepSrc-1.Rnw   |   47 +
 1799 files changed, 87462 insertions(+), 20119 deletions(-)
---
diff --git a/win32/deps/bin/R.exe b/win32/deps/bin/R.exe
index e2c6803..43731fa 100644
Binary files a/win32/deps/bin/R.exe and b/win32/deps/bin/R.exe differ
diff --git a/win32/deps/bin/Rscript.exe b/win32/deps/bin/Rscript.exe
index 0d37a50..43731fa 100644
Binary files a/win32/deps/bin/Rscript.exe and b/win32/deps/bin/Rscript.exe differ
diff --git a/win32/deps/bin/i386/R.dll b/win32/deps/bin/i386/R.dll
new file mode 100644
index 0000000..ba7b61a
Binary files /dev/null and b/win32/deps/bin/i386/R.dll differ
diff --git a/win32/deps/bin/i386/R.exe b/win32/deps/bin/i386/R.exe
new file mode 100644
index 0000000..6697c70
Binary files /dev/null and b/win32/deps/bin/i386/R.exe differ
diff --git a/win32/deps/bin/i386/RSetReg.exe b/win32/deps/bin/i386/RSetReg.exe
new file mode 100644
index 0000000..3e5eea2
Binary files /dev/null and b/win32/deps/bin/i386/RSetReg.exe differ
diff --git a/win32/deps/bin/i386/Rblas.dll b/win32/deps/bin/i386/Rblas.dll
new file mode 100644
index 0000000..6dd7a92
Binary files /dev/null and b/win32/deps/bin/i386/Rblas.dll differ
diff --git a/win32/deps/bin/i386/Rcmd.exe b/win32/deps/bin/i386/Rcmd.exe
new file mode 100644
index 0000000..6aca7db
Binary files /dev/null and b/win32/deps/bin/i386/Rcmd.exe differ
diff --git a/win32/deps/bin/i386/Rgraphapp.dll b/win32/deps/bin/i386/Rgraphapp.dll
new file mode 100644
index 0000000..c17e5c7
Binary files /dev/null and b/win32/deps/bin/i386/Rgraphapp.dll differ
diff --git a/win32/deps/bin/i386/Rgui.exe b/win32/deps/bin/i386/Rgui.exe
new file mode 100644
index 0000000..b0757cd
Binary files /dev/null and b/win32/deps/bin/i386/Rgui.exe differ
diff --git a/win32/deps/bin/i386/Riconv.dll b/win32/deps/bin/i386/Riconv.dll
new file mode 100644
index 0000000..4bc6323
Binary files /dev/null and b/win32/deps/bin/i386/Riconv.dll differ
diff --git a/win32/deps/bin/i386/Rlapack.dll b/win32/deps/bin/i386/Rlapack.dll
new file mode 100644
index 0000000..b96ad74
Binary files /dev/null and b/win32/deps/bin/i386/Rlapack.dll differ
diff --git a/win32/deps/bin/i386/Rscript.exe b/win32/deps/bin/i386/Rscript.exe
new file mode 100644
index 0000000..fd03c0a
Binary files /dev/null and b/win32/deps/bin/i386/Rscript.exe differ
diff --git a/win32/deps/bin/i386/Rterm.exe b/win32/deps/bin/i386/Rterm.exe
new file mode 100644
index 0000000..1efc779
Binary files /dev/null and b/win32/deps/bin/i386/Rterm.exe differ
diff --git a/win32/deps/bin/i386/Rzlib.dll b/win32/deps/bin/i386/Rzlib.dll
new file mode 100644
index 0000000..133975c
Binary files /dev/null and b/win32/deps/bin/i386/Rzlib.dll differ
diff --git a/win32/deps/bin/i386/open.exe b/win32/deps/bin/i386/open.exe
new file mode 100644
index 0000000..24aa7ae
Binary files /dev/null and b/win32/deps/bin/i386/open.exe differ
diff --git a/win32/deps/etc/Rcmd_environ b/win32/deps/etc/Rcmd_environ
index 8276a97..e308ee5 100644
--- a/win32/deps/etc/Rcmd_environ
+++ b/win32/deps/etc/Rcmd_environ
@@ -2,40 +2,35 @@
 R_SHARE_DIR=${R_HOME}/share
 R_INCLUDE_DIR=${R_HOME}/include
 R_DOC_DIR=${R_HOME}/doc
-R_LIBS=${R_HOME}/lib/R/library
 R_ARCH=
 
 ## from Rcmd
 R_OSTYPE=windows
-PERL5LIB=${R_SHARE_DIR}/perl;${PERL5LIB}
-TEXINPUTS=.;${TEXINPUTS};${R_SHARE_DIR}/texmf;
+TEXINPUTS=.;${TEXINPUTS};${R_SHARE_DIR}/texmf/tex/latex;
+BIBINPUTS=.;${BIBINPUTS};${R_SHARE_DIR}/texmf/bibtex/bib;
+BSTINPUTS=.;${BSTINPUTS};${R_SHARE_DIR}/texmf/bibtex/bst;
 
 ## from etc/Renviron
-R_PLAFORM='i386-pc-mingw32'
+# R_PLATFORM='i386-pc-mingw32'
 R_PAPERSIZE_USER=${R_PAPERSIZE}
 R_PAPERSIZE=${R_PAPERSIZE-'a4'}
-## Default TeXMF stuff
-R_LATEXCMD=${R_LATEXCMD-${LATEX-'latex'}}
-R_PDFLATEXCMD=${R_PDFLATEXCMD-${PDFLATEX-'pdflatex'}}
-R_DVIPSCMD=${R_DVIPSCMD-${DVIPS-'dvips'}}
-R_MAKEINDEXCMD=${R_MAKEINDEX-${MAKEINDEX-'makeindex'}}
-R_RD4DVI=${R_RD4DVI-'ae'}
-R_RD4PDF=${R_RD4PDF-'times,hyper'}
+# for Rd2dpf, reference manual
+R_RD4PDF=${R_RD4PDF-'times,inconsolata,hyper'}
+## used for options("texi2dvi")
+# R_TEXI2DVICMD=${R_TEXI2DVICMD-${TEXI2DVI-'texi2dvi'}}
+## used by INSTALL, check, build
+R_GZIPCMD=${R_GZIPCMD-'gzip'}
 ## Default zip/unzip commands
 R_UNZIPCMD=${R_UNZIPCMD-'unzip'}
 R_ZIPCMD=${R_ZIPCMD-'zip'}
+R_BZIPCMD=${R_BZIPCMD-'bzip2'}
 ## Default browser
-R_BROWSER=${R_BROWSER-'open'}
+# R_BROWSER=${R_BROWSER-'open'}
 ## Default editor
-#EDITOR=${EDITOR-${VISUAL-vi}}
+# EDITOR=${EDITOR-${VISUAL-vi}}
 ## Default pager
-#PAGER=${PAGER-''}
+# PAGER=${PAGER-''}
 ## Default PDF viewer
-R_PDFVIEWER=${R_PDFVIEWER-'open'}
-## Use configure values
-AWK=gawk
-GREP='grep -E'
-#MAKE=${MAKE-make'}
-#PERL=${PERL-perl}
+# R_PDFVIEWER=${R_PDFVIEWER-'open'}
+# MAKE=${MAKE-make}
 SED=${SED-sed}
-#TAR=${TAR-tar}
diff --git a/win32/deps/etc/Rdevga b/win32/deps/etc/Rdevga
index cb361fb..c2d2dcb 100644
--- a/win32/deps/etc/Rdevga
+++ b/win32/deps/etc/Rdevga
@@ -4,9 +4,9 @@
 # Format is 
 # [TT] face:style
 # where style is plain, bold, italic or bold&italic.
-# If 'TT' is present, only True Type fonts are searched.
+# If 'TT' is present, only TrueType/OpenType fonts are searched.
 # Remarks:
-#   (a) Windows graphics engine can only rotate True Type fonts;
+#   (a) Windows graphics engine can only rotate TrueType fonts;
 #   (b) Only the first 32 fonts will be used.
 
 TT Arial : plain
diff --git a/win32/deps/etc/Rprofile.site b/win32/deps/etc/Rprofile.site
new file mode 100644
index 0000000..f909b59
--- /dev/null
+++ b/win32/deps/etc/Rprofile.site
@@ -0,0 +1,23 @@
+# Things you might want to change
+
+# options(papersize="a4")
+# options(editor="notepad")
+# options(pager="internal")
+
+# set the default help type
+# options(help_type="text")
+  options(help_type="html")
+
+# set a site library
+# .Library.site <- file.path(chartr("\\", "/", R.home()), "site-library")
+
+# set a CRAN mirror
+# local({r <- getOption("repos")
+#       r["CRAN"] <- "http://my.local.cran";
+#       options(repos=r)})
+
+# Give a fortune cookie, but only to interactive sessions
+# (This would need the fortunes package to be installed.)
+#  if (interactive()) 
+#    fortunes::fortune()
+
diff --git a/win32/deps/etc/i386/Makeconf b/win32/deps/etc/i386/Makeconf
new file mode 100644
index 0000000..e9ad4d4
--- /dev/null
+++ b/win32/deps/etc/i386/Makeconf
@@ -0,0 +1,219 @@
+#-*- Makefile -*-
+# $(R_HOME}/etc$(R_ARCH)/Makeconf
+
+# Hand-edited version for gnuwin32.
+
+ifdef DEBUG
+  DLLFLAGS=
+  DEBUGFLAG=-gdwarf-2
+else
+  DLLFLAGS=-s
+  DEBUGFLAG=
+endif
+
+DLLFLAGS+= -static-libgcc
+LINKFLAGS+= -static-libgcc
+
+## Things which are substituted by fixed/Makefile (and also -O3 -> -O2)
+WIN = 32
+BINPREF = 
+# SYMPAT = 's/^.* [BCDRT] _/ /p' for 32-bit
+# SYMPAT = 's/^.* [BCDRT] / /p' for 64-bit
+SYMPAT = 's/^.* [BCDRT] _/ /p'
+IMPDIR = bin/i386
+# flags for multilib builds, for compilers, dlltool and windres
+M_ARCH = 
+DT_ARCH = 
+RC_ARCH = 
+# Used by packages tcltk and tkrplot
+TCL_HOME = $(R_HOME)/Tcl
+LOCAL_SOFT = 
+
+ifneq ($(strip $(LOCAL_SOFT)),)
+LOCAL_CPPFLAGS = -I"$(LOCAL_SOFT)/include"
+LOCAL_LIBS = -L"$(LOCAL_SOFT)/lib$(R_ARCH)" -L"$(LOCAL_SOFT)/lib"
+endif
+
+DLLTOOL = $(BINPREF)dlltool --as $(BINPREF)as $(DT_ARCH)
+DLLTOOLFLAGS = -k
+NM = $(BINPREF)nm
+RESCOMP = $(BINPREF)windres $(RC_ARCH)
+## MAIN_LD needs to be set by the package
+LINKER = $(MAIN_LD)
+## as a default
+DLL = $(CC)
+
+## Things defined in Renviron on Unix
+SED = sed
+TAR = tar
+
+## Things defined in MkRules
+CAT = cat
+CP = cp
+MKDIR = mkdir
+RM = rm -f
+SORT = sort
+
+## For use in packages
+GRAPHAPP_LIB = -lRgraphapp
+TCL_VERSION = 85
+ZLIB_LIBS = -lRzlib
+
+AR = $(BINPREF)ar
+## Used by packages 'maps' and 'mapdata'
+AWK = gawk
+BLAS_LIBS = -L"$(R_HOME)/$(IMPDIR)" -lRblas
+C_VISIBILITY = 
+CC = $(BINPREF)gcc $(M_ARCH)
+CFLAGS = -O3 -Wall $(DEBUGFLAG) -std=gnu99 -mtune=core2
+CPICFLAGS = 
+CPPFLAGS =
+CXX = $(BINPREF)g++ $(M_ARCH)
+CXXCPP = $(CXX) -E
+CXXFLAGS = -O2 -Wall $(DEBUGFLAG) -mtune=core2
+CXXPICFLAGS = 
+DYLIB_EXT = .dll
+DYLIB_LD = $(DLL)
+DYLIB_LDFLAGS = -shared
+DYLIB_LINK = $(DYLIB_LD) $(DYLIB_LDFLAGS) $(LDFLAGS)
+ECHO = echo
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+FC = $(BINPREF)gfortran $(M_ARCH)
+FCFLAGS = -O3 $(DEBUGFLAG) -mtune=core2
+# additional libs needed when linking with $(FC), e.g. on Solaris
+FCLIBS =
+F77 = $(BINPREF)gfortran $(M_ARCH)
+F77_VISIBILITY = 
+FFLAGS = -O3 $(DEBUGFLAG) -mtune=core2
+FLIBS = -lgfortran
+FCPICFLAGS =
+FPICFLAGS = 
+FOUNDATION_CPPFLAGS =
+FOUNDATION_LIBS =
+JAR =
+JAVA =
+JAVAC = 
+JAVAH =
+# JAVA_HOME = 
+# JAVA_LD_LIBRARY_PATH = 
+JAVA_LIBS = -L"$(JAVA_HOME)/bin/client" -ljvm -ljvm-w32
+JAVA_CPPFLAGS = -I"$(JAVA_HOME)/../include" -I"$(JAVA_HOME)/../include/win32"
+LAPACK_LIBS = -L"$(R_HOME)/$(IMPDIR)" -lRlapack
+## we only need this is if it is external, as otherwise link to R
+LIBINTL=
+LIBM = -lm
+LIBR = -L"$(R_HOME)/$(IMPDIR)" -lR
+LIBS =  -lm
+## needed by R CMD config
+LIBnn = lib
+LIBTOOL =
+LDFLAGS =
+## needed to build applications linking to static libR
+# MAIN_LD =
+# MAIN_LDFLAGS =
+# MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LDFLAGS)
+# don't have this: would 'mkdir -p' do?
+# MKINSTALLDIRS = $(R_HOME)/bin/mkinstalldirs
+OBJC = $(CC)
+OBJCFLAGS = -O2
+OBJC_LIBS = -lobjc
+OBJCXX =
+R_ARCH = /i386
+RANLIB = $(BINPREF)ranlib
+SAFE_FFLAGS = -O3 -ffloat-store
+SED = sed
+## it seems some makes (but not ours) get upset if SHELL is set.
+# SHELL = /bin/sh
+SHLIB_CFLAGS = 
+SHLIB_CXXFLAGS = 
+SHLIB_CXXLD = $(CXX)
+## ideally -shared -static-libstdc++, but not for gcc 4.2.1
+SHLIB_CXXLDFLAGS = -shared
+SHLIB_EXT = .dll
+SHLIB_FCLD = $(FC)
+## ideally -shared -static-libgfortran, but not for gcc 4.2.1
+SHLIB_FCLDFLAGS = -shared
+SHLIB_FFLAGS = 
+SHLIB_LD = $(CC)
+SHLIB_LDFLAGS = -shared
+SHLIB_LIBADD =
+SHLIB_LINK = $(SHLIB_LD) -Wl,--export-all-symbols $(SHLIB_LDFLAGS) $(LDFLAGS)
+SHLIB_OPENMP_CFLAGS = -fopenmp
+SHLIB_OPENMP_CXXFLAGS = -fopenmp
+SHLIB_OPENMP_FCFLAGS = -fopenmp
+SHLIB_OPENMP_FFLAGS = -fopenmp
+SHLIB_PTHREAD_FLAGS = -pthread
+STRIP_LIBS = $(BINPREF)strip --strip-unneeded
+STRIP_STATIC_LIBS = $(BINPREF)strip --strip-debug
+TCLTK_CPPFLAGS = -I "$(TCL_HOME)/include" -DWin32
+TCLTK_LIBS = -L"$(TCL_HOME)/bin" -ltcl$(TCL_VERSION) -ltk$(TCL_VERSION)
+
+STATIC_LIBR =
+
+R_XTRA_CFLAGS =
+R_XTRA_CPPFLAGS = -I"$(R_HOME)/include" -DNDEBUG
+R_XTRA_CXXFLAGS = 
+R_XTRA_FFLAGS = 
+
+ALL_CFLAGS = $(R_XTRA_CFLAGS) $(PKG_CFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(CFLAGS)
+ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(PKG_CPPFLAGS) $(CPPFLAGS) $($*-CPPFLAGS) $(CLINK_CPPFLAGS) $(LOCAL_CPPFLAGS)
+ALL_CXXFLAGS = $(R_XTRA_CXXFLAGS) $(PKG_CXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(CXXFLAGS)
+ALL_OBJCFLAGS = $(PKG_OBJCFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(OBJCFLAGS)
+ALL_OBJCXXFLAGS = $(PKG_OBJCXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(OBJCXXFLAGS)
+ALL_FFLAGS = $(R_XTRA_FFLAGS) $(PKG_FFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FFLAGS)
+ALL_LIBS = $(PKG_LIBS) $(LOCAL_LIBS) $(SHLIB_LIBADD) $(LIBR) $(LIBINTL)
+
+.SUFFIXES:
+.SUFFIXES: .c .cc .cpp .d .f .f90 .f95 .m .mm .M .o .a .def .dll .exe .rc
+
+.c.o:
+	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@
+.c.d:
+	@echo "making $@ from $<"
+	@$(CC) -std=gnu99 -MM $(ALL_CPPFLAGS) $< > $@
+.cc.o:
+	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
+.cpp.o:
+	$(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@
+.cc.d:
+	@echo "making $@ from $<"
+	@$(CXX) -M $(ALL_CPPFLAGS) $< > $@
+.cpp.d:
+	@echo "making $@ from $<"
+	@$(CXX) -M $(ALL_CPPFLAGS) $< > $@
+.m.o:
+	$(OBJC) $(ALL_CPPFLAGS) $(ALL_OBJCFLAGS) -c $< -o $@
+.m.d:
+	@echo "making $@ from $<"
+	@$(OBJC) -MM $(ALL_CPPFLAGS) $< > $@
+.mm.o:
+	$(OBJCXX) $(ALL_CPPFLAGS) $(ALL_OBJCXXFLAGS) -c $< -o $@
+.M.o:
+	$(OBJCXX) $(ALL_CPPFLAGS) $(ALL_OBJCXXFLAGS) -c $< -o $@
+.f.o:
+	$(F77) $(ALL_FFLAGS) -c $< -o $@
+.f95.o:
+	$(FC) $(PKG_FCFLAGS) $(FCPICFLAGS) $(FCFLAGS) -c  $< -o $@
+.f90.o:
+	$(FC) $(PKG_FCFLAGS) $(FCPICFLAGS) $(FCFLAGS) -c  $< -o $@
+
+%.exe:
+	$(LINKER) $(LINKFLAGS) $($*-LINKFLAGS) -o $@ $^ $($*-LIBS) $(LOCAL_LIBS) $(LIBS)
+
+%.dll:
+	@echo EXPORTS > $*.def
+	@$(NM) $^ | $(SED) -n $(SYMPAT) >> $*.def
+	$(SHLIB_LD) -shared $(DLLFLAGS) -o $@ $*.def $^ $(ALL_LIBS)
+	@$(RM) $*.def
+
+lib%.dll.a: %.def
+	$(DLLTOOL) $(DLLTOOLFLAGS) $($*-DLLTOOLFLAGS) --dllname $*.dll --input-def $*.def --output-lib $@
+
+%.a:
+	@$(RM) $@
+	$(AR) crs $@ $^
+
+%.o: %.rc
+	$(RESCOMP) $(RESFLAGS) -i $< -o $@
diff --git a/win32/deps/etc/repositories b/win32/deps/etc/repositories
new file mode 100644
index 0000000..440c10b
--- /dev/null
+++ b/win32/deps/etc/repositories
@@ -0,0 +1,20 @@
+## The fields here are tab-delimited: there is a row name
+## menu_name 	is the name to be used in setRepositories()
+## URL 		is the base URL (see R-admin.texi)
+## default 	is whether this should be a default choice
+## source, win.binary, mac.binary   indicate if the corresponding type is present
+##
+## BioC entries are version-specific, with %v getting expanded to the
+## BioC version associated with the current R version.
+## Also, %bm is substituted from the setting of getOption("BioC_mirror")
+##
+menu_name	URL	default	source	win.binary	mac.binary
+CRAN	CRAN	@CRAN@	TRUE	TRUE	TRUE	TRUE
+CRANextra	CRAN (extras)	"http://www.stats.ox.ac.uk/pub/RWin";	TRUE	FALSE	TRUE	TRUE
+BioCsoft	"BioC software"	%bm/packages/%v/bioc	FALSE	TRUE	TRUE	TRUE
+BioCann	"BioC annotation"	%bm/packages/%v/data/annotation	FALSE	TRUE	TRUE	TRUE
+BioCexp	"BioC experiment"	%bm/packages/%v/data/experiment	FALSE	TRUE	TRUE	TRUE
+BioCextra	"BioC extra"	%bm/packages/%v/extra	FALSE	TRUE	TRUE	TRUE
+Omegahat	Omegahat	http://www.omegahat.org/R	FALSE	TRUE	TRUE	FALSE
+R-Forge	R-Forge	http://R-Forge.R-project.org	FALSE	TRUE	TRUE	TRUE
+rforge.net	rforge.net	http://www.rforge.net	FALSE	TRUE	TRUE	TRUE
diff --git a/win32/deps/library/Cairo/DESCRIPTION b/win32/deps/library/Cairo/DESCRIPTION
new file mode 100644
index 0000000..ef681dc
--- /dev/null
+++ b/win32/deps/library/Cairo/DESCRIPTION
@@ -0,0 +1,32 @@
+Package: Cairo
+Version: 1.5-2
+Title: R graphics device using cairo graphics library for creating
+        high-quality bitmap (PNG, JPEG, TIFF), vector (PDF, SVG,
+        PostScript) and display (X11 and Win32) output.
+Author: Simon Urbanek <Simon Urbanek r-project org>, Jeffrey Horner
+        <jeff horner vanderbilt edu>
+Maintainer: Simon Urbanek <Simon Urbanek r-project org>
+Depends: R (>= 2.4.0)
+Suggests: png
+Enhances: FastRWeb
+Description: This package provides a Cairo graphics device that can be
+        use to create high-quality vector (PDF, PostScript and SVG) and
+        bitmap output (PNG,JPEG,TIFF), and high-quality rendering in
+        displays (X11 and Win32). Since it uses the same back-end for
+        all output, copying across formats is WYSIWYG. Files are
+        created without the dependence on X11 or other external
+        programs. This device supports alpha channel (semi-transparent
+        drawing) and resulting images can contain transparent and
+        semi-transparent regions. It is ideal for use in server
+        environemnts (file output) and as a replacement for other
+        devices that don't have Cairo's capabilities such as alpha
+        support or anti-aliasing. Backends are modular such that any
+        subset of backends is supported.
+License: GPL-2
+SystemRequirements: cairo (>= 1.2 http://www.cairographics.org/)
+URL: http://www.rforge.net/Cairo/
+Packaged: 2012-11-05 18:22:35 UTC; svnuser
+Repository: CRAN
+Date/Publication: 2012-11-05 19:46:52
+Built: R 2.15.2; i386-w64-mingw32; 2013-01-03 17:06:29 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/Cairo/INDEX b/win32/deps/library/Cairo/INDEX
new file mode 100644
index 0000000..1708875
--- /dev/null
+++ b/win32/deps/library/Cairo/INDEX
@@ -0,0 +1,10 @@
+Cairo                   Create a new Cairo-based graphics device
+Cairo.capabilities      Reports which output types are supported by
+                        this Cairo build
+Cairo.capture           Capture contents of an image backend.
+Cairo.onSave            Cairo callbacks
+Cairo.serial            Check for changes in the graphics state of
+                        Cairo devices.
+CairoFontMatch          Find installed fonts with a fontconfig pattern
+CairoFonts              Set the fonts used for all Cairo graphics
+                        devices.
diff --git a/win32/deps/library/Cairo/MD5 b/win32/deps/library/Cairo/MD5
new file mode 100644
index 0000000..395e2d2
--- /dev/null
+++ b/win32/deps/library/Cairo/MD5
@@ -0,0 +1,23 @@
+367e1d046a1b3bcc1bd575b171b84a48 *DESCRIPTION
+fc2c0a74538e45f22ff465b0e64fafec *INDEX
+e3e837c005b332a79b709a50da125b2e *Meta/Rd.rds
+4db599095e401fe2698de6ec03c1bc55 *Meta/hsearch.rds
+62f4a47498cb94c97fdefef3dbb5ae37 *Meta/links.rds
+f0fe1e54466b28647836b904a036c97c *Meta/nsInfo.rds
+2711cfe07728704728dc42b4fca35826 *Meta/package.rds
+a4757769cbeeb852905ad940c7ac7029 *NAMESPACE
+3b624acf7084dcf42766ad70a70644af *NEWS
+240d28d145138a75831809e31a480bad *R/Cairo
+9a22fef89f7d92813d04c9f689d7374f *R/Cairo.rdb
+1d82db82df08a0dde48e4496fc390431 *R/Cairo.rdx
+87c65a40e4a86e4ef484df5260fb21df *help/AnIndex
+cc9130832b75b9d47cd1c34820a8c1ff *help/Cairo.rdb
+ff518ffddf788112cb32d7b0b1527544 *help/Cairo.rdx
+59e0de616bb718ce1a5023e0c84b637b *help/aliases.rds
+913c51196267929a30ef2de38f9d8889 *help/paths.rds
+8cc3b6376814258a0c58e2cb4443edfc *html/00Index.html
+444535b9cb76ddff1bab1e1865a3fb14 *html/R.css
+470c7f09a7bf4dc3a363e555443a8bf6 *libs/i386/Cairo.dll
+3ed973be2396fc83baea840e8bb59c24 *libs/i386/symbols.rds
+3a9c89cbe58b07e653a6b938d0c0a63d *libs/x64/Cairo.dll
+9a6cbf714e835eacd7ac8b19d633c197 *libs/x64/symbols.rds
diff --git a/win32/deps/library/Cairo/Meta/Rd.rds b/win32/deps/library/Cairo/Meta/Rd.rds
new file mode 100644
index 0000000..e610773
Binary files /dev/null and b/win32/deps/library/Cairo/Meta/Rd.rds differ
diff --git a/win32/deps/library/Cairo/Meta/hsearch.rds b/win32/deps/library/Cairo/Meta/hsearch.rds
new file mode 100644
index 0000000..4fe8318
Binary files /dev/null and b/win32/deps/library/Cairo/Meta/hsearch.rds differ
diff --git a/win32/deps/library/Cairo/Meta/links.rds b/win32/deps/library/Cairo/Meta/links.rds
new file mode 100644
index 0000000..40cf766
Binary files /dev/null and b/win32/deps/library/Cairo/Meta/links.rds differ
diff --git a/win32/deps/library/Cairo/Meta/nsInfo.rds b/win32/deps/library/Cairo/Meta/nsInfo.rds
new file mode 100644
index 0000000..6248edd
Binary files /dev/null and b/win32/deps/library/Cairo/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/Cairo/Meta/package.rds b/win32/deps/library/Cairo/Meta/package.rds
new file mode 100644
index 0000000..143bed0
Binary files /dev/null and b/win32/deps/library/Cairo/Meta/package.rds differ
diff --git a/win32/deps/library/Cairo/NAMESPACE b/win32/deps/library/Cairo/NAMESPACE
new file mode 100644
index 0000000..0af3d7e
--- /dev/null
+++ b/win32/deps/library/Cairo/NAMESPACE
@@ -0,0 +1 @@
+exportPattern("^Cairo")
diff --git a/win32/deps/library/Cairo/NEWS b/win32/deps/library/Cairo/NEWS
new file mode 100644
index 0000000..5da0c42
--- /dev/null
+++ b/win32/deps/library/Cairo/NEWS
@@ -0,0 +1,224 @@
+NEWS/Changelog
+
+1.5-2	(2012-11-05)
+    o	added Cairo.onSave() callback which allows R code to be run
+	when Cairo finishes a page
+
+    o	added Cairo.serial() function which allows user code to check
+	whether the graphics have been updated
+
+    o	bugfix/update in Cairo connection patch (by Karl Millar)
+
+
+1.5-1	(2011-12-10)
+    o	add support for dev.hold()/dev.flush()
+
+    o	use new R 2.14.0 device capabilities advertizing feature
+
+    o	fix memory leak when setting fonts via CairoFonts()
+
+    o	explicitly request font anti-aliasing even if it is not the
+	surface default - in particular Windows has disabled font
+	anti-aliasing by default
+
+
+1.5-0	(2011-09-30)
+    o	fix swapped bold vs italic traits if freetype is not available
+
+    o	use Times font for symbols on Windows because Symbol font
+	doesn't seem to support Unicode
+
+    o	add support for poly-paths
+
+    o	add support for dev.capture()/grid.cap()
+
+    o	added new type "raster" that creates an image back-end without
+	any output file. It can be used in conjunction with
+	dev.capture() to create in-memory image representations, e.g.:
+	Cairo(type='raster')
+	plot(1:10, col=2)
+	p = writePNG(dev.capture(native=TRUE), raw())
+	will create a raw vector containg a PNG image.
+
+
+1.4-9	(2011-04-06)
+    o	force static built-in libraries on Windows to prevent Cairo
+	from picking up broken system libraries
+
+1.4-8	(2011-03-07)
+    o	spurious character in the 1.4-7 w32-backed source has made it
+	unusable on Windows. This is a re-packaging of 1.4-7 without
+	that spurious character.
+
+1.4-7	(2011-03-07)
+    o	fix a bug in raster support causing raster to be usable only
+	once
+
+    o	win backend: release and re-get DC on resize -- fixes resizing
+	issues in CairoWin() for some Windows versions
+
+1.4-6	(2011-02-10)
+    o	adds raster image support (courtesy of R core)
+
+    o	update Windows libcairo binary to cairo 1.10.2, use static
+	build to avoid DLL issues and add 64-bit binary
+
+1.4-5	(2009-07-16)
+    o	minor Windows configuration change
+
+    o	fix SET_VECTOR_ELT issue for R 2.9.0+
+
+1.4-4	(2008-10-17)
+    o	adapt to changes in R-devel (2.9.0-to-be), clean up warnings
+
+1.4-3	(2008-07-21)
+    o	make the use of an invalid font non-fatal
+
+    o	allow Cairo to compile on some older systems that don't have
+	trunc()
+
+    o	updated libcairo binary for Windows to 1.6.4 (from GTK+)
+
+1.4-2	(2008-04-03)
+    o	adapt to even more changes in R 2.7
+
+1.4-1	(2008-03-14)
+    o	adapt to R 2.7 changes
+
+1.4-0
+    o	fix DPI detection in X11 back-end and use 90dpi as a fallback
+
+    o	fix cra settings to be closer to what other devices use
+
+    o	CairoX11 no longer fixes DPI to 72, "auto" is now the default.
+	In addition, CairoWin and CairoX11 allow additional arguments
+	to ba passed to Cairo.
+
+1.3-5	(2007-08-27)
+    o	adapt to const char* CHARs in R-devel
+
+    o	fix a bug in CairoSVG (wrong argument name)
+
+    o	fix a bug in CairoPS (units were not set to "in" and
+	width/height had no defaults)
+
+    o	fix unintentional doubling of the .ps suffix
+
+1.3-4	(2007-05-10)
+    o	more fixes in flag-guessing
+
+    o	some vector backends (e.g. PDF, SVG) were falling back to
+	bitamp rasterization, we try to prevent this 
+
+    o	address expose issues with some X11 servers
+
+    o	add CairoSVG wrapper
+
+    o	add an unified way to register back-ends and get a list of all
+	supported types.
+
+    o	add Cairo.capabilities() function
+
+1.3-3	2007-04-25
+    o	improve detection of cairo and its dependencies
+
+    o	work around missing API such that cairo 1.0 can be used.
+	However, it is strongly encouraged to use cairo 1.2 or
+	possibly 1.4 as they contain important bugfixes.
+
+    o	fix page numbering to start at 1 (was 0) and update
+	documentation correspondingly
+
+1.3-2	2007-04-18
+    o	added format autodetection for tiff and png. The 32-bit
+	version of either format is used if the background
+	is not opaque.
+
+    o	fixed bug in the value returned by Cairo
+
+    o	added type and file attributes to the Cairo object
+
+    o	added (hidden, experimental) functions that allow direct
+	modification of image content in Cairo (.image, .ptr.to.raw
+	and .raw.to.ptr)
+
+1.3-1
+    o	change semantics of canvas and bg to match other devices:
+	canvas is used by devices that don't support any kind
+	of transparency in case bg is translucent
+
+    o	fixed data ordering issues in TIFF and JPEG output
+
+    o	added "compression" parameter to TIFF back-end which
+	now defaults to LZW compression
+
+1.3-0
+    o	add support for canvas and dpi specification
+
+    o	allow backends to detect native resolution
+
+    o	add support for custom parameters (e.g. quality for jpeg)
+
+1.2-1
+    o	improve rendering on bitmap devices by aligning straight lines
+	to the pixel grid and adding bleed to such fills.
+
+    o	added wrappers that take exactly the same parameters as
+	existing devices such as png, jpeg, pdf, postscript, X11 or
+	windows and map them to calls to Cairo. They can be used to
+	replace native devices by Cairo without the need to change
+	existing code.
+
+    o	added namespace
+
+1.2-0
+    o	additional interactive back ends: X11 (XLib) and win (Win32)
+
+    o	enhanced back-end API to support interactive back-ends
+
+    o	change default backgroud color to "white", because
+	alpha-blending doesn't work properly in cairo when painting on
+	purely transparent background.
+
+    o	change the way filenames are interpreted, use multi-file
+	printf convention as other devices do.
+
+    o	added support for jpeg and tiff image formats
+
+1.1-0
+    o	additional file/stream back-ends: svg, ps
+
+    o	enhanced back-end API
+
+1.0-0
+    o	fixed function names to not conflict with GDD
+
+0.1-5
+    o   added R connections patch support at config time.
+        see 
+	http://wiki.r-project.org/rwiki/doku.php?id=developers:r_connections_api
+
+0.1-4	(2006-12-07)
+    o	add pdf backend (Jeff Horner)
+
+    o	fix up backend infrastructure (Jeff Horner)
+
+0.1-3	(2006-12-06)
+    o	add freetype and fontconfig support (Jeff Horner)
+
+    o	fix memory leaks (Jeff Horner)
+
+    o	make transparent background default with bg="transparent"
+
+0.1-2	(2006-12-05)
+    o	add support for caps/joints (patch by Jeff Horner)
+
+    o	make rectangels to snap to grid (patch by Jeff Horner)
+
+    o	use transparent image background by default
+
+
+0.1-1	(2005-12-23)
+    o	first official release, image backend works, others are
+	waiting to be implemented by volunteers
+
diff --git a/win32/deps/library/Cairo/R/Cairo b/win32/deps/library/Cairo/R/Cairo
new file mode 100644
index 0000000..ac8cebe
--- /dev/null
+++ b/win32/deps/library/Cairo/R/Cairo
@@ -0,0 +1,9 @@
+local({
+    info <- loadingNamespaceInfo()
+    ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
+    if (is.null(ns))
+        stop("cannot find namespace environment");
+    barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
+    dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
diff --git a/win32/deps/library/Cairo/R/Cairo.rdb b/win32/deps/library/Cairo/R/Cairo.rdb
new file mode 100644
index 0000000..bfa6b1b
Binary files /dev/null and b/win32/deps/library/Cairo/R/Cairo.rdb differ
diff --git a/win32/deps/library/Cairo/R/Cairo.rdx b/win32/deps/library/Cairo/R/Cairo.rdx
new file mode 100644
index 0000000..84252c7
Binary files /dev/null and b/win32/deps/library/Cairo/R/Cairo.rdx differ
diff --git a/win32/deps/library/Cairo/help/AnIndex b/win32/deps/library/Cairo/help/AnIndex
new file mode 100644
index 0000000..606aac8
--- /dev/null
+++ b/win32/deps/library/Cairo/help/AnIndex
@@ -0,0 +1,15 @@
+Cairo	Cairo
+Cairo.capabilities	Cairo.capabilities
+Cairo.capture	Cairo.capture
+Cairo.onSave	Cairo.onSave
+Cairo.serial	Cairo.serial
+CairoFontMatch	CairoFontMatch
+CairoFonts	CairoFonts
+CairoJPEG	Cairo
+CairoPDF	Cairo
+CairoPNG	Cairo
+CairoPS	Cairo
+CairoSVG	Cairo
+CairoTIFF	Cairo
+CairoWin	Cairo
+CairoX11	Cairo
diff --git a/win32/deps/library/Cairo/help/Cairo.rdb b/win32/deps/library/Cairo/help/Cairo.rdb
new file mode 100644
index 0000000..1155c10
Binary files /dev/null and b/win32/deps/library/Cairo/help/Cairo.rdb differ
diff --git a/win32/deps/library/Cairo/help/Cairo.rdx b/win32/deps/library/Cairo/help/Cairo.rdx
new file mode 100644
index 0000000..6ed70c9
Binary files /dev/null and b/win32/deps/library/Cairo/help/Cairo.rdx differ
diff --git a/win32/deps/library/Cairo/help/aliases.rds b/win32/deps/library/Cairo/help/aliases.rds
new file mode 100644
index 0000000..79a01c7
Binary files /dev/null and b/win32/deps/library/Cairo/help/aliases.rds differ
diff --git a/win32/deps/library/Cairo/help/paths.rds b/win32/deps/library/Cairo/help/paths.rds
new file mode 100644
index 0000000..697d544
Binary files /dev/null and b/win32/deps/library/Cairo/help/paths.rds differ
diff --git a/win32/deps/library/Cairo/html/00Index.html b/win32/deps/library/Cairo/html/00Index.html
new file mode 100644
index 0000000..35e57ec
--- /dev/null
+++ b/win32/deps/library/Cairo/html/00Index.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: R graphics device using cairo graphics library for creating
+high-quality bitmap (PNG, JPEG, TIFF), vector (PDF, SVG,
+PostScript) and display (X11 and Win32) output.</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> R graphics device using cairo graphics library for creating
+high-quality bitmap (PNG, JPEG, TIFF), vector (PDF, SVG,
+PostScript) and display (X11 and Win32) output.
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;Cairo&rsquo; version 1.5-2</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 width="25%"><a href="Cairo.html">Cairo</a></td>
+<td>Create a new Cairo-based graphics device</td></tr>
+<tr><td width="25%"><a href="Cairo.capabilities.html">Cairo.capabilities</a></td>
+<td>Reports which output types are supported by this Cairo build</td></tr>
+<tr><td width="25%"><a href="Cairo.capture.html">Cairo.capture</a></td>
+<td>Capture contents of an image backend.</td></tr>
+<tr><td width="25%"><a href="Cairo.onSave.html">Cairo.onSave</a></td>
+<td>Cairo callbacks</td></tr>
+<tr><td width="25%"><a href="Cairo.serial.html">Cairo.serial</a></td>
+<td>Check for changes in the graphics state of Cairo devices.</td></tr>
+<tr><td width="25%"><a href="CairoFontMatch.html">CairoFontMatch</a></td>
+<td>Find installed fonts with a fontconfig pattern</td></tr>
+<tr><td width="25%"><a href="CairoFonts.html">CairoFonts</a></td>
+<td>Set the fonts used for all Cairo graphics devices.</td></tr>
+<tr><td width="25%"><a href="Cairo.html">CairoJPEG</a></td>
+<td>Create a new Cairo-based graphics device</td></tr>
+<tr><td width="25%"><a href="Cairo.html">CairoPDF</a></td>
+<td>Create a new Cairo-based graphics device</td></tr>
+<tr><td width="25%"><a href="Cairo.html">CairoPNG</a></td>
+<td>Create a new Cairo-based graphics device</td></tr>
+<tr><td width="25%"><a href="Cairo.html">CairoPS</a></td>
+<td>Create a new Cairo-based graphics device</td></tr>
+<tr><td width="25%"><a href="Cairo.html">CairoSVG</a></td>
+<td>Create a new Cairo-based graphics device</td></tr>
+<tr><td width="25%"><a href="Cairo.html">CairoTIFF</a></td>
+<td>Create a new Cairo-based graphics device</td></tr>
+<tr><td width="25%"><a href="Cairo.html">CairoWin</a></td>
+<td>Create a new Cairo-based graphics device</td></tr>
+<tr><td width="25%"><a href="Cairo.html">CairoX11</a></td>
+<td>Create a new Cairo-based graphics device</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/Cairo/html/R.css b/win32/deps/library/Cairo/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/Cairo/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/Cairo/libs/i386/Cairo.dll b/win32/deps/library/Cairo/libs/i386/Cairo.dll
new file mode 100644
index 0000000..a2561b7
Binary files /dev/null and b/win32/deps/library/Cairo/libs/i386/Cairo.dll differ
diff --git a/win32/deps/library/Cairo/libs/i386/symbols.rds b/win32/deps/library/Cairo/libs/i386/symbols.rds
new file mode 100644
index 0000000..370f74b
Binary files /dev/null and b/win32/deps/library/Cairo/libs/i386/symbols.rds differ
diff --git a/win32/deps/library/Cairo/libs/x64/Cairo.dll b/win32/deps/library/Cairo/libs/x64/Cairo.dll
new file mode 100644
index 0000000..b61e06b
Binary files /dev/null and b/win32/deps/library/Cairo/libs/x64/Cairo.dll differ
diff --git a/win32/deps/library/Cairo/libs/x64/symbols.rds b/win32/deps/library/Cairo/libs/x64/symbols.rds
new file mode 100644
index 0000000..f8b09cd
Binary files /dev/null and b/win32/deps/library/Cairo/libs/x64/symbols.rds differ
diff --git a/win32/deps/library/EMD/DESCRIPTION b/win32/deps/library/EMD/DESCRIPTION
index fbb73ac..02e30f7 100644
--- a/win32/deps/library/EMD/DESCRIPTION
+++ b/win32/deps/library/EMD/DESCRIPTION
@@ -1,14 +1,19 @@
 Package: EMD
+Version: 1.5.2
+Date: 2013-01-18
 Title: Empirical Mode Decomposition and Hilbert Spectral Analysis
-Version: 1.2.0
-Date: 2008-11-08
-Author: Donghoh Kim <donghoh kim gmail com>, Hee-Seok Oh
-        <heeseok stats snu ac kr>
+Author: Donghoh Kim and Hee-Seok Oh
 Maintainer: Donghoh Kim <donghoh kim gmail com>
-Depends: R (>= 2.6), fields (>= 4.1)
-Description: This package carries out empirical mode decompostion and
-        Hilbert spectral analysis.
-License: GPL version 2 or newer
+Depends: R (>= 2.11), fields (>= 6.3), locfit (>= 1.5-8)
+Description: This package carries out empirical mode decomposition and
+        Hilbert spectral analysis. For usage of EMD, see Kim and Oh,
+        2009 (Kim, D and Oh, H.-S. (2009) EMD: A Package for Empirical
+        Mode Decomposition and Hilbert Spectrum, The R Journal, 1,
+        40-46).
+License: GPL (>= 2)
 URL: http://dasan.sejong.ac.kr/~dhkim/software_emd.html
-Packaged: Fri Nov 28 13:13:50 2008; Administrator
-Built: R 2.9.2; i386-pc-mingw32; 2010-01-13 23:31:11 UTC; windows
+Packaged: 2013-01-18 01:48:24 UTC; donghohkim
+Repository: CRAN
+Date/Publication: 2013-01-18 06:42:37
+Built: R 2.15.2; x86_64-w64-mingw32; 2013-02-07 02:53:10 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/EMD/INDEX b/win32/deps/library/EMD/INDEX
index 699dfea..0425bf6 100644
--- a/win32/deps/library/EMD/INDEX
+++ b/win32/deps/library/EMD/INDEX
@@ -1,18 +1,22 @@
+cvimpute.by.mean        Imputation by the mean of the two adjacent
+                        values
 cvtype                  Generating test dataset index for
                         cross-validation
 emd                     Empirical Mode Decomposition
 emd.pred                Prediction by EMD and VAR model
-emd2d                   Two dimensional Empirical Mode Decomposition
-emddenoise              Denoising by EMD and Cross-Validation
+emd2d                   Bidimenasional Empirical Mode Decomposition
+emddenoise              Denoising by EMD and Thresholding
 extractimf              Intrinsic Mode Function
-extractimf2d            Two dimensional Intrinsic Mode Function
+extractimf2d            Bidimensional Intrinsic Mode Function
 extrema                 Finding Local Extrema and Zero-crossings
 extrema2dC              Finding Local Extrema
 hilbertspec             Hilbert Transform and Instantaneous Frequency
-imageEMD                Plot of Two Dimensional Decomposition Result
+imageEMD                Plot of Bidimenasional Empirical Mode
+                        Decomposition Result
 kospi200                Korea Stock Price Index 200
 lena                    Gray Lena image
 lennon                  Gray John Lennon image
+semd                    Statistical Empirical Mode Decomposition
 solar irradiance        Solar Irradiance Proxy Data
 spectrogram             Spectrogram
 sunspot                 Sunspot Data
diff --git a/win32/deps/library/EMD/MD5 b/win32/deps/library/EMD/MD5
index 175aec5..25e3f33 100644
--- a/win32/deps/library/EMD/MD5
+++ b/win32/deps/library/EMD/MD5
@@ -1,87 +1,31 @@
-607fe7c20cc6198d4769db1077b5f775 *CONTENTS
-4579c9a462f562c374ade65ee2d5ec90 *DESCRIPTION
-5f0f71033eb3046f27405bd7bb4217e6 *INDEX
-24c76ae3e75f992390bfae63b2105699 *Meta/Rd.rds
-f0124119ac488612606672d4fc50a7a6 *Meta/data.rds
-4494a1b7dfb36ee260776b7b5f3bc111 *Meta/hsearch.rds
-b5d136ef6ad10c2f783510373a367076 *Meta/package.rds
-eaad6298bae7cef17bc1f1d9e08a628c *R-ex/cvtype.R
-40c9a3f0f3e9b73396429898758c42f9 *R-ex/emd.R
-70d67a33d59c671b6087ad407ffb726a *R-ex/emd2d.R
-b9a944848f99bcbd5df8cbf732d37b52 *R-ex/emddenoise.R
-fe686fb4eef8b49fa81f9a0e8285c773 *R-ex/extractimf.R
-8e4e68ce272c4b4a44d79172c66b518f *R-ex/extractimf2d.R
-b9dd6c73cd45735ff2f4be573935fa12 *R-ex/extrema.R
-eb85b6674792136c8d9f4de52a4139d8 *R-ex/extrema2dC.R
-61d84dc0c28537466e226efffdc0715f *R-ex/hilbertspec.R
-77d9aca0f0bf3ed3f2cdba4cc15d29dd *R-ex/imageEMD.R
-5a1db4a8943c8f343942e07027310694 *R-ex/kospi200.R
-5661cc4325d2005e66dcd576ca9ce3f0 *R-ex/lena.R
-c45960f72dbe9e594f944954d1871fd6 *R-ex/lennon.R
-4aec27ed4df85d77ac5d872a242702d3 *R-ex/solar.R
-3aecd6626321a98ba0ebb026208fbb8e *R-ex/spectrogram.R
-5195cb2eeeb0b33fa24e9c3cd57648be *R-ex/sunspot.R
-6e60a4480e0345d65902fc23b54bffd6 *R/EMD
-bb7b8ce8e83c89ac52f5ef40ffc49fd9 *R/EMD.rdb
-ff567676bbf791e2bcfe5be12f69bdab *R/EMD.rdx
-b892a0cce7aeaf1cea70fa4b6cd39745 *chtml/EMD.chm
-a81e6d2e48afa4f265b5504978233942 *data/Rdata.zip
-5c898f6852de9c9675db44004c3dd255 *data/filelist
-217d6b7da68b6e0617548e655b4b6269 *help/AnIndex
-897aa2e6df4561402044718bbce5f421 *help/EMD-internal
-2f2439a0c0888a08c0e87565d2d101db *help/cvtype
-0b534fecfa97a2261d18d294de4064ef *help/emd
-2666f26afd90ddd3a3c9e67f74afc1a5 *help/emd.pred
-c37771d3ad1d972c4fe38c820f14000f *help/emd2d
-aba8d28fd62e9f8ca37943b043792f54 *help/emddenoise
-0ceed4cfcda07658b73b4d04f13f628a *help/extractimf
-9e3f4fc933caffaa19108dc7b25df821 *help/extractimf2d
-4d1b7fb063259823fd8f8c9f47dfc6f4 *help/extrema
-81a93670f71f9cd9e24d498718f5e525 *help/extrema2dC
-f4876ed36bfbeb06603cba0889470e1b *help/hilbertspec
-f2e464ceec84659dc9fde2ce960c1436 *help/imageEMD
-dc1a34c082ad9d4c56af8429c0a9d2f6 *help/kospi200
-240a83af052a91f078e890ff57c816f2 *help/lena
-a3af05fd46524eb62ee787576bc3a311 *help/lennon
-bb001b996d6451f8d3a2667d65c81aa1 *help/solar
-f6a7fe4a6090e950a9b4f3f5f79b94fc *help/spectrogram
-1e160762f17eab3d7c97e9e13e22db11 *help/sunspot
-5bab497447d0adec13d449d4f1844d6a *html/00Index.html
-e66aeb5082a04be1a85fe81d2c28da81 *html/EMD-internal.html
-816e2299b334bf787956f393b946bd5f *html/cvtype.html
-247fe3830f89852dc3aa46f15bfa52d3 *html/emd.html
-36b0bef014e96f8d39991bf3b35dfd78 *html/emd.pred.html
-52806933e19ea5f7f4aa8781b8bbc177 *html/emd2d.html
-1f41747469dbd56bf8865266b808efc4 *html/emddenoise.html
-6e1c55cd76995fdf9f94f8eb9da53de9 *html/extractimf.html
-8cf7bb09ef2164a7f12c633e29cc7a9e *html/extractimf2d.html
-b20c3f19a312fc0a3b8aacef4f4bb2a1 *html/extrema.html
-7454d3c8f3ba97956c5ff5a4e97868bd *html/extrema2dC.html
-00a7cabd351db292f907680c4b2b91a4 *html/hilbertspec.html
-610bd1dd475364ef860a1d65dcc0618c *html/imageEMD.html
-7f869850215826f53632570e82ac98c5 *html/kospi200.html
-a79f84a86511e40883172118d7167d51 *html/lena.html
-2761943895506250ab70b51144684eab *html/lennon.html
-feae1cf110786a5895d53013b2e5d61e *html/solar.html
-f620863be19e709830542e639909c2e4 *html/spectrogram.html
-486f919fd81b7f163eb386e45477b65a *html/sunspot.html
-a5876616e4850e095266e6792db37fa0 *latex/EMD-internal.tex
-f353848a0cc1406d2bc31d5463e088fe *latex/cvtype.tex
-47b98414562326e5def01ae5ee040fdf *latex/emd.pred.tex
-def06758d11448453433b4f1bcd260a7 *latex/emd.tex
-80ebc837a3a74ffeea25cbd898ecc11a *latex/emd2d.tex
-1076d8147587b2002ee60d46669c0913 *latex/emddenoise.tex
-24609b0e1c80963d9fa2149ec1dde9c6 *latex/extractimf.tex
-f000d5ede0ba17544a04b1337507ad86 *latex/extractimf2d.tex
-bd1080b9334a7281e960dc2f8edbc1eb *latex/extrema.tex
-067deee2072ab2f0c580c3d76d6c59bf *latex/extrema2dC.tex
-cea7e577ac1871b2e1436544a86feaea *latex/hilbertspec.tex
-58cfb363936a78bb46eefd19b4e482c5 *latex/imageEMD.tex
-e20472aec00fd6bf02d31d701ecaf9e9 *latex/kospi200.tex
-d911335bdbe2d08d2eb05c5457ca9a0e *latex/lena.tex
-98a99cb9656af9c39d8fa3d2c1474ea0 *latex/lennon.tex
-33da893b24594022be3016106899ded4 *latex/solar.tex
-f022d4406e7363855521a27880a58254 *latex/spectrogram.tex
-1994b554962ed5a28a9a47cf8550c845 *latex/sunspot.tex
-1d8088e0e2cbb72a9eaea539530f85d8 *libs/EMD.dll
-ebdea9070fe291a3164c1465e3011260 *man/EMD.Rd.gz
+0bbeb20774b370fcd06325c86f56f41f *DESCRIPTION
+7cab3c6c0ec40e33a8e29db791dd7493 *INDEX
+9be851006daf880d243e72d9cb39c3bd *Meta/Rd.rds
+327a89d516fd51104a644d60e4d37e5c *Meta/data.rds
+9694c9e5938d5f8b6dff227f22e81319 *Meta/hsearch.rds
+5e78d512a47833f316a6f6beea4cebaa *Meta/links.rds
+e4480eec10ea860f496723208e300ba1 *Meta/nsInfo.rds
+f0878e639a8baccb3c33ff2b8ad2ceb8 *Meta/package.rds
+613324507c35b15519284127f38458d6 *NAMESPACE
+240d28d145138a75831809e31a480bad *R/EMD
+6ce426beb884abcff567512a7a48fc87 *R/EMD.rdb
+5e94892b2d1179e2c4f0ff8e300f4913 *R/EMD.rdx
+a101e733a90cbb1bbf82848273f91983 *data/beryllium.rda
+e9c9b986a1fcdbaad60575b7b8fd866b *data/datalist
+79d30ac997b95721113cdeed4764159c *data/kospi200.rda
+bcff9b4539ef195ca6af5f08fc34a21a *data/lena.rda
+40b3bf402353b781f06c8723acc59e09 *data/lennon.rda
+5a0d9d469dd564fd81e8c6f595213ce0 *data/solar.hs.rda
+f588d89cb0247e7592c955545be5bbab *data/solar.lean.rda
+c8e09219747bd132c5d706d69a2b795f *data/sunspot.rda
+4f46211dbfe73e7d13b6d4fa282c583c *help/AnIndex
+289c7c7c619a19c5eb751c761a53b230 *help/EMD.rdb
+646238596231937957860c7170d1b111 *help/EMD.rdx
+fffddfd179844861217ca3958304c206 *help/aliases.rds
+af2ab59afc3090d2ab5aeef6543e571a *help/paths.rds
+01ab19d3abd89cf4dbfc891974a995ef *html/00Index.html
+444535b9cb76ddff1bab1e1865a3fb14 *html/R.css
+8e73fc2e31d9c64d91bcb06109047448 *libs/i386/EMD.dll
+5c7b3d7a2ea9cb26c8dee58a1949fb8f *libs/i386/symbols.rds
+301d8112da209de4ec57262d51f3f974 *libs/x64/EMD.dll
+deac506ea59db7390aa2669973654906 *libs/x64/symbols.rds
diff --git a/win32/deps/library/EMD/Meta/Rd.rds b/win32/deps/library/EMD/Meta/Rd.rds
index 2e9759c..eb64c90 100644
Binary files a/win32/deps/library/EMD/Meta/Rd.rds and b/win32/deps/library/EMD/Meta/Rd.rds differ
diff --git a/win32/deps/library/EMD/Meta/data.rds b/win32/deps/library/EMD/Meta/data.rds
index f7965d6..8b8c979 100644
Binary files a/win32/deps/library/EMD/Meta/data.rds and b/win32/deps/library/EMD/Meta/data.rds differ
diff --git a/win32/deps/library/EMD/Meta/hsearch.rds b/win32/deps/library/EMD/Meta/hsearch.rds
index 2841564..aedd14b 100644
Binary files a/win32/deps/library/EMD/Meta/hsearch.rds and b/win32/deps/library/EMD/Meta/hsearch.rds differ
diff --git a/win32/deps/library/EMD/Meta/links.rds b/win32/deps/library/EMD/Meta/links.rds
new file mode 100644
index 0000000..bd98107
Binary files /dev/null and b/win32/deps/library/EMD/Meta/links.rds differ
diff --git a/win32/deps/library/EMD/Meta/nsInfo.rds b/win32/deps/library/EMD/Meta/nsInfo.rds
new file mode 100644
index 0000000..cd1cb30
Binary files /dev/null and b/win32/deps/library/EMD/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/EMD/Meta/package.rds b/win32/deps/library/EMD/Meta/package.rds
index 41179ae..441a179 100644
Binary files a/win32/deps/library/EMD/Meta/package.rds and b/win32/deps/library/EMD/Meta/package.rds differ
diff --git a/win32/deps/library/EMD/NAMESPACE b/win32/deps/library/EMD/NAMESPACE
new file mode 100644
index 0000000..8bf7cb5
--- /dev/null
+++ b/win32/deps/library/EMD/NAMESPACE
@@ -0,0 +1,10 @@
+# Export all names
+exportPattern(".")
+
+# Import all packages listed as Imports or Depends
+import(
+  fields,
+  locfit
+)
+
+useDynLib(EMD)
diff --git a/win32/deps/library/EMD/R/EMD b/win32/deps/library/EMD/R/EMD
index be99e29..ac8cebe 100644
--- a/win32/deps/library/EMD/R/EMD
+++ b/win32/deps/library/EMD/R/EMD
@@ -1,18 +1,9 @@
-.First.lib <- function(libname, pkgname)
-{
-    fullName <- paste("package", pkgname, sep=":")
-    myEnv <- as.environment(match(fullName, search()))
-    barepackage <- sub("([^-]+)_.*", "\\1", pkgname)
-    dbbase <- file.path(libname, pkgname, "R", barepackage)
-    rm(.First.lib, envir = myEnv)
-    lazyLoad(dbbase, myEnv)
-    if(exists(".First.lib", envir = myEnv, inherits = FALSE)) {
-        f <- get(".First.lib", envir = myEnv, inherits = FALSE)
-        if(is.function(f))
-            f(libname, pkgname)
-        else
-            stop(gettextf("package '%s' has a non-function '.First.lib'",
-                          pkgname),
-                 domain = NA)
-    }
-}
+local({
+    info <- loadingNamespaceInfo()
+    ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
+    if (is.null(ns))
+        stop("cannot find namespace environment");
+    barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
+    dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
diff --git a/win32/deps/library/EMD/R/EMD.rdb b/win32/deps/library/EMD/R/EMD.rdb
index e992a9d..54b4a28 100644
Binary files a/win32/deps/library/EMD/R/EMD.rdb and b/win32/deps/library/EMD/R/EMD.rdb differ
diff --git a/win32/deps/library/EMD/R/EMD.rdx b/win32/deps/library/EMD/R/EMD.rdx
index 92e1d10..4b1669a 100644
Binary files a/win32/deps/library/EMD/R/EMD.rdx and b/win32/deps/library/EMD/R/EMD.rdx differ
diff --git a/win32/deps/library/EMD/data/beryllium.rda b/win32/deps/library/EMD/data/beryllium.rda
new file mode 100644
index 0000000..40dbb10
Binary files /dev/null and b/win32/deps/library/EMD/data/beryllium.rda differ
diff --git a/win32/deps/library/EMD/data/datalist b/win32/deps/library/EMD/data/datalist
new file mode 100644
index 0000000..7b62ea9
--- /dev/null
+++ b/win32/deps/library/EMD/data/datalist
@@ -0,0 +1,7 @@
+beryllium
+kospi200
+lena
+lennon
+solar.hs
+solar.lean
+sunspot
diff --git a/win32/deps/library/EMD/data/kospi200.rda b/win32/deps/library/EMD/data/kospi200.rda
new file mode 100644
index 0000000..1a9ef7b
Binary files /dev/null and b/win32/deps/library/EMD/data/kospi200.rda differ
diff --git a/win32/deps/library/EMD/data/lena.rda b/win32/deps/library/EMD/data/lena.rda
new file mode 100644
index 0000000..17905b7
Binary files /dev/null and b/win32/deps/library/EMD/data/lena.rda differ
diff --git a/win32/deps/library/EMD/data/lennon.rda b/win32/deps/library/EMD/data/lennon.rda
new file mode 100644
index 0000000..416e00f
Binary files /dev/null and b/win32/deps/library/EMD/data/lennon.rda differ
diff --git a/win32/deps/library/EMD/data/solar.hs.rda b/win32/deps/library/EMD/data/solar.hs.rda
new file mode 100644
index 0000000..0b5dc17
Binary files /dev/null and b/win32/deps/library/EMD/data/solar.hs.rda differ
diff --git a/win32/deps/library/EMD/data/solar.lean.rda b/win32/deps/library/EMD/data/solar.lean.rda
new file mode 100644
index 0000000..a8bf629
Binary files /dev/null and b/win32/deps/library/EMD/data/solar.lean.rda differ
diff --git a/win32/deps/library/EMD/data/sunspot.rda b/win32/deps/library/EMD/data/sunspot.rda
new file mode 100644
index 0000000..45dc1c1
Binary files /dev/null and b/win32/deps/library/EMD/data/sunspot.rda differ
diff --git a/win32/deps/library/EMD/help/AnIndex b/win32/deps/library/EMD/help/AnIndex
index 706911e..0c1bfb6 100644
--- a/win32/deps/library/EMD/help/AnIndex
+++ b/win32/deps/library/EMD/help/AnIndex
@@ -1,4 +1,5 @@
 beryllium	solar
+cvimpute.by.mean	cvimpute.by.mean
 cvtype	cvtype
 emd	emd
 EMD-internal	EMD-internal
@@ -9,6 +10,7 @@ extractimf	extractimf
 extractimf2d	extractimf2d
 extrema	extrema
 extrema2dC	extrema2dC
+extrema2dVC	EMD-internal
 hilbert	EMD-internal
 hilbertspec	hilbertspec
 image.plot.ts	EMD-internal
@@ -16,6 +18,7 @@ imageEMD	imageEMD
 kospi200	kospi200
 lena	lena
 lennon	lennon
+semd	semd
 solar irradiance	solar
 solar.hs	solar
 solar.lean	solar
diff --git a/win32/deps/library/EMD/help/EMD.rdb b/win32/deps/library/EMD/help/EMD.rdb
new file mode 100644
index 0000000..f0aa687
Binary files /dev/null and b/win32/deps/library/EMD/help/EMD.rdb differ
diff --git a/win32/deps/library/EMD/help/EMD.rdx b/win32/deps/library/EMD/help/EMD.rdx
new file mode 100644
index 0000000..ab30a2e
Binary files /dev/null and b/win32/deps/library/EMD/help/EMD.rdx differ
diff --git a/win32/deps/library/EMD/help/aliases.rds b/win32/deps/library/EMD/help/aliases.rds
new file mode 100644
index 0000000..b27a529
Binary files /dev/null and b/win32/deps/library/EMD/help/aliases.rds differ
diff --git a/win32/deps/library/EMD/help/paths.rds b/win32/deps/library/EMD/help/paths.rds
new file mode 100644
index 0000000..e8effc1
Binary files /dev/null and b/win32/deps/library/EMD/help/paths.rds differ
diff --git a/win32/deps/library/EMD/html/00Index.html b/win32/deps/library/EMD/html/00Index.html
index ac35dcc..203c874 100644
--- a/win32/deps/library/EMD/html/00Index.html
+++ b/win32/deps/library/EMD/html/00Index.html
@@ -1,19 +1,19 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><title>R: Empirical Mode Decomposition and Hilbert Spectral Analysis</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="../../R.css">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
 </head><body>
-<h1>Empirical Mode Decomposition and Hilbert Spectral Analysis <img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]"></h1>
-
+<h1> Empirical Mode Decomposition and Hilbert Spectral Analysis
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
 <hr>
-
 <div align="center">
-<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg"
-alt="[Package List]" width="30" height="30" border="0"></a>
-<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg"
-alt="[Top]" width="30" height="30" border="0"></a>
-</div>
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;EMD&rsquo; version 1.5.2</h2>
 
-<h2>Documentation for package &lsquo;EMD&rsquo; version 1.2.0</h2>
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
 
 <h2>Help Pages</h2>
 
@@ -21,6 +21,8 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <table width="100%">
 <tr><td width="25%"><a href="solar.html">beryllium</a></td>
 <td>Solar Irradiance Proxy Data</td></tr>
+<tr><td width="25%"><a href="cvimpute.by.mean.html">cvimpute.by.mean</a></td>
+<td>Imputation by the mean of the two adjacent values</td></tr>
 <tr><td width="25%"><a href="cvtype.html">cvtype</a></td>
 <td>Generating test dataset index for cross-validation</td></tr>
 <tr><td width="25%"><a href="emd.html">emd</a></td>
@@ -28,13 +30,13 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <tr><td width="25%"><a href="emd.pred.html">emd.pred</a></td>
 <td>Prediction by EMD and VAR model</td></tr>
 <tr><td width="25%"><a href="emd2d.html">emd2d</a></td>
-<td>Two dimensional Empirical Mode Decomposition</td></tr>
+<td>Bidimenasional Empirical Mode Decomposition</td></tr>
 <tr><td width="25%"><a href="emddenoise.html">emddenoise</a></td>
-<td>Denoising by EMD and Cross-Validation</td></tr>
+<td>Denoising by EMD and Thresholding</td></tr>
 <tr><td width="25%"><a href="extractimf.html">extractimf</a></td>
 <td>Intrinsic Mode Function</td></tr>
 <tr><td width="25%"><a href="extractimf2d.html">extractimf2d</a></td>
-<td>Two dimensional Intrinsic Mode Function</td></tr>
+<td>Bidimensional Intrinsic Mode Function</td></tr>
 <tr><td width="25%"><a href="extrema.html">extrema</a></td>
 <td>Finding Local Extrema and Zero-crossings</td></tr>
 <tr><td width="25%"><a href="extrema2dC.html">extrema2dC</a></td>
@@ -42,13 +44,15 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <tr><td width="25%"><a href="hilbertspec.html">hilbertspec</a></td>
 <td>Hilbert Transform and Instantaneous Frequency</td></tr>
 <tr><td width="25%"><a href="imageEMD.html">imageEMD</a></td>
-<td>Plot of Two Dimensional Decomposition Result</td></tr>
+<td>Plot of Bidimenasional Empirical Mode Decomposition Result</td></tr>
 <tr><td width="25%"><a href="kospi200.html">kospi200</a></td>
 <td>Korea Stock Price Index 200</td></tr>
 <tr><td width="25%"><a href="lena.html">lena</a></td>
 <td>Gray Lena image</td></tr>
 <tr><td width="25%"><a href="lennon.html">lennon</a></td>
 <td>Gray John Lennon image</td></tr>
+<tr><td width="25%"><a href="semd.html">semd</a></td>
+<td>Statistical Empirical Mode Decomposition</td></tr>
 <tr><td width="25%"><a href="solar.html">solar irradiance</a></td>
 <td>Solar Irradiance Proxy Data</td></tr>
 <tr><td width="25%"><a href="solar.html">solar.hs</a></td>
diff --git a/win32/deps/library/EMD/html/R.css b/win32/deps/library/EMD/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/EMD/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/EMD/libs/i386/EMD.dll b/win32/deps/library/EMD/libs/i386/EMD.dll
new file mode 100644
index 0000000..a8e5896
Binary files /dev/null and b/win32/deps/library/EMD/libs/i386/EMD.dll differ
diff --git a/win32/deps/library/EMD/libs/i386/symbols.rds b/win32/deps/library/EMD/libs/i386/symbols.rds
new file mode 100644
index 0000000..46466df
Binary files /dev/null and b/win32/deps/library/EMD/libs/i386/symbols.rds differ
diff --git a/win32/deps/library/EMD/libs/x64/EMD.dll b/win32/deps/library/EMD/libs/x64/EMD.dll
new file mode 100644
index 0000000..46f7fe3
Binary files /dev/null and b/win32/deps/library/EMD/libs/x64/EMD.dll differ
diff --git a/win32/deps/library/EMD/libs/x64/symbols.rds b/win32/deps/library/EMD/libs/x64/symbols.rds
new file mode 100644
index 0000000..2bcfda7
Binary files /dev/null and b/win32/deps/library/EMD/libs/x64/symbols.rds differ
diff --git a/win32/deps/library/KernSmooth/DESCRIPTION b/win32/deps/library/KernSmooth/DESCRIPTION
index c7ce18a..9036db2 100644
--- a/win32/deps/library/KernSmooth/DESCRIPTION
+++ b/win32/deps/library/KernSmooth/DESCRIPTION
@@ -1,18 +1,22 @@
-Package: KernSmooth
-Priority: recommended
-Version: 2.23-2
-Date: 2009-05-22
-Title: Functions for kernel smoothing for Wand & Jones (1995)
-Author: S original by Matt Wand. R port by Brian Ripley
-        <ripley stats ox ac uk>.
-Maintainer: Brian Ripley <ripley stats ox ac uk>
-Depends: R (>= 2.5.0), stats
-Suggests: MASS
-Description: functions for kernel smoothing (and density estimation)
-        corresponding to the book: Wand, M.P. and Jones, M.C. (1995)
-        "Kernel Smoothing".
-License: Unlimited
-Packaged: 2009-05-22 13:00:56 UTC; ripley
-Repository: CRAN
-Date/Publication: 2009-05-24 08:45:58
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 13:04:08 UTC; windows
+Package: KernSmooth
+Priority: recommended
+Version: 2.23-8
+Date: 2012-06-27
+Title: Functions for kernel smoothing for Wand & Jones (1995)
+Authors R: c(person("Matt", "Wand", role = "aut", email =
+        "Matt Wand uts edu au"), person("Brian", "Ripley", role =
+        c("trl", "cre", "ctb"), email = "ripley stats ox ac uk"))
+Author: Matt Wand <Matt Wand uts edu au> R port and updates by Brian
+        Ripley <ripley stats ox ac uk>.
+Maintainer: Brian Ripley <ripley stats ox ac uk>
+Depends: R (>= 2.5.0), stats
+Suggests: MASS
+Description: functions for kernel smoothing (and density estimation)
+        corresponding to the book: Wand, M.P. and Jones, M.C. (1995)
+        "Kernel Smoothing".
+License: Unlimited
+Packaged: 2012-06-27 09:44:29 UTC; ripley
+Repository: CRAN
+Date/Publication: 2012-06-27 09:57:46
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:15:03 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/KernSmooth/INDEX b/win32/deps/library/KernSmooth/INDEX
index 2d524a4..9a10490 100644
--- a/win32/deps/library/KernSmooth/INDEX
+++ b/win32/deps/library/KernSmooth/INDEX
@@ -1,7 +1,8 @@
-bkde                     Compute a Binned Kernel Density Estimate
-bkde2D                   Compute a 2D Binned Kernel Density Estimate
-bkfe                     Compute a Binned Kernel Functional Estimate
-dpih                     Select a Histogram Bin Width
-dpik                     Select a Bandwidth for Kernel Density Estimation
-dpill                    Select a Bandwidth for Local Linear Regression
-locpoly                  Estimate Functions Using Local Polynomials
+bkde                    Compute a Binned Kernel Density Estimate
+bkde2D                  Compute a 2D Binned Kernel Density Estimate
+bkfe                    Compute a Binned Kernel Functional Estimate
+dpih                    Select a Histogram Bin Width
+dpik                    Select a Bandwidth for Kernel Density
+                        Estimation
+dpill                   Select a Bandwidth for Local Linear Regression
+locpoly                 Estimate Functions Using Local Polynomials
diff --git a/win32/deps/library/KernSmooth/LICENCE b/win32/deps/library/KernSmooth/LICENCE
index 3daadbb..f25e338 100644
--- a/win32/deps/library/KernSmooth/LICENCE
+++ b/win32/deps/library/KernSmooth/LICENCE
@@ -2,4 +2,4 @@ By agreement with Dr Wand (1998-June-22), the R port can be used and
 distributed freely, superseding the comments in orig/KernSmooth.tex.
 
 The original S code is copyright Matt Wand, the R port copyright
-Brian Ripley
\ No newline at end of file
+Brian Ripley
diff --git a/win32/deps/library/KernSmooth/Meta/Rd.rds b/win32/deps/library/KernSmooth/Meta/Rd.rds
index b53465b..1c8ea5b 100644
Binary files a/win32/deps/library/KernSmooth/Meta/Rd.rds and b/win32/deps/library/KernSmooth/Meta/Rd.rds differ
diff --git a/win32/deps/library/KernSmooth/Meta/hsearch.rds b/win32/deps/library/KernSmooth/Meta/hsearch.rds
index 81a09fb..f6c3189 100644
Binary files a/win32/deps/library/KernSmooth/Meta/hsearch.rds and b/win32/deps/library/KernSmooth/Meta/hsearch.rds differ
diff --git a/win32/deps/library/KernSmooth/Meta/links.rds b/win32/deps/library/KernSmooth/Meta/links.rds
new file mode 100644
index 0000000..f47f8aa
Binary files /dev/null and b/win32/deps/library/KernSmooth/Meta/links.rds differ
diff --git a/win32/deps/library/KernSmooth/Meta/nsInfo.rds b/win32/deps/library/KernSmooth/Meta/nsInfo.rds
index c355055..b89c026 100644
Binary files a/win32/deps/library/KernSmooth/Meta/nsInfo.rds and b/win32/deps/library/KernSmooth/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/KernSmooth/Meta/package.rds b/win32/deps/library/KernSmooth/Meta/package.rds
index 6eec3d7..bd6ee61 100644
Binary files a/win32/deps/library/KernSmooth/Meta/package.rds and b/win32/deps/library/KernSmooth/Meta/package.rds differ
diff --git a/win32/deps/library/KernSmooth/R/KernSmooth b/win32/deps/library/KernSmooth/R/KernSmooth
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/KernSmooth/R/KernSmooth
+++ b/win32/deps/library/KernSmooth/R/KernSmooth
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/KernSmooth/R/KernSmooth.rdb b/win32/deps/library/KernSmooth/R/KernSmooth.rdb
index e116e42..906e4cf 100644
Binary files a/win32/deps/library/KernSmooth/R/KernSmooth.rdb and b/win32/deps/library/KernSmooth/R/KernSmooth.rdb differ
diff --git a/win32/deps/library/KernSmooth/R/KernSmooth.rdx b/win32/deps/library/KernSmooth/R/KernSmooth.rdx
index 0a1b7d5..f63b753 100644
Binary files a/win32/deps/library/KernSmooth/R/KernSmooth.rdx and b/win32/deps/library/KernSmooth/R/KernSmooth.rdx differ
diff --git a/win32/deps/library/KernSmooth/help/KernSmooth.rdb b/win32/deps/library/KernSmooth/help/KernSmooth.rdb
new file mode 100644
index 0000000..be8cd2a
Binary files /dev/null and b/win32/deps/library/KernSmooth/help/KernSmooth.rdb differ
diff --git a/win32/deps/library/KernSmooth/help/KernSmooth.rdx b/win32/deps/library/KernSmooth/help/KernSmooth.rdx
new file mode 100644
index 0000000..a0104db
Binary files /dev/null and b/win32/deps/library/KernSmooth/help/KernSmooth.rdx differ
diff --git a/win32/deps/library/KernSmooth/help/aliases.rds b/win32/deps/library/KernSmooth/help/aliases.rds
new file mode 100644
index 0000000..fce3a9a
Binary files /dev/null and b/win32/deps/library/KernSmooth/help/aliases.rds differ
diff --git a/win32/deps/library/KernSmooth/help/paths.rds b/win32/deps/library/KernSmooth/help/paths.rds
new file mode 100644
index 0000000..9e1d180
Binary files /dev/null and b/win32/deps/library/KernSmooth/help/paths.rds differ
diff --git a/win32/deps/library/KernSmooth/html/00Index.html b/win32/deps/library/KernSmooth/html/00Index.html
new file mode 100644
index 0000000..5768c31
--- /dev/null
+++ b/win32/deps/library/KernSmooth/html/00Index.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Functions for kernel smoothing for Wand & Jones (1995)</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Functions for kernel smoothing for Wand & Jones (1995)
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;KernSmooth&rsquo; version 2.23-8</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td width="25%"><a href="bkde.html">bkde</a></td>
+<td>Compute a Binned Kernel Density Estimate</td></tr>
+<tr><td width="25%"><a href="bkde2D.html">bkde2D</a></td>
+<td>Compute a 2D Binned Kernel Density Estimate</td></tr>
+<tr><td width="25%"><a href="bkfe.html">bkfe</a></td>
+<td>Compute a Binned Kernel Functional Estimate</td></tr>
+<tr><td width="25%"><a href="dpih.html">dpih</a></td>
+<td>Select a Histogram Bin Width</td></tr>
+<tr><td width="25%"><a href="dpik.html">dpik</a></td>
+<td>Select a Bandwidth for Kernel Density Estimation</td></tr>
+<tr><td width="25%"><a href="dpill.html">dpill</a></td>
+<td>Select a Bandwidth for Local Linear Regression</td></tr>
+<tr><td width="25%"><a href="locpoly.html">locpoly</a></td>
+<td>Estimate Functions Using Local Polynomials</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/KernSmooth/html/R.css b/win32/deps/library/KernSmooth/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/KernSmooth/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/KernSmooth/libs/i386/KernSmooth.dll b/win32/deps/library/KernSmooth/libs/i386/KernSmooth.dll
new file mode 100644
index 0000000..143a1cf
Binary files /dev/null and b/win32/deps/library/KernSmooth/libs/i386/KernSmooth.dll differ
diff --git a/win32/deps/library/KernSmooth/po/de/LC_MESSAGES/R-KernSmooth.mo b/win32/deps/library/KernSmooth/po/de/LC_MESSAGES/R-KernSmooth.mo
new file mode 100644
index 0000000..616386a
Binary files /dev/null and b/win32/deps/library/KernSmooth/po/de/LC_MESSAGES/R-KernSmooth.mo differ
diff --git a/win32/deps/library/KernSmooth/po/en quot/LC_MESSAGES/R-KernSmooth.mo b/win32/deps/library/KernSmooth/po/en quot/LC_MESSAGES/R-KernSmooth.mo
new file mode 100644
index 0000000..d31a14e
Binary files /dev/null and b/win32/deps/library/KernSmooth/po/en quot/LC_MESSAGES/R-KernSmooth.mo differ
diff --git a/win32/deps/library/KernSmooth/po/pl/LC_MESSAGES/R-KernSmooth.mo b/win32/deps/library/KernSmooth/po/pl/LC_MESSAGES/R-KernSmooth.mo
new file mode 100644
index 0000000..346a45f
Binary files /dev/null and b/win32/deps/library/KernSmooth/po/pl/LC_MESSAGES/R-KernSmooth.mo differ
diff --git a/win32/deps/library/KernSmooth/tests/bkfe.R b/win32/deps/library/KernSmooth/tests/bkfe.R
new file mode 100644
index 0000000..aa576c0
--- /dev/null
+++ b/win32/deps/library/KernSmooth/tests/bkfe.R
@@ -0,0 +1,8 @@
+## failed in bkfe with exaxt powers of 2 prior to 2.23-5
+library(KernSmooth)
+x <- 1:100
+dpik(x, gridsize = 256)
+## and for bkde for some x.
+x <- c(0.036, 0.042, 0.052, 0.216, 0.368, 0.511, 0.705, 0.753, 0.776, 0.84)
+bkde(x, gridsize = 256, range.x = range(x))
+
diff --git a/win32/deps/library/MASS/CITATION b/win32/deps/library/MASS/CITATION
index f6a6566..a0a7f2b 100644
--- a/win32/deps/library/MASS/CITATION
+++ b/win32/deps/library/MASS/CITATION
@@ -1,4 +1,4 @@
-citHeader("To cite the VR bundle (MASS, class, nnet, spatial) in publications use:")
+citHeader("To cite the MASS package in publications use:")
 
 citEntry(entry="Book",
          title = "Modern Applied Statistics with S",
diff --git a/win32/deps/library/MASS/DESCRIPTION b/win32/deps/library/MASS/DESCRIPTION
index ddbdc31..78a75d2 100644
--- a/win32/deps/library/MASS/DESCRIPTION
+++ b/win32/deps/library/MASS/DESCRIPTION
@@ -1,24 +1,28 @@
-Bundle: VR
-Contains: MASS class nnet spatial
-Priority: recommended
-Version: 7.2-48
-Date: 2009-07-29
-Depends: R (>= 2.5.0), grDevices, graphics, stats, utils
-Suggests: lattice, nlme, survival
-Author: S original by Venables & Ripley. R port by Brian Ripley
-        <ripley stats ox ac uk>, following earlier work by Kurt Hornik
-        and Albrecht Gebhardt.
-Maintainer: Brian Ripley <ripley stats ox ac uk>
-BundleDescription: Functions and datasets to support Venables and
-        Ripley, 'Modern Applied Statistics with S' (4th edition).
-License: GPL-2 | GPL-3
-URL: http://www.stats.ox.ac.uk/pub/MASS4/
-Packaged: 2009-07-31 13:56:57 UTC; ripley
-Repository: CRAN
-Date/Publication: 2009-08-05 11:20:53
-Package: MASS
-Description: The main library and the datasets
-Title: Main Package of Venables and Ripley's MASS
-LazyLoad: yes
-LazyData: yes
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 12:59:32 UTC; windows
+Package: MASS
+Priority: recommended
+Version: 7.3-22
+Date: 2012-10-08
+Revision: $Rev: 3252 $
+Depends: R (>= 2.14.0), grDevices, graphics, stats, utils
+Suggests: lattice, nlme, nnet, survival
+Authors R: c(person("Brian", "Ripley", role = c("aut", "cre", "cph"),
+        email = "ripley stats ox ac uk"), person("Bill", "Venables",
+        role = "ctb"), person("Kurt", "Hornik", role = "trl", comment =
+        "partial port ca 1998"), person("Albrecht", "Gebhardt", role =
+        "trl", comment = "partial port ca 1998"), person("David",
+        "Firth", role = "ctb"))
+Description: Functions and datasets to support Venables and Ripley,
+  'Modern Applied Statistics with S' (4th edition, 2002).
+Title: Support Functions and Datasets for Venables and Ripley's MASS
+License: GPL-2 | GPL-3
+URL: http://www.stats.ox.ac.uk/pub/MASS4/
+LazyData: yes
+Packaged: 2012-10-08 10:07:18 UTC; ripley
+Author: Brian Ripley [aut, cre, cph],
+  Bill Venables [ctb],
+  Kurt Hornik [trl] (partial port ca 1998),
+  Albrecht Gebhardt [trl] (partial port ca 1998),
+  David Firth [ctb]
+Maintainer: Brian Ripley <ripley stats ox ac uk>
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:10:20 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/MASS/INDEX b/win32/deps/library/MASS/INDEX
index 2495c26..01f1fb9 100644
--- a/win32/deps/library/MASS/INDEX
+++ b/win32/deps/library/MASS/INDEX
@@ -9,7 +9,7 @@ bandwidth.nrd           Bandwidth for density() via Normal Reference
                           Distribution
 bcv                     Biased Cross-Validation for Bandwidth Selection
 boxcox                  Box-Cox Transformations for Linear Models
-con2tr                  Convert Lists to Data Frames for use by Trellis
+con2tr                  Convert Lists to Data Frames for use by lattice
 confint-MASS            Confidence Intervals for Model Parameters
 contr.sdif              Successive Differences Contrast Coding
 corresp                 Simple Correspondence Analysis
@@ -56,9 +56,10 @@ plot.mca                Plot Method for Objects of Class 'mca'
 polr                    Proportional Odds Logistic Regression
 predict.lda             Classify Multivariate Observations by Linear
                           Discrimination
-predict.lqs  		Predict from an lqs Fit
+predict.lqs             Predict from an lqs Fit
 predict.mca             Predict Method for Class 'mca'
 predict.qda             Classify from Quadratic Discriminant Analysis
+profile.glm             Method for Profiling glm Objects
 qda                     Quadratic Discriminant Analysis
 rational                Rational Approximation
 renumerate              Convert a Formula Transformed by 'denumerate'
@@ -72,7 +73,6 @@ studres                 Extract Studentized Residuals from a Linear Model
 summary.loglm           Summary Method Function for Objects of Class 'loglm'
 summary.negbin          Summary Method Function for Objects of Class 'negbin'
 summary.rlm             Summary Method for Robust Linear Models
-synth.tr                Synthetic Classification Problem
 theta.md                Estimate theta of the Negative Binomial by Deviance
 theta.ml                Estimate theta of the Negative Binomial by Maximum
 			  Likelihood
@@ -88,7 +88,6 @@ Datasets:
 
 Aids2                   Australian AIDS Survival Data
 Animals                 Brain and Body Weights for 28 Species
-Belgian-phones          Belgium Phone Calls 1950-1973
 Boston                  Housing Values in Suburbs of Boston
 Cars93                  Data from 93 Cars on Sale in the USA in 1993
 Cushings                Diagnostic Tests on Patients with Cushing's Syndrome
@@ -124,6 +123,7 @@ chem                    Copper in Wholemeal Flour
 coop                    Co-operative Trial in Analytical Chemistry
 cpus                    Performance of Computer CPUs
 crabs                   Morphological Measurements on Leptograpsus Crabs
+deaths                  Monthly Deaths from Lung Diseases in the UK
 drivers                 Deaths of Car Drivers in Great Britain 1969-84
 eagles                  Foraging Ecology of Bald Eagles
 epil                    Seizure Counts for Epileptics
@@ -143,18 +143,20 @@ leuk                    Survival Times and White Blood Counts for
                           Leukaemia Patients
 mammals                 Brain and Body Weights for 62 Species of Land Mammals
 mcycle                  Data from a Simulated Motorcycle Accident
-menarche                Age of Menarche data
+menarche                Age of Menarche in Warsaw
 michelson               Michelson's Speed of Light Data
 minn38                  Minnesota High School Graduates of 1938
 motors                  Accelerated Life Testing of Motorettes
 muscle                  Effect of Calcium Chloride on Muscle Contraction
 			  in Rat Hearts
+newcomb                 Newcomb's Measurements of the Passage Time of Light
 nlschools               Eighth-Grade Pupils in the Netherlands
 npk                     Classical N, P, K Factorial Experiment
 npr1                    US Naval Petroleum Reserve No. 1 data
 oats                    Data from an Oats Field Trial
 painters                The Painter's Data of de Piles
 petrol                  N. L. Prater's Petrol Refinery Data
+phones                  Belgium Phone Calls 1950-1973
 quine                   Absenteeism from School in Rural New South Wales
 road                    Road Accident Deaths in US States
 rotifer                 Numbers of Rotifers by Fluid Density
@@ -166,6 +168,7 @@ snails                  Snail Mortality Data
 steam                   The Saturated Steam Pressure Data
 stormer                 The Stormer Viscometer Data
 survey                  Student Survey Data
+synth.tr                Synthetic Classification Problem
 topo                    Spatial Topographic Data
 waders                  Counts of Waders at 15 Sites in South Africa
 whiteside               House Insulation: Whiteside's Data
diff --git a/win32/deps/library/MASS/LICENCE b/win32/deps/library/MASS/LICENCE
index e694c08..9f0d123 100644
--- a/win32/deps/library/MASS/LICENCE
+++ b/win32/deps/library/MASS/LICENCE
@@ -21,10 +21,7 @@ File MASS/R/profiles.R copyright (C) 1996 D. M. Bates and W. N. Venables.
 
 Our understanding is that the dataset files MASS/data/*.rda are not copyright.
 
-Files spatial/data/*.dat were generated or digitized by B. D. Ripley: no
-copyright is asserted.
-
-All other files are copyright (C) 1994-2007  W. N. Venables and
+All other files are copyright (C) 1994-2009  W. N. Venables and
 B. D. Ripley. Those parts which were distributed with the first
 edition are also copyright (C) 1994 Springer-Verlag New York Inc, with
 all rights assigned to W. N. Venables and B. D. Ripley.
diff --git a/win32/deps/library/MASS/Meta/Rd.rds b/win32/deps/library/MASS/Meta/Rd.rds
index 32d5a0b..2c8596c 100644
Binary files a/win32/deps/library/MASS/Meta/Rd.rds and b/win32/deps/library/MASS/Meta/Rd.rds differ
diff --git a/win32/deps/library/MASS/Meta/data.rds b/win32/deps/library/MASS/Meta/data.rds
index 06f82c1..dad9d2c 100644
Binary files a/win32/deps/library/MASS/Meta/data.rds and b/win32/deps/library/MASS/Meta/data.rds differ
diff --git a/win32/deps/library/MASS/Meta/hsearch.rds b/win32/deps/library/MASS/Meta/hsearch.rds
index ebf14f5..52b966b 100644
Binary files a/win32/deps/library/MASS/Meta/hsearch.rds and b/win32/deps/library/MASS/Meta/hsearch.rds differ
diff --git a/win32/deps/library/MASS/Meta/links.rds b/win32/deps/library/MASS/Meta/links.rds
new file mode 100644
index 0000000..fde6ca4
Binary files /dev/null and b/win32/deps/library/MASS/Meta/links.rds differ
diff --git a/win32/deps/library/MASS/Meta/nsInfo.rds b/win32/deps/library/MASS/Meta/nsInfo.rds
index f1f27d9..1052867 100644
Binary files a/win32/deps/library/MASS/Meta/nsInfo.rds and b/win32/deps/library/MASS/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/MASS/Meta/package.rds b/win32/deps/library/MASS/Meta/package.rds
index 55e96a4..15bd788 100644
Binary files a/win32/deps/library/MASS/Meta/package.rds and b/win32/deps/library/MASS/Meta/package.rds differ
diff --git a/win32/deps/library/MASS/NAMESPACE b/win32/deps/library/MASS/NAMESPACE
index e37e843..6012139 100644
--- a/win32/deps/library/MASS/NAMESPACE
+++ b/win32/deps/library/MASS/NAMESPACE
@@ -37,7 +37,7 @@ export(denumerate.formula, renumerate.formula)
 
 importFrom(graphics, pairs, plot)
 importFrom(stats, anova, biplot, coef, confint, extractAIC, family, fitted,
-	   logLik, model.frame, predict, profile, residuals, se.contrast,
+	   logLik, model.frame, nobs, predict, profile, residuals, se.contrast,
            simulate, terms, update, vcov)
 
 
@@ -108,6 +108,8 @@ S3method(Math, fractions)
 S3method(model.frame, lda)
 S3method(model.frame, polr)
 S3method(model.frame, qda)
+S3method(nobs, loglm)
+S3method(nobs, polr)
 S3method(Ops, fractions)
 S3method(pairs, lda)
 S3method(pairs, profile)
@@ -156,6 +158,7 @@ S3method(rlm, formula)
 S3method(se.contrast, rlm)
 S3method(select, ridgelm)
 S3method(simulate, negbin)
+S3method(simulate, polr)
 S3method(Summary, fractions)
 S3method(summary, loglm)
 S3method(summary, negbin)
@@ -165,6 +168,7 @@ S3method(t, fractions)
 S3method(terms, gls)
 S3method(terms, lme)
 S3method(update, loglm)
+S3method(vcov, fitdistr)
 S3method(vcov, negbin)
 S3method(vcov, polr)
 S3method(vcov, rlm)
diff --git a/win32/deps/library/MASS/NEWS b/win32/deps/library/MASS/NEWS
index 9d2aa46..f7a2c65 100644
--- a/win32/deps/library/MASS/NEWS
+++ b/win32/deps/library/MASS/NEWS
@@ -153,9 +153,37 @@ This file documents software changes since the third edition.
 - removed unused argument 'nseg' to plot.profile.
 - 'alpha' in the "glm" and "polr" methods for profile() is now interpreted
   as two-tailed univariate for consistency with other profile methods.
-- 'mammals': corrected typos in names, some thanks to Arni Magnusson
+- 'mammals': corrected typos in names, some thanks to Arni Magnusson.
 - profile.glm() now works for binomial glm specified with a matrix response
   and a cmpletely zero row.
 - there is a "negbin" method for simulate()
 - the use of package mclust has been removed from the ch11.R script
   because of the change of licence conditions for that package.
+- change ch13.R script for change in package 'survival' 2.35-x.
+- glmmPQL looks up variables in its 'correlation' argument (if a formula)
+  in the usual scope (wish of Ben Bolker: such arguments are unsupported).
+- added a simulate() method for unweighted polr() fits.
+- kde2d() allows a length-2 argument 'n'.
+- the default for truehist(col=) is now set to a colour, not a colour number.
+- the returned fitted values and (undocumented) linear predictor for
+  polr() did not take any offset into account (reported by Ioannis Kosmides).
+- the vcov() method for polr() now returns on the zeta scale (suggested by
+  Achim Zeileis).
+- fitdistr() gains a vcov() method (suggested by Achim Zeileis).
+- ch06.R has R alternatives to fac.design.
+- ch11.R has R alternatives for ggobi and factor rotation.
+- hubers() copes in extreme cases when middle 50% of data is constant.
+- tests/ now includes dataset for polr.R, so checking depends only on
+  base packages and lattice.
+- The "glm" method for profile() failed when given a binomial model
+  with a two-column response.
+- fitdistr() works harder to rescale the problem when fitting a gamma.
+- cov.trob() handles zero weights without giving a warning (reported by
+  John Fox).
+- boxcox() works better when 'y' is very badly scaled, e.g. around 1e-16
+  (patch by Martin Maechler).
+- mvrnorm() no longer defaults to the deprecated EISPACK=TRUE (and
+  hence changes the results).  It gains an argument 'EISPACK' for
+  back-compatibility.
+- the "polr" method for profile() could lose dimensions in its return object
+  (reported by Joris Meys)
diff --git a/win32/deps/library/MASS/R/MASS b/win32/deps/library/MASS/R/MASS
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/MASS/R/MASS
+++ b/win32/deps/library/MASS/R/MASS
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/MASS/R/MASS.rdb b/win32/deps/library/MASS/R/MASS.rdb
index 7e2141a..7c3922d 100644
Binary files a/win32/deps/library/MASS/R/MASS.rdb and b/win32/deps/library/MASS/R/MASS.rdb differ
diff --git a/win32/deps/library/MASS/R/MASS.rdx b/win32/deps/library/MASS/R/MASS.rdx
index 73254dd..3d0998d 100644
Binary files a/win32/deps/library/MASS/R/MASS.rdx and b/win32/deps/library/MASS/R/MASS.rdx differ
diff --git a/win32/deps/library/MASS/data/Rdata.rdb b/win32/deps/library/MASS/data/Rdata.rdb
index cfbfe66..e51620e 100644
Binary files a/win32/deps/library/MASS/data/Rdata.rdb and b/win32/deps/library/MASS/data/Rdata.rdb differ
diff --git a/win32/deps/library/MASS/data/Rdata.rds b/win32/deps/library/MASS/data/Rdata.rds
index c3af8f5..4a64627 100644
Binary files a/win32/deps/library/MASS/data/Rdata.rds and b/win32/deps/library/MASS/data/Rdata.rds differ
diff --git a/win32/deps/library/MASS/data/Rdata.rdx b/win32/deps/library/MASS/data/Rdata.rdx
index 005608f..fabbbfc 100644
Binary files a/win32/deps/library/MASS/data/Rdata.rdx and b/win32/deps/library/MASS/data/Rdata.rdx differ
diff --git a/win32/deps/library/MASS/help/AnIndex b/win32/deps/library/MASS/help/AnIndex
index f72f9fe..b7eb220 100644
--- a/win32/deps/library/MASS/help/AnIndex
+++ b/win32/deps/library/MASS/help/AnIndex
@@ -30,7 +30,6 @@ Cars93	Cars93
 cats	cats
 cement	cement
 chem	chem
-coef.fitdistr	fitdistr
 coef.lda	lda
 con2tr	con2tr
 confint.glm	confint
@@ -112,7 +111,6 @@ lm.gls	lm.gls
 lm.ridge	lm.ridge
 lmsreg	lqs
 lmwork	stdres
-logLik.fitdistr	fitdistr
 logLik.negbin	glm.nb
 loglm	loglm
 loglm1	loglm1
@@ -172,7 +170,6 @@ predict.lqs	predict.lqs
 predict.mca	predict.mca
 predict.qda	predict.qda
 predict.rlm	rlm
-print.fitdistr	fitdistr
 print.fractions	fractions
 print.gamma.shape	gamma.shape.glm
 print.glm.dose	dose.p
diff --git a/win32/deps/library/MASS/help/MASS.rdb b/win32/deps/library/MASS/help/MASS.rdb
new file mode 100644
index 0000000..1a4898d
Binary files /dev/null and b/win32/deps/library/MASS/help/MASS.rdb differ
diff --git a/win32/deps/library/MASS/help/MASS.rdx b/win32/deps/library/MASS/help/MASS.rdx
new file mode 100644
index 0000000..80f1b77
Binary files /dev/null and b/win32/deps/library/MASS/help/MASS.rdx differ
diff --git a/win32/deps/library/MASS/help/aliases.rds b/win32/deps/library/MASS/help/aliases.rds
new file mode 100644
index 0000000..12ce6a2
Binary files /dev/null and b/win32/deps/library/MASS/help/aliases.rds differ
diff --git a/win32/deps/library/MASS/help/paths.rds b/win32/deps/library/MASS/help/paths.rds
new file mode 100644
index 0000000..e7cbe02
Binary files /dev/null and b/win32/deps/library/MASS/help/paths.rds differ
diff --git a/win32/deps/library/MASS/html/00Index.html b/win32/deps/library/MASS/html/00Index.html
new file mode 100644
index 0000000..fe6b1cc
--- /dev/null
+++ b/win32/deps/library/MASS/html/00Index.html
@@ -0,0 +1,645 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><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/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;MASS&rsquo; version 7.3-22</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../NEWS">Package NEWS</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p 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 width="25%"><a href="abbey.html">abbey</a></td>
+<td>Determinations of Nickel Content</td></tr>
+<tr><td width="25%"><a href="accdeaths.html">accdeaths</a></td>
+<td>Accidental Deaths in the US 1973-1978</td></tr>
+<tr><td width="25%"><a href="addterm.html">addterm</a></td>
+<td>Try All One-Term Additions to a Model</td></tr>
+<tr><td width="25%"><a href="addterm.html">addterm.default</a></td>
+<td>Try All One-Term Additions to a Model</td></tr>
+<tr><td width="25%"><a href="addterm.html">addterm.glm</a></td>
+<td>Try All One-Term Additions to a Model</td></tr>
+<tr><td width="25%"><a href="addterm.html">addterm.lm</a></td>
+<td>Try All One-Term Additions to a Model</td></tr>
+<tr><td width="25%"><a href="Aids2.html">Aids2</a></td>
+<td>Australian AIDS Survival Data</td></tr>
+<tr><td width="25%"><a href="Animals.html">Animals</a></td>
+<td>Brain and Body Weights for 28 Species</td></tr>
+<tr><td width="25%"><a href="anorexia.html">anorexia</a></td>
+<td>Anorexia Data on Weight Change</td></tr>
+<tr><td width="25%"><a href="anova.negbin.html">anova.negbin</a></td>
+<td>Likelihood Ratio Tests for Negative Binomial GLMs</td></tr>
+<tr><td width="25%"><a href="area.html">area</a></td>
+<td>Adaptive Numerical Integration</td></tr>
+<tr><td width="25%"><a href="fractions.html">as.character.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td 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 width="25%"><a href="bacteria.html">bacteria</a></td>
+<td>Presence of Bacteria after Drug Treatments</td></tr>
+<tr><td width="25%"><a href="bandwidth.nrd.html">bandwidth.nrd</a></td>
+<td>Bandwidth for density() via Normal Reference Distribution</td></tr>
+<tr><td width="25%"><a href="bcv.html">bcv</a></td>
+<td>Biased Cross-Validation for Bandwidth Selection</td></tr>
+<tr><td width="25%"><a href="beav1.html">beav1</a></td>
+<td>Body Temperature Series of Beaver 1</td></tr>
+<tr><td width="25%"><a href="beav2.html">beav2</a></td>
+<td>Body Temperature Series of Beaver 2</td></tr>
+<tr><td width="25%"><a href="biopsy.html">biopsy</a></td>
+<td>Biopsy Data on Breast Cancer Patients</td></tr>
+<tr><td width="25%"><a href="birthwt.html">birthwt</a></td>
+<td>Risk Factors Associated with Low Infant Birth Weight</td></tr>
+<tr><td width="25%"><a href="Boston.html">Boston</a></td>
+<td>Housing Values in Suburbs of Boston</td></tr>
+<tr><td width="25%"><a href="boxcox.html">boxcox</a></td>
+<td>Box-Cox Transformations for Linear Models</td></tr>
+<tr><td width="25%"><a href="boxcox.html">boxcox.default</a></td>
+<td>Box-Cox Transformations for Linear Models</td></tr>
+<tr><td width="25%"><a href="boxcox.html">boxcox.formula</a></td>
+<td>Box-Cox Transformations for Linear Models</td></tr>
+<tr><td 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 width="25%"><a href="cabbages.html">cabbages</a></td>
+<td>Data from a cabbage field trial</td></tr>
+<tr><td width="25%"><a href="caith.html">caith</a></td>
+<td>Colours of Eyes and Hair of People in Caithness</td></tr>
+<tr><td 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 width="25%"><a href="cats.html">cats</a></td>
+<td>Anatomical Data from Domestic Cats</td></tr>
+<tr><td width="25%"><a href="cement.html">cement</a></td>
+<td>Heat Evolved by Setting Cements</td></tr>
+<tr><td width="25%"><a href="chem.html">chem</a></td>
+<td>Copper in Wholemeal Flour</td></tr>
+<tr><td width="25%"><a href="lda.html">coef.lda</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="con2tr.html">con2tr</a></td>
+<td>Convert Lists to Data Frames for use by lattice</td></tr>
+<tr><td width="25%"><a href="confint.html">confint.glm</a></td>
+<td>Confidence Intervals for Model Parameters</td></tr>
+<tr><td width="25%"><a href="confint.html">confint.nls</a></td>
+<td>Confidence Intervals for Model Parameters</td></tr>
+<tr><td width="25%"><a href="confint.html">confint.profile.glm</a></td>
+<td>Confidence Intervals for Model Parameters</td></tr>
+<tr><td width="25%"><a href="confint.html">confint.profile.nls</a></td>
+<td>Confidence Intervals for Model Parameters</td></tr>
+<tr><td width="25%"><a href="contr.sdif.html">contr.sdif</a></td>
+<td>Successive Differences Contrast Coding</td></tr>
+<tr><td width="25%"><a href="coop.html">coop</a></td>
+<td>Co-operative Trial in Analytical Chemistry</td></tr>
+<tr><td width="25%"><a href="corresp.html">corresp</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td width="25%"><a href="corresp.html">corresp.data.frame</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td width="25%"><a href="corresp.html">corresp.default</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td width="25%"><a href="corresp.html">corresp.factor</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td width="25%"><a href="corresp.html">corresp.formula</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td width="25%"><a href="corresp.html">corresp.matrix</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td width="25%"><a href="corresp.html">corresp.xtabs</a></td>
+<td>Simple Correspondence Analysis</td></tr>
+<tr><td width="25%"><a href="cov.rob.html">cov.mcd</a></td>
+<td>Resistant Estimation of Multivariate Location and Scatter</td></tr>
+<tr><td width="25%"><a href="cov.rob.html">cov.mve</a></td>
+<td>Resistant Estimation of Multivariate Location and Scatter</td></tr>
+<tr><td width="25%"><a href="cov.rob.html">cov.rob</a></td>
+<td>Resistant Estimation of Multivariate Location and Scatter</td></tr>
+<tr><td width="25%"><a href="cov.trob.html">cov.trob</a></td>
+<td>Covariance Estimation for Multivariate t Distribution</td></tr>
+<tr><td width="25%"><a href="cpus.html">cpus</a></td>
+<td>Performance of Computer CPUs</td></tr>
+<tr><td width="25%"><a href="crabs.html">crabs</a></td>
+<td>Morphological Measurements on Leptograpsus Crabs</td></tr>
+<tr><td 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 width="25%"><a href="DDT.html">DDT</a></td>
+<td>DDT in Kale</td></tr>
+<tr><td width="25%"><a href="deaths.html">deaths</a></td>
+<td>Monthly Deaths from Lung Diseases in the UK</td></tr>
+<tr><td width="25%"><a href="denumerate.html">denumerate</a></td>
+<td>Transform an Allowable Formula for 'loglm' into one for 'terms'</td></tr>
+<tr><td 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 width="25%"><a href="dose.p.html">dose.p</a></td>
+<td>Predict Doses for Binomial Assay model</td></tr>
+<tr><td width="25%"><a href="drivers.html">drivers</a></td>
+<td>Deaths of Car Drivers in Great Britain 1969-84</td></tr>
+<tr><td width="25%"><a href="dropterm.html">dropterm</a></td>
+<td>Try All One-Term Deletions from a Model</td></tr>
+<tr><td width="25%"><a href="dropterm.html">dropterm.default</a></td>
+<td>Try All One-Term Deletions from a Model</td></tr>
+<tr><td width="25%"><a href="dropterm.html">dropterm.glm</a></td>
+<td>Try All One-Term Deletions from a Model</td></tr>
+<tr><td 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 width="25%"><a href="eagles.html">eagles</a></td>
+<td>Foraging Ecology of Bald Eagles</td></tr>
+<tr><td width="25%"><a href="epil.html">epil</a></td>
+<td>Seizure Counts for Epileptics</td></tr>
+<tr><td width="25%"><a href="eqscplot.html">eqscplot</a></td>
+<td>Plots with Geometrically Equal Scales</td></tr>
+<tr><td width="25%"><a href="stepAIC.html">extractAIC.gls</a></td>
+<td>Choose a model by AIC in a Stepwise Algorithm</td></tr>
+<tr><td 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 width="25%"><a href="glm.nb.html">family.negbin</a></td>
+<td>Fit a Negative Binomial Generalized Linear Model</td></tr>
+<tr><td width="25%"><a href="farms.html">farms</a></td>
+<td>Ecological Factors in Farm Management</td></tr>
+<tr><td width="25%"><a href="fgl.html">fgl</a></td>
+<td>Measurements of Forensic Glass Fragments</td></tr>
+<tr><td width="25%"><a href="fitdistr.html">fitdistr</a></td>
+<td>Maximum-likelihood Fitting of Univariate Distributions</td></tr>
+<tr><td width="25%"><a href="forbes.html">forbes</a></td>
+<td>Forbes' Data on Boiling Points in the Alps</td></tr>
+<tr><td 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 width="25%"><a href="GAGurine.html">GAGurine</a></td>
+<td>Level of GAG in Urine of Children</td></tr>
+<tr><td width="25%"><a href="galaxies.html">galaxies</a></td>
+<td>Velocities for 82 Galaxies</td></tr>
+<tr><td 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 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 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 width="25%"><a href="gehan.html">gehan</a></td>
+<td>Remission Times of Leukaemia Patients</td></tr>
+<tr><td width="25%"><a href="genotype.html">genotype</a></td>
+<td>Rat Genotype Data</td></tr>
+<tr><td width="25%"><a href="geyser.html">geyser</a></td>
+<td>Old Faithful Geyser Data</td></tr>
+<tr><td width="25%"><a href="gilgais.html">gilgais</a></td>
+<td>Line Transect of Soil in Gilgai Territory</td></tr>
+<tr><td width="25%"><a href="ginv.html">ginv</a></td>
+<td>Generalized Inverse of a Matrix</td></tr>
+<tr><td 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 width="25%"><a href="glm.nb.html">glm.nb</a></td>
+<td>Fit a Negative Binomial Generalized Linear Model</td></tr>
+<tr><td 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 width="25%"><a href="hills.html">hills</a></td>
+<td>Record Times in Scottish Hill Races</td></tr>
+<tr><td width="25%"><a href="hist.scott.html">hist.FD</a></td>
+<td>Plot a Histogram with Automatic Bin Width Selection</td></tr>
+<tr><td width="25%"><a href="hist.scott.html">hist.scott</a></td>
+<td>Plot a Histogram with Automatic Bin Width Selection</td></tr>
+<tr><td width="25%"><a href="housing.html">housing</a></td>
+<td>Frequency Table from a Copenhagen Housing Conditions Survey</td></tr>
+<tr><td width="25%"><a href="huber.html">huber</a></td>
+<td>Huber M-estimator of Location with MAD Scale</td></tr>
+<tr><td 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 width="25%"><a href="immer.html">immer</a></td>
+<td>Yields from a Barley Field Trial</td></tr>
+<tr><td width="25%"><a href="Insurance.html">Insurance</a></td>
+<td>Numbers of Car Insurance claims</td></tr>
+<tr><td width="25%"><a href="fractions.html">is.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td 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 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 width="25%"><a href="lda.html">lda</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="lda.html">lda.data.frame</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="lda.html">lda.default</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="lda.html">lda.formula</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="lda.html">lda.matrix</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="ldahist.html">ldahist</a></td>
+<td>Histograms or Density Plots of Multiple Groups</td></tr>
+<tr><td width="25%"><a href="leuk.html">leuk</a></td>
+<td>Survival Times and White Blood Counts for Leukaemia Patients</td></tr>
+<tr><td width="25%"><a href="lm.gls.html">lm.gls</a></td>
+<td>Fit Linear Models by Generalized Least Squares</td></tr>
+<tr><td width="25%"><a href="lm.ridge.html">lm.ridge</a></td>
+<td>Ridge Regression</td></tr>
+<tr><td width="25%"><a href="lqs.html">lmsreg</a></td>
+<td>Resistant Regression</td></tr>
+<tr><td width="25%"><a href="stdres.html">lmwork</a></td>
+<td>Extract Standardized Residuals from a Linear Model</td></tr>
+<tr><td width="25%"><a href="glm.nb.html">logLik.negbin</a></td>
+<td>Fit a Negative Binomial Generalized Linear Model</td></tr>
+<tr><td width="25%"><a href="loglm.html">loglm</a></td>
+<td>Fit Log-Linear Models by Iterative Proportional Scaling</td></tr>
+<tr><td width="25%"><a href="logtrans.html">logtrans</a></td>
+<td>Estimate log Transformation Parameter</td></tr>
+<tr><td width="25%"><a href="logtrans.html">logtrans.default</a></td>
+<td>Estimate log Transformation Parameter</td></tr>
+<tr><td width="25%"><a href="logtrans.html">logtrans.formula</a></td>
+<td>Estimate log Transformation Parameter</td></tr>
+<tr><td width="25%"><a href="logtrans.html">logtrans.lm</a></td>
+<td>Estimate log Transformation Parameter</td></tr>
+<tr><td width="25%"><a href="lqs.html">lqs</a></td>
+<td>Resistant Regression</td></tr>
+<tr><td width="25%"><a href="lqs.html">lqs.default</a></td>
+<td>Resistant Regression</td></tr>
+<tr><td width="25%"><a href="lqs.html">lqs.formula</a></td>
+<td>Resistant Regression</td></tr>
+<tr><td 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 width="25%"><a href="mammals.html">mammals</a></td>
+<td>Brain and Body Weights for 62 Species of Land Mammals</td></tr>
+<tr><td width="25%"><a href="fractions.html">Math.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td width="25%"><a href="mca.html">mca</a></td>
+<td>Multiple Correspondence Analysis</td></tr>
+<tr><td width="25%"><a href="mcycle.html">mcycle</a></td>
+<td>Data from a Simulated Motorcycle Accident</td></tr>
+<tr><td width="25%"><a href="Melanoma.html">Melanoma</a></td>
+<td>Survival from Malignant Melanoma</td></tr>
+<tr><td width="25%"><a href="menarche.html">menarche</a></td>
+<td>Age of Menarche in Warsaw</td></tr>
+<tr><td width="25%"><a href="michelson.html">michelson</a></td>
+<td>Michelson's Speed of Light Data</td></tr>
+<tr><td width="25%"><a href="minn38.html">minn38</a></td>
+<td>Minnesota High School Graduates of 1938</td></tr>
+<tr><td width="25%"><a href="lda.html">model.frame.lda</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="qda.html">model.frame.qda</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="motors.html">motors</a></td>
+<td>Accelerated Life Testing of Motorettes</td></tr>
+<tr><td width="25%"><a href="muscle.html">muscle</a></td>
+<td>Effect of Calcium Chloride on Muscle Contraction in Rat Hearts</td></tr>
+<tr><td 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 width="25%"><a href="negative.binomial.html">negative.binomial</a></td>
+<td>Family function for Negative Binomial GLMs</td></tr>
+<tr><td width="25%"><a href="newcomb.html">newcomb</a></td>
+<td>Newcomb's Measurements of the Passage Time of Light</td></tr>
+<tr><td width="25%"><a href="nlschools.html">nlschools</a></td>
+<td>Eighth-Grade Pupils in the Netherlands</td></tr>
+<tr><td width="25%"><a href="npk.html">npk</a></td>
+<td>Classical N, P, K Factorial Experiment</td></tr>
+<tr><td width="25%"><a href="npr1.html">npr1</a></td>
+<td>US Naval Petroleum Reserve No. 1 data</td></tr>
+<tr><td 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 width="25%"><a href="oats.html">oats</a></td>
+<td>Data from an Oats Field Trial</td></tr>
+<tr><td width="25%"><a href="OME.html">OME</a></td>
+<td>Tests of Auditory Perception in Children with OME</td></tr>
+<tr><td 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 width="25%"><a href="painters.html">painters</a></td>
+<td>The Painter's Data of de Piles</td></tr>
+<tr><td width="25%"><a href="pairs.lda.html">pairs.lda</a></td>
+<td>Produce Pairwise Scatterplots from an 'lda' Fit</td></tr>
+<tr><td width="25%"><a href="plot.profile.html">pairs.profile</a></td>
+<td>Plotting Functions for 'profile' Objects</td></tr>
+<tr><td width="25%"><a href="parcoord.html">parcoord</a></td>
+<td>Parallel Coordinates Plot</td></tr>
+<tr><td width="25%"><a href="petrol.html">petrol</a></td>
+<td>N. L. Prater's Petrol Refinery Data</td></tr>
+<tr><td width="25%"><a href="phones.html">phones</a></td>
+<td>Belgium Phone Calls 1950-1973</td></tr>
+<tr><td width="25%"><a href="Pima.tr.html">Pima.te</a></td>
+<td>Diabetes in Pima Indian Women</td></tr>
+<tr><td width="25%"><a href="Pima.tr.html">Pima.tr</a></td>
+<td>Diabetes in Pima Indian Women</td></tr>
+<tr><td width="25%"><a href="Pima.tr.html">Pima.tr2</a></td>
+<td>Diabetes in Pima Indian Women</td></tr>
+<tr><td width="25%"><a href="plot.lda.html">plot.lda</a></td>
+<td>Plot Method for Class 'lda'</td></tr>
+<tr><td width="25%"><a href="plot.mca.html">plot.mca</a></td>
+<td>Plot Method for Objects of Class 'mca'</td></tr>
+<tr><td width="25%"><a href="plot.profile.html">plot.profile</a></td>
+<td>Plotting Functions for 'profile' Objects</td></tr>
+<tr><td width="25%"><a href="lm.ridge.html">plot.ridgelm</a></td>
+<td>Ridge Regression</td></tr>
+<tr><td width="25%"><a href="polr.html">polr</a></td>
+<td>Ordered Logistic or Probit Regression</td></tr>
+<tr><td width="25%"><a href="predict.glmmPQL.html">predict.glmmPQL</a></td>
+<td>Predict Method for glmmPQL Fits</td></tr>
+<tr><td width="25%"><a href="predict.lda.html">predict.lda</a></td>
+<td>Classify Multivariate Observations by Linear Discrimination</td></tr>
+<tr><td width="25%"><a href="predict.lqs.html">predict.lqs</a></td>
+<td>Predict from an lqs Fit</td></tr>
+<tr><td width="25%"><a href="predict.mca.html">predict.mca</a></td>
+<td>Predict Method for Class 'mca'</td></tr>
+<tr><td width="25%"><a href="predict.qda.html">predict.qda</a></td>
+<td>Classify from Quadratic Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="rlm.html">predict.rlm</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td width="25%"><a href="fractions.html">print.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td 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 width="25%"><a href="dose.p.html">print.glm.dose</a></td>
+<td>Predict Doses for Binomial Assay model</td></tr>
+<tr><td width="25%"><a href="lda.html">print.lda</a></td>
+<td>Linear Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="mca.html">print.mca</a></td>
+<td>Multiple Correspondence Analysis</td></tr>
+<tr><td width="25%"><a href="qda.html">print.qda</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="lm.ridge.html">print.ridgelm</a></td>
+<td>Ridge Regression</td></tr>
+<tr><td width="25%"><a href="rlm.html">print.rlm</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td width="25%"><a href="rms.curv.html">print.rms.curv</a></td>
+<td>Relative Curvature Measures for Non-Linear Regression</td></tr>
+<tr><td 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 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 width="25%"><a href="summary.rlm.html">print.summary.rlm</a></td>
+<td>Summary Method for Robust Linear Models</td></tr>
+<tr><td width="25%"><a href="profile.glm.html">profile.glm</a></td>
+<td>Method for Profiling glm Objects</td></tr>
+<tr><td width="25%"><a href="rlm.html">psi.bisquare</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td width="25%"><a href="rlm.html">psi.hampel</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td 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 width="25%"><a href="qda.html">qda</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="qda.html">qda.data.frame</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="qda.html">qda.default</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="qda.html">qda.formula</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td width="25%"><a href="qda.html">qda.matrix</a></td>
+<td>Quadratic Discriminant Analysis</td></tr>
+<tr><td 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 width="25%"><a href="Rabbit.html">Rabbit</a></td>
+<td>Blood Pressure in Rabbits</td></tr>
+<tr><td width="25%"><a href="rational.html">rational</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td width="25%"><a href="renumerate.html">renumerate</a></td>
+<td>Convert a Formula Transformed by 'denumerate'</td></tr>
+<tr><td width="25%"><a href="renumerate.html">renumerate.formula</a></td>
+<td>Convert a Formula Transformed by 'denumerate'</td></tr>
+<tr><td width="25%"><a href="rlm.html">rlm</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td width="25%"><a href="rlm.html">rlm.default</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td width="25%"><a href="rlm.html">rlm.formula</a></td>
+<td>Robust Fitting of Linear Models</td></tr>
+<tr><td width="25%"><a href="rms.curv.html">rms.curv</a></td>
+<td>Relative Curvature Measures for Non-Linear Regression</td></tr>
+<tr><td width="25%"><a href="rnegbin.html">rnegbin</a></td>
+<td>Simulate Negative Binomial Variates</td></tr>
+<tr><td width="25%"><a href="road.html">road</a></td>
+<td>Road Accident Deaths in US States</td></tr>
+<tr><td width="25%"><a href="rotifer.html">rotifer</a></td>
+<td>Numbers of Rotifers by Fluid Density</td></tr>
+<tr><td 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 width="25%"><a href="sammon.html">sammon</a></td>
+<td>Sammon's Non-Linear Mapping</td></tr>
+<tr><td width="25%"><a href="lm.ridge.html">select</a></td>
+<td>Ridge Regression</td></tr>
+<tr><td width="25%"><a href="lm.ridge.html">select.ridgelm</a></td>
+<td>Ridge Regression</td></tr>
+<tr><td width="25%"><a href="isoMDS.html">Shepard</a></td>
+<td>Kruskal's Non-metric Multidimensional Scaling</td></tr>
+<tr><td width="25%"><a href="ships.html">ships</a></td>
+<td>Ships Damage Data</td></tr>
+<tr><td width="25%"><a href="shoes.html">shoes</a></td>
+<td>Shoe wear data of Box, Hunter and Hunter</td></tr>
+<tr><td width="25%"><a href="shrimp.html">shrimp</a></td>
+<td>Percentage of Shrimp in Shrimp Cocktail</td></tr>
+<tr><td width="25%"><a href="shuttle.html">shuttle</a></td>
+<td>Space Shuttle Autolander Problem</td></tr>
+<tr><td width="25%"><a href="Sitka.html">Sitka</a></td>
+<td>Growth Curves for Sitka Spruce Trees in 1988</td></tr>
+<tr><td width="25%"><a href="Sitka89.html">Sitka89</a></td>
+<td>Growth Curves for Sitka Spruce Trees in 1989</td></tr>
+<tr><td width="25%"><a href="Skye.html">Skye</a></td>
+<td>AFM Compositions of Aphyric Skye Lavas</td></tr>
+<tr><td width="25%"><a href="snails.html">snails</a></td>
+<td>Snail Mortality Data</td></tr>
+<tr><td width="25%"><a href="SP500.html">SP500</a></td>
+<td>Returns of the Standard and Poors 500</td></tr>
+<tr><td width="25%"><a href="stdres.html">stdres</a></td>
+<td>Extract Standardized Residuals from a Linear Model</td></tr>
+<tr><td width="25%"><a href="steam.html">steam</a></td>
+<td>The Saturated Steam Pressure Data</td></tr>
+<tr><td width="25%"><a href="stepAIC.html">stepAIC</a></td>
+<td>Choose a model by AIC in a Stepwise Algorithm</td></tr>
+<tr><td width="25%"><a href="stormer.html">stormer</a></td>
+<td>The Stormer Viscometer Data</td></tr>
+<tr><td width="25%"><a href="studres.html">studres</a></td>
+<td>Extract Studentized Residuals from a Linear Model</td></tr>
+<tr><td width="25%"><a href="fractions.html">Summary.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td width="25%"><a href="summary.loglm.html">summary.loglm</a></td>
+<td>Summary Method Function for Objects of Class 'loglm'</td></tr>
+<tr><td width="25%"><a href="summary.negbin.html">summary.negbin</a></td>
+<td>Summary Method Function for Objects of Class 'negbin'</td></tr>
+<tr><td width="25%"><a href="summary.rlm.html">summary.rlm</a></td>
+<td>Summary Method for Robust Linear Models</td></tr>
+<tr><td width="25%"><a href="survey.html">survey</a></td>
+<td>Student Survey Data</td></tr>
+<tr><td width="25%"><a href="synth.tr.html">synth.te</a></td>
+<td>Synthetic Classification Problem</td></tr>
+<tr><td 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 width="25%"><a href="fractions.html">t.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td width="25%"><a href="stepAIC.html">terms.gls</a></td>
+<td>Choose a model by AIC in a Stepwise Algorithm</td></tr>
+<tr><td width="25%"><a href="stepAIC.html">terms.lme</a></td>
+<td>Choose a model by AIC in a Stepwise Algorithm</td></tr>
+<tr><td width="25%"><a href="theta.md.html">theta.md</a></td>
+<td>Estimate theta of the Negative Binomial</td></tr>
+<tr><td width="25%"><a href="theta.md.html">theta.ml</a></td>
+<td>Estimate theta of the Negative Binomial</td></tr>
+<tr><td width="25%"><a href="theta.md.html">theta.mm</a></td>
+<td>Estimate theta of the Negative Binomial</td></tr>
+<tr><td width="25%"><a href="topo.html">topo</a></td>
+<td>Spatial Topographic Data</td></tr>
+<tr><td width="25%"><a href="Traffic.html">Traffic</a></td>
+<td>Effect of Swedish Speed Limits on Accidents</td></tr>
+<tr><td 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 width="25%"><a href="ucv.html">ucv</a></td>
+<td>Unbiased Cross-Validation for Bandwidth Selection</td></tr>
+<tr><td width="25%"><a href="UScereal.html">UScereal</a></td>
+<td>Nutritional and Marketing Information on US Cereals</td></tr>
+<tr><td 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 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 width="25%"><a href="waders.html">waders</a></td>
+<td>Counts of Waders at 15 Sites in South Africa</td></tr>
+<tr><td width="25%"><a href="whiteside.html">whiteside</a></td>
+<td>House Insulation: Whiteside's Data</td></tr>
+<tr><td width="25%"><a href="width.SJ.html">width.SJ</a></td>
+<td>Bandwidth Selection by Pilot Estimation of Derivatives</td></tr>
+<tr><td width="25%"><a href="write.matrix.html">write.matrix</a></td>
+<td>Write a Matrix or Data Frame</td></tr>
+<tr><td 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 width="25%"><a href="rational.html">.rat</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td width="25%"><a href="fractions.html">[.fractions</a></td>
+<td>Rational Approximation</td></tr>
+<tr><td width="25%"><a href="fractions.html">[&lt;-.fractions</a></td>
+<td>Rational Approximation</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/MASS/html/R.css b/win32/deps/library/MASS/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/MASS/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/MASS/libs/i386/MASS.dll b/win32/deps/library/MASS/libs/i386/MASS.dll
new file mode 100644
index 0000000..17a89c4
Binary files /dev/null and b/win32/deps/library/MASS/libs/i386/MASS.dll differ
diff --git a/win32/deps/library/MASS/po/de/LC_MESSAGES/R-MASS.mo b/win32/deps/library/MASS/po/de/LC_MESSAGES/R-MASS.mo
new file mode 100644
index 0000000..99db4f6
Binary files /dev/null and b/win32/deps/library/MASS/po/de/LC_MESSAGES/R-MASS.mo differ
diff --git a/win32/deps/library/MASS/po/en quot/LC_MESSAGES/R-MASS.mo b/win32/deps/library/MASS/po/en quot/LC_MESSAGES/R-MASS.mo
new file mode 100644
index 0000000..14f1590
Binary files /dev/null and b/win32/deps/library/MASS/po/en quot/LC_MESSAGES/R-MASS.mo differ
diff --git a/win32/deps/library/MASS/po/fr/LC_MESSAGES/R-MASS.mo b/win32/deps/library/MASS/po/fr/LC_MESSAGES/R-MASS.mo
new file mode 100644
index 0000000..0b8e29e
Binary files /dev/null and b/win32/deps/library/MASS/po/fr/LC_MESSAGES/R-MASS.mo differ
diff --git a/win32/deps/library/MASS/po/pl/LC_MESSAGES/R-MASS.mo b/win32/deps/library/MASS/po/pl/LC_MESSAGES/R-MASS.mo
new file mode 100644
index 0000000..4c38eed
Binary files /dev/null and b/win32/deps/library/MASS/po/pl/LC_MESSAGES/R-MASS.mo differ
diff --git a/win32/deps/library/MASS/scripts/ch01.R b/win32/deps/library/MASS/scripts/ch01.R
index a21c0a8..0c6a900 100644
--- a/win32/deps/library/MASS/scripts/ch01.R
+++ b/win32/deps/library/MASS/scripts/ch01.R
@@ -2,8 +2,8 @@
 
 ## Script from Fourth Edition of `Modern Applied Statistics with S'
 
-options(echo = T, width=65, digits=5, height=9999)
-postscript(file="ch01.ps", width=8, height=6, pointsize=9)
+options(width=65, digits=5, height=9999)
+pdf(file="ch01.pdf", width=8, height=6, pointsize=9)
 
 # Chapter 1   Introduction
 
diff --git a/win32/deps/library/MASS/scripts/ch02.R b/win32/deps/library/MASS/scripts/ch02.R
index fff2212..066aea7 100644
--- a/win32/deps/library/MASS/scripts/ch02.R
+++ b/win32/deps/library/MASS/scripts/ch02.R
@@ -5,7 +5,7 @@
 # Chapter 2   Data Manipulation
 
 library(MASS)
-options(echo = T, width=65, digits=5, height=9999)
+options(width=65, digits=5, height=9999)
 
 -2:2
 
@@ -105,7 +105,7 @@ names(longitude) <- state.name
 longitude[c("Hawaii", "Alaska")]
 
 myarr[1, 2:4, ]
-myarr[1, 2:4, , drop = F]
+myarr[1, 2:4, , drop = FALSE]
 
 attach(painters)
 painters[Colour >= 17, ]
@@ -138,7 +138,7 @@ 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 = F)
+scrabs[, 4:8] <- lapply(scrabs[, 4:8], scale, scale = FALSE)
 
 scrabs <- crabs  # make a copy
 scrabs[ ] <- lapply(scrabs,
diff --git a/win32/deps/library/MASS/scripts/ch03.R b/win32/deps/library/MASS/scripts/ch03.R
index 3b5253c..51446e3 100644
--- a/win32/deps/library/MASS/scripts/ch03.R
+++ b/win32/deps/library/MASS/scripts/ch03.R
@@ -5,7 +5,7 @@
 # Chapter 3   S Language
 
 library(MASS)
-options(echo = T, width=65, digits=5, height=9999)
+options(width=65, digits=5, height=9999)
 
 # from Chapter 2
 
@@ -112,7 +112,7 @@ 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 = F))
+as.vector(abbreviate(state.name[44:50], use.classes = FALSE))
 
 grep("na$", state.name)
 regexpr("na$", state.name)
diff --git a/win32/deps/library/MASS/scripts/ch04.R b/win32/deps/library/MASS/scripts/ch04.R
index a6d5bf2..c3d4c22 100644
--- a/win32/deps/library/MASS/scripts/ch04.R
+++ b/win32/deps/library/MASS/scripts/ch04.R
@@ -6,9 +6,8 @@
 
 library(MASS)
 library(lattice)
-trellis.device(postscript, file="ch04.ps", width=8, height=6,
-               pointsize=9)
-options(echo=T, width=65, digits=5)
+pdf(file="ch04.pdf", width=8, height=6, pointsize=9)
+options(width=65, digits=5)
 
 
 # 4.2  Basic plotting functions
@@ -21,7 +20,7 @@ if(interactive())
 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 = T)
+text(loc, total + par("cxy")[2], total, cex = 0.7, xpd = TRUE)
 
 # S: if(interactive()) brush(hills)
 
@@ -82,7 +81,7 @@ 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 = F)$x
+xs <- qqnorm(rs, plot = FALSE)$x
 env <- t(apply(samp[, -1], 1, range))
 
 matplot(xs, cbind(rs, env), type = "pnn",
@@ -187,11 +186,11 @@ 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 = T, layout = c(4, 2))
+         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, ...) {
+   panel = function(x, y, subscripts, jitter.data = FALSE, ...) {
        if(jitter.data)  y <- jitter(as.numeric(y))
        panel.superpose(x, y, subscripts, ...)
    },
@@ -212,11 +211,11 @@ 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
+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 = T, ID = A5$ID,
+      subscripts = TRUE, ID = A5$ID,
       strip = function(factor, ...)
          strip.default(..., factor.levels = labs, style = 1),
       layout = c(8, 5, 1),
diff --git a/win32/deps/library/MASS/scripts/ch05.R b/win32/deps/library/MASS/scripts/ch05.R
index b35d23a..f61852f 100644
--- a/win32/deps/library/MASS/scripts/ch05.R
+++ b/win32/deps/library/MASS/scripts/ch05.R
@@ -24,14 +24,14 @@ perm.t.test <- function(d) {
     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=T))^2
+    vx <- s %*% (x - matrix(mx, digits, n, byrow=TRUE))^2
     as.vector(mx/sqrt(vx/digits))
 }
 
 library(MASS)
-options(echo = T,width=65, digits=5, height=9999)
+options(width=65, digits=5, height=9999)
 library(lattice)
-trellis.device(postscript, file="ch05.ps", width=8, height=6, pointsize=9)
+pdf(file="ch05.pdf", width=8, height=6, pointsize=9)
 
 rm(A, B) # precautionary clear-out
 attach(shoes)
@@ -106,15 +106,15 @@ wilcox.test(A, mu = 10)
 
 var.test(A, B)
 
-t.test(A, B, var.equal = T)
+t.test(A, B, var.equal = TRUE)
 
-t.test(A, B, var.equal = F)
+t.test(A, B, var.equal = FALSE)
 
 wilcox.test(A, B)
 
-t.test(A, B, paired = T)
+t.test(A, B, paired = TRUE)
 
-wilcox.test(A, B, paired = T)
+wilcox.test(A, B, paired = TRUE)
 detach()
 
 par(mfrow = c(1, 2))
@@ -230,7 +230,7 @@ density(gal, n = 1, from = 20.833, to = 20.834, width = "SJ")$y
 set.seed(101)
 m <- 1000
 res <- numeric(m)
-for (i in 1:m) res[i] <- median(sample(gal, replace = T))
+for (i in 1:m) res[i] <- median(sample(gal, replace = TRUE))
 mean(res - median(gal))
 sqrt(var(res))
 
@@ -249,7 +249,7 @@ boot.ci(gal.boot, conf = c(0.90, 0.95),
          type = c("norm","basic","perc","bca"))
 plot(gal.boot)
 
-if(F){ # bootstrap() is an S-PLUS function
+if(FALSE) { # bootstrap() is an S-PLUS function
 gal.bt <- bootstrap(gal, median, seed = 101, B = 1000)
 summary(gal.bt)
 plot(gal.bt)
@@ -261,7 +261,7 @@ limits.bca(gal.bt)
 
 sim.gen  <- function(data, mle) {
  n <- length(data)
- data[sample(n, replace = T)]  + mle*rnorm(n)
+ data[sample(n, replace = TRUE)]  + mle*rnorm(n)
 }
 gal.boot2 <- boot(gal, median, R = 1000,
  sim = "parametric", ran.gen = sim.gen, mle = 0.5)
diff --git a/win32/deps/library/MASS/scripts/ch06.R b/win32/deps/library/MASS/scripts/ch06.R
index 854d349..aaea793 100644
--- a/win32/deps/library/MASS/scripts/ch06.R
+++ b/win32/deps/library/MASS/scripts/ch06.R
@@ -6,8 +6,8 @@
 
 library(MASS)
 library(lattice)
-options(echo = T,width=65, digits=5, height=9999)
-trellis.device(postscript, file="ch06.ps", width=8, height=6, pointsize=9)
+options(width=65, digits=5, height=9999)
+pdf(file="ch06.pdf", width=8, height=6, pointsize=9)
 options(contrasts = c("contr.helmert", "contr.poly"))
 
 
@@ -137,18 +137,17 @@ 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"))
 
-summary(lm(calls ~ year, data = phones), cor = F)
-summary(rlm(calls ~ year, maxit = 50, data = phones), cor = F)
-summary(rlm(calls ~ year, scale.est = "proposal 2",
-             data = phones), cor = F)
-summary(rlm(calls ~ year, data = phones, psi = psi.bisquare),
-         cor = F)
+## 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"), cor = F)
+summary(rlm(calls ~ year, data = phones, method = "MM"))
 
 # library(robust) # S-PLUS only
 # phones.lmr <- lmRob(calls ~ year, data = phones)
@@ -159,11 +158,11 @@ 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"), cor = F)
+             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), cor = F)
-summary(rlm(ispeed ~ grad, data = hills, method="MM"), cor=F)
+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)
@@ -199,12 +198,12 @@ 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 = T)
+model.tables(npk.aov1, type = "means", se = TRUE)
 
 mp <- c("-", "+")
 (NPK <- expand.grid(N = mp, P = mp, K = mp))
 
-if(F) {
+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)
 
@@ -223,6 +222,16 @@ factors <- list(S=mp, D=mp, H=mp, G=mp, R=mp, B=mp, P=mp)
 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
 
@@ -237,11 +246,12 @@ plot(Means, Vars, xlab = "Cell Means", ylab = "Cell Variances")
 plot(Means, SD, xlab = "Cell Means", ylab = "Cell Std Devn.")
 detach()
 
-boxcox(Days+1 ~ Eth*Sex*Age*Lrn, data = quine, singular.ok = T,
+## 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 = T)
+    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)
@@ -252,7 +262,7 @@ addterm(quine.lo, quine.hi, test = "F")
 
 quine.stp <- stepAIC(quine.nxt,
    scope = list(upper = ~Eth*Sex*Age*Lrn, lower = ~1),
-   trace = F)
+   trace = FALSE)
 quine.stp$anova
 
 dropterm(quine.stp, test = "F")
@@ -273,7 +283,7 @@ cpus1 <- cpus
 attach(cpus)
 for(v in names(cpus)[2:7])
   cpus1[[v]] <- cut(cpus[[v]], unique(quantile(cpus[[v]])),
-                    include.lowest = T)
+                    include.lowest = TRUE)
 detach()
 boxcox(perf ~ syct + mmin + mmax + cach + chmin + chmax,
        data = cpus1, lambda = seq(-0.25, 1, 0.1))
@@ -297,7 +307,7 @@ 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=F)
+cpus.lm2 <- stepAIC(cpus.lm, trace=FALSE)
 cpus.lm2$anova
 test.cpus(cpus.lm2)
 
@@ -307,10 +317,10 @@ test.cpus(cpus.lm2)
 immer.aov <- aov((Y1 + Y2)/2 ~ Var + Loc, data = immer)
 summary(immer.aov)
 
-model.tables(immer.aov, type = "means", se = T, cterms = "Var")
+model.tables(immer.aov, type = "means", se = TRUE, cterms = "Var")
 
-if(F) {
-multicomp(immer.aov, plot = T)
+if(FALSE) {
+multicomp(immer.aov, plot = TRUE)
 
 oats1 <- aov(Y ~ N + V + B, data = oats)
 summary(oats1)
diff --git a/win32/deps/library/MASS/scripts/ch07.R b/win32/deps/library/MASS/scripts/ch07.R
index 9da4466..483bea9 100644
--- a/win32/deps/library/MASS/scripts/ch07.R
+++ b/win32/deps/library/MASS/scripts/ch07.R
@@ -5,8 +5,8 @@
 # Chapter 7   Generalized Linear Models
 
 library(MASS)
-options(echo = T,width=65, digits=5, height=9999)
-postscript(file="ch07.ps", width=8, height=6, pointsize=9)
+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),
@@ -21,7 +21,7 @@ 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, cor = F)
+summary(budworm.lg)
 
 plot(c(1,32), c(0,1), type = "n", xlab = "dose",
      ylab = "prob", log = "x")
@@ -60,28 +60,29 @@ bwt <- data.frame(low = factor(low), age, lwt, race,
 detach(); rm(race, ptd, ftv)
 
 birthwt.glm <- glm(low ~ ., family = binomial, data = bwt)
-summary(birthwt.glm, cor = F)
-birthwt.step <- stepAIC(birthwt.glm, trace = F)
+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 = F)
+   + I(scale(lwt)^2), trace = FALSE)
 birthwt.step2$anova
-summary(birthwt.step2, cor = F)$coef
+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
-library(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)
-summary(birthwt.gam)
-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()
+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)
@@ -99,12 +100,12 @@ detach()
 names(housing)
 house.glm0 <- glm(Freq ~ Infl*Type*Cont + Sat,
                   family = poisson, data = housing)
-summary(house.glm0, cor = F)
+summary(house.glm0)
 
 addterm(house.glm0, ~. + Sat:(Infl+Type+Cont), test = "Chisq")
 
 house.glm1 <- update(house.glm0, . ~ . + Sat:(Infl+Type+Cont))
-summary(house.glm1, cor = F)
+summary(house.glm1)
 1 - pchisq(deviance(house.glm1), house.glm1$df.resid)
 
 dropterm(house.glm1, test = "Chisq")
@@ -114,7 +115,7 @@ 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 = T,
+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))
@@ -147,7 +148,7 @@ 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 = T)
+Fr <- matrix(housing$Freq, ncol = 3, byrow = TRUE)
 2 * sum(Fr * log(house.pr/house.pr1))
 
 house.plr2 <- stepAIC(house.plr, ~.^2)
diff --git a/win32/deps/library/MASS/scripts/ch08.R b/win32/deps/library/MASS/scripts/ch08.R
index beafe82..4647707 100644
--- a/win32/deps/library/MASS/scripts/ch08.R
+++ b/win32/deps/library/MASS/scripts/ch08.R
@@ -6,8 +6,8 @@
 
 library(MASS)
 library(lattice)
-options(echo = T, width=65, digits=5, height=9999)
-trellis.device(postscript, file="ch08.ps", width=8, height=6, pointsize=9)
+options(width=65, digits=5, height=9999)
+pdf(file="ch08.pdf", width=8, height=6, pointsize=9)
 
 
 # From Chapter 6, for comparisons
@@ -25,10 +25,10 @@ cpus1 <- cpus
 attach(cpus)
 for(v in names(cpus)[2:7])
   cpus1[[v]] <- cut(cpus[[v]], unique(quantile(cpus[[v]])),
-                    include.lowest = T)
+                    include.lowest = TRUE)
 detach()
 cpus.lm <- lm(log10(perf) ~ ., data=cpus1[cpus.samp, 2:8])
-cpus.lm2 <- stepAIC(cpus.lm, trace=F)
+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
@@ -55,7 +55,7 @@ detach()
 
 wtloss.st <- c(b0 = 90, b1 = 95, th = 120)
 wtloss.fm <- nls(Weight ~ b0 + b1*2^(-Days/th),
-   data = wtloss, start = wtloss.st, trace = T)
+   data = wtloss, start = wtloss.st, trace = TRUE)
 wtloss.fm
 
 expn <- function(b0, b1, th, x) {
@@ -68,7 +68,7 @@ expn <- function(b0, b1, th, x) {
 }
 
 wtloss.gr <- nls(Weight ~ expn(b0, b1, th, Days),
-   data = wtloss, start = wtloss.st, trace = T)
+   data = wtloss, start = wtloss.st, trace = TRUE)
 
 expn1 <- deriv(y ~ b0 + b1 * 2^(-x/th), c("b0", "b1", "th"),
                function(b0, b1, th, x) {})
@@ -79,7 +79,7 @@ negexp <- selfStart(model = ~ b0 + b1*exp(-x/th),
    template = function(x, b0, b1, th) {})
 
 wtloss.ss <- nls(Weight ~ negexp(Days, B0, B1, theta),
-                 data = wtloss, trace = T)
+                 data = wtloss, trace = TRUE)
 
 
 # 8.3  Non-linear fitted model objects and method functions
@@ -109,7 +109,7 @@ detach()
 
 xyplot(Yhat ~ Conc | Strip, Muscle, as.table = TRUE,
   ylim = range(c(Muscle$Yhat, Muscle$logLength), na.rm = TRUE),
-  subscripts = T, xlab = "Calcium Chloride concentration (mM)",
+  subscripts = TRUE, xlab = "Calcium Chloride concentration (mM)",
   ylab = "log(Length in mm)", panel =
   function(x, y, subscripts, ...) {
      lines(spline(x, y))
@@ -143,7 +143,7 @@ b0 <- coef(fm0)
 names(b0) <- c("b1", "b2")
 b0
 storm.fm <- nls(Time ~ b1*Viscosity/(Wt-b2), data = stormer,
-                start = b0, trace = T)
+                start = b0, trace = TRUE)
 
 bc <- coef(storm.fm)
 se <- sqrt(diag(vcov(storm.fm)))
@@ -169,8 +169,8 @@ 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 = T)
-contour(b1, b2, fstat, levels = qf(0.95,2,21), add = T, labex = 0)
+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()
@@ -283,7 +283,7 @@ 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 = T)
+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)
@@ -301,7 +301,7 @@ showcuts <- function(obj)
 showcuts(cpus.mars)
 test2(cpus.mars)
 # examine the fitted functions
-Xp <- matrix(sapply(cpus2[cpus.samp, 1:6], mean), 100, 6, byrow = T)
+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)
@@ -373,7 +373,7 @@ cpus.ppr2 <- ppr(log10(perf) ~ ., data = cpus2[cpus.samp,],
 test.cpus(cpus.ppr2)
 res3 <- log10(cpus2[-cpus.samp, "perf"]) -
              predict(cpus.ppr, cpus2[-cpus.samp,])
-wilcox.test(res2^2, res3^2, paired = T, alternative = "greater")
+wilcox.test(res2^2, res3^2, paired = TRUE, alternative = "greater")
 
 
 # 8.10  Neural networks
@@ -383,11 +383,11 @@ 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 = T, skip = T,
-    maxit = 1000, Hess = T)
+    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, T)$values    # rock.nn$Hessian in R
+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)
@@ -408,17 +408,17 @@ 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 = T, skip = T, size = 0)
+                linout = TRUE, skip = TRUE, size = 0)
 test.cpus(cpus.nn1)
 
-cpus.nn2 <- nnet(log10(perf) ~ ., cpus3[cpus.samp,], linout = T,
-                 skip = T, size = 4, decay = 0.01, maxit = 1000)
+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 = T,
-                 skip = T, size = 10, decay = 0.01, maxit = 1000)
+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 = T,
-                skip = T, size = 25, decay = 0.01, maxit = 1000)
+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, ],
@@ -434,7 +434,7 @@ CVnn.cpus <- function(formula, data = cpus3[cpus.samp, ],
     for (i in sort(unique(ri))) {
       cat(" ", i,  sep="")
       for(rep in 1:nreps) {
-        learn <- nnet(formula, data[ri !=i,], trace=F, ...)
+        learn <- nnet(formula, data[ri !=i,], trace=FALSE, ...)
         res[ri == i] <- res[ri == i] +
                         predict(learn, data[ri == i,])
       }
@@ -452,6 +452,6 @@ CVnn.cpus <- function(formula, data = cpus3[cpus.samp, ],
   cbind(size=size, decay=lambda, fit=sqrt(choice/100))
 }
 CVnn.cpus(log10(perf) ~ ., data = cpus3[cpus.samp,],
-         linout = T, skip = T, maxit = 1000)
+         linout = TRUE, skip = TRUE, maxit = 1000)
 
 # End of ch08
diff --git a/win32/deps/library/MASS/scripts/ch09.R b/win32/deps/library/MASS/scripts/ch09.R
index 1b9b122..d22f7ed 100644
--- a/win32/deps/library/MASS/scripts/ch09.R
+++ b/win32/deps/library/MASS/scripts/ch09.R
@@ -5,8 +5,8 @@
 # Chapter 9   Tree-based Methods
 
 library(MASS)
-postscript(file="ch09.ps", width=8, height=6, pointsize=9)
-options(echo = TRUE, digits=5)
+pdf(file="ch09.pdf", width=8, height=6, pointsize=9)
+options(digits=5)
 
 library(rpart)
 
diff --git a/win32/deps/library/MASS/scripts/ch10.R b/win32/deps/library/MASS/scripts/ch10.R
index c7c70cc..defcfad 100644
--- a/win32/deps/library/MASS/scripts/ch10.R
+++ b/win32/deps/library/MASS/scripts/ch10.R
@@ -6,8 +6,8 @@
 
 library(MASS)
 library(lattice)
-trellis.device(postscript, file="ch10.ps", width=8, height=6, pointsize=9)
-options(echo=T, width=65, digits=5)
+pdf(file="ch10.pdf", width=8, height=6, pointsize=9)
+options(width=65, digits=5)
 library(nlme)
 
 # 10.1  Linear models
@@ -23,9 +23,9 @@ xyplot(Y ~ EP | No, data = petrol,
 
 Petrol <- petrol
 names(Petrol)
-Petrol[, 2:5] <- scale(Petrol[, 2:5], scale = F)
+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 = T,
+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)
@@ -57,20 +57,19 @@ classMeans <- tapply(IQ, class, mean)
 nl1$IQave <- classMeans[as.character(class)]
 detach()
 cen <- c("IQ", "IQave", "SES")
-nl1[cen] <- scale(nl1[cen], center = T, scale = F)
+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)
 
-summary(lm(lang ~ IQ*COMB + SES + class, data = nl1,
-           singular.ok = T), cor = F)
+## 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),
-        cor = F)
+summary(lm(lang ~ IQave + COMB, data = nl2, weights = GS))
 
 sitka.lme <- lme(size ~ treat*ordered(Time),
    random = ~1 | tree, data = Sitka, method = "ML")
@@ -84,13 +83,13 @@ anova(sitka.lme, sitka.lme2)
 
 # fitted curves
 matrix(fitted(sitka.lme2, level = 0)[c(301:305, 1:5)],
-       2, 5, byrow = T,
+       2, 5, byrow = TRUE,
        dimnames = list(c("control", "ozone"), unique(Sitka$Time)))
 
 
 # 10.2  Classic nested designs
 
-if(F) {
+if(FALSE) {
 summary(raov(Conc ~ Lab/Bat, data = coop, subset = Spc=="S1"))
 
 is.random(coop) <- T
@@ -106,7 +105,7 @@ varcomp(Conc ~ Lab/Bat, data = coop, subset = Spc=="S1",
 #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 = T)
+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)))
 
@@ -116,8 +115,8 @@ 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 = T)
-model.tables(oats.aov, type = "means", se = T)
+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)
@@ -139,7 +138,7 @@ 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 = T)
+    start  = list(fixed = c(2, 0, 4, 0, 100)), verbose = TRUE)
 
 summary(sitka.nlme)
 
@@ -185,7 +184,7 @@ summary(R.nlme2)
 xyplot(BPchange ~ log(Dose) | Animal * Treatment, Rabbit,
     xlab = "log(Dose) of Phenylbiguanide",
     ylab = "Change in blood pressure (mm Hg)",
-    subscripts = T, aspect = "xy", panel =
+    subscripts = TRUE, aspect = "xy", panel =
        function(x, y, subscripts) {
           panel.grid()
           panel.xyplot(x, y)
@@ -196,18 +195,13 @@ xyplot(BPchange ~ log(Dose) | Animal * Treatment, Rabbit,
 
 # 10.4 Generalized linear mixed models
 
-# bacteria <- bacteria # needed in S-PLUS
 contrasts(bacteria$trt) <- structure(contr.sdif(3),
     dimnames = list(NULL, c("drug", "encourage")))
-summary(glm(y ~ trt * week, binomial, data = bacteria),
-        cor = F)
-summary(glm(y ~ trt + week, binomial, data = bacteria),
-        cor = F)
+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), cor = F)
+summary(glm(y ~ lbase*trt + lage + V4, family = poisson, data = epil))
 
-# epil <- epil # needed in S-PLUS
 epil2 <- epil[epil$period == 1, ]
 epil2["period"] <- rep(0, 59); epil2["y"] <- epil2["base"]
 epil["time"] <- 1; epil2["time"] <- 4
@@ -221,7 +215,7 @@ 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 = F)
+            family = poisson, data = epil3))
 
 glm(y ~ factor(subject), family = poisson, data = epil)
 
@@ -235,10 +229,10 @@ 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, cor = F)
+summary(fit)
 sum(residuals(fit, type = "pearson")^2)
 
-if(F) { # very slow
+if(FALSE) { # very slow
 library(GLMMGibbs)
 # declare a random intercept for each subject
 epil$subject <- Ra(data = factor(epil$subject))
@@ -262,6 +256,7 @@ summary(glmmPQL(y ~ pred, random = ~1 | subject,
 
 # 10.5  GEE models
 
+if(FALSE) {
 ## modified for YAGS 3.21-3
 library(yags)
 attach(bacteria)
@@ -273,6 +268,7 @@ attach(epil)
 yags(y ~ lbase*trt + lage + V4, family = poisson, alphainit=0,
      id = subject, corstr = "exchangeable")
 detach("epil")
+}
 
 options(contrasts = c("contr.sum", "contr.poly"))
 library(gee)
diff --git a/win32/deps/library/MASS/scripts/ch11.R b/win32/deps/library/MASS/scripts/ch11.R
index 4679164..a324e44 100644
--- a/win32/deps/library/MASS/scripts/ch11.R
+++ b/win32/deps/library/MASS/scripts/ch11.R
@@ -5,8 +5,8 @@
 # Chapter 11   Exploratory Multivariate Analysis
 
 library(MASS)
-postscript(file="ch11.ps", width=8, height=6, pointsize=9)
-options(echo=T, width=65, digits=5)
+pdf(file="ch11.pdf", width=8, height=6, pointsize=9)
+options(width=65, digits=5)
 
 
 # 11.1  Visualization methods
@@ -14,7 +14,7 @@ options(echo=T, width=65, digits=5)
 # 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 = T))
+(ir.pca <- princomp(log(ir), cor = TRUE))
 summary(ir.pca)
 plot(ir.pca)
 ir.pc <- predict(ir.pca)
@@ -31,14 +31,22 @@ loadings(lcrabs.pca)
 lcrabs.pc <- predict(lcrabs.pca)
 dimnames(lcrabs.pc) <- list(NULL, paste("PC", 1:5, sep = ""))
 
-if(F) { # needs interaction with XGobi
+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 = T)
+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),
@@ -69,7 +77,7 @@ 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 = F)
+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]
@@ -93,14 +101,14 @@ 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 = F, add = T)
+        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 = T), pc.biplot = T, cex = 0.7,
+biplot(princomp(state, cor = TRUE), pc.biplot = TRUE, cex = 0.7,
        expand = 0.8)
 
 library(fastICA)
@@ -112,7 +120,7 @@ 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 = T)
+# 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)])
@@ -165,25 +173,9 @@ fanny(swiss.px, 3)
 ##   use, and the code given in the first printing does not work in R's
 ##   mclust-2.x.'
 ##
-## And now mclust has been given a more restrictive licence, so
-## this code is not run by default.
-if(FALSE) {
-library(mclust) # 2.x equivalent commands
-h <- hc(modelName = "VVV", swiss.x)
-print(mh <- as.vector(hclass(h, 3)))
-z <- me(modelName = "VVV", swiss.x,  z = 0.5*(unmap(mh)+1/3))
-eqscplot(swiss.px[, 1:2], type = "n",
-         xlab = "first principal component",
-         ylab = "second principal component")
-text(swiss.px[, 1:2], labels = max.col(z$z))
 
-vals <- EMclust(swiss.x) # all possible models, 0:9 clusters.
-print(sm <- summary(vals, swiss.x))
-eqscplot(swiss.px[, 1:2], type = "n",
-         xlab = "first principal component",
-         ylab = "second principal component")
-text(swiss.px[, 1:2], labels = sm$classification)
-}
+## And later mclust was given a restrictive licence, so this example
+## has been removed.
 
 
 # 11.3 Factor analysis
@@ -194,16 +186,16 @@ ability.FA
 #summary(ability.FA)
 round(loadings(ability.FA) %*% t(loadings(ability.FA)) +
            diag(ability.FA$uniq), 3)
-# loadings(rotate(ability.FA, rotation = "oblimin"))
 
-if(FALSE) {
-par(pty = "s")
-L <- loadings(ability.FA)
-eqscplot(L, xlim = c(0,1), ylim = c(0,1))
-if(interactive()) identify(L, dimnames(L)[[1]])
-oblirot <- rotate(loadings(ability.FA), rotation = "oblimin")
-naxes <- solve(oblirot$tmat)
-arrows(rep(0, 2), rep(0, 2), naxes[,1], naxes[,2])
+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])
 }
 
 
@@ -211,9 +203,9 @@ arrows(rep(0, 2), rep(0, 2), naxes[,1], naxes[,2])
 
 caith <- as.matrix(caith)
 names(dimnames(caith)) <- c("eyes", "hair")
-mosaicplot(caith, color = T)
+mosaicplot(caith, color = TRUE)
 House <- xtabs(Freq ~ Type + Infl + Cont + Sat, housing)
-mosaicplot(House, color = T)
+mosaicplot(House, color = TRUE)
 
 corresp(caith)
 
@@ -225,7 +217,7 @@ 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 = T)  # Use levels as names
+farms.mca <- mca(farms, abbrev = TRUE)  # Use levels as names
 plot(farms.mca, cex = rep(0.7, 2))
 
 # End of ch11
diff --git a/win32/deps/library/MASS/scripts/ch12.R b/win32/deps/library/MASS/scripts/ch12.R
index f42c811..863843e 100644
--- a/win32/deps/library/MASS/scripts/ch12.R
+++ b/win32/deps/library/MASS/scripts/ch12.R
@@ -5,8 +5,8 @@
 # Chapter 12   Classification
 
 library(MASS)
-postscript(file="ch12.ps", width=8, height=6, pointsize=9)
-options(echo=T, width=65, digits=5)
+pdf(file="ch12.pdf", width=8, height=6, pointsize=9)
+options(width=65, digits=5)
 library(class)
 library(nnet)
 
@@ -46,7 +46,6 @@ perp <- function(x, y) {
    abline(c(m[2] - s*m[1], s))
    invisible()
 }
-# For R replace @means by $means
 cr.m <- lda(cr.t, crabs$sex)$means
 points(cr.m, pch = 3, mkh = 0.3)
 perp(cr.m[1, ], cr.m[2, ])
@@ -58,7 +57,7 @@ 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 = T, lty=  3)
+       levels = 0.5, labex = 0, add = TRUE, lty=  3)
 
 for(i in c("O", "o",  "B", "b"))
  print(var(lcrabs[crabs.grp == i, ]))
@@ -104,10 +103,10 @@ predplot <- function(object, main="", len = 100, ...)
     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 = T, levels = 0, labex = 0)
+            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 = T, levels = 0, labex = 0)
+            add = TRUE, levels = 0, labex = 0)
     invisible()
 }
 
@@ -121,15 +120,15 @@ cushplot <- function(xp, yp, Z)
              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 = T, levels = 0, labex = 0)
+            add = TRUE, levels = 0, labex = 0)
     zp <- Z[, 1] - pmax(Z[, 2], Z[, 3])
     contour(exp(xp), exp(yp), matrix(zp, np),
-            add = T, levels = 0, labex = 0)
+            add = TRUE, levels = 0, labex = 0)
     invisible()
 }
 
 cush <- log(as.matrix(Cushings[, -3]))
-tp <- Cushings$Type[1:21, drop = T]
+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")
@@ -155,16 +154,16 @@ 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 = T); par(cex = 1)
+par(cex = 1.5); partition.tree(cush.tr, add = TRUE); par(cex = 1)
 
 
 # 12.3  Non-parametric rules
 
-Z <- knn(scale(cush[1:21, ], F, c(3.4, 5.7)),
-        scale(cushT, F, c(3.4, 5.7)), tp)
+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, ], F, c(3.4, 5.7)),
-        scale(cushT, F, c(3.4, 5.7)), tp, k = 3)
+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))
 
 
@@ -181,7 +180,7 @@ pltnn <- function(main, ...) {
 
 plt.bndry <- function(size=0, decay=0, ...)
 {
-   cush.nn <- nnet(cush, tpi, skip=T, softmax=T, size=size,
+   cush.nn <- nnet(cush, tpi, skip=TRUE, softmax=TRUE, size=size,
       decay=decay, maxit=1000)
    invisible(b1(predict(cush.nn, cushT), ...))
 }
@@ -190,10 +189,10 @@ b1 <- function(Z, ...)
 {
    zp <- Z[,3] - pmax(Z[,2], Z[,1])
    contour(exp(xp), exp(yp), matrix(zp, np),
-      add=T, levels=0, labex=0, ...)
+      add=TRUE, levels=0, labex=0, ...)
    zp <- Z[,1] - pmax(Z[,3], Z[,2])
    contour(exp(xp), exp(yp), matrix(zp, np),
-      add=T, levels=0, labex=0, ...)
+      add=TRUE, levels=0, labex=0, ...)
 }
 
 cush <- cush[1:21,]; tpi <- class.ind(tp)
@@ -221,10 +220,9 @@ 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 = T, softmax = T, size = 3,
-       decay = 0.01, maxit = 1000, trace = F)
+   cush.nn <- nnet(cush, tpi, skip = TRUE, softmax = TRUE, size = 3,
+       decay = 0.01, maxit = 1000, trace = FALSE)
    Z <- Z + predict(cush.nn, cushT)
-# In R replace @ by $ in next line.
    cat("final value", format(round(cush.nn$value,3)), "\n")
    b1(predict(cush.nn, cushT), col = 2, lwd = 0.5)
 }
@@ -278,7 +276,7 @@ CVtest <- function(fitfn, predfn, ...)
 res.multinom <- CVtest(
   function(x, ...) multinom(type ~ ., fgl[x, ], ...),
   function(obj, x) predict(obj, fgl[x, ], type = "class"),
-  maxit = 1000, trace = F )
+  maxit = 1000, trace = FALSE)
 
 con(true = fgl$type, predicted = res.multinom)
 
@@ -298,7 +296,7 @@ fgl0 <- fgl[ , -10] # drop type
   res } -> res.knn1
 con(true = fgl$type, predicted = res.knn1)
 
-res.lb <- knn(fgl0, fgl0, fgl$type, k = 3, prob = T, use.all = F)
+res.lb <- knn(fgl0, fgl0, fgl$type, k = 3, prob = TRUE, use.all = FALSE)
 table(attr(res.lb, "prob"))
 
 library(rpart)
@@ -334,7 +332,7 @@ CVnn2 <- function(formula, data,
         for (i in sort(unique(ri))) {
             if(verbose > 20) cat(" ", i,  sep="")
             for(rep in 1:nreps) {
-                learn <- nnet(formula, data[ri !=i,], trace = F, ...)
+                learn <- nnet(formula, data[ri !=i,], trace = FALSE, ...)
                 res[ri == i,] <- res[ri == i,] +
                     predict(learn, data[ri == i,])
             }
@@ -347,7 +345,7 @@ CVnn2 <- function(formula, data,
     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=T)
+        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")
@@ -361,7 +359,7 @@ CVnn2 <- function(formula, data,
         if(verbose > 1) cat("chosen size = ", csize,
                             " decay = ", decay, "\n", sep="")
         for(rep in 1:nreps) {
-            learn <- nnet(formula, data[rand != i,], trace=F,
+            learn <- nnet(formula, data[rand != i,], trace=FALSE,
                           size=csize, decay=decay, ...)
             res[rand == i,] <- res[rand == i,] +
                 predict(learn, data[rand == i,])
@@ -370,8 +368,8 @@ CVnn2 <- function(formula, data,
     factor(levels(truth)[max.col(res/nreps)], levels = levels(truth))
 }
 
-if(F) { # only run this if you have time to wait
-res.nn2 <- CVnn2(type ~ ., fgl1, skip = T, maxit = 500, nreps = 10)
+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)
 }
 
@@ -420,7 +418,7 @@ CVprobs <- function(fitfn, predfn, ...)
 probs.multinom <- CVprobs(
   function(x, ...) multinom(type ~ ., fgl[x, ], ...),
   function(obj, x) predict(obj, fgl[x, ], type = "probs"),
-  maxit = 1000, trace = F )
+  maxit = 1000, trace = FALSE)
 
 probs.yes <- as.vector(class.ind(fgl$type))
 probs <- as.vector(probs.multinom)
diff --git a/win32/deps/library/MASS/scripts/ch13.R b/win32/deps/library/MASS/scripts/ch13.R
index b20999d..fbce974 100644
--- a/win32/deps/library/MASS/scripts/ch13.R
+++ b/win32/deps/library/MASS/scripts/ch13.R
@@ -5,9 +5,9 @@
 # Chapter 13   Survival Analysis
 
 library(MASS)
-options(echo=T, width=65, digits=5, height=9999)
+options(width=65, digits=5, height=9999)
 options(contrasts=c("contr.treatment", "contr.poly"))
-postscript("ch13.ps", width=8, height=6, pointsize=9)
+pdf("ch13.pdf", width=8, height=6, pointsize=9)
 
 library(survival)
 
@@ -23,7 +23,7 @@ plot(log(time) ~ pair)
 gehan.surv <- survfit(Surv(time, cens) ~ treat, data = gehan,
                       conf.type = "log-log")
 summary(gehan.surv)
-plot(gehan.surv, conf.int = T, lty = 3:2, log = T,
+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)
@@ -43,32 +43,31 @@ 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"))
+                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 = T)
+plot(survfit(Surv(ntimes) ~ 1), log = TRUE)
 
 survreg(Surv(time, cens) ~ factor(pair) + treat, gehan,
-          dist = "exponential")
+        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 = F)
+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 = T))
+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 = T)
+               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 = T)
+               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))
@@ -83,7 +82,7 @@ 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 = T)
+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)
@@ -121,7 +120,7 @@ summary( survfit(motor.cox, newdata = data.frame(temp=130)) )
      diag.time + strata(cell) + prior, data = VA))
 
 par(mfrow=c(1,2), pty="s")
-plot(survfit(VA.coxs), log = T, lty = 1:4, col = 2:5)
+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))
@@ -132,11 +131,11 @@ 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 = F)
+summary(VA.wei, cor = FALSE)
 
 VA.exp <- survreg(Surv(stime, status) ~ Karn + cell,
                   data = VA, dist = "exponential")
-summary(VA.exp, cor = F)
+summary(VA.exp, cor = FALSE)
 
 cox.zph(VA.coxs)
 
@@ -166,7 +165,7 @@ coxph(Surv(start, stop, event) ~ transplant*
 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 = T, log = T, lty = c(1, 3), col = 2:3)
+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)
@@ -184,16 +183,15 @@ 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 = c(0, 1))
-summary(survfit(stan, stan2, individual = T,
-                 conf.type = "log-log"))
+    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 = T)
-  crit2 <- matrix(events[2:4], n, 3, byrow = T)
+  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]
@@ -222,7 +220,7 @@ 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 = F, lty = 1:4, col = 2:5,
+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)
 
@@ -231,11 +229,11 @@ aids2.cox <- coxph(Surv(start, stop, status)
 (aids2.surv <- survfit(aids2.cox))
 
 par(mfrow = c(1, 2), pty="s")
-plot(aids2.surv[1:4], mark.time = F, lty = 1:4, col = 2:5,
+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 = F, 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")
@@ -267,7 +265,7 @@ make.aidsp <- function(){
 Aidsp <- make.aidsp()
 aids.wei <- survreg(Surv(survtime + 0.9, status) ~  state
     + T.categ + sex + age, data = Aidsp)
-summary(aids.wei, cor = F)
+summary(aids.wei, cor = FALSE)
 
 survreg(Surv(survtime + 0.9, status) ~ state + T.categ
   + age, data = Aidsp)
diff --git a/win32/deps/library/MASS/scripts/ch14.R b/win32/deps/library/MASS/scripts/ch14.R
index c0820bb..ffe8566 100644
--- a/win32/deps/library/MASS/scripts/ch14.R
+++ b/win32/deps/library/MASS/scripts/ch14.R
@@ -5,8 +5,8 @@
 # Chapter 14   Time Series
 
 library(MASS)
-postscript(file="ch14.ps", width=8, height=6, pointsize=9)
-options(width=65, digits=5, echo = T)
+pdf(file="ch14.pdf", width=8, height=6, pointsize=9)
+options(width=65, digits=5)
 
 lh
 deaths
@@ -60,7 +60,7 @@ par(mfrow = c(1, 1))
 acf(lh, type = "partial")
 acf(deaths, type = "partial")
 
-lh.ar1 <- ar(lh, F, 1)
+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
@@ -241,18 +241,18 @@ plot(density(SP500, width = "sj", n = 256), type = "l", xlab = "", ylab = "")
 par(pty = "s")
 qqnorm(SP500)
 qqline(SP500)
-if(F) {
-module(garch)
-summary(garch(SP500 ~ 1, ~garch(1,1)))
+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)
+    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 = T))
+    summary(garch(SP500 ~ 1, ~egarch(1,1), cond.dist = "t", leverage = TRUE))
 }
 
-library(tseries)
-summary(garch(x = SP500 - median(SP500), order = c(1, 1)))
+if(require(tseries))
+    print(summary(garch(x = SP500 - median(SP500), order = c(1, 1))))
 
 # End of ch14
diff --git a/win32/deps/library/MASS/scripts/ch15.R b/win32/deps/library/MASS/scripts/ch15.R
index 8995d80..9fe0a99 100644
--- a/win32/deps/library/MASS/scripts/ch15.R
+++ b/win32/deps/library/MASS/scripts/ch15.R
@@ -5,8 +5,8 @@
 # Chapter 15   Spatial Statistics
 
 library(MASS)
-postscript(file="ch15.ps", width=8, height=8, pointsize=9)
-options(echo = TRUE, width=65, digits=5)
+pdf(file="ch15.pdf", width=8, height=8, pointsize=9)
+options(width=65, digits=5)
 
 library(spatial)
 
@@ -16,25 +16,25 @@ 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 = T)
+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 = T)
+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 = T)
+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 = T)
+contour(trsurf, levels = seq(600, 1000, 25), add = TRUE)
 points(topo)
 title("Degree=6")
 
@@ -46,33 +46,33 @@ 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=T)
+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 = F)
+  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 = T)
+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 = T)
+   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 = T)
+  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 = F)
-topo.lo <- predict(topo.loess, expand.grid(topo.mar), se=T)
+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 = T)
+        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 = T)
+        add = TRUE)
 title("Loess degree = 1")
 points(topo)
 
@@ -80,13 +80,13 @@ 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 = T)
+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 = T)
+                        ncp = 4, extrap = TRUE)
 eqscplot(topo.int2, xlab = "interp", ylab = "", type = "n")
-contour(topo.int2, levels = seq(600, 1000, 25), add = T)
+contour(topo.int2, levels = seq(600, 1000, 25), add = TRUE)
 points(topo)
 
 
@@ -97,25 +97,25 @@ 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 = T)
+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 = T)
+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 = T)
+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 = T)
+contour(sesurf, levels = c(20, 25), add = TRUE)
 points(topo)
 title("Kriging s.e.")
 
@@ -142,11 +142,11 @@ par(mfrow = c(2, 2), pty = "s")
 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 = T)
+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 = T)
+contour(sesurf, levels = c(15, 20, 25), add = TRUE)
 points(topo)
 
 ## bottom row of Figure 15.8
@@ -154,11 +154,11 @@ 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 = T)
+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 = T)
+contour(sesurf, levels = c(15, 20, 25), add = TRUE)
 points(topo)
 
 
diff --git a/win32/deps/library/MASS/scripts/ch16.R b/win32/deps/library/MASS/scripts/ch16.R
index a552451..9ae2079 100644
--- a/win32/deps/library/MASS/scripts/ch16.R
+++ b/win32/deps/library/MASS/scripts/ch16.R
@@ -5,8 +5,8 @@
 # Chapter 16   Optimization and Mazimum Likelihood Estimation
 
 library(MASS)
-postscript(file="ch16.ps", width=8, height=8, pointsize=9)
-options(echo = T, width=65, digits=5)
+pdf(file="ch16.pdf", width=8, height=8, pointsize=9)
+options(width=65, digits=5)
 
 # 16.3 General optimization
 
@@ -47,7 +47,7 @@ mix.gr <- function(p, x) {
 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 = T,
+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))))
@@ -93,7 +93,7 @@ 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 = T,
+                upper = rep(Inf, 6), hessian = TRUE,
                 x = waiting[-1], y = duration[-299])
 rbind(est = mix.nl1$par, se = sqrt(diag(solve(mix.nl1$hessian))))
 
@@ -109,7 +109,7 @@ if(!exists("bwt")) {
 }
 
 logitreg <- function(x, y, wt = rep(1, length(y)),
-               intercept = T, start = rep(0, p), ...)
+               intercept = TRUE, start = rep(0, p), ...)
 {
   fmin <- function(beta, X, y, w) {
       p <- plogis(X %*% beta)
diff --git a/win32/deps/library/MASS/tests/BankWages.rda b/win32/deps/library/MASS/tests/BankWages.rda
new file mode 100644
index 0000000..75dbd05
Binary files /dev/null and b/win32/deps/library/MASS/tests/BankWages.rda differ
diff --git a/win32/deps/library/MASS/tests/Examples/MASS-Ex.Rout.save b/win32/deps/library/MASS/tests/Examples/MASS-Ex.Rout.save
new file mode 100644
index 0000000..90c808f
--- /dev/null
+++ b/win32/deps/library/MASS/tests/Examples/MASS-Ex.Rout.save
@@ -0,0 +1,5231 @@
+
+R Under development (unstable) (2012-05-26 r59449) -- "Unsuffered Consequences"
+Copyright (C) 2012 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.
+
+  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')
+> 
+> assign(".oldSearch", 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 == 0) 1:ncol(M) else  - (1:tmp$rank)
++     qr.Q(tmp, complete = TRUE)[, set, drop = FALSE]
++ }
+function (M) 
+{
+    tmp <- qr(M)
+    set <- if (tmp$rank == 0) 
+        1:ncol(M)
+    else -(1: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 ## this fails in R on some 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 G1.nlme <- 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 summary(G1.nlme)
+> ##D 
+> ##D G2.nlme <- 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)
+> ##D summary(G2.nlme)
+> ## 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)
+Loading required package: splines
+> 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.163      0.85   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.274 0.780
+factor(week)4  -1.421     0.242    0.667 -2.131 0.033
+factor(week)6  -1.661     0.190    0.682 -2.434 0.015
+factor(week)11 -1.675     0.187    0.678 -2.471 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.67     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â, âpackage:splinesâ
+
+> 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
+> 
+> attach(beav1)
+> 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 
+
+> detach("beav1"); 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)
+> 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
+> 
+> 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("birthwt")
+> 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 
+> 
+> 
+> 
+> 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
+> 
+> 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(contr.sdif(6)))
+     [,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 
+> ## Not run: 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
+> ## Not run: ~ (.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))
+Loading required package: nlme
+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()
+
+detaching âpackage:nlmeâ
+
+> 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)
+Loading required package: splines
+> 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â, âpackage:splinesâ
+
+> 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(ifelse(y == 0, 1, 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
+> 
+> 
+> 
+> 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)
+Loading required package: splines
+> 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â, âpackage:splinesâ
+
+> 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$fol
+> fm <- loglm(~1 + 2 + 3 + 4, minn38a)  # numerals as names.
+> deviance(fm)
+[1] 0
+> ##[1] 3711.9
+> fm1 <- update(fm, .~.^2)
+> fm2 <- update(fm, .~.^3, print = TRUE)
+2 iterations: deviation 0 
+> ## 5 iterations: deviation 0.0750732
+> anova(fm, fm1, fm2)
+LR tests for hierarchical log-linear models
+
+Model 1:
+ ~`1` + `2` + `3` + `4` 
+Model 2:
+ . ~ .v2 + .v1 + .v3 
+Model 3:
+ . ~ .v2 + .v1 + .v3 
+
+          Deviance  df Delta(Dev) Delta(df) P(> Delta(Dev)
+Model 1          0 155                                    
+Model 2          0 108          0        47              1
+Model 3          0  36          0        72              1
+Saturated        0   0          0        36              1
+> ## Not run: 
+> ##D LR tests for hierarchical log-linear models
+> ##D 
+> ##D Model 1:
+> ##D   ~  1 + 2 + 3 + 4
+> ##D Model 2:
+> ##D  .  ~  1 + 2 + 3 + 4 + 1:2 + 1:3 + 1:4 + 2:3 + 2:4 + 3:4
+> ##D Model 3:
+> ##D  .  ~  1 + 2 + 3 + 4 + 1:2 + 1:3 + 1:4 + 2:3 + 2:4 + 3:4 +
+> ##D         1:2:3 + 1:2:4 + 1:3:4 + 2:3:4
+> ##D 
+> ##D 
+> ##D           Deviance  df Delta(Dev) Delta(df) P(> Delta(Dev)
+> ##D   Model 1 3711.915 155
+> ##D   Model 2  220.043 108   3491.873        47        0.00000
+> ##D   Model 3   47.745  36    172.298        72        0.00000
+> ##D Saturated    0.000   0     47.745        36        0.09114
+> ##D 
+> ## End(Not run)
+> # 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
+> ## Not run: 
+> ##D Call:
+> ##D loglm(formula = ~Type + Origin, data = xtabs(~Type + Origin,
+> ##D     Cars93))
+> ##D 
+> ##D Statistics:
+> ##D                     X^2 df  P(> X^2)
+> ##D Likelihood Ratio 18.362  5 0.0025255
+> ##D          Pearson 14.080  5 0.0151101
+> ##D 
+> ## End(Not run)
+> # 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)
+Loading required package: splines
+> 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â, âpackage:splinesâ
+
+> 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)
+> B
+          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 
+> 
+> attach(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)
+> detach()
+> 
+> require(lattice)
+Loading required package: 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, ...) {
++       lines(spline(x, y))
++       panel.xyplot(x, Muscle$logLength[subscripts], ...)
++    })
+> 
+> 
+> 
+> cleanEx()
+
+detaching âpackage:latticeâ
+
+> 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
+> 
+> library(nlme)
+> nl1 <- nlschools
+> attach(nl1)
+> classMeans <- tapply(IQ, class, mean)
+> nl1$IQave <- classMeans[as.character(class)]
+> nl1$IQ <- nl1$IQ - nl1$IQave
+> detach()
+> cen <- c("IQ", "IQave", "SES")
+> nl1[cen] <- scale(nl1[cen], center = TRUE, scale = FALSE)
+> 
+> nl.lme <- 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.45 15177.78 -7550.226
+
+Random effects:
+ Formula: ~IQ | class
+ Structure: General positive-definite, Log-Cholesky parametrization
+            StdDev    Corr  
+(Intercept) 2.7870651 (Intr)
+IQ          0.4842392 -0.516
+Residual    6.2483879       
+
+Fixed effects: lang ~ IQ * COMB + IQave + SES 
+               Value Std.Error   DF   t-value p-value
+(Intercept) 41.37017 0.3536372 2151 116.98478  0.0000
+IQ           2.12355 0.1007018 2151  21.08752  0.0000
+COMB1       -1.67177 0.5871924  130  -2.84706  0.0051
+IQave        3.24779 0.3002118  130  10.81833  0.0000
+SES          0.15674 0.0146534 2151  10.69673  0.0000
+IQ:COMB1     0.43074 0.1859429 2151   2.31652  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.05938661 -0.63108408  0.06551865  0.71786438  2.79454034 
+
+Number of Observations: 2287
+Number of Groups: 133 
+> 
+> 
+> 
+> cleanEx()
+
+detaching âpackage:nlmeâ
+
+> 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
+> 
+> 
+> 
+> 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 = "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.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 
+> 
+> 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)
+> 
+> 
+> 
+> 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)
+Loading required package: nlme
+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()
+
+detaching âpackage:nlmeâ
+
+> 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)
+> 
+> 
+> 
+> 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
+> attach(cpus)
+> for(v in names(cpus)[2:7])
++   cpus1[[v]] <- cut(cpus[[v]], unique(quantile(cpus[[v]])),
++                     include.lowest = TRUE)
+> detach()
+> 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> attach(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> bwt <- data.frame(low = factor(low), age, lwt, race,
+brthwt+     smoke = (smoke > 0), ptd, ht = (ht > 0), ui = (ui > 0), ftv)
+
+brthwt> detach("birthwt")
+
+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
+> ## Not run: 
+> ##D Call:
+> ##D rlm(formula = calls ~ year, data = phones, maxit = 50)
+> ##D 
+> ##D Residuals:
+> ##D    Min     1Q Median     3Q    Max
+> ##D -18.31  -5.95  -1.68  26.46 173.77
+> ##D 
+> ##D Coefficients:
+> ##D             Value    Std. Error t value
+> ##D (Intercept) -102.622   26.553   -3.86
+> ##D year           2.041    0.429    4.76
+> ##D 
+> ##D Residual standard error: 9.03 on 22 degrees of freedom
+> ##D 
+> ##D Correlation of Coefficients:
+> ##D [1] -0.994
+> ##D 
+> ## End(Not run)
+> 
+> 
+> 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 
+> attach(yeast)
+> mu <- fitted(fit)
+> theta.md(numbers, mu, dfr = 399, weights = fr)
+[1] 3.027079
+> theta.ml(numbers, mu, weights = fr)
+Warning in theta.ml(numbers, mu, weights = fr) :
+  iteration limit reached
+[1] 3.586071
+attr(,"warn")
+[1] "iteration limit reached"
+attr(,"SE")
+[1] 1.743658
+> theta.mm(numbers, mu, dfr = 399, weights = fr)
+[1] 3.549593
+> detach()
+> 
+> 
+> 
+> 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
+> 
+> 
+> 
+> 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
+> 
+> attach(geyser)
+> width.SJ(duration, method = "dpi")
+[1] 0.5747852
+> width.SJ(duration)
+[1] 0.360518
+> detach()
+> 
+> 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>
+> ###
+> cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  14.809 0.117 20.658 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
diff --git a/win32/deps/library/MASS/tests/confint.R b/win32/deps/library/MASS/tests/confint.R
new file mode 100644
index 0000000..2ae0326
--- /dev/null
+++ b/win32/deps/library/MASS/tests/confint.R
@@ -0,0 +1,26 @@
+library(MASS)
+
+PropCI <- function(x, n, conf = 0.95)
+{
+    DF <- data.frame(y = x / n, weights = n)
+    mod <- glm(y ~ 1, weights = weights, family = binomial(), data = DF)
+    plogis(confint(mod, level = conf))
+}
+
+PropCI(14, 35)
+## had scope error prior to 7.2-31
+
+## single variable cases:
+n.tot <- c(60,17,8,2,187,85,51,23)
+n.hyp <- c(5,2,1,0,35,13,15,8)
+hyp.tbl <- cbind(n.hyp, n.tot-n.hyp)
+glm.hyp <- glm(hyp.tbl ~ 1, binomial)
+plot(profile(glm.hyp))
+x <- cbind(2,20)
+plot(profile(glm(x~1,binomial)))
+# failed in 7.2-39
+
+dat <- data.frame(event = c(2,4,5), nonev = c(4,2,7))
+m <- glm(cbind(event, nonev) ~ 1, data=dat, family=binomial)
+confint(m)
+# failed in 7.2-40
diff --git a/win32/deps/library/MASS/tests/fitdistr.R b/win32/deps/library/MASS/tests/fitdistr.R
new file mode 100644
index 0000000..4860bef
--- /dev/null
+++ b/win32/deps/library/MASS/tests/fitdistr.R
@@ -0,0 +1,30 @@
+## a quick check on vcov for fitdistr (from 7.3-6/7)
+
+library(MASS)
+
+options(digits=4)
+set.seed(1)
+x <- rnorm(100)
+fit <- fitdistr(x, "normal")
+fit
+vcov(fit)
+
+x <- rlnorm(100)
+fit <- fitdistr(x, "lognormal")
+fit
+vcov(fit)
+
+x <- rpois(100, 4.5)
+fit <- fitdistr(x, "poisson")
+fit
+vcov(fit)
+
+x <- rexp(100, 13)
+fit <- fitdistr(x, "exponential")
+fit
+vcov(fit)
+
+x <- rgeom(100, 0.25)
+fit <- fitdistr(x, "geometric")
+fit
+vcov(fit)
diff --git a/win32/deps/library/MASS/tests/fitdistr.Rout.save b/win32/deps/library/MASS/tests/fitdistr.Rout.save
new file mode 100644
index 0000000..bba7e6b
--- /dev/null
+++ b/win32/deps/library/MASS/tests/fitdistr.Rout.save
@@ -0,0 +1,76 @@
+
+R version 2.12.0 Under development (unstable) (2010-05-21 r52065)
+Copyright (C) 2010 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.
+
+> ## a quick check on vcov for fitdistr (from 7.3-6/7)
+> 
+> library(MASS)
+> 
+> options(digits=4)
+> set.seed(1)
+> x <- rnorm(100)
+> fit <- fitdistr(x, "normal")
+> fit
+    mean       sd   
+  0.10889   0.89370 
+ (0.08937) (0.06319)
+> vcov(fit)
+         mean       sd
+mean 0.007987 0.000000
+sd   0.000000 0.003993
+> 
+> x <- rlnorm(100)
+> fit <- fitdistr(x, "lognormal")
+> fit
+   meanlog     sdlog  
+  -0.03781    0.95308 
+ ( 0.09531) ( 0.06739)
+> vcov(fit)
+         meanlog    sdlog
+meanlog 0.009084 0.000000
+sdlog   0.000000 0.004542
+> 
+> x <- rpois(100, 4.5)
+> fit <- fitdistr(x, "poisson")
+> fit
+   lambda 
+  4.5400  
+ (0.2131) 
+> vcov(fit)
+       lambda
+lambda 0.0454
+> 
+> x <- rexp(100, 13)
+> fit <- fitdistr(x, "exponential")
+> fit
+    rate 
+  15.224 
+ ( 1.522)
+> vcov(fit)
+      rate
+rate 2.318
+> 
+> x <- rgeom(100, 0.25)
+> fit <- fitdistr(x, "geometric")
+> fit
+    prob  
+  0.22831 
+ (0.02006)
+> vcov(fit)
+          prob
+prob 0.0004022
+> 
diff --git a/win32/deps/library/MASS/tests/glm.nb.R b/win32/deps/library/MASS/tests/glm.nb.R
new file mode 100644
index 0000000..c9a36e1
--- /dev/null
+++ b/win32/deps/library/MASS/tests/glm.nb.R
@@ -0,0 +1,49 @@
+## glm.nb with weights
+library(MASS)
+yeast <- data.frame(cbind(numbers = 0:5, fr = c(213, 128, 37, 18, 3, 1)))
+
+attach(yeast)
+n <- rep(numbers, fr)
+
+## fitting using glm.nb with weights - wrong results in 7.2-18
+yeast2.fit <- glm.nb(numbers~1, link = log, weights=fr)
+summary(yeast2.fit)
+
+## fitting extending the vector and using glm.nb - correct result ##
+yeast3.fit<-glm.nb(n~1, link = log)
+summary(yeast3.fit)
+
+stopifnot(all.equal(deviance(yeast2.fit), deviance(yeast3.fit)))
+stopifnot(all.equal(yeast2.fit$theta, yeast3.fit$theta))
+
+detach(yeast)
+
+# another one, corrected in 7.2-43
+set.seed(13245)
+x <- c(-5:5)
+mu <- exp(1 + 0.1*x)
+y <- rnegbin(length(mu), mu = mu, theta = 1.5)
+dat <- data.frame(x, y)
+dat2 <- dat[rep(1:11, each=2), ]
+w <- round(runif(11),2)
+dat2$w <- as.vector(rbind(w, 1-w))
+fm2 <- glm.nb(y ~ x, dat)
+gm2 <- glm.nb(y ~ x, dat2, weights = w)
+summary(fm2)
+summary(gm2) # failed before
+stopifnot(all.equal(fm2$theta, gm2$theta)) # differed
+stopifnot(all.equal(deviance(fm2), deviance(gm2)))
+fm3 <- glm(y ~ x, negative.binomial(theta = fm2$theta), dat)
+gm3 <- glm(y ~ x, negative.binomial(theta = fm2$theta), dat2, weights =w)
+summary(fm3)
+summary(gm3)
+stopifnot(all.equal(deviance(fm3), deviance(gm3)))
+
+fit <- glm.nb(Days ~ Sex/(Age + Eth*Lrn), data = quine)
+set.seed(1)
+simulate(fit, nsim=5)[1:10, ]
+if(getRversion() >= "2.9.0") {
+    fit2 <- glm.convert(fit)
+    set.seed(1)
+    print(simulate(fit2, nsim=5)[1:10, ])
+}
diff --git a/win32/deps/library/MASS/tests/hubers.R b/win32/deps/library/MASS/tests/hubers.R
new file mode 100644
index 0000000..cfbad5d
--- /dev/null
+++ b/win32/deps/library/MASS/tests/hubers.R
@@ -0,0 +1,5 @@
+library(MASS)
+x <- c(rep(1.407,3), rep(1.422,4), 1.597, 1.597, rep(1.64,19), 1.649,
+       1.664, 1.664, 1.67, 1.672, 1.672, 1.787, 4.42, 4.44, rep(6.55,3),
+       rep(6.79,14), rep(7.19,,73), 9.00, 9.38, rep(9.41,10))
+hubers(x) # failed to converge in MASS 7.3-9.
diff --git a/win32/deps/library/MASS/tests/lme.R b/win32/deps/library/MASS/tests/lme.R
new file mode 100644
index 0000000..0b09006
--- /dev/null
+++ b/win32/deps/library/MASS/tests/lme.R
@@ -0,0 +1,16 @@
+## stepAIC on an lme object: an example from Robert Cuffe
+library(nlme)
+library(MASS)
+set.seed(321) # to be sure
+a <- data.frame( resp=rnorm(250), cov1=rnorm(250),
+                 cov2=rnorm(250), group=rep(letters[1:10],25) )
+mod1 <- lme(resp~cov1, a, ~cov1|group, method="ML")
+mod2 <- stepAIC(mod1, scope=list(upper=~(cov1+cov2)^2, lower=~1) )
+
+beav <- beav2
+set.seed(123)
+beav$dummy <- rnorm(nrow(beav))
+beav.gls <- gls(temp ~ activ + dummy, data = beav,
+                 corr = corAR1(0.8), method = "ML")
+stepAIC(beav.gls)
+
diff --git a/win32/deps/library/MASS/tests/polr.R b/win32/deps/library/MASS/tests/polr.R
new file mode 100644
index 0000000..b47d143
--- /dev/null
+++ b/win32/deps/library/MASS/tests/polr.R
@@ -0,0 +1,48 @@
+## tests from David Firth 2004-Oct-13
+
+library(MASS)
+y <- structure(as.integer(c(1, 2, 3, 1, 2, 3)), .Label = c("1", "2", "3"),
+               class = c("ordered", "factor"))
+Freq <- c(10, 0, 10, 10, 0, 10)
+group <- structure(as.integer(c(1, 1, 1, 2, 2, 2)), .Label = c("1", "2"),
+                   class = "factor")
+
+temp <- polr(y ~ group, weights = Freq)
+temp$convergence
+temp
+
+stopifnot(all(abs(coef(temp)) < 1e-4))
+
+Freq <- c(1000000, 1, 1000000, 1000000, 1, 1000000)
+temp2 <- polr(y ~ group, weights = Freq)
+temp2
+
+stopifnot(all(abs(coef(temp2)) < 1e-4))
+
+## tests of rank-deficient model matrix
+
+group <- factor(c(1, 1, 1, 2, 2, 2), levels=1:3)
+polr(y ~ group, weights = Freq)
+group <- factor(c(1, 1, 1, 3, 3, 3), levels=1:3)
+polr(y ~ group, weights = Freq)
+
+## profile on a single-coef model
+## data from McCullagh JRSSB 1980
+tonsils <- data.frame(carrier = factor(rep(c('yes', 'no'), each=3)),
+                      size = ordered(rep(c(1,2,3),2)),
+                      count = c(19,29,24,497,560,269))
+m <- polr(size ~ carrier, data = tonsils, weights = count)
+confint(m)
+
+
+## refitting needs transformed starting values (Achim Zeileis Mar 2010)
+load("BankWages.rda") # from AER
+bw <- polr(job ~ education, data = BankWages)
+summary(bw)
+## failed due to incorrect restarting values
+
+## missing drop = FALSE in profiling (Joris Meys, Sep 2012)
+house.plr <- polr(Sat ~ Cont, weights = Freq, data = housing)
+pr <- profile(house.plr)
+plot(pr)
+
diff --git a/win32/deps/library/MASS/tests/profile.R b/win32/deps/library/MASS/tests/profile.R
new file mode 100644
index 0000000..7745dea
--- /dev/null
+++ b/win32/deps/library/MASS/tests/profile.R
@@ -0,0 +1,10 @@
+### Example from Merete KjÃr Hansen 2011-07-06
+library(MASS)
+dat <- data.frame(y = c(35, 21, 9, 6, 1),
+                  dose = c(0.0028, 0.0056, 0.0112, 0.0225, 0.045),
+                  n = c(40, 40, 40, 40, 40), w = 1:5)
+### fit model with two-column response and weights
+fm <- glm(cbind(y, n-y) ~ dose, weights=w, family=binomial, data=dat)
+### Investigating the profile likelihoods of the parameters with profile.glm
+profile(fm)
+## failed in MASS 7.3-13
diff --git a/win32/deps/library/MASS/tests/regression.R b/win32/deps/library/MASS/tests/regression.R
new file mode 100644
index 0000000..42d5034
--- /dev/null
+++ b/win32/deps/library/MASS/tests/regression.R
@@ -0,0 +1,9 @@
+### regression tests
+
+library(MASS)
+
+## uses Matrix
+contr.sdif(6)
+contr.sdif(6, sparse=TRUE)
+stopifnot(all(contr.sdif(6) == contr.sdif(6, sparse=TRUE)))
+
diff --git a/win32/deps/library/MASS/tests/regression.Rout.save b/win32/deps/library/MASS/tests/regression.Rout.save
new file mode 100644
index 0000000..ae01784
--- /dev/null
+++ b/win32/deps/library/MASS/tests/regression.Rout.save
@@ -0,0 +1,47 @@
+
+R version 2.10.0 Under development (unstable) (2009-07-31 r49037)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> ### regression tests
+> 
+> library(MASS)
+> 
+> ## uses Matrix
+> 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
+> contr.sdif(6, sparse=TRUE)
+6 x 5 sparse Matrix of class "dgCMatrix"
+         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
+> stopifnot(all(contr.sdif(6) == contr.sdif(6, sparse=TRUE)))
+> 
+> 
+> proc.time()
+   user  system elapsed 
+  2.298   0.078   2.377 
diff --git a/win32/deps/library/MASS/tests/rlm.R b/win32/deps/library/MASS/tests/rlm.R
new file mode 100644
index 0000000..25805dd
--- /dev/null
+++ b/win32/deps/library/MASS/tests/rlm.R
@@ -0,0 +1,91 @@
+library(MASS)
+
+## Based on incorrect 'bug' report
+
+hills$ispeed <- hills$time/hills$dist
+hills$grad <- hills$climb/hills$dist
+
+## weighted fit
+fit0 <- rlm(time ~ dist + climb - 1, data = hills,
+            weights = 1/dist^2, method="MM")
+summary(fit0, cor=FALSE)
+## equivalent to
+fit1 <- rlm(ispeed ~ grad, data = hills, method="MM")
+summary(fit1, cor=FALSE)
+
+cf0 <- coef(summary(fit0))
+cf1 <- coef(summary(fit1))
+rownames(cf1) <- rownames(cf0)
+stopifnot(all.equal(cf0, cf1))
+stopifnot(all.equal(weighted.residuals(fit0), residuals(fit1)))
+
+# test other cases
+fit0 <- rlm(time ~ dist + climb - 1, data = hills, weights = 1/dist^2)
+summary(fit0, cor=FALSE)
+## equivalent to
+fit1 <- rlm(ispeed ~ grad, data = hills)
+summary(fit1, cor=FALSE)
+
+cf0 <- coef(summary(fit0))
+cf1 <- coef(summary(fit1))
+rownames(cf1) <- rownames(cf0)
+stopifnot(all.equal(cf0, cf1))
+stopifnot(all.equal(weighted.residuals(fit0), residuals(fit1)))
+
+fit0 <- rlm(time ~ dist + climb - 1, data = hills, weights = 1/dist^2,
+            scale.est = "Huber")
+summary(fit0, cor=FALSE)
+## equivalent to
+fit1 <- rlm(ispeed ~ grad, data = hills, scale.est = "Huber")
+summary(fit1, cor=FALSE)
+
+cf0 <- coef(summary(fit0))
+cf1 <- coef(summary(fit1))
+rownames(cf1) <- rownames(cf0)
+stopifnot(all.equal(cf0, cf1))
+stopifnot(all.equal(weighted.residuals(fit0), residuals(fit1)))
+
+
+## cf lm fits
+
+fit2 <- lm(time ~ dist + climb - 1, data = hills, weights = 1/dist^2)
+fit3 <- lm(ispeed ~ grad, data = hills)
+stopifnot(all.equal(weighted.residuals(fit2), residuals(fit3)))
+
+
+## case weights: can't do MM as no weighted lqs.
+wts <- rep(1, 35)
+wts[c(1,11,21)] <- 10
+h2 <- hills[rep(1:35, times=wts), ]
+fit4 <- lm(ispeed ~ grad, data = hills, weights = wts)
+fit5 <- lm(ispeed ~ grad, data = h2)
+## same coefs, different se's.
+fit6 <- rlm(ispeed ~ grad, data = h2, acc=1e-10)
+fit7 <- rlm(ispeed ~ grad, data = hills,
+            weights = wts, wt.method="case", acc=1e-10)
+summary(fit6)
+summary(fit7)
+stopifnot(all.equal(coef(summary(fit6)), coef(summary(fit7))))
+summary(fit6, "XtWX")
+summary(fit7, "XtWX")
+stopifnot(all.equal(coef(summary(fit6, "XtWX")), coef(summary(fit7, "XtWX"))))
+
+fit8 <- rlm(ispeed ~ grad, data = h2, scale.est = "Huber", acc=1e-10)
+fit9 <- rlm(ispeed ~ grad, data = hills, scale.est = "Huber",
+            weights = wts, wt.method="case", acc=1e-10)
+summary(fit8)
+summary(fit9)
+stopifnot(all.equal(coef(summary(fit8)), coef(summary(fit9))))
+summary(fit8, "XtWX")
+summary(fit9, "XtWX")
+stopifnot(all.equal(coef(summary(fit8, "XtWX")), coef(summary(fit9, "XtWX"))))
+
+
+## w was a matrix under some initializations
+x <- matrix(1:200, 100,2)
+B <- c(2.5, -1.3)
+y <- x %*% B + rnorm(100)
+r1 <- rlm(x, y, init=B, psi=psi.huber)
+r2 <- rlm(x, y, init=B, psi=psi.bisquare)
+r3 <- rlm(x, y, init=B, psi=psi.hampel)   # failed
+r4 <- rlm(x, y, psi=psi.hampel)
diff --git a/win32/deps/library/MASS/tests/scripts.R b/win32/deps/library/MASS/tests/scripts.R
new file mode 100644
index 0000000..76fd5bc
--- /dev/null
+++ b/win32/deps/library/MASS/tests/scripts.R
@@ -0,0 +1,36 @@
+if(!nzchar(Sys.getenv("MASS_TESTING"))) q("no")
+unlink("scripts", recursive = TRUE)
+dir.create("scripts")
+Sys.unsetenv("R_TESTS") # avoid startup using startup.Rs (which is in the dir above)
+setwd("scripts")
+writeLines(c(".Random.seed <- c(0L,1:3)",
+              "options(width = 65, show.signif.stars=FALSE)"),
+           ".Rprofile")
+
+runone <- function(f)
+{
+    message("  Running ", sQuote(basename(f)))
+    outfile <- paste(basename(f), "out", sep = "")
+    failfile <- paste(outfile, "fail", sep=".")
+    unlink(c(outfile, failfile))
+    res <- system2(file.path(R.home("bin"), "R"),
+                   c("CMD BATCH --vanilla", shQuote(f), shQuote(outfile)),
+                   env = paste("R_LIBS", Sys.getenv("R_LIBS"), sep = "="))
+    if (res) {
+        cat(tail(readLines(outfile), 20), sep="\n")
+        file.rename(outfile, failfile)
+        return(1L)
+    }
+    0L
+}
+
+
+library(MASS)
+dd <- system.file("scripts", package="MASS")
+files <- list.files(dd, pattern="\\.R$", full.names=TRUE)
+res <- 0L
+for(f in files) res <- res + runone(f)
+
+proc.time()
+
+if(res) stop(gettextf("%d scripts failed", res))
diff --git a/win32/deps/library/Matrix/DESCRIPTION b/win32/deps/library/Matrix/DESCRIPTION
index 1f03f73..63af964 100644
--- a/win32/deps/library/Matrix/DESCRIPTION
+++ b/win32/deps/library/Matrix/DESCRIPTION
@@ -1,27 +1,28 @@
-Package: Matrix
-Version: 0.999375-30
-Date: 2009-07-28
-Priority: recommended
-Title: Sparse and Dense Matrix Classes and Methods
-Author: Douglas Bates <bates stat wisc edu> and Martin Maechler
-        <maechler stat math ethz ch>
-Maintainer: Doug and Martin <Matrix-authors R-project org>
-Description: Classes and methods for dense and sparse matrices and
-        operations on them using Lapack and SuiteSparse.
-Depends: R (>= 2.9.0), stats, methods, utils, lattice
-Imports: graphics, lattice, grid, stats
-Enhances: graph, SparseM
-SystemRequirements: GNU make
-LazyLoad: yes
-LazyData: no
-LazyDataNote: no longer available, since we use data/*.R *and* our
-        classes
-License: GPL (>= 2)
-LicenseDetails: The Matrix package includes libraries AMD, CHOLMOD,
-        COLAMD, CSparse and SPQR from the SuiteSparse collection of Tim
-        Davis.  All sections of that code are covered by the GPL or
-        LGPL licenses.  See the directory doc/UFsparse for details.
-Packaged: 2009-07-28 19:09:38 UTC; maechler
-Repository: CRAN
-Date/Publication: 2009-07-30 12:51:23
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 13:12:29 UTC; windows
+Package: Matrix
+Version: 1.0-9
+Date: 2012-09-03
+Priority: recommended
+Title: Sparse and Dense Matrix Classes and Methods
+Author: Douglas Bates <bates stat wisc edu> and Martin Maechler <maechler stat math ethz ch>
+Maintainer: Martin Maechler <mmaechler+Matrix gmail com>
+Contact: Doug and Martin <Matrix-authors R-project org>
+Description: Classes and methods for dense and sparse matrices and
+    operations on them using Lapack and SuiteSparse.
+Depends: R (>= 2.15.0), stats, methods, utils, lattice
+Imports: graphics, grid
+Suggests: expm, MASS
+Enhances: MatrixModels, graph, SparseM, sfsmisc
+Encoding: UTF-8
+LazyData: no
+LazyDataNote: no longer available, since we use data/*.R *and* our
+        classes
+BuildResaveData: no
+License: GPL (>= 2)
+LicenseDetails: The Matrix package includes libraries AMD, CHOLMOD,
+        COLAMD, CSparse and SPQR from the SuiteSparse collection of Tim
+        Davis.  All sections of that code are covered by the GPL or
+        LGPL licenses.  See the directory doc/UFsparse for details.
+URL: http://Matrix.R-forge.R-project.org/
+Packaged: 2012-09-05 08:59:42 UTC; maechler
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:10:56 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/Matrix/Doxyfile b/win32/deps/library/Matrix/Doxyfile
index e140df6..9a658ad 100644
--- a/win32/deps/library/Matrix/Doxyfile
+++ b/win32/deps/library/Matrix/Doxyfile
@@ -1,25 +1,24 @@
-#		Dear Emacs, treat me as -*- sh -*-
-# Doxyfile 1.5.3
+# Doxyfile 1.7.4
 
 # This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
+# doxygen (www.doxygen.org) for a project.
 #
-# All text after a hash (#) is considered a comment and will be ignored
+# All text after a hash (#) is considered a comment and will be ignored.
 # The format is:
 #       TAG = value [value, ...]
 # For lists items can also be appended using:
 #       TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
+# Values that contain spaces should be placed between quotes (" ").
 
 #---------------------------------------------------------------------------
 # Project related configuration options
 #---------------------------------------------------------------------------
 
-# This tag specifies the encoding used for all characters in the config file that
-# follow. The default is UTF-8 which is also the encoding used for all text before
-# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into
-# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of
-# possible encodings.
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
 
 DOXYFILE_ENCODING      = UTF-8
 
@@ -32,14 +31,27 @@ PROJECT_NAME           = Matrix
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER         = 0.999375
+PROJECT_NUMBER         = "$Rev: 2721 $ at $LastChangedDate: 2011-10-06 14:59:16 +0200 (Thu, 06 Oct 2011) $"
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer
+# a quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is
+# included in the documentation. The maximum height of the logo should not
+# exceed 55 pixels and the maximum width should not exceed 200 pixels.
+# Doxygen will copy the logo to the output directory.
+
+PROJECT_LOGO           =
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.
 # If a relative path is entered, it will be relative to the location
 # where doxygen was started. If left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = ../../www/doxygen
+OUTPUT_DIRECTORY       = ../../../www/doxygen
 
 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
 # 4096 sub-directories (in 2 levels) under the output directory of each output
@@ -55,10 +67,11 @@ CREATE_SUBDIRS         = NO
 # information to generate all constant output in the proper language.
 # The default language is English, other supported languages are:
 # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian,
-# Italian, Japanese, Japanese-en (Japanese with English messages), Korean,
-# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
-# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
 
 OUTPUT_LANGUAGE        = English
 
@@ -126,7 +139,7 @@ STRIP_FROM_PATH        =
 STRIP_FROM_INC_PATH    =
 
 # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
+# (but less readable) file names. This can be useful if your file system
 # doesn't support long names like on DOS, Mac, or CD-ROM.
 
 SHORT_NAMES            = NO
@@ -155,13 +168,6 @@ QT_AUTOBRIEF           = NO
 
 MULTILINE_CPP_IS_BRIEF = NO
 
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member
-# documentation.
-
-DETAILS_AT_TOP         = YES
-
 # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
 # member inherits the documentation from any documented member that it
 # re-implements.
@@ -196,17 +202,41 @@ ALIASES                =
 OPTIMIZE_OUTPUT_FOR_C  = YES
 
 # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for Java.
-# For instance, namespaces will be presented as packages, qualified scopes
-# will look different, etc.
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
 
 OPTIMIZE_OUTPUT_JAVA   = NO
 
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to
-# include (a tag file for) the STL sources as input, then you should
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this
+# tag. The format is ext=language, where ext is a file extension, and language
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
 # set this tag to YES in order to let doxygen match functions declarations and
 # definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
+# func(std::string) {}). This also makes the inheritance and collaboration
 # diagrams that involve STL classes more complete and accurate.
 
 BUILTIN_STL_SUPPORT    = NO
@@ -216,6 +246,21 @@ BUILTIN_STL_SUPPORT    = NO
 
 CPP_CLI_SUPPORT        = NO
 
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
 # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
 # tag is set to YES, then doxygen will reuse the documentation of the first
 # member in the group (if any) for the other members of the group. By default
@@ -231,6 +276,39 @@ DISTRIBUTE_GROUP_DOC   = NO
 
 SUBGROUPING            = YES
 
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
+# unions are shown inside the group in which they are included (e.g. using
+# @ingroup) instead of on a separate page (for HTML and Man pages) or
+# section (for LaTeX and RTF).
+
+INLINE_GROUPED_CLASSES = NO
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penalty.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will roughly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
 #---------------------------------------------------------------------------
 # Build related configuration options
 #---------------------------------------------------------------------------
@@ -265,10 +343,11 @@ EXTRACT_LOCAL_CLASSES  = YES
 
 EXTRACT_LOCAL_METHODS  = NO
 
-# If this flag is set to YES, the members of anonymous namespaces will be extracted
-# and appear in the documentation as a namespace called 'anonymous_namespace{file}',
-# where file will be replaced with the base name of the file that contains the anonymous
-# namespace. By default anonymous namespace are hidden.
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespaces are hidden.
 
 EXTRACT_ANON_NSPACES   = NO
 
@@ -328,6 +407,12 @@ HIDE_SCOPE_NAMES       = NO
 
 SHOW_INCLUDE_FILES     = YES
 
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
 # If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
 # is inserted in the documentation for inline members.
 
@@ -347,6 +432,22 @@ SORT_MEMBER_DOCS       = YES
 
 SORT_BRIEF_DOCS        = YES
 
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
 # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
 # sorted by fully-qualified names, including namespaces. If set to
 # NO (the default), the class list will be sorted only by class name,
@@ -357,6 +458,15 @@ SORT_BRIEF_DOCS        = YES
 
 SORT_BY_SCOPE_NAME     = NO
 
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
+# do proper type resolution of all parameters of a function it will reject a
+# match between the prototype and the implementation of a member function even
+# if there is only one candidate or it is obvious which candidate to choose
+# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
+# will still accept a match between prototype and implementation in such cases.
+
+STRICT_PROTO_MATCHING  = NO
+
 # The GENERATE_TODOLIST tag can be used to enable (YES) or
 # disable (NO) the todo list. This list is created by putting \todo
 # commands in the documentation.
@@ -387,10 +497,10 @@ GENERATE_DEPRECATEDLIST= YES
 ENABLED_SECTIONS       =
 
 # The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
+# the initial value of a variable or macro consists of for it to appear in
 # the documentation. If the initializer consists of more lines than specified
 # here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
+# The appearance of the initializer of individual variables and macros in the
 # documentation can be controlled using \showinitializer or \hideinitializer
 # command in the documentation regardless of this setting.
 
@@ -408,9 +518,22 @@ SHOW_USED_FILES        = YES
 
 SHOW_DIRECTORIES       = NO
 
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
 # The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from the
-# version control system). Doxygen will invoke the program by executing (via
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
 # popen()) the command <command> <input-file>, where <command> is the value of
 # the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
 # provided by doxygen. Whatever the program writes to standard output
@@ -418,6 +541,15 @@ SHOW_DIRECTORIES       = NO
 
 FILE_VERSION_FILTER    =
 
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. The create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE            =
+
 #---------------------------------------------------------------------------
 # configuration options related to warning and progress messages
 #---------------------------------------------------------------------------
@@ -446,7 +578,7 @@ WARN_IF_UNDOCUMENTED   = YES
 
 WARN_IF_DOC_ERROR      = YES
 
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# The WARN_NO_PARAMDOC option can be enabled to get warnings for
 # functions that are documented, but have no documentation for their parameters
 # or return value. If set to NO (the default) doxygen will only warn about
 # wrong or incomplete parameter documentation, but not about the absence of
@@ -480,10 +612,11 @@ WARN_LOGFILE           =
 
 INPUT                  = ../src
 
-# This tag can be used to specify the character encoding of the source files that
-# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
-# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding.
-# See http://www.gnu.org/software/libiconv for the list of possible encodings.
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
 
 INPUT_ENCODING         = UTF-8
 
@@ -491,8 +624,9 @@ INPUT_ENCODING         = UTF-8
 # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
 # and *.h) to filter out the source-files in the directories. If left
 # blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
+# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
+# *.f90 *.f *.for *.vhd *.vhdl
 
 FILE_PATTERNS          =
 
@@ -509,7 +643,7 @@ RECURSIVE              = NO
 EXCLUDE                =
 
 # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
+# directories that are symbolic links (a Unix file system feature) are excluded
 # from the input.
 
 EXCLUDE_SYMLINKS       = NO
@@ -523,9 +657,10 @@ EXCLUDE_SYMLINKS       = NO
 EXCLUDE_PATTERNS       =
 
 # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the output.
-# The symbol name can be a fully qualified name, a word, or if the wildcard * is used,
-# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
 
 EXCLUDE_SYMBOLS        =
 
@@ -560,17 +695,20 @@ IMAGE_PATH             =
 # by executing (via popen()) the command <filter> <input-file>, where <filter>
 # is the value of the INPUT_FILTER tag, and <input-file> is the name of an
 # input file. Doxygen will then use the output that the filter program writes
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
 # ignored.
 
 INPUT_FILTER           =
 
 # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.  Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.  The filters are a list of the form:
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
 # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
+# info on how filters are used. If FILTER_PATTERNS is empty or if
+# non of the patterns match the file name, INPUT_FILTER is applied.
 
 FILTER_PATTERNS        =
 
@@ -580,6 +718,14 @@ FILTER_PATTERNS        =
 
 FILTER_SOURCE_FILES    = NO
 
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
+# and it is also possible to disable source filtering for a specific pattern
+# using *.ext= (so without naming a filter). This option only has effect when
+# FILTER_SOURCE_FILES is enabled.
+
+FILTER_SOURCE_PATTERNS =
+
 #---------------------------------------------------------------------------
 # configuration options related to source browsing
 #---------------------------------------------------------------------------
@@ -587,9 +733,7 @@ FILTER_SOURCE_FILES    = NO
 # If the SOURCE_BROWSER tag is set to YES then a list of source files will
 # be generated. Documented entities will be cross-referenced with these sources.
 # Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH
-# then you must also enable this option. If you don't then doxygen will produce
-# a warning and turn it on anyway
+# VERBATIM_HEADERS is set to NO.
 
 SOURCE_BROWSER         = YES
 
@@ -604,13 +748,13 @@ INLINE_SOURCES         = NO
 
 STRIP_CODE_COMMENTS    = YES
 
-# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# If the REFERENCED_BY_RELATION tag is set to YES
 # then for each documented function all documented
 # functions referencing it will be listed.
 
 REFERENCED_BY_RELATION = YES
 
-# If the REFERENCES_RELATION tag is set to YES (the default)
+# If the REFERENCES_RELATION tag is set to YES
 # then for each documented function all documented entities
 # called/used by that function will be listed.
 
@@ -619,7 +763,8 @@ REFERENCES_RELATION    = YES
 # If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
 # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
 # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
+# link to the source code.
+# Otherwise they will link to the documentation.
 
 REFERENCES_LINK_SOURCE = YES
 
@@ -683,7 +828,13 @@ HTML_FILE_EXTENSION    = .html
 
 # The HTML_HEADER tag can be used to specify a personal HTML header for
 # each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
+# standard header. Note that when using a custom header you are responsible
+# for the proper inclusion of any scripts and style sheets that doxygen
+# needs, which is dependent on the configuration options used.
+# It is adviced to generate a default header using "doxygen -w html
+# header.html footer.html stylesheet.css YourConfigFile" and then modify
+# that header. Note that the header is subject to change so you typically
+# have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW!
 
 HTML_HEADER            =
 
@@ -693,6 +844,10 @@ HTML_HEADER            =
 
 HTML_FOOTER            =
 
+# If the HTML_TIMESTAMP tag is set to YES then the generated HTML documentation will contain the timesstamp.
+
+HTML_TIMESTAMP         = NO
+
 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
 # style sheet that is used by each HTML page. It can be used to
 # fine-tune the look of the HTML output. If the tag is left blank doxygen
@@ -702,19 +857,52 @@ HTML_FOOTER            =
 
 HTML_STYLESHEET        =
 
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that
+# the files will be copied as-is; there are no commands or markers available.
+
+HTML_EXTRA_FILES       =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+# Doxygen will adjust the colors in the stylesheet and background images
+# according to this color. Hue is specified as an angle on a colorwheel,
+# see http://en.wikipedia.org/wiki/Hue for more information.
+# For instance the value 0 represents red, 60 is yellow, 120 is green,
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+# the colors in the HTML output. For a value of 0 the output will use
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+# the luminance component of the colors in the HTML output. Values below
+# 100 gradually make the output lighter, whereas values above 100 make
+# the output darker. The value divided by 100 is the actual gamma applied,
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
+
 # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
 # files or namespaces will be aligned in HTML using tables. If set to
 # NO a bullet list will be used.
 
 HTML_ALIGN_MEMBERS     = YES
 
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP      = NO
-
 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
 # documentation will contain sections that can be hidden and shown after the
 # page has loaded. For this to work a browser that supports
@@ -723,6 +911,50 @@ GENERATE_HTMLHELP      = NO
 
 HTML_DYNAMIC_SECTIONS  = NO
 
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
 # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
 # be used to specify the file name of the resulting .chm file. You
 # can add a path in front of the file if the result should not be
@@ -743,6 +975,12 @@ HHC_LOCATION           =
 
 GENERATE_CHI           = NO
 
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING     =
+
 # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
 # controls whether a binary table of contents is generated (YES) or a
 # normal table of contents (NO) in the .chm file.
@@ -754,32 +992,171 @@ BINARY_TOC             = NO
 
 TOC_EXPAND             = NO
 
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          =
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters";>
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes";>
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+#  will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+# the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
 # The DISABLE_INDEX tag can be used to turn on/off the condensed index at
 # top of each HTML page. The value NO (the default) enables the index and
 # the value YES disables it.
 
 DISABLE_INDEX          = NO
 
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
+# (range [0,1..20]) that doxygen will group on one line in the generated HTML
+# documentation. Note that a value of 0 will completely suppress the enum
+# values from appearing in the overview section.
 
 ENUM_VALUES_PER_LINE   = 8
 
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
 # is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
-# probably better off using the HTML help feature.
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
 
 GENERATE_TREEVIEW      = YES
 
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
 # used to set the initial width (in pixels) of the frame in which the tree
 # is shown.
 
 TREEVIEW_WIDTH         = 250
 
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are
+# not supported properly for IE 6.0, but are supported on all modern browsers.
+# Note that when changing this option you need to delete any form_*.png files
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
+# (see http://www.mathjax.org) which uses client side Javascript for the
+# rendering instead of using prerendered bitmaps. Use this if you do not
+# have LaTeX installed or if you want to formulas look prettier in the HTML
+# output. When enabled you also need to install MathJax separately and
+# configure the path to it using the MATHJAX_RELPATH option.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you need to specify the location relative to the
+# HTML output directory using the MATHJAX_RELPATH option. The destination
+# directory should contain the MathJax.js script. For instance, if the mathjax
+# directory is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the
+# mathjax.org site, so you can quickly see the result without installing
+# MathJax, but it is strongly recommended to install a local copy of MathJax
+# before deployment.
+
+MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = NO
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a PHP enabled web server instead of at the web client
+# using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server
+# based approach is that it scales better to large projects and allows
+# full text search. The disadvantages are that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH    = NO
+
 #---------------------------------------------------------------------------
 # configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
@@ -797,6 +1174,9 @@ LATEX_OUTPUT           = latex
 
 # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
 # invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
 
 LATEX_CMD_NAME         = latex
 
@@ -813,7 +1193,7 @@ MAKEINDEX_CMD_NAME     = makeindex
 COMPACT_LATEX          = NO
 
 # The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
+# by the printer. Possible values are: a4, letter, legal and
 # executive. If left blank a4wide will be used.
 
 PAPER_TYPE             = letter
@@ -830,6 +1210,13 @@ EXTRA_PACKAGES         =
 
 LATEX_HEADER           =
 
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
+# the generated latex document. The footer should contain everything after
+# the last chapter. If it is left blank doxygen will generate a
+# standard footer. Notice: only use this tag if you know what you are doing!
+
+LATEX_FOOTER           =
+
 # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
 # is prepared for conversion to pdf (using ps2pdf). The pdf file will
 # contain links (just like the HTML output) instead of page references
@@ -856,6 +1243,13 @@ LATEX_BATCHMODE        = YES
 
 LATEX_HIDE_INDICES     = NO
 
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
 #---------------------------------------------------------------------------
 # configuration options related to the RTF output
 #---------------------------------------------------------------------------
@@ -992,8 +1386,10 @@ GENERATE_PERLMOD       = NO
 PERLMOD_LATEX          = NO
 
 # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.  This is useful
-# if you want to understand what is going on.  On the other hand, if this
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
 # tag is set to NO the size of the Perl module output will be much smaller
 # and Perl will parse it just the same.
 
@@ -1030,7 +1426,7 @@ MACRO_EXPANSION        = NO
 EXPAND_ONLY_PREDEF     = NO
 
 # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
+# pointed to by INCLUDE_PATH will be searched when a #include is found.
 
 SEARCH_INCLUDES        = YES
 
@@ -1060,15 +1456,15 @@ PREDEFINED             =
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
 # this tag can be used to specify a list of macro names that should be expanded.
 # The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
+# Use the PREDEFINED tag if you want to use a different macro definition that
+# overrules the definition found in the source code.
 
 EXPAND_AS_DEFINED      =
 
 # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
+# doxygen's preprocessor will remove all references to function-like macros
+# that are alone on a line, have an all uppercase name, and do not end with a
+# semicolon, because these will confuse the parser if not removed.
 
 SKIP_FUNCTION_MACROS   = YES
 
@@ -1080,9 +1476,11 @@ SKIP_FUNCTION_MACROS   = YES
 # Optionally an initial location of the external documentation
 # can be added for each tagfile. The format of a tag file without
 # this location is as follows:
-#   TAGFILES = file1 file2 ...
+#
+# TAGFILES = file1 file2 ...
 # Adding location for the tag files is done as follows:
-#   TAGFILES = file1=loc1 "file2 = loc2" ...
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
 # where "loc1" and "loc2" can be relative or absolute paths or
 # URLs. If a location is present for each tag, the installdox tool
 # does not have to be run to correct the links.
@@ -1122,17 +1520,17 @@ PERL_PATH              = /usr/bin/perl
 # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
 # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
 # or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
+# this option also works with HAVE_DOT disabled, but it is recommended to
+# install and use dot, since it yields more powerful graphs.
 
 CLASS_DIAGRAMS         = NO
 
 # You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to
-# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to
-# specify the directory where the mscgen tool resides. If left empty the tool is assumed to
-# be found in the default search path.
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
 
 MSCGEN_PATH            =
 
@@ -1149,6 +1547,36 @@ HIDE_UNDOC_RELATIONS   = YES
 
 HAVE_DOT               = YES
 
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+# allowed to run in parallel. When set to 0 (the default) doxygen will
+# base this on the number of processors available in the system. You can set it
+# explicitly to a value larger than 0 to get control over the balance
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS        = 0
+
+# By default doxygen will write a font called Helvetica to the output
+# directory and reference it in all dot files that doxygen generates.
+# When you want a differently looking font you can specify the font name
+# using DOT_FONTNAME. You need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME           = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH           =
+
 # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
 # will generate a graph for each documented class showing the direct and
 # indirect inheritance relations. Setting this tag to YES will force the
@@ -1193,24 +1621,24 @@ INCLUDE_GRAPH          = YES
 
 INCLUDED_BY_GRAPH      = YES
 
-# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
-# generate a call dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
 
 CALL_GRAPH             = YES
 
-# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
-# generate a caller dependency graph for every global function or class method.
-# Note that enabling this option will significantly increase the time of a run.
-# So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command.
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
 
 CALLER_GRAPH           = YES
 
 # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
+# will generate a graphical hierarchy of all classes instead of a textual one.
 
 GRAPHICAL_HIERARCHY    = YES
 
@@ -1222,7 +1650,7 @@ GRAPHICAL_HIERARCHY    = YES
 DIRECTORY_GRAPH        = YES
 
 # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
+# generated by dot. Possible values are svg, png, jpg, or gif.
 # If left blank png will be used.
 
 DOT_IMAGE_FORMAT       = png
@@ -1238,12 +1666,18 @@ DOT_PATH               =
 
 DOTFILE_DIRS           =
 
-# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the
+# \mscfile command).
+
+MSCFILE_DIRS           =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
 # nodes that will be shown in the graph. If the number of nodes in a graph
 # becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the number
-# of direct children of the root node in a graph is already larger than
-# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
 # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
 
 DOT_GRAPH_MAX_NODES    = 50
@@ -1259,10 +1693,10 @@ DOT_GRAPH_MAX_NODES    = 50
 MAX_DOT_GRAPH_DEPTH    = 0
 
 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, which results in a white background.
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
 
 DOT_TRANSPARENT        = NO
 
@@ -1284,12 +1718,3 @@ GENERATE_LEGEND        = YES
 # the various graphs.
 
 DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/win32/deps/library/Matrix/INDEX b/win32/deps/library/Matrix/INDEX
index 2ab8b11..a17d042 100644
--- a/win32/deps/library/Matrix/INDEX
+++ b/win32/deps/library/Matrix/INDEX
@@ -30,8 +30,11 @@ USCounties              USCounties Contiguity Matrix
                         Package 'Matrix'
 [<--methods             Methods for "[<-" - Assigning to Subsets for
                         'Matrix'
+abIndex-class           Class "abIndex" of Abstract Index Vectors
+abIseq                  Sequence Generation of "abIndex", Abstract
+                        Index Vectors
 all-methods             "Matrix" Methods for Functions all() and any()
-all.equal-methods       Matrix Methods for Function all.equal()
+all.equal-methods       Matrix Package Methods for Function all.equal()
 atomicVector-class      Virtual Class "atomicVector" of Atomic Vectors
 band                    Extract bands of a matrix
 bandSparse              Construct Sparse Banded Matrix from
@@ -40,10 +43,13 @@ bdiag                   Construct a Block Diagonal Matrix
 cBind                   Versions of 'cbind' and 'rbind' recursively
                         built on cbind2/rbind2
 chol                    Choleski Decomposition - 'Matrix' S4 Generic
+chol2inv-methods        Inverse from Choleski or QR Decomposition -
+                        Matrix Methods
 colSums                 Form Row and Column Sums and Means
 compMatrix-class        Class "compMatrix" of Composite (Factorizable)
                         Matrices
-contr.helmert           Contrast Matrices, Optionally Sparse
+condest                 Compute Approximate CONDition number and 1-Norm
+                        of (Large) Matrices
 dMatrix-class           (Virtual) Class "dMatrix" of "double" Matrices
 ddenseMatrix-class      Virtual Class "ddenseMatrix" of Numeric Dense
                         Matrices
@@ -57,6 +63,8 @@ dgRMatrix-class         Sparse Compressed, Row-oriented Numeric
 dgTMatrix-class         Sparse matrices in triplet form
 dgeMatrix-class         Class "dgeMatrix" of Dense Numeric (S4 Class)
                         Matrices
+diagU2N                 Transform Triangular Matrices from Unit
+                        Triangular to General and back
 diagonalMatrix-class    Class "diagonalMatrix" of Diagonal Matrices
 dpoMatrix-class         Positive Semi-definite Dense Numeric Matrices
 drop0                   Drop "Explicit Zeroes" from a Sparse Matrix
@@ -75,13 +83,15 @@ expm                    Matrix Exponential
 facmul                  Multiplication by Decomposition Factors
 forceSymmetric          Force a Matrix to 'symmetricMatrix' Without
                         Symmetry Checks
+formatSparseM           Formatting Sparse Numeric Matrices Utilities
 generalMatrix-class     Class "generalMatrix" of General Matrices
 iMatrix-class           Virtual Classes Not Yet Really Implemented and
                         Used
 image-methods           Methods for image() in Package 'Matrix'
 index-class             Virtual Class "index" - Simple Class for Matrix
                         Indices
-is.na-methods           is.na() Methods for 'Matrix' Objects
+is.na-methods           is.na(), is.infinite() Methods for 'Matrix'
+                        Objects
 isSymmetric-methods     Methods for Function isSymmetric in Package
                         'Matrix'
 kronecker-methods       Methods for Function 'kronecker()' in Package
@@ -94,11 +104,12 @@ lgeMatrix-class         Class "lgeMatrix" of General Dense Logical
 lsparseMatrix-class     Sparse logical matrices
 lsyMatrix-class         Symmetric Dense Logical Matrices
 ltrMatrix-class         Triangular Dense Logical Matrices
-lu                      Triangular Decomposition of a Square Matrix
+lu                      (Generalized) Triangular Decomposition of a
+                        Matrix
 nMatrix-class           Class "nMatrix" of Non-zero Pattern Matrices
 ndenseMatrix-class      Virtual Class "ndenseMatrix" of Dense Logical
                         Matrices
-nearPD                  Nearest Matrix to a Positive Definite Matrix
+nearPD                  Nearest Positive Definite Matrix
 ngeMatrix-class         Class "ngeMatrix" of General Dense
                         Nonzero-pattern Matrices
 nnzero                  The Number of Non-Zero Values of a Matrix
@@ -108,22 +119,25 @@ nsyMatrix-class         Symmetric Dense Nonzero-Pattern Matrices
 ntrMatrix-class         Triangular Dense Logical Matrices
 number-class            Class "number" of Possibly Complex Numbers
 pMatrix-class           Permutation matrices
-printSpMatrix           Print Sparse Matrices Flexibly
-qr-methods              QR Decomposition -- S4 Methods and Generic
+printSpMatrix           Format and Print Sparse Matrices Flexibly
+qr-methods              QR Decomposition - S4 Methods and Generic
 rankMatrix              Rank of a Matrix
 rcond                   Estimate the Reciprocal Condition Number
 readHB                  Read and write external matrix formats
+rep2abI                 Replicate Vectors into 'abIndex' Result
 replValue-class         Virtual Class "replValue" - Simple Class for
                         subassignment Values
+rleDiff-class           Class "rleDiff" of rle(diff(.)) Stored Vectors
 spMatrix                Sparse Matrix Constructor From Triplet
 sparse.model.matrix     Construct Sparse Design / Model Matrices
 sparseLU-class          Sparse LU decomposition of a square sparse
                         matrix
 sparseMatrix            General Sparse Matrix Construction from Nonzero
                         Entries
-sparseMatrix-class      Virtual Class "sparseMatrix" -- Mother of
-                        Sparse Matrices
+sparseMatrix-class      Virtual Class "sparseMatrix" - Mother of Sparse
+                        Matrices
 sparseQR-class          Sparse QR decomposition of a sparse matrix
+sparseVector            Sparse Vector Construction from Nonzero Entries
 sparseVector-class      Sparse Vector Classes
 symmetricMatrix-class   Virtual Class of Symmetric Matrices in
                         package:Matrix
@@ -133,5 +147,6 @@ tcrossprod              Cross-product of transpose
 triangularMatrix-class
                         Virtual Class of Triangular Matrices in
                         package:Matrix
-unpack                  Full Storage Representation of Packed Matrices
-xtabs                   Cross Tabulation, Optionally Sparse
+unpack                  Representation of Packed and Unpacked (Dense)
+                        Matrices
+updown                  Up- and Down-Dating a Cholesky Decomposition
diff --git a/win32/deps/library/Matrix/Meta/Rd.rds b/win32/deps/library/Matrix/Meta/Rd.rds
index 9eb3222..0344360 100644
Binary files a/win32/deps/library/Matrix/Meta/Rd.rds and b/win32/deps/library/Matrix/Meta/Rd.rds differ
diff --git a/win32/deps/library/Matrix/Meta/data.rds b/win32/deps/library/Matrix/Meta/data.rds
index fd821ec..456f073 100644
Binary files a/win32/deps/library/Matrix/Meta/data.rds and b/win32/deps/library/Matrix/Meta/data.rds differ
diff --git a/win32/deps/library/Matrix/Meta/hsearch.rds b/win32/deps/library/Matrix/Meta/hsearch.rds
index 9a8fc45..540d8b4 100644
Binary files a/win32/deps/library/Matrix/Meta/hsearch.rds and b/win32/deps/library/Matrix/Meta/hsearch.rds differ
diff --git a/win32/deps/library/Matrix/Meta/links.rds b/win32/deps/library/Matrix/Meta/links.rds
new file mode 100644
index 0000000..d4f3d2c
Binary files /dev/null and b/win32/deps/library/Matrix/Meta/links.rds differ
diff --git a/win32/deps/library/Matrix/Meta/nsInfo.rds b/win32/deps/library/Matrix/Meta/nsInfo.rds
index 9df72fd..7d3745a 100644
Binary files a/win32/deps/library/Matrix/Meta/nsInfo.rds and b/win32/deps/library/Matrix/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/Matrix/Meta/package.rds b/win32/deps/library/Matrix/Meta/package.rds
index 3c59973..2c3ef27 100644
Binary files a/win32/deps/library/Matrix/Meta/package.rds and b/win32/deps/library/Matrix/Meta/package.rds differ
diff --git a/win32/deps/library/Matrix/Meta/vignette.rds b/win32/deps/library/Matrix/Meta/vignette.rds
index 8254b73..90d7b12 100644
Binary files a/win32/deps/library/Matrix/Meta/vignette.rds and b/win32/deps/library/Matrix/Meta/vignette.rds differ
diff --git a/win32/deps/library/Matrix/NAMESPACE b/win32/deps/library/Matrix/NAMESPACE
index 1672fb7..5d49024 100644
--- a/win32/deps/library/Matrix/NAMESPACE
+++ b/win32/deps/library/Matrix/NAMESPACE
@@ -4,27 +4,43 @@ useDynLib(Matrix, .registration=TRUE)
 ## notably for which we define methods:
 importFrom("lattice", levelplot)
 importFrom("graphics", image)
-importFrom("utils", head, tail)
-importFrom("stats", cov2cor, update)
+importFrom("utils", head, tail, assignInNamespace)
+importFrom("stats", cov2cor, update#, vcov
+           )
+
 importFrom("grid", grid.rect, gpar, grob)# others via 'grid::'
 
-## Currently, group generics need to be explicitly imported (Bug?):
-importFrom("methods", Ops, Arith, Compare, Logic, Math, Math2, Summary, Complex)
+importFrom("methods",
+	   ## still needed {group generics needed to be explicitly imported} ?
+	   Ops, Arith, Compare, Logic, Math, Math2, Summary, Complex,
+           ## generics for which we export new methods:
+	   cbind2, rbind2, coerce, show
+	   , kronecker
+	   ## things we call,.. necessary when Matrix is loaded, but not attached, as in
+           ## Rscript --vanilla -e 'require(methods);(M <- Matrix::Matrix(0:1,3,3));as(M,"sparseMatrix")'
+	   , is, as, new
+	   )
+
 
 ## Generics and functions defined in this package
 export("Cholesky",
-       "Diagonal", ".symDiagonal",
+       "Diagonal", ".symDiagonal", ".sparseDiagonal",
        "Hilbert",
        "Matrix",
        "spMatrix",
        "sparseMatrix",
        "Schur",
+       "abIseq", "abIseq1", "rep2abI",
        "band",
        "bandSparse",
-       "bdiag",
-       "colMeans", "colSums", ## these needed a "..." added
-       "rowMeans", "rowSums",
-##NOT_YET "det", # = a copy of base::det() but with Matrix namespace
+       "bdiag", ".bdiag",
+## no longer; implicit generics now
+       ## "colMeans", "colSums", ## these needed a "..." added
+       ## "rowMeans", "rowSums",
+       "condest", "onenormest",
+       "det",# << "identical" as base - but with correct determinant()
+       ".diag.dsC",# -> R/dsCMatrix.R --has FIXME
+       "diagN2U", "diagU2N", ".diagU2N",
        "drop0",
        "expand",
        "expm",
@@ -34,26 +50,30 @@ export("Cholesky",
 #	 "isDiagonal",
        "isLDL",
        "lu",
-       "norm",
        "nearPD",
        "nnzero",
+       "formatSpMatrix", "formatSparseM", ".formatSparseSimple",
        "printSpMatrix",
        "printSpMatrix2",
        "rankMatrix",
        "readHB",
        "readMM",
        "sparse.model.matrix",
+       "sparseVector",
        "symmpart",
        "skewpart",
        "tcrossprod",
        "tril",
        "triu",
-       "unpack"
+       "updown",
+       "pack", "unpack"
+       , ".updateCHMfactor"
        , ".validateCsparse"
 #        "writeHB",
        , "writeMM"
-       , ".M.classEnv"
        )
+if(getRversion() < "2.15.0" || R.version$`svn rev` < 57849)
+    export(".M.classEnv")
 
 ## substitute for using  cbind() / rbind()
 export("cBind",
@@ -67,6 +87,7 @@ exportClasses(
 	      "atomicVector",
 	      "number",
 ## LOGIC      "logic",
+              "abIndex", "rleDiff",
 
 	      ## --- 'Matrix' mother and all its daughters : ---------------
 	      "Matrix",
@@ -161,6 +182,7 @@ exportClasses(
 	      ## --- 'MatrixFactorization' mother and all its daughters : ---
 
 	      "MatrixFactorization",
+	      "CholeskyFactorization",
 
 	      "LU",
 	      "denseLU",
@@ -189,6 +211,7 @@ exportClasses(
 	      )
 
 
+
 exportMethods(## for both own and "other" generics:
 
 	      ## Group Methods
@@ -200,6 +223,10 @@ exportMethods(## for both own and "other" generics:
 	      "Ops",
 	      "Summary",
 
+              ## re-export S4 methods, for "stats"-S3-generics:
+              "cov2cor",
+              "update",
+
 	      "!",
 	      "+",# for dgT(Matrix) only
 	      "%*%",
@@ -215,16 +242,17 @@ exportMethods(## for both own and "other" generics:
 	      "as.matrix",
 	      "as.vector",
 	      "as.numeric",
+	      "as.integer",
 	      "as.logical",
 	      "band",
 	      "chol",
+              "chol2inv",
 	      "colMeans",
 	      "colSums",
-              "cov2cor",
 	      "coerce",
 	      "crossprod",
 	      "determinant",
-	      "diag",
+	      "diag", "diag<-",
 	      "diff",
 	      "dim",
 	      "dim<-",
@@ -233,17 +261,20 @@ exportMethods(## for both own and "other" generics:
               "drop",
 	      "expand",
 	      "expm",
+              "format",
 	      "head",
 	      "image",
 	      "forceSymmetric",
 	      "isSymmetric",
 ##	       "isDiagonal",
 ##	       "isTriangular",
-              "is.na",
+	      "is.na",
+	      "is.finite", "is.infinite",
 	      "kronecker",
 	      "length",
               "mean",
 	      "norm",
+              "nnzero",
               "print",# print(x, ...) when show(x) is not sufficient
 	      "qr",
 	      "qr.R",
@@ -267,19 +298,20 @@ exportMethods(## for both own and "other" generics:
 	      "tcrossprod",
 	      "tril",
 	      "triu",
+	      "updown",
               "unname",
-              "update",
+              "which",
 	      "zapsmall"
 	      )
 
-if(getRversion() < "2.10.0")# The version of R -- at *install* time (!)
-    exportPattern("^contr\\..*")
-
-if(getRversion() < "2.10.0")
-    export("xtabs")
-
-
 exportMethods("rbind2")
 exportMethods("cbind2")
 
 S3method(print, sparseSummary)
+S3method(print, diagSummary)
+S3method(c, abIndex)# < for now -- S4 method on c() seems "difficult"
+
+## So that such dispatch also works inside base functions:
+S3method(as.array, Matrix)
+S3method(as.matrix, Matrix)
+S3method(as.vector, Matrix)
diff --git a/win32/deps/library/Matrix/R/Matrix b/win32/deps/library/Matrix/R/Matrix
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/Matrix/R/Matrix
+++ b/win32/deps/library/Matrix/R/Matrix
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/Matrix/R/Matrix.rdb b/win32/deps/library/Matrix/R/Matrix.rdb
index 3048b95..b4855c9 100644
Binary files a/win32/deps/library/Matrix/R/Matrix.rdb and b/win32/deps/library/Matrix/R/Matrix.rdb differ
diff --git a/win32/deps/library/Matrix/R/Matrix.rdx b/win32/deps/library/Matrix/R/Matrix.rdx
index a778594..1483674 100644
Binary files a/win32/deps/library/Matrix/R/Matrix.rdx and b/win32/deps/library/Matrix/R/Matrix.rdx differ
diff --git a/win32/deps/library/Matrix/doc/Announce.txt b/win32/deps/library/Matrix/doc/Announce.txt
index 2962b62..f5ed97d 100644
--- a/win32/deps/library/Matrix/doc/Announce.txt
+++ b/win32/deps/library/Matrix/doc/Announce.txt
@@ -1,3 +1,7 @@
+Basically the text of the R-packages posting on Mar 28, 2008 :
+    https://stat.ethz.ch/pipermail/r-packages/2008/000911.html
+------------------------------------------------------------------------
+
 This weekend, a new version of "the Matrix" (well, actually the R
 package named "Matrix") will become available on the CRAN mirrors.
 
diff --git a/win32/deps/library/Matrix/doc/Comparisons.R b/win32/deps/library/Matrix/doc/Comparisons.R
index 35187a0..6f452b0 100644
--- a/win32/deps/library/Matrix/doc/Comparisons.R
+++ b/win32/deps/library/Matrix/doc/Comparisons.R
@@ -1,11 +1,13 @@
+### R code from vignette source 'Comparisons.Rnw'
+
 ###################################################
-### chunk number 1: preliminaries
+### code chunk number 1: preliminaries
 ###################################################
 options(width=75)
 
 
 ###################################################
-### chunk number 2: modelMatrix
+### code chunk number 2: modelMatrix
 ###################################################
 data(Formaldehyde)
 str(Formaldehyde)
@@ -14,26 +16,26 @@ str(Formaldehyde)
 
 
 ###################################################
-### chunk number 3: naiveCalc
+### code chunk number 3: naiveCalc
 ###################################################
 solve(t(m) %*% m) %*% t(m) %*% yo
 
 
 ###################################################
-### chunk number 4: timedNaive
+### code chunk number 4: timedNaive
 ###################################################
 system.time(solve(t(m) %*% m) %*% t(m) %*% yo)
 
 
 ###################################################
-### chunk number 5: catNaive
+### code chunk number 5: catNaive
 ###################################################
 dput(c(solve(t(m) %*% m) %*% t(m) %*% yo))
 dput(unname(lm.fit(m, yo)$coefficients))
 
 
 ###################################################
-### chunk number 6: KoenNg
+### code chunk number 6: KoenNg
 ###################################################
 library(Matrix)
 data(KNex, package = "Matrix")
@@ -44,20 +46,20 @@ system.time(naive.sol <- solve(t(mm) %*% mm) %*% t(mm) %*% y)
 
 
 ###################################################
-### chunk number 7: crossKoenNg
+### code chunk number 7: crossKoenNg
 ###################################################
 system.time(cpod.sol <- solve(crossprod(mm), crossprod(mm,y)))
 all.equal(naive.sol, cpod.sol)
 
 
 ###################################################
-### chunk number 8: xpxKoenNg
+### code chunk number 8: xpxKoenNg
 ###################################################
 system.time(t(mm) %*% mm)
 
 
 ###################################################
-### chunk number 9: fullMatrix_crossprod
+### code chunk number 9: fullMatrix_crossprod
 ###################################################
 fm <- mm
 set.seed(11)
@@ -68,7 +70,7 @@ stopifnot(all.equal(c1, c2, tol = 1e-12))
 
 
 ###################################################
-### chunk number 10: naiveChol
+### code chunk number 10: naiveChol
 ###################################################
 system.time(ch <- chol(crossprod(mm)))
 system.time(chol.sol <-
@@ -78,7 +80,7 @@ stopifnot(all.equal(chol.sol, naive.sol))
 
 
 ###################################################
-### chunk number 11: MatrixKoenNg
+### code chunk number 11: MatrixKoenNg
 ###################################################
 mm <- as(KNex$mm, "dgeMatrix")
 class(crossprod(mm))
@@ -87,7 +89,7 @@ stopifnot(all.equal(naive.sol, unname(as(Mat.sol,"matrix"))))
 
 
 ###################################################
-### chunk number 12: saveFactor
+### code chunk number 12: saveFactor
 ###################################################
 xpx <- crossprod(mm)
 xpy <- crossprod(mm, y)
@@ -96,7 +98,7 @@ system.time(solve(xpx, xpy)) # reusing factorization
 
 
 ###################################################
-### chunk number 13: SparseKoenNg
+### code chunk number 13: SparseKoenNg
 ###################################################
 mm <- KNex$mm
 class(mm)
@@ -105,7 +107,7 @@ stopifnot(all.equal(naive.sol, unname(as(sparse.sol, "matrix"))))
 
 
 ###################################################
-### chunk number 14: SparseSaveFactor
+### code chunk number 14: SparseSaveFactor
 ###################################################
 xpx <- crossprod(mm)
 xpy <- crossprod(mm, y)
@@ -114,13 +116,13 @@ system.time(solve(xpx, xpy))
 
 
 ###################################################
-### chunk number 15: sessionInfo
+### code chunk number 15: sessionInfo
 ###################################################
 toLatex(sessionInfo())
 
 
 ###################################################
-### chunk number 16: from_pkg_sfsmisc
+### code chunk number 16: from_pkg_sfsmisc
 ###################################################
 
 if(identical(1L, grep("linux", R.version[["os"]]))) { ##----- Linux - only ----
@@ -141,7 +143,7 @@ Smem <- Sys.procinfo("/proc/meminfo")
 
 
 ###################################################
-### chunk number 17: Sys_proc_fake eval=FALSE
+### code chunk number 17: Sys_proc_fake (eval = FALSE)
 ###################################################
 ## if(identical(1L, grep("linux", R.version[["os"]]))) { ## Linux - only ---
 ##  Scpu <- sfsmisc::Sys.procinfo("/proc/cpuinfo")
@@ -152,7 +154,7 @@ Smem <- Sys.procinfo("/proc/meminfo")
 
 
 ###################################################
-### chunk number 18: Sys_proc_out
+### code chunk number 18: Sys_proc_out
 ###################################################
 if(identical(1L, grep("linux", R.version[["os"]]))) { ## Linux - only ---
  print(Scpu[c("model name", "cpu MHz", "cache size", "bogomips")])
diff --git a/win32/deps/library/Matrix/doc/Comparisons.Rnw b/win32/deps/library/Matrix/doc/Comparisons.Rnw
index fb2876e..c7060fb 100644
--- a/win32/deps/library/Matrix/doc/Comparisons.Rnw
+++ b/win32/deps/library/Matrix/doc/Comparisons.Rnw
@@ -5,7 +5,7 @@
 %%\VignetteIndexEntry{Comparisons of Least Squares calculation speeds}
 %%\VignetteDepends{Matrix}
 \begin{document}
-\SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=5,height=3,strip.white=TRUE,keep.source=TRUE}
+\SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=5,height=3,strip.white=true,keep.source=TRUE}
 \setkeys{Gin}{width=\textwidth}
 \title{Comparing Least Squares Calculations}
 \author{Douglas Bates\\R Development Core Team\\\email{Douglas Bates R-project org}}
diff --git a/win32/deps/library/Matrix/doc/Comparisons.pdf b/win32/deps/library/Matrix/doc/Comparisons.pdf
index e7ea55a..564c49c 100644
Binary files a/win32/deps/library/Matrix/doc/Comparisons.pdf and b/win32/deps/library/Matrix/doc/Comparisons.pdf differ
diff --git a/win32/deps/library/Matrix/doc/Design-issues.R b/win32/deps/library/Matrix/doc/Design-issues.R
index b4bf98a..1ece87e 100644
--- a/win32/deps/library/Matrix/doc/Design-issues.R
+++ b/win32/deps/library/Matrix/doc/Design-issues.R
@@ -1,11 +1,13 @@
+### R code from vignette source 'Design-issues.Rnw'
+
 ###################################################
-### chunk number 1: preliminaries
+### code chunk number 1: preliminaries
 ###################################################
 options(width=75)
 
 
 ###################################################
-### chunk number 2: diag-class
+### code chunk number 2: diag-class
 ###################################################
 library(Matrix)
 (D4 <- Diagonal(4, 10*(1:4)))
@@ -14,14 +16,14 @@ diag(D4)
 
 
 ###################################################
-### chunk number 3: diag-2
+### code chunk number 3: diag-2
 ###################################################
 diag(D4) <- diag(D4) + 1:4
 D4
 
 
 ###################################################
-### chunk number 4: unit-diag
+### code chunk number 4: unit-diag
 ###################################################
 str(I3 <- Diagonal(3)) ## empty 'x' slot
 
@@ -29,7 +31,7 @@ getClass("diagonalMatrix") ## extending "denseMatrix"
 
 
 ###################################################
-### chunk number 5: Matrix-ex
+### code chunk number 5: Matrix-ex
 ###################################################
 (M <- spMatrix(4,4, i=1:4, j=c(3:1,4), x=c(4,1,4,8))) # dgTMatrix
 m <- as(M, "matrix")
@@ -37,7 +39,7 @@ m <- as(M, "matrix")
 
 
 ###################################################
-### chunk number 6: sessionInfo
+### code chunk number 6: sessionInfo
 ###################################################
 toLatex(sessionInfo())
 
diff --git a/win32/deps/library/Matrix/doc/Design-issues.Rnw b/win32/deps/library/Matrix/doc/Design-issues.Rnw
index 76c0f99..90adb23 100644
--- a/win32/deps/library/Matrix/doc/Design-issues.Rnw
+++ b/win32/deps/library/Matrix/doc/Design-issues.Rnw
@@ -8,7 +8,7 @@
 %%                    vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
 %%\VignetteIndexEntry{Design Issues in Matrix package Development}
 %%\VignetteDepends{Matrix}
-\SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=5,height=3,strip.white=TRUE,keep.source=TRUE}
+\SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=5,height=3,strip.white=true,keep.source=TRUE}
 %								          ^^^^^^^^^^^^^^^^
 \title{Design Issues in Matrix package Development}
 \author{Martin Maechler and Douglas Bates\\R Core Development Team
diff --git a/win32/deps/library/Matrix/doc/Design-issues.pdf b/win32/deps/library/Matrix/doc/Design-issues.pdf
index 83a7fd1..7fd09f6 100644
Binary files a/win32/deps/library/Matrix/doc/Design-issues.pdf and b/win32/deps/library/Matrix/doc/Design-issues.pdf differ
diff --git a/win32/deps/library/Matrix/doc/Intro2Matrix.R b/win32/deps/library/Matrix/doc/Intro2Matrix.R
index 35adbee..8cea1c1 100644
--- a/win32/deps/library/Matrix/doc/Intro2Matrix.R
+++ b/win32/deps/library/Matrix/doc/Intro2Matrix.R
@@ -1,11 +1,13 @@
+### R code from vignette source 'Intro2Matrix.Rnw'
+
 ###################################################
-### chunk number 1: preliminaries
+### code chunk number 1: preliminaries
 ###################################################
 options(width=75)
 
 
 ###################################################
-### chunk number 2: ex1
+### code chunk number 2: ex1
 ###################################################
 library(Matrix)
 
@@ -15,7 +17,7 @@ tM <- t(M)
 
 
 ###################################################
-### chunk number 3: ex2
+### code chunk number 3: ex2
 ###################################################
 (M2 <- cBind(-1, M))
 M[2, 1]
@@ -23,7 +25,7 @@ M[4, ]
 
 
 ###################################################
-### chunk number 4: set0
+### code chunk number 4: set0
 ###################################################
 M2[, c(2,4:6)] <- 0
 M2[2, ] <- 0
@@ -32,7 +34,7 @@ M2[1:2,2] <- M2[3,4:5] <- NA
 
 
 ###################################################
-### chunk number 5: asSparse
+### code chunk number 5: asSparse
 ###################################################
 sM <- as(M2, "sparseMatrix")
 10 * sM
@@ -41,41 +43,41 @@ is(sM / 10  +  M2 %/% 2, "sparseMatrix")
 
 
 ###################################################
-### chunk number 6: add1
+### code chunk number 6: add1
 ###################################################
 sM + 10
 
 
 ###################################################
-### chunk number 7: Comp1
+### code chunk number 7: Comp1
 ###################################################
 Mg2 <- (sM > 2)
 Mg2
 
 
 ###################################################
-### chunk number 8: str_mat
+### code chunk number 8: str_mat
 ###################################################
 str(Mg2)
 summary(Mg2)
 
 
 ###################################################
-### chunk number 9: drop0
+### code chunk number 9: drop0
 ###################################################
 Mg2 <- drop0(Mg2)
 str(Mg2 x) # length 13, was 16
 
 
 ###################################################
-### chunk number 10: image
+### code chunk number 10: image
 ###################################################
 data(CAex)
 print(image(CAex, main = "image(CAex)")) # print(.) needed for Sweave
 
 
 ###################################################
-### chunk number 11: sub_logi
+### code chunk number 11: sub_logi
 ###################################################
 sM[sM > 2]
 sml <- sM[sM <= 2]
@@ -83,14 +85,14 @@ sml
 
 
 ###################################################
-### chunk number 12: Tsparse-class
+### code chunk number 12: Tsparse-class
 ###################################################
 getClass("TsparseMatrix") # (i,j, Dim, Dimnames) slots are common to all
 getClass("dgTMatrix")
 
 
 ###################################################
-### chunk number 13: sessionInfo
+### code chunk number 13: sessionInfo
 ###################################################
 toLatex(sessionInfo())
 
diff --git a/win32/deps/library/Matrix/doc/Intro2Matrix.Rnw b/win32/deps/library/Matrix/doc/Intro2Matrix.Rnw
index 414184f..c8bb084 100644
--- a/win32/deps/library/Matrix/doc/Intro2Matrix.Rnw
+++ b/win32/deps/library/Matrix/doc/Intro2Matrix.Rnw
@@ -9,7 +9,7 @@
 %
 %%\VignetteIndexEntry{2nd Introduction to the Matrix Package}
 %%\VignetteDepends{Matrix}
-\SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=7,height=4,strip.white=TRUE,keep.source=TRUE}
+\SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=7,height=4,strip.white=true,keep.source=TRUE}
 %								          ^^^^^^^^^^^^^^^^
 \title{2nd Introduction to the Matrix package}
 \author{Martin Maechler and Douglas Bates\\ R Core Development Team
diff --git a/win32/deps/library/Matrix/doc/Intro2Matrix.pdf b/win32/deps/library/Matrix/doc/Intro2Matrix.pdf
index ebe8228..b1f2b88 100644
Binary files a/win32/deps/library/Matrix/doc/Intro2Matrix.pdf and b/win32/deps/library/Matrix/doc/Intro2Matrix.pdf differ
diff --git a/win32/deps/library/Matrix/doc/Introduction.R b/win32/deps/library/Matrix/doc/Introduction.R
index 6359a4e..7e4d62d 100644
--- a/win32/deps/library/Matrix/doc/Introduction.R
+++ b/win32/deps/library/Matrix/doc/Introduction.R
@@ -1,5 +1,7 @@
+### R code from vignette source 'Introduction.Rnw'
+
 ###################################################
-### chunk number 1: preliminaries
+### code chunk number 1: preliminaries
 ###################################################
 options(width=75)
 
diff --git a/win32/deps/library/Matrix/doc/Introduction.Rnw b/win32/deps/library/Matrix/doc/Introduction.Rnw
index 3d5b2d8..18edc2e 100644
--- a/win32/deps/library/Matrix/doc/Introduction.Rnw
+++ b/win32/deps/library/Matrix/doc/Introduction.Rnw
@@ -4,7 +4,7 @@
 \bibliographystyle{plainnat}
 %%\VignetteIndexEntry{Introduction to the Matrix Package}
 %%\VignetteDepends{Matrix}
-\SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=5,height=3,strip.white=TRUE,keep.source=TRUE}
+\SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,width=5,height=3,strip.white=true,keep.source=TRUE}
 \title{Introduction to the Matrix package --- as of Feb.~2005\footnote{
     There's an unfinished ``2nd Introduction to the Matrix package''
     which contains partly newer information, but is not at all self-contained.
diff --git a/win32/deps/library/Matrix/doc/Introduction.pdf b/win32/deps/library/Matrix/doc/Introduction.pdf
index 10148b4..de97a32 100644
Binary files a/win32/deps/library/Matrix/doc/Introduction.pdf and b/win32/deps/library/Matrix/doc/Introduction.pdf differ
diff --git a/win32/deps/library/Matrix/doc/SuiteSparse/AMD.txt b/win32/deps/library/Matrix/doc/SuiteSparse/AMD.txt
new file mode 100644
index 0000000..2f0a4ff
--- /dev/null
+++ b/win32/deps/library/Matrix/doc/SuiteSparse/AMD.txt
@@ -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
diff --git a/win32/deps/library/Matrix/doc/SuiteSparse/CHOLMOD.txt b/win32/deps/library/Matrix/doc/SuiteSparse/CHOLMOD.txt
new file mode 100644
index 0000000..08eb0a2
--- /dev/null
+++ b/win32/deps/library/Matrix/doc/SuiteSparse/CHOLMOD.txt
@@ -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.
+
diff --git a/win32/deps/library/Matrix/doc/SuiteSparse/COLAMD.txt b/win32/deps/library/Matrix/doc/SuiteSparse/COLAMD.txt
new file mode 100644
index 0000000..6c5edf0
--- /dev/null
+++ b/win32/deps/library/Matrix/doc/SuiteSparse/COLAMD.txt
@@ -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, ...)
diff --git a/win32/deps/library/Matrix/doc/UFsparse/SPQR.txt b/win32/deps/library/Matrix/doc/SuiteSparse/SPQR.txt
similarity index 100%
rename from win32/deps/library/Matrix/doc/UFsparse/SPQR.txt
rename to win32/deps/library/Matrix/doc/SuiteSparse/SPQR.txt
diff --git a/win32/deps/library/Matrix/doc/SuiteSparse/SuiteSparse_config.txt b/win32/deps/library/Matrix/doc/SuiteSparse/SuiteSparse_config.txt
new file mode 100644
index 0000000..2dbaacd
--- /dev/null
+++ b/win32/deps/library/Matrix/doc/SuiteSparse/SuiteSparse_config.txt
@@ -0,0 +1,44 @@
+SuiteSparse_config, 2012, 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.
+
+--------------------------------------------------------------------------------
+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.
+--------------------------------------------------------------------------------
+
diff --git a/win32/deps/library/Matrix/doc/UFsparse/UserGuides.txt b/win32/deps/library/Matrix/doc/SuiteSparse/UserGuides.txt
similarity index 100%
rename from win32/deps/library/Matrix/doc/UFsparse/UserGuides.txt
rename to win32/deps/library/Matrix/doc/SuiteSparse/UserGuides.txt
diff --git a/win32/deps/library/Matrix/doc/index.html b/win32/deps/library/Matrix/doc/index.html
index dd737cf..acbbc4f 100644
--- a/win32/deps/library/Matrix/doc/index.html
+++ b/win32/deps/library/Matrix/doc/index.html
@@ -1,18 +1,47 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><title>R: Matrix vignettes</title>
-<link rel="stylesheet" type="text/css" href="../../R.css">
+<html><head><title>R: Vignettes</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>
-<h2>Vignettes of package Matrix </h2>
-<dl>
-<dt><a href="Comparisons.pdf">Comparisons.pdf</a>:
-<dd> Comparisons of Least Squares calculation speeds
-<dt><a href="Design-issues.pdf">Design-issues.pdf</a>:
-<dd> Design Issues in Matrix package Development
-<dt><a href="Intro2Matrix.pdf">Intro2Matrix.pdf</a>:
-<dd> 2nd Introduction to the Matrix Package
-<dt><a href="Introduction.pdf">Introduction.pdf</a>:
-<dd> Introduction to the Matrix Package
-<dt><a href="sparseModels.pdf">sparseModels.pdf</a>:
-<dd> Sparse Model Matrices
-</dl>
+<h1> Vignettes
+<img class="toplogo" src="/doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="/doc/html/index.html"><img src="/doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div>
+<h2>Vignettes from package 'Matrix'</h2>
+<table width="100%">
+<col width="22%">
+<col width="2%">
+<col width="50%">
+<col width="8%">
+<col width="8%">
+<col width="8%">
+<tr><td align="right" valign="top"><a href="../../../library/Matrix/doc/Comparisons.pdf">Matrix::Comparisons</a></td>
+<td></td><td valign="top">Comparisons of Least Squares calculation speeds</td>
+<td valign="top"><a href="../../../library/Matrix/doc/Comparisons.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Matrix/doc/Comparisons.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/Matrix/doc/Comparisons.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/Matrix/doc/Design-issues.pdf">Matrix::Design-issues</a></td>
+<td></td><td valign="top">Design Issues in Matrix package Development</td>
+<td valign="top"><a href="../../../library/Matrix/doc/Design-issues.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Matrix/doc/Design-issues.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/Matrix/doc/Design-issues.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/Matrix/doc/Intro2Matrix.pdf">Matrix::Intro2Matrix</a></td>
+<td></td><td valign="top">2nd Introduction to the Matrix Package</td>
+<td valign="top"><a href="../../../library/Matrix/doc/Intro2Matrix.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Matrix/doc/Intro2Matrix.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/Matrix/doc/Intro2Matrix.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/Matrix/doc/Introduction.pdf">Matrix::Introduction</a></td>
+<td></td><td valign="top">Introduction to the Matrix Package</td>
+<td valign="top"><a href="../../../library/Matrix/doc/Introduction.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Matrix/doc/Introduction.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/Matrix/doc/Introduction.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/Matrix/doc/sparseModels.pdf">Matrix::sparseModels</a></td>
+<td></td><td valign="top">Sparse Model Matrices</td>
+<td valign="top"><a href="../../../library/Matrix/doc/sparseModels.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/Matrix/doc/sparseModels.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/Matrix/doc/sparseModels.R">R code</a></td></tr>
+</table>
 </body></html>
diff --git a/win32/deps/library/Matrix/doc/sparseModels.R b/win32/deps/library/Matrix/doc/sparseModels.R
index dd4c3fe..3d3ff37 100644
--- a/win32/deps/library/Matrix/doc/sparseModels.R
+++ b/win32/deps/library/Matrix/doc/sparseModels.R
@@ -1,11 +1,13 @@
+### R code from vignette source 'sparseModels.Rnw'
+
 ###################################################
-### chunk number 1: preliminaries
+### code chunk number 1: preliminaries
 ###################################################
 options(width=75)
 
 
 ###################################################
-### chunk number 2: ex1
+### code chunk number 2: ex1
 ###################################################
  (ff <- factor(strsplit("statistics_is_a_task", "")[[1]], levels=c("_",letters)))
  factor(ff)      # drops the levels that do not occur
@@ -13,7 +15,7 @@ options(width=75)
 
 
 ###################################################
-### chunk number 3: ex1.2
+### code chunk number 3: ex1.2
 ###################################################
  levels(f1)[match(c("c","k"), levels(f1))] <- "ck"
  library(Matrix)
@@ -25,37 +27,35 @@ options(width=75)
 
 
 ###################################################
-### chunk number 4: as_factor_sparse
+### code chunk number 4: as_factor_sparse
 ###################################################
 as(f1, "sparseMatrix")
 
 
 ###################################################
-### chunk number 5: contrasts_sub
+### code chunk number 5: contrasts_sub
 ###################################################
 printSpMatrix( t( Matrix(contrasts(f1))[as.character(f1) ,] ),
               col.names=TRUE)
 
 
 ###################################################
-### chunk number 6: ex1-model.matrix
+### code chunk number 6: ex1-model.matrix
 ###################################################
 t( Matrix(model.matrix(~ 0+ f1))) # model with*OUT* intercept
 
 
 ###################################################
-### chunk number 7: chickwts-ex
+### code chunk number 7: chickwts-ex
 ###################################################
 str(chickwts)# a standard R data set,  71 x 2
 x.feed <- as(chickwts$feed, "sparseMatrix")
 x.feed[ , (1:72)[c(TRUE,FALSE,FALSE)]] ## every  3rd  column:
 
-## Provisional (hence unexported) sparse lm.fit():
-Matrix:::lm.fit.sparse(x = t(x.feed), y = chickwts[,1])
 
 
 ###################################################
-### chunk number 8: warpbreaks-data
+### code chunk number 8: warpbreaks-data
 ###################################################
 data(warpbreaks)# a standard R data set
 str(warpbreaks) # 2 x 3 (x 9) balanced two-way with 9 replicates:
@@ -63,7 +63,7 @@ xtabs(~ wool + tension, data = warpbreaks)
 
 
 ###################################################
-### chunk number 9: modMat-warpbreaks
+### code chunk number 9: modMat-warpbreaks
 ###################################################
 tmm <- with(warpbreaks,
             rBind(as(tension, "sparseMatrix"),
@@ -72,7 +72,7 @@ print(  image(tmm)  ) # print(.) the lattice object
 
 
 ###################################################
-### chunk number 10: morley-data
+### code chunk number 10: morley-data
 ###################################################
 data(morley) # a standard R data set
 morley$Expt <- factor(morley$Expt)
@@ -85,7 +85,7 @@ print(  image(t.mm)  ) # print(.) the lattice object
 
 
 ###################################################
-### chunk number 11: npk_ex
+### code chunk number 11: npk_ex
 ###################################################
 data(npk, package="MASS")
 
@@ -99,7 +99,7 @@ t(M.npk) # easier to display, column names readably displayed as row.names(t(.))
 
 
 ###################################################
-### chunk number 12: aov-large-ex
+### code chunk number 12: aov-large-ex
 ###################################################
 id <- factor(1:20)
 a <- factor(1:2)
@@ -111,7 +111,7 @@ dim(aDat) # 120'000 x 5  (120'000 = 2*2*1500 * 20 = 6000 * 20)
 
 
 ###################################################
-### chunk number 13: aov-ex-X-sparse
+### code chunk number 13: aov-ex-X-sparse
 ###################################################
 d2 <- factor(1:150) # 10 times smaller
 tmp2 <- expand.grid(id=id, a=a, b=b, d=d2)
@@ -124,13 +124,24 @@ round(object.size(mm) / object.size(smm), 1)
 
 
 ###################################################
-### chunk number 14: X-sparse-image
+### code chunk number 14: X-sparse-image (eval = FALSE)
+###################################################
+## image(t(smm), aspect = 1/3, lwd=0, col.regions = "red")
+
+
+###################################################
+### code chunk number 15: X-sparse-image-fake
 ###################################################
-print( image(t(smm), aspect=1/3, col.regions= "red") ) # print(<lattice>)
+png("sparseModels-X-sparse-image.png", width=6, height=3,
+    units='in', res=150)
+print(
+image(t(smm), aspect = 1/3, lwd=0, col.regions = "red")
+      )
+dev.off()
 
 
 ###################################################
-### chunk number 15: X-sparse-mult
+### code chunk number 16: X-sparse-mult
 ###################################################
 x <- 1:600
 system.time(y <- smm %*% x) ## sparse is much faster
@@ -139,7 +150,7 @@ identical(as.matrix(y), y.) ## TRUE
 
 
 ###################################################
-### chunk number 16: sessionInfo
+### code chunk number 17: sessionInfo
 ###################################################
 toLatex(sessionInfo())
 
diff --git a/win32/deps/library/Matrix/doc/sparseModels.Rnw b/win32/deps/library/Matrix/doc/sparseModels.Rnw
index c381186..4724843 100644
--- a/win32/deps/library/Matrix/doc/sparseModels.Rnw
+++ b/win32/deps/library/Matrix/doc/sparseModels.Rnw
@@ -7,10 +7,7 @@
 \newcommand{\noFootnote}[1]{{\small (\textit{#1})}}
 \newcommand{\myOp}[1]{{$\left\langle\ensuremath{#1}\right\rangle$}}
 %%\VignetteIndexEntry{Sparse Model Matrices}
-%%\VignetteDepends{Matrix}
-\SweaveOpts{engine=R, keep.source=TRUE}
-%	 	      ^^^^^^^^^^^^^^^^
-\SweaveOpts{eps=FALSE, pdf=TRUE, width=5, height=3, strip.white=TRUE}
+%%\VignetteDepends{Matrix,MASS}
 \title{Sparse Model Matrices}
 \author{Martin Maechler\\ R Core Development Team
   \\\email{maechler R-project org}}
@@ -18,6 +15,9 @@
 %
 \begin{document}
 \maketitle
+\SweaveOpts{engine=R, keep.source=TRUE}
+\SweaveOpts{eps=FALSE, pdf=TRUE, width=8, height=5.5, strip.white=true}
+\setkeys{Gin}{width=\textwidth}
 
 % \begin{abstract}
 %  ............................ FIXME
@@ -94,9 +94,11 @@ str(chickwts)# a standard R data set,  71 x 2
 x.feed <- as(chickwts$feed, "sparseMatrix")
 x.feed[ , (1:72)[c(TRUE,FALSE,FALSE)]] ## every  3rd  column:
 
-## Provisional (hence unexported) sparse lm.fit():
-Matrix:::lm.fit.sparse(x = t(x.feed), y = chickwts[,1])
 @
+% FIXME: Move this to ../../../MatrixModels/inst/doc/  ???
+% ## Provisional (hence unexported) sparse lm.fit():
+% Matrix:::lm.fit.sparse(x = t(x.feed), y = chickwts[,1])
+
 %- for emacs: $
 
 
@@ -104,22 +106,22 @@ Matrix:::lm.fit.sparse(x = t(x.feed), y = chickwts[,1])
 
 To create the model matrix for the case of one factor and one continuous
 predictor---called ``analysis of covariance'' in the historical literature---
-we can adopt the following simple scheme:
+we can adopt the following simple scheme.
 
 %% Possible examples:
 %% - Puromycin
 %% - ToothGrowth
 
---- FIXME ---
+%--- FIXME ---
 
-The final model matrix is the catenation of
+The final model matrix is the concatenation of:
 
-1) create the sparse 0-1 matrix \code{m1} from the factor -- == f1 main-effect
+1) create the sparse 0-1 matrix \code{m1} from the f1 main-effect
 
 2) the single row/column 'x'  ==  'x' main-effect
 
 3) replacing the values 1 in \code{m1 x} (the x-slot of the factor model matrix),
-   by the values of \code{x} (our continuous predictor)
+   by the values of \code{x} (our continuous predictor).
 
 \section{Two (or more) factors, main effects only: \texttt{y $\sim$ f1 + f2}}
 
@@ -132,9 +134,10 @@ str(warpbreaks) # 2 x 3 (x 9) balanced two-way with 9 replicates:
 xtabs(~ wool + tension, data = warpbreaks)
 @
 
-It is \emph{not} statistically sensible to assume that \code{Run} is a
-fixed effect, however the example is handy to depict how a model matrix
-would be built for the model \code{Speed ~ Expt + Run}.
+%It is \emph{not} statistically sensible to assume that \code{Run} is a
+%fixed effect, however the example is handy to depict how a model matrix
+This example depicts how a model matrix
+would be built for the model \code{breaks ~ wool + tension}.
 Since this is a main effects model (no interactions), the desired model
 matrix is simply the concatenation of the model matrices of the main
 effects. There are two here, but the principle applies to general main
@@ -194,17 +197,16 @@ t(M.npk) # easier to display, column names readably displayed as row.names(t(.))
 @
 %% printSpMatrix(M.npk, col.names = "abb1")
 
-An other example is the it seems realistic situation of a user who
-enquired on R-help (July 15, 2008,
+Another example was reported by a user on R-help (July 15, 2008,
 {\small \url{https://stat.ethz.ch/pipermail/r-help/2008-July/167772.html}})
-about an ``aov error with large data set'':
+about an ``aov error with large data set''.
 
-\begin{citation}
-   I'm looking to analyze a large data set: a within-Ss 2*2*1500 design
-   with 20 Ss. However, aov() gives me an error, reproducible as follows:
+\begin{citation} % RAS:  in my PDF, I don't see the first character I
+I'm looking to analyze a large data set: a within-Ss 2*2*1500 design
+with 20 Ss.  However, aov() gives me an error. %, reproducible as follows:
 \end{citation}
 
-and gave the following code example (slightly edited):
+And gave the following code example (slightly edited):
 <<aov-large-ex>>=
 id <- factor(1:20)
 a <- factor(1:2)
@@ -219,14 +221,12 @@ and then continued with
 \begin{Sinput}
 m.aov <- aov(y ~ a*b*d + Error(id/(a*b*d)), data=aDat)
 \end{Sinput}
-which
+
 \begin{citation}\sffamily
-   yields the following error:\\
-   "\\ \ttfamily
+   which yields the following error:\\
+   \ttfamily
      Error in model.matrix.default(mt, mf, contrasts) :\\
      allocMatrix: too many elements specified\\
-   "
-   Any suggestions?
 \end{citation}
 to which he got the explanation by Peter Dalgaard that the formal model matrix involved
 was much too large in this case, and that PD assumed, \pkg{lme4} would be
@@ -261,19 +261,24 @@ round(object.size(mm) / object.size(smm), 1)
 shows that even for the small \code{d} here, the memory reduction would be
 more than an order of magnitude.
 \\
-<<X-sparse-image, fig=TRUE>>=
-print( image(t(smm), aspect=1/3, col.regions= "red") ) # print(<lattice>)
+%% Reasons to fake here:
+%% 1) print() is needed for lattice -- but looks ugly,
+%% 2) the resulting  pdf file is too large -- use png instead:
+<<X-sparse-image, eval=FALSE>>=
+image(t(smm), aspect = 1/3, lwd=0, col.regions = "red")
+<<X-sparse-image-fake, fig=TRUE, include=FALSE, echo=FALSE, results=hide, keep.source=FALSE>>=
+png("sparseModels-X-sparse-image.png", width=6, height=3,
+    units='in', res=150)
+print(
+<<X-sparse-image>>
+      )
+dev.off()
 @
-% % print() is needed for lattice -- but looks ugly, hence
-% <<X-sparse-image-fake, fig=TRUE, include=FALSE, echo=FALSE, results=hide>>=
-% print( image(t(smm), aspect=1/3, lwd=0, col.regions = "red") )
-% @
-% <<X-sparse-image, eval=FALSE>>=
-% image(t(smm), aspect=3, lwd=0, col.r = "red")
-% @
-% \includegraphics{sparseModels-X-sparse-image-fake}
-%
-\\
+%%--NB: 'keep.source=FALSE' above is workaround-a-bug-in-R-devel-(2.13.x)---
+\par\vspace*{-1ex}
+\centerline{%
+  \includegraphics[width=1.1\textwidth]{sparseModels-X-sparse-image.png}}
+
 and working with the sparse instead of the dense model matrix is
 considerably faster as well,
 <<X-sparse-mult>>=
diff --git a/win32/deps/library/Matrix/doc/sparseModels.pdf b/win32/deps/library/Matrix/doc/sparseModels.pdf
index 94be0c0..c6bb76d 100644
Binary files a/win32/deps/library/Matrix/doc/sparseModels.pdf and b/win32/deps/library/Matrix/doc/sparseModels.pdf differ
diff --git a/win32/deps/library/Matrix/help/AnIndex b/win32/deps/library/Matrix/help/AnIndex
index d8630af..78d550a 100644
--- a/win32/deps/library/Matrix/help/AnIndex
+++ b/win32/deps/library/Matrix/help/AnIndex
@@ -10,6 +10,7 @@
 !,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
@@ -49,11 +50,14 @@
 %*%,diagonalMatrix,matrix-method	diagonalMatrix-class
 %*%,diagonalMatrix,sparseMatrix-method	diagonalMatrix-class
 %*%,dMatrix,integer-method	dMatrix-class
+%*%,dMatrix,lMatrix-method	dMatrix-class
+%*%,dMatrix,nMatrix-method	dMatrix-class
 %*%,dsparseMatrix,ddenseMatrix-method	dsparseMatrix-class
 %*%,dsparseMatrix,dgeMatrix-method	dsparseMatrix-class
 %*%,dspMatrix,ddenseMatrix-method	dsyMatrix-class
 %*%,dspMatrix,matrix-method	dsyMatrix-class
 %*%,dsyMatrix,ddenseMatrix-method	dsyMatrix-class
+%*%,dsyMatrix,dsyMatrix-method	dsyMatrix-class
 %*%,dsyMatrix,matrix-method	dsyMatrix-class
 %*%,dtpMatrix,ddenseMatrix-method	dtpMatrix-class
 %*%,dtpMatrix,matrix-method	dtpMatrix-class
@@ -64,6 +68,9 @@
 %*%,ldenseMatrix,lsparseMatrix-method	lsparseMatrix-classes
 %*%,lgCMatrix,lgCMatrix-method	lsparseMatrix-classes
 %*%,lgeMatrix,diagonalMatrix-method	diagonalMatrix-class
+%*%,lMatrix,dMatrix-method	dMatrix-class
+%*%,lMatrix,lMatrix-method	dMatrix-class
+%*%,lMatrix,nMatrix-method	dMatrix-class
 %*%,lsparseMatrix,ldenseMatrix-method	lsparseMatrix-classes
 %*%,lsparseMatrix,lsparseMatrix-method	lsparseMatrix-classes
 %*%,Matrix,ANY-method	Matrix-class
@@ -83,6 +90,9 @@
 %*%,Matrix,TsparseMatrix-method	TsparseMatrix-class
 %*%,ndenseMatrix,nsparseMatrix-method	nsparseMatrix-classes
 %*%,ngCMatrix,ngCMatrix-method	nsparseMatrix-classes
+%*%,nMatrix,dMatrix-method	dMatrix-class
+%*%,nMatrix,lMatrix-method	dMatrix-class
+%*%,nMatrix,nMatrix-method	dMatrix-class
 %*%,nsparseMatrix,ndenseMatrix-method	nsparseMatrix-classes
 %*%,nsparseMatrix,nsparseMatrix-method	nsparseMatrix-classes
 %*%,numeric,CsparseMatrix-method	CsparseMatrix-class
@@ -96,6 +106,7 @@
 %*%,sparseVector,Matrix-method	sparseVector-class
 %*%,TsparseMatrix,ANY-method	TsparseMatrix-class
 %*%,TsparseMatrix,Matrix-method	TsparseMatrix-class
+%*%,TsparseMatrix,TsparseMatrix-method	TsparseMatrix-class
 %/%,ddiMatrix,ddenseMatrix-method	diagonalMatrix-class
 %/%,ddiMatrix,ldenseMatrix-method	diagonalMatrix-class
 %/%,ddiMatrix,Matrix-method	diagonalMatrix-class
@@ -138,13 +149,21 @@
 *,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
+-,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
+.formatSparseSimple	formatSparseM
+.sparseDiagonal	Diagonal
 .symDiagonal	Diagonal
+.updateCHMfactor	CHMfactor-class
 .validateCsparse	CsparseMatrix-class
 /,ddiMatrix,ddenseMatrix-method	diagonalMatrix-class
 /,ddiMatrix,ldenseMatrix-method	diagonalMatrix-class
@@ -154,6 +173,9 @@
 /,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
@@ -162,11 +184,14 @@ 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
@@ -179,29 +204,56 @@ any,ldiMatrix-method	diagonalMatrix-class
 any,lMatrix-method	all-methods
 any,Matrix-method	all-methods
 any,nsparseMatrix-method	nsparseMatrix-classes
+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
@@ -209,18 +261,30 @@ 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,ANY-method	abIndex-class
+as.vector,abIndex,character-method	abIndex-class
 as.vector,dgeMatrix,missing-method	dgeMatrix-class
 as.vector,diagonalMatrix,missing-method	diagonalMatrix-class
 as.vector,ldenseMatrix,missing-method	ldenseMatrix-class
@@ -246,6 +310,7 @@ 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
@@ -257,6 +322,7 @@ 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
@@ -272,6 +338,7 @@ 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
@@ -286,15 +353,19 @@ chol,dgeMatrix-method	chol
 chol,dpoMatrix-method	chol
 chol,dppMatrix-method	chol
 chol,dsCMatrix-method	chol
-chol,dsCMatrix-method	chol
 chol,dsparseMatrix-method	chol
 chol,ldiMatrix-method	chol
 chol,lsCMatrix-method	chol
-chol,lsCMatrix-method	chol
 chol,Matrix-method	chol
 chol,nsCMatrix-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
@@ -302,7 +373,13 @@ 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,nsparseVector-method	sparseVector-class
 coerce,ANY,sparseMatrix-method	sparseMatrix-class
 coerce,ANY,sparseVector-method	sparseVector-class
 coerce,atomicVector,dsparseVector-method	sparseVector-class
@@ -321,14 +398,15 @@ 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,CsparseMatrix-method	ddenseMatrix-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,symmetricMatrix-method	diagonalMatrix-class
 coerce,ddiMatrix,triangularMatrix-method	diagonalMatrix-class
 coerce,ddiMatrix,TsparseMatrix-method	diagonalMatrix-class
@@ -378,9 +456,11 @@ 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,dgCMatrix-method	dsCMatrix-class
 coerce,dsCMatrix,dgeMatrix-method	dsCMatrix-class
 coerce,dsCMatrix,dgTMatrix-method	dsCMatrix-class
@@ -392,11 +472,13 @@ coerce,dsCMatrix,lsCMatrix-method	dsCMatrix-class
 coerce,dsCMatrix,matrix-method	dsCMatrix-class
 coerce,dsCMatrix,nsCMatrix-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
@@ -438,6 +520,7 @@ coerce,dtTMatrix,matrix-method	dtCMatrix-class
 coerce,factor,dgCMatrix-method	dgCMatrix-class
 coerce,factor,sparseMatrix-method	sparseMatrix-class
 coerce,graph,CsparseMatrix-method	sparseMatrix-class
+coerce,graph,Matrix-method	sparseMatrix-class
 coerce,graph,sparseMatrix-method	sparseMatrix-class
 coerce,graphAM,sparseMatrix-method	sparseMatrix-class
 coerce,graphNEL,CsparseMatrix-method	sparseMatrix-class
@@ -449,6 +532,7 @@ 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
@@ -476,6 +560,7 @@ coerce,lgTMatrix,matrix-method	lsparseMatrix-classes
 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
@@ -641,6 +726,10 @@ 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
@@ -679,8 +768,10 @@ 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,pMatrix-method	pMatrix-class
+coerce,numeric,seqMat-method	abIndex-class
 coerce,numeric,TsparseMatrix-method	TsparseMatrix-class
 coerce,pBunchKaufman,lMatrix-method	Cholesky-class
 coerce,pCholesky,lMatrix-method	Cholesky-class
@@ -706,16 +797,26 @@ 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	sparseMatrix-class
 coerce,sparseMatrix,graphNEL-method	sparseMatrix-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,triangularVector,sparseVector-method	sparseVector-class
 coerce,TsparseMatrix,CsparseMatrix-method	TsparseMatrix-class
 coerce,TsparseMatrix,graphNEL-method	sparseMatrix-class
 coerce,TsparseMatrix,lMatrix-method	TsparseMatrix-class
@@ -735,6 +836,7 @@ 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,lgCMatrix-method	colSums
 colMeans,ngCMatrix-method	colSums
@@ -746,24 +848,32 @@ 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,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
-contr.helmert	contrast
-contr.poly	contrast
-contr.SAS	contrast
-contr.sum	contrast
-contr.treatment	contrast
+condest	condest
 corMatrix-class	dpoMatrix-class
 cov2cor,Matrix-method	Matrix-class
 cov2cor,sparseMatrix-method	sparseMatrix-class
@@ -776,6 +886,7 @@ crossprod,CsparseMatrix,matrix-method	CsparseMatrix-class
 crossprod,CsparseMatrix,missing-method	CsparseMatrix-class
 crossprod,CsparseMatrix,numeric-method	CsparseMatrix-class
 crossprod,ddenseMatrix,CsparseMatrix-method	CsparseMatrix-class
+crossprod,ddenseMatrix,dgCMatrix-method	ddenseMatrix-class
 crossprod,ddenseMatrix,dsparseMatrix-method	dsparseMatrix-class
 crossprod,ddenseMatrix,missing-method	ddenseMatrix-class
 crossprod,dgCMatrix,dgeMatrix-method	dgCMatrix-class
@@ -799,6 +910,9 @@ crossprod,diagonalMatrix,sparseMatrix-method	diagonalMatrix-class
 crossprod,dMatrix,integer-method	dMatrix-class
 crossprod,dsparseMatrix,ddenseMatrix-method	dsparseMatrix-class
 crossprod,dsparseMatrix,dgeMatrix-method	dsparseMatrix-class
+crossprod,dtrMatrix,ddenseMatrix-method	dtrMatrix-class
+crossprod,dtrMatrix,dtrMatrix-method	dtrMatrix-class
+crossprod,dtrMatrix,matrix-method	dtrMatrix-class
 crossprod,dtrMatrix,missing-method	dtrMatrix-class
 crossprod,integer,dMatrix-method	dMatrix-class
 crossprod,ldenseMatrix,lsparseMatrix-method	lsparseMatrix-classes
@@ -814,6 +928,7 @@ crossprod,matrix,dgeMatrix-method	dgeMatrix-class
 crossprod,Matrix,Matrix-method	Matrix-class
 crossprod,Matrix,matrix-method	Matrix-class
 crossprod,matrix,Matrix-method	Matrix-class
+crossprod,Matrix,missing-method	Matrix-class
 crossprod,Matrix,numeric-method	Matrix-class
 crossprod,Matrix,sparseVector-method	sparseVector-class
 crossprod,Matrix,TsparseMatrix-method	TsparseMatrix-class
@@ -826,12 +941,16 @@ crossprod,nsparseMatrix,nsparseMatrix-method	nsparseMatrix-classes
 crossprod,nsparseMatrix-method	nsparseMatrix-classes
 crossprod,numeric,dgeMatrix-method	dgeMatrix-class
 crossprod,numeric,Matrix-method	Matrix-class
+crossprod,pMatrix,Matrix-method	pMatrix-class
+crossprod,pMatrix,matrix-method	pMatrix-class
 crossprod,pMatrix,missing-method	pMatrix-class
+crossprod,pMatrix,pMatrix-method	pMatrix-class
 crossprod,sparseMatrix,diagonalMatrix-method	diagonalMatrix-class
 crossprod,sparseVector,Matrix-method	sparseVector-class
 crossprod,TsparseMatrix,ANY-method	TsparseMatrix-class
 crossprod,TsparseMatrix,Matrix-method	TsparseMatrix-class
 crossprod,TsparseMatrix,missing-method	TsparseMatrix-class
+crossprod,TsparseMatrix,TsparseMatrix-method	TsparseMatrix-class
 CsparseMatrix-class	CsparseMatrix-class
 dCHMsimpl-class	CHMfactor-class
 dCHMsuper-class	CHMfactor-class
@@ -839,6 +958,7 @@ 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
@@ -872,17 +992,38 @@ 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
@@ -900,6 +1041,7 @@ 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
@@ -974,10 +1116,14 @@ 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
 head,Matrix-method	Matrix-class
+head,sparseVector-method	sparseVector-class
 Hilbert	Hilbert
 image,ANY-method	image-methods
 image,CHMfactor-method	image-methods
@@ -991,10 +1137,32 @@ image,nsparseMatrix-method	image-methods
 image-methods	image-methods
 iMatrix-class	unused-classes
 index-class	index-class
+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,lMatrix-method	is.na-methods
+is.finite,nMatrix-method	is.na-methods
+is.finite,nsparseVector-method	sparseVector-class
+is.finite,pMatrix-method	is.na-methods
+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,lMatrix-method	is.na-methods
+is.infinite,nMatrix-method	is.na-methods
+is.infinite,nsparseVector-method	sparseVector-class
+is.infinite,pMatrix-method	is.na-methods
+is.infinite,sparseVector-method	sparseVector-class
+is.na,abIndex-method	abIndex-class
 is.na,denseMatrix-method	is.na-methods
 is.na,nsparseMatrix-method	nsparseMatrix-classes
-is.na,pMatrix-method	pMatrix-class
+is.na,nsparseVector-method	sparseVector-class
+is.na,pMatrix-method	is.na-methods
 is.na,sparseMatrix-method	is.na-methods
+is.na,sparseVector-method	sparseVector-class
 is.na-methods	is.na-methods
 isLDL	CHMfactor-class
 isparseVector-class	sparseVector-class
@@ -1011,10 +1179,12 @@ 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,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
@@ -1022,6 +1192,7 @@ 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
@@ -1035,13 +1206,20 @@ 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
@@ -1051,8 +1229,20 @@ 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
@@ -1067,9 +1257,10 @@ ltrMatrix-class	ltrMatrix-class
 ltTMatrix-class	lsparseMatrix-classes
 lu	lu
 lu,ddenseMatrix-method	ddenseMatrix-class
-lu,dgCMatrix-method	dgCMatrix-class
+lu,dgCMatrix-method	lu
 lu,dgeMatrix-method	lu
 lu,dsparseMatrix-method	dsparseMatrix-class
+lu,matrix-method	lu
 lu,sparseMatrix-method	sparseMatrix-class
 LU-class	LU-class
 Math,CsparseMatrix-method	CsparseMatrix-class
@@ -1083,6 +1274,8 @@ Matrix	Matrix
 Matrix-class	Matrix-class
 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
@@ -1093,6 +1286,12 @@ 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,pMatrix-method	nnzero
+nnzero,sparseMatrix-method	nnzero
 norm	norm
 norm,ANY,missing-method	norm
 norm,ddenseMatrix,character-method	ddenseMatrix-class
@@ -1126,6 +1325,11 @@ 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
@@ -1136,23 +1340,30 @@ 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
@@ -1160,6 +1371,10 @@ 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
@@ -1170,6 +1385,7 @@ 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
@@ -1177,7 +1393,10 @@ 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
@@ -1190,6 +1409,13 @@ 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
@@ -1210,9 +1436,11 @@ qr.fitted,sparseQR,dgeMatrix-method	sparseQR-class
 qr.fitted,sparseQR,matrix-method	sparseQR-class
 qr.fitted,sparseQR,numeric-method	sparseQR-class
 qr.qty,sparseQR,dgeMatrix-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,dgeMatrix-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
@@ -1230,6 +1458,7 @@ 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,ldiMatrix,atomicVector-method	diagonalMatrix-class
 rbind2,ldiMatrix,matrix-method	diagonalMatrix-class
@@ -1245,6 +1474,7 @@ 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
@@ -1272,11 +1502,13 @@ rcond,ldenseMatrix,character-method	rcond
 rcond,Matrix,character-method	rcond
 rcond,matrix,character-method	rcond
 rcond,ndenseMatrix,character-method	rcond
-rcond,sparseMatrix,character-method	sparseMatrix-class
+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
@@ -1284,6 +1516,7 @@ 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,lgCMatrix-method	colSums
 rowMeans,ngCMatrix-method	colSums
@@ -1295,6 +1528,7 @@ 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,lgCMatrix-method	colSums
 rowSums,ngCMatrix-method	colSums
@@ -1307,11 +1541,15 @@ Schur,dgeMatrix,missing-method	Schur
 Schur,diagonalMatrix,logical-method	Schur
 Schur,diagonalMatrix,missing-method	Schur
 Schur,dsyMatrix,ANY-method	Schur
-Schur,generalMatrix,ANY-method	Schur
-Schur,symmetricMatrix,ANY-method	Schur
+Schur,generalMatrix,logical-method	Schur
+Schur,generalMatrix,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
@@ -1323,6 +1561,7 @@ 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
@@ -1337,11 +1576,16 @@ skewpart-methods	symmpart
 solve,ANY,Matrix-method	Matrix-class
 solve,CHMfactor,ANY-method	CHMfactor-class
 solve,CHMfactor,ddenseMatrix-method	CHMfactor-class
+solve,CHMfactor,diagonalMatrix-method	CHMfactor-class
 solve,CHMfactor,dsparseMatrix-method	CHMfactor-class
 solve,CHMfactor,matrix-method	CHMfactor-class
+solve,CHMfactor,missing-method	CHMfactor-class
 solve,CHMfactor,numeric-method	CHMfactor-class
 solve,ddenseMatrix,ANY-method	ddenseMatrix-class
+solve,ddenseMatrix,Matrix-method	ddenseMatrix-class
+solve,ddenseMatrix,matrix-method	ddenseMatrix-class
 solve,ddenseMatrix,missing-method	ddenseMatrix-class
+solve,ddenseMatrix,numeric-method	ddenseMatrix-class
 solve,denseLU,missing-method	LU-class
 solve,dgCMatrix,ddenseMatrix-method	dgCMatrix-class
 solve,dgCMatrix,dsparseMatrix-method	dgCMatrix-class
@@ -1385,6 +1629,8 @@ solve,dtpMatrix,ddenseMatrix-method	dtpMatrix-class
 solve,dtpMatrix,matrix-method	dtpMatrix-class
 solve,dtpMatrix,missing-method	dtpMatrix-class
 solve,dtrMatrix,ddenseMatrix-method	dtrMatrix-class
+solve,dtrMatrix,dMatrix-method	dtrMatrix-class
+solve,dtrMatrix,Matrix-method	dtrMatrix-class
 solve,dtrMatrix,matrix-method	dtrMatrix-class
 solve,dtrMatrix,missing-method	dtrMatrix-class
 solve,Matrix,ANY-method	Matrix-class
@@ -1398,6 +1644,8 @@ solve,Matrix,sparseVector-method	sparseVector-class
 solve,MatrixFactorization,ANY-method	MatrixFactorization-class
 solve,MatrixFactorization,missing-method	MatrixFactorization-class
 solve,MatrixFactorization,numeric-method	MatrixFactorization-class
+solve,pMatrix,Matrix-method	pMatrix-class
+solve,pMatrix,matrix-method	pMatrix-class
 solve,pMatrix,missing-method	pMatrix-class
 solve,sparseQR,ANY-method	sparseQR-class
 solve,TsparseMatrix,ANY-method	TsparseMatrix-class
@@ -1408,20 +1656,25 @@ 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,ldiMatrix-method	diagonalMatrix-class
 Summary,lMatrix-method	dMatrix-class
 Summary,Matrix-method	Matrix-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
@@ -1473,12 +1726,14 @@ t,pMatrix-method	pMatrix-class
 t,RsparseMatrix-method	RsparseMatrix-class
 t,TsparseMatrix-method	TsparseMatrix-class
 tail,Matrix-method	Matrix-class
+tail,sparseVector-method	sparseVector-class
 tcrossprod	tcrossprod
 tcrossprod,ANY,Matrix-method	Matrix-class
 tcrossprod,ANY,TsparseMatrix-method	TsparseMatrix-class
 tcrossprod,CsparseMatrix,CsparseMatrix-method	CsparseMatrix-class
 tcrossprod,CsparseMatrix,diagonalMatrix-method	diagonalMatrix-class
 tcrossprod,CsparseMatrix,missing-method	CsparseMatrix-class
+tcrossprod,ddenseMatrix,dtrMatrix-method	dtrMatrix-class
 tcrossprod,ddenseMatrix,missing-method	ddenseMatrix-class
 tcrossprod,dgCMatrix,missing-method	tcrossprod
 tcrossprod,dgeMatrix,dgeMatrix-method	dgeMatrix-class
@@ -1492,6 +1747,7 @@ tcrossprod,diagonalMatrix,diagonalMatrix-method	diagonalMatrix-class
 tcrossprod,diagonalMatrix,matrix-method	diagonalMatrix-class
 tcrossprod,diagonalMatrix,missing-method	diagonalMatrix-class
 tcrossprod,diagonalMatrix,sparseMatrix-method	diagonalMatrix-class
+tcrossprod,dtrMatrix,dtrMatrix-method	dtrMatrix-class
 tcrossprod,lgCMatrix,missing-method	lsparseMatrix-classes
 tcrossprod,lgeMatrix,diagonalMatrix-method	diagonalMatrix-class
 tcrossprod,lgTMatrix,missing-method	lsparseMatrix-classes
@@ -1499,10 +1755,14 @@ tcrossprod,lsparseMatrix,missing-method	lsparseMatrix-classes
 tcrossprod,Matrix,ANY-method	Matrix-class
 tcrossprod,matrix,dgeMatrix-method	dgeMatrix-class
 tcrossprod,matrix,diagonalMatrix-method	diagonalMatrix-class
+tcrossprod,matrix,dtrMatrix-method	dtrMatrix-class
 tcrossprod,Matrix,Matrix-method	Matrix-class
 tcrossprod,Matrix,matrix-method	Matrix-class
 tcrossprod,matrix,Matrix-method	Matrix-class
+tcrossprod,Matrix,missing-method	Matrix-class
 tcrossprod,Matrix,numeric-method	Matrix-class
+tcrossprod,Matrix,pMatrix-method	pMatrix-class
+tcrossprod,matrix,pMatrix-method	pMatrix-class
 tcrossprod,Matrix,sparseVector-method	sparseVector-class
 tcrossprod,Matrix,TsparseMatrix-method	TsparseMatrix-class
 tcrossprod,ngCMatrix,missing-method	nsparseMatrix-classes
@@ -1511,11 +1771,13 @@ tcrossprod,nsparseMatrix,missing-method	nsparseMatrix-classes
 tcrossprod,numeric,dgeMatrix-method	dgeMatrix-class
 tcrossprod,numeric,Matrix-method	Matrix-class
 tcrossprod,pMatrix,missing-method	pMatrix-class
+tcrossprod,pMatrix,pMatrix-method	pMatrix-class
 tcrossprod,sparseMatrix,diagonalMatrix-method	diagonalMatrix-class
 tcrossprod,sparseVector,Matrix-method	sparseVector-class
 tcrossprod,TsparseMatrix,ANY-method	TsparseMatrix-class
 tcrossprod,TsparseMatrix,Matrix-method	TsparseMatrix-class
 tcrossprod,TsparseMatrix,missing-method	TsparseMatrix-class
+tcrossprod,TsparseMatrix,TsparseMatrix-method	TsparseMatrix-class
 tcrossprod-methods	tcrossprod
 triangularMatrix-class	triangularMatrix-class
 tril	band
@@ -1580,21 +1842,46 @@ TsparseMatrix-class	TsparseMatrix-class
 unname,Matrix,missing-method	Matrix-class
 unname,Matrix-method	Matrix-class
 unpack	unpack
-unpack,dspMatrix-method	dsyMatrix-class
-unpack,dtpMatrix-method	dtpMatrix-class
+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,TsparseMatrix-method	externalFormats
+writeMM,sparseMatrix-method	externalFormats
 xsparseVector-class	sparseVector-class
-xtabs	xtabs
 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
@@ -1605,14 +1892,19 @@ zsparseVector-class	sparseVector-class
 [,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
@@ -1621,13 +1913,18 @@ zsparseVector-class	sparseVector-class
 [<-,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,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
@@ -1643,12 +1940,16 @@ zsparseVector-class	sparseVector-class
 [<-,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,missing,missing,ANY-method	Subassign-methods
-[<-,pMatrix,index,ANY,ANY-method	pMatrix-class
-[<-,pMatrix,missing,index,ANY-method	pMatrix-class
+[<-,Matrix,ndenseMatrix,missing,replValue-method	Subassign-methods
+[<-,Matrix,nsparseMatrix,missing,replValue-method	Subassign-methods
+[<-,pMatrix,index,ANY,ANY-method	Subassign-methods
+[<-,pMatrix,missing,index,ANY-method	Subassign-methods
+[<-,pMatrix,missing,missing,ANY-method	Subassign-methods
 [<-,RsparseMatrix,index,index,replValue-method	Subassign-methods
 [<-,RsparseMatrix,index,index,sparseVector-method	Subassign-methods
 [<-,RsparseMatrix,index,missing,replValue-method	Subassign-methods
@@ -1659,14 +1960,18 @@ zsparseVector-class	sparseVector-class
 [<-,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,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
diff --git a/win32/deps/library/Matrix/help/Matrix.rdb b/win32/deps/library/Matrix/help/Matrix.rdb
new file mode 100644
index 0000000..3ddc172
Binary files /dev/null and b/win32/deps/library/Matrix/help/Matrix.rdb differ
diff --git a/win32/deps/library/Matrix/help/Matrix.rdx b/win32/deps/library/Matrix/help/Matrix.rdx
new file mode 100644
index 0000000..8267559
Binary files /dev/null and b/win32/deps/library/Matrix/help/Matrix.rdx differ
diff --git a/win32/deps/library/Matrix/help/aliases.rds b/win32/deps/library/Matrix/help/aliases.rds
new file mode 100644
index 0000000..03d1e59
Binary files /dev/null and b/win32/deps/library/Matrix/help/aliases.rds differ
diff --git a/win32/deps/library/Matrix/help/paths.rds b/win32/deps/library/Matrix/help/paths.rds
new file mode 100644
index 0000000..fda6656
Binary files /dev/null and b/win32/deps/library/Matrix/help/paths.rds differ
diff --git a/win32/deps/library/Matrix/html/00Index.html b/win32/deps/library/Matrix/html/00Index.html
new file mode 100644
index 0000000..bd0935f
--- /dev/null
+++ b/win32/deps/library/Matrix/html/00Index.html
@@ -0,0 +1,1411 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><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/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;Matrix&rsquo; version 1.0-9</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../doc/index.html">Overview of user guides and package vignettes</a>; browse <a href="../doc">directory</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p 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 width="25%"><a href="abIndex-class.html">abIndex-class</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="abIseq.html">abIseq</a></td>
+<td>Sequence Generation of "abIndex", Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="abIseq.html">abIseq1</a></td>
+<td>Sequence Generation of "abIndex", Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="all-methods.html">all-method</a></td>
+<td>"Matrix" Methods for Functions all() and any()</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">all-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">all-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="all-methods.html">all-methods</a></td>
+<td>"Matrix" Methods for Functions all() and any()</td></tr>
+<tr><td 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 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 width="25%"><a href="all-methods.html">any-method</a></td>
+<td>"Matrix" Methods for Functions all() and any()</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">any-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">any-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td 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 width="25%"><a href="Matrix-class.html">Arith-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">Arith-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">Arith-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">Arith-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">Arith-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">Arith-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">Arith-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="dpoMatrix-class.html">Arith-method</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dsCMatrix-class.html">Arith-method</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td width="25%"><a href="dsparseMatrix-class.html">Arith-method</a></td>
+<td>Virtual Class "dsparseMatrix" of Numeric Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="dtCMatrix-class.html">Arith-method</a></td>
+<td>Triangular, (compressed) sparse column matrices</td></tr>
+<tr><td width="25%"><a href="lgeMatrix-class.html">Arith-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">Arith-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="nMatrix-class.html">Arith-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td width="25%"><a href="ngeMatrix-class.html">Arith-method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">Arith-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">Arith-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">as.array-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">as.integer-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">as.logical-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="ldenseMatrix-class.html">as.logical-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ndenseMatrix-class.html">as.logical-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">as.logical-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">as.matrix-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">as.numeric-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">as.numeric-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">as.numeric-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">as.numeric-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">as.vector-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">as.vector-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td 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 width="25%"><a href="diagonalMatrix-class.html">as.vector-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="ldenseMatrix-class.html">as.vector-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lgeMatrix-class.html">as.vector-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ndenseMatrix-class.html">as.vector-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td 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 width="25%"><a href="sparseVector-class.html">as.vector-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td 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 width="25%"><a href="band.html">band</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td width="25%"><a href="band.html">band-method</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td width="25%"><a href="band.html">band-methods</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td width="25%"><a href="bandSparse.html">bandSparse</a></td>
+<td>Construct Sparse Banded Matrix from (Sup-/Super-) Diagonals</td></tr>
+<tr><td width="25%"><a href="bdiag.html">bdiag</a></td>
+<td>Construct a Block Diagonal Matrix</td></tr>
+<tr><td width="25%"><a href="BunchKaufman-methods.html">BunchKaufman</a></td>
+<td>Bunch-Kaufman Decomposition Methods</td></tr>
+<tr><td width="25%"><a href="Cholesky-class.html">BunchKaufman-class</a></td>
+<td>Cholesky and Bunch-Kaufman Decompositions</td></tr>
+<tr><td width="25%"><a href="BunchKaufman-methods.html">BunchKaufman-method</a></td>
+<td>Bunch-Kaufman Decomposition Methods</td></tr>
+<tr><td 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 width="25%"><a href="abIseq.html">c.abIndex</a></td>
+<td>Sequence Generation of "abIndex", Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="CAex.html">CAex</a></td>
+<td>Albers' example Matrix with "Difficult" Eigen Factorization</td></tr>
+<tr><td width="25%"><a href="cBind.html">cBind</a></td>
+<td>Versions of 'cbind' and 'rbind' recursively built on cbind2/rbind2</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">cbind2-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="denseMatrix-class.html">cbind2-method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">cbind2-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">cbind2-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="CHMfactor-class.html">CHMfactor-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="CHMfactor-class.html">CHMsimpl-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="CHMfactor-class.html">CHMsuper-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="chol.html">chol</a></td>
+<td>Choleski Decomposition - 'Matrix' S4 Generic</td></tr>
+<tr><td width="25%"><a href="chol.html">chol-method</a></td>
+<td>Choleski Decomposition - 'Matrix' S4 Generic</td></tr>
+<tr><td width="25%"><a href="chol.html">chol-methods</a></td>
+<td>Choleski Decomposition - 'Matrix' S4 Generic</td></tr>
+<tr><td width="25%"><a href="chol2inv-methods.html">chol2inv-method</a></td>
+<td>Inverse from Choleski or QR Decomposition - Matrix Methods</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">chol2inv-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="chol2inv-methods.html">chol2inv-methods</a></td>
+<td>Inverse from Choleski or QR Decomposition - Matrix Methods</td></tr>
+<tr><td width="25%"><a href="Cholesky.html">Cholesky</a></td>
+<td>Cholesky Decomposition of a Sparse Matrix</td></tr>
+<tr><td width="25%"><a href="Cholesky-class.html">Cholesky-class</a></td>
+<td>Cholesky and Bunch-Kaufman Decompositions</td></tr>
+<tr><td width="25%"><a href="Cholesky.html">Cholesky-method</a></td>
+<td>Cholesky Decomposition of a Sparse Matrix</td></tr>
+<tr><td width="25%"><a href="MatrixFactorization-class.html">CholeskyFactorization-class</a></td>
+<td>Class "MatrixFactorization" of Matrix Factorizations</td></tr>
+<tr><td width="25%"><a href="CHMfactor-class.html">coerce-method</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="Cholesky-class.html">coerce-method</a></td>
+<td>Cholesky and Bunch-Kaufman Decompositions</td></tr>
+<tr><td 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 width="25%"><a href="Matrix-class.html">coerce-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td 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 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 width="25%"><a href="TsparseMatrix-class.html">coerce-method</a></td>
+<td>Class "TsparseMatrix" of Sparse Matrices in Triplet Form</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">coerce-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">coerce-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="denseMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">coerce-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="dgTMatrix-class.html">coerce-method</a></td>
+<td>Sparse matrices in triplet form</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">coerce-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">coerce-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="dpoMatrix-class.html">coerce-method</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dsCMatrix-class.html">coerce-method</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td width="25%"><a href="dsyMatrix-class.html">coerce-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dtCMatrix-class.html">coerce-method</a></td>
+<td>Triangular, (compressed) sparse column matrices</td></tr>
+<tr><td width="25%"><a href="dtpMatrix-class.html">coerce-method</a></td>
+<td>Packed triangular dense matrices</td></tr>
+<tr><td width="25%"><a href="dtrMatrix-class.html">coerce-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td width="25%"><a href="ldenseMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ldiMatrix-class.html">coerce-method</a></td>
+<td>Class "ldiMatrix" of Diagonal Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lgeMatrix-class.html">coerce-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">coerce-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="lsyMatrix-class.html">coerce-method</a></td>
+<td>Symmetric Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ltrMatrix-class.html">coerce-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="nMatrix-class.html">coerce-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td width="25%"><a href="ndenseMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ngeMatrix-class.html">coerce-method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">coerce-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="nsyMatrix-class.html">coerce-method</a></td>
+<td>Symmetric Dense Nonzero-Pattern Matrices</td></tr>
+<tr><td width="25%"><a href="ntrMatrix-class.html">coerce-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="pMatrix-class.html">coerce-method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">coerce-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="symmetricMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class of Symmetric Matrices in package:Matrix</td></tr>
+<tr><td width="25%"><a href="triangularMatrix-class.html">coerce-method</a></td>
+<td>Virtual Class of Triangular Matrices in package:Matrix</td></tr>
+<tr><td width="25%"><a href="colSums.html">colMeans</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="colSums.html">colMeans-method</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">colMeans-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="colSums.html">colSums</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="colSums.html">colSums-method</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">colSums-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td 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 width="25%"><a href="dMatrix-class.html">Compare-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">Compare-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="lgeMatrix-class.html">Compare-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">Compare-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="nMatrix-class.html">Compare-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td width="25%"><a href="ngeMatrix-class.html">Compare-method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td width="25%"><a href="compMatrix-class.html">compMatrix-class</a></td>
+<td>Class "compMatrix" of Composite (Factorizable) Matrices</td></tr>
+<tr><td width="25%"><a href="condest.html">condest</a></td>
+<td>Compute Approximate CONDition number and 1-Norm of (Large) Matrices</td></tr>
+<tr><td width="25%"><a href="dpoMatrix-class.html">corMatrix-class</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">cov2cor-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">cov2cor-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="CsparseMatrix-class.html">crossprod-method</a></td>
+<td>Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">crossprod-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="TsparseMatrix-class.html">crossprod-method</a></td>
+<td>Class "TsparseMatrix" of Sparse Matrices in Triplet Form</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">crossprod-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">crossprod-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">crossprod-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="dgTMatrix-class.html">crossprod-method</a></td>
+<td>Sparse matrices in triplet form</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">crossprod-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">crossprod-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="dsparseMatrix-class.html">crossprod-method</a></td>
+<td>Virtual Class "dsparseMatrix" of Numeric Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="dtrMatrix-class.html">crossprod-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">crossprod-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">crossprod-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="pMatrix-class.html">crossprod-method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">crossprod-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td 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 width="25%"><a href="CHMfactor-class.html">dCHMsimpl-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="CHMfactor-class.html">dCHMsuper-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">ddenseMatrix-class</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="ddiMatrix-class.html">ddiMatrix-class</a></td>
+<td>Class "ddiMatrix" of Diagonal Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="LU-class.html">denseLU-class</a></td>
+<td>LU (dense) Matrix Decompositions</td></tr>
+<tr><td width="25%"><a href="denseMatrix-class.html">denseMatrix-class</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">det</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="CHMfactor-class.html">determinant-method</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">determinant-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">determinant-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">determinant-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">determinant-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="dpoMatrix-class.html">determinant-method</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dsCMatrix-class.html">determinant-method</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td width="25%"><a href="dtpMatrix-class.html">determinant-method</a></td>
+<td>Packed triangular dense matrices</td></tr>
+<tr><td width="25%"><a href="dtrMatrix-class.html">determinant-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td width="25%"><a href="pMatrix-class.html">determinant-method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">determinant-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">dgCMatrix-class</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">dgeMatrix-class</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="dgRMatrix-class.html">dgRMatrix-class</a></td>
+<td>Sparse Compressed, Row-oriented Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dgTMatrix-class.html">dgTMatrix-class</a></td>
+<td>Sparse matrices in triplet form</td></tr>
+<tr><td 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 width="25%"><a href="Matrix-class.html">diag-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">diag-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">diag-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="dgRMatrix-class.html">diag-method</a></td>
+<td>Sparse Compressed, Row-oriented Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">diag-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">diag-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="dsyMatrix-class.html">diag-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dtpMatrix-class.html">diag-method</a></td>
+<td>Packed triangular dense matrices</td></tr>
+<tr><td width="25%"><a href="dtrMatrix-class.html">diag-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td width="25%"><a href="ldenseMatrix-class.html">diag-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lgeMatrix-class.html">diag-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsyMatrix-class.html">diag-method</a></td>
+<td>Symmetric Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ltrMatrix-class.html">diag-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ndenseMatrix-class.html">diag-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">diag-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td 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 width="25%"><a href="dsyMatrix-class.html">diag&lt;--method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dtpMatrix-class.html">diag&lt;--method</a></td>
+<td>Packed triangular dense matrices</td></tr>
+<tr><td width="25%"><a href="dtrMatrix-class.html">diag&lt;--method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td width="25%"><a href="lgeMatrix-class.html">diag&lt;--method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsyMatrix-class.html">diag&lt;--method</a></td>
+<td>Symmetric Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ltrMatrix-class.html">diag&lt;--method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td 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 width="25%"><a href="nsyMatrix-class.html">diag&lt;--method</a></td>
+<td>Symmetric Dense Nonzero-Pattern Matrices</td></tr>
+<tr><td width="25%"><a href="ntrMatrix-class.html">diag&lt;--method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="diagU2N.html">diagN2U</a></td>
+<td>Transform Triangular Matrices from Unit Triangular to General and back</td></tr>
+<tr><td width="25%"><a href="Diagonal.html">Diagonal</a></td>
+<td>Create Diagonal Matrix Object</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">diagonalMatrix-class</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="diagU2N.html">diagU2N</a></td>
+<td>Transform Triangular Matrices from Unit Triangular to General and back</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">diff-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">dim-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="MatrixFactorization-class.html">dim-method</a></td>
+<td>Class "MatrixFactorization" of Matrix Factorizations</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">dim-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="dgRMatrix-class.html">dim-method</a></td>
+<td>Sparse Compressed, Row-oriented Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">dim-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">dim&lt;--method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="denseMatrix-class.html">dim&lt;--method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">dim&lt;--method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">dim&lt;--method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">dimnames-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">dimnames-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">dimnames&lt;--method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">dMatrix-class</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="dpoMatrix-class.html">dpoMatrix-class</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dpoMatrix-class.html">dppMatrix-class</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">drop-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">drop-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="drop0.html">drop0</a></td>
+<td>Drop "Explicit Zeroes" from a Sparse Matrix</td></tr>
+<tr><td width="25%"><a href="dsCMatrix-class.html">dsCMatrix-class</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td width="25%"><a href="dsparseMatrix-class.html">dsparseMatrix-class</a></td>
+<td>Virtual Class "dsparseMatrix" of Numeric Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">dsparseVector-class</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="dsyMatrix-class.html">dspMatrix-class</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dsRMatrix-class.html">dsRMatrix-class</a></td>
+<td>Symmetric Sparse Compressed Row Matrices</td></tr>
+<tr><td width="25%"><a href="dsCMatrix-class.html">dsTMatrix-class</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td width="25%"><a href="dsyMatrix-class.html">dsyMatrix-class</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dtCMatrix-class.html">dtCMatrix-class</a></td>
+<td>Triangular, (compressed) sparse column matrices</td></tr>
+<tr><td width="25%"><a href="dtpMatrix-class.html">dtpMatrix-class</a></td>
+<td>Packed triangular dense matrices</td></tr>
+<tr><td width="25%"><a href="dtRMatrix-class-def.html">dtRMatrix-class</a></td>
+<td>Triangular Sparse Compressed Row Matrices</td></tr>
+<tr><td width="25%"><a href="dtrMatrix-class.html">dtrMatrix-class</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td 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 width="25%"><a href="dgeMatrix-class.html">eigen-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="expand.html">expand</a></td>
+<td>Expand a Decomposition into Factors</td></tr>
+<tr><td width="25%"><a href="CHMfactor-class.html">expand-method</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="LU-class.html">expand-method</a></td>
+<td>LU (dense) Matrix Decompositions</td></tr>
+<tr><td width="25%"><a href="MatrixFactorization-class.html">expand-method</a></td>
+<td>Class "MatrixFactorization" of Matrix Factorizations</td></tr>
+<tr><td width="25%"><a href="sparseLU-class.html">expand-method</a></td>
+<td>Sparse LU decomposition of a square sparse matrix</td></tr>
+<tr><td width="25%"><a href="expm.html">expm</a></td>
+<td>Matrix Exponential</td></tr>
+<tr><td 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 width="25%"><a href="facmul.html">facmul</a></td>
+<td>Multiplication by Decomposition Factors</td></tr>
+<tr><td width="25%"><a href="facmul.html">facmul.default</a></td>
+<td>Multiplication by Decomposition Factors</td></tr>
+<tr><td width="25%"><a href="forceSymmetric.html">forceSymmetric</a></td>
+<td>Force a Matrix to 'symmetricMatrix' Without Symmetry Checks</td></tr>
+<tr><td width="25%"><a href="forceSymmetric.html">forceSymmetric-method</a></td>
+<td>Force a Matrix to 'symmetricMatrix' Without Symmetry Checks</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">format-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="formatSparseM.html">formatSparseM</a></td>
+<td>Formatting Sparse Numeric Matrices Utilities</td></tr>
+<tr><td 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 width="25%"><a href="dMatrix-class.html">gamma-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">gamma-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="generalMatrix-class.html">generalMatrix-class</a></td>
+<td>Class "generalMatrix" of General Matrices</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Matrix-class.html">head-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">head-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td 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 width="25%"><a href="image-methods.html">image-method</a></td>
+<td>Methods for image() in Package 'Matrix'</td></tr>
+<tr><td width="25%"><a href="image-methods.html">image-methods</a></td>
+<td>Methods for image() in Package 'Matrix'</td></tr>
+<tr><td width="25%"><a href="unused-classes.html">iMatrix-class</a></td>
+<td>Virtual Classes Not Yet Really Implemented and Used</td></tr>
+<tr><td width="25%"><a href="index-class.html">index-class</a></td>
+<td>Virtual Class "index" - Simple Class for Matrix Indices</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">is.finite-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td 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 width="25%"><a href="sparseVector-class.html">is.finite-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">is.infinite-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td 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 width="25%"><a href="sparseVector-class.html">is.infinite-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">is.na-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td 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 width="25%"><a href="nsparseMatrix-classes.html">is.na-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">is.na-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td 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 width="25%"><a href="CHMfactor-class.html">isLDL</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">isparseVector-class</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="isSymmetric-methods.html">isSymmetric-method</a></td>
+<td>Methods for Function isSymmetric in Package 'Matrix'</td></tr>
+<tr><td width="25%"><a href="isSymmetric-methods.html">isSymmetric-methods</a></td>
+<td>Methods for Function isSymmetric in Package 'Matrix'</td></tr>
+</table>
+
+<h2><a name="K">-- K --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="KNex.html">KNex</a></td>
+<td>Koenker-Ng Example Sparse Model Matrix and Response Vector</td></tr>
+<tr><td width="25%"><a href="kronecker-methods.html">kronecker-method</a></td>
+<td>Methods for Function 'kronecker()' in Package 'Matrix'</td></tr>
+<tr><td 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 width="25%"><a href="ldenseMatrix-class.html">ldenseMatrix-class</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ldiMatrix-class.html">ldiMatrix-class</a></td>
+<td>Class "ldiMatrix" of Diagonal Logical Matrices</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">length-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">length-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">length-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">lgamma-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">lgamma-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">lgCMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="lgeMatrix-class.html">lgeMatrix-class</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">lgRMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">lgTMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">lMatrix-class</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">log-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">log-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td 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 width="25%"><a href="Matrix-class.html">Logic-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">Logic-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">Logic-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="ldenseMatrix-class.html">Logic-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lgeMatrix-class.html">Logic-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">Logic-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="nMatrix-class.html">Logic-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td width="25%"><a href="ngeMatrix-class.html">Logic-method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">Logic-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">lsCMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">lsparseMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">lsparseVector-class</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="lsyMatrix-class.html">lspMatrix-class</a></td>
+<td>Symmetric Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">lsRMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">lsTMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="lsyMatrix-class.html">lsyMatrix-class</a></td>
+<td>Symmetric Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">ltCMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="ltrMatrix-class.html">ltpMatrix-class</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">ltRMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="ltrMatrix-class.html">ltrMatrix-class</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">ltTMatrix-class</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="lu.html">lu</a></td>
+<td>(Generalized) Triangular Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="LU-class.html">LU-class</a></td>
+<td>LU (dense) Matrix Decompositions</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">lu-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="dsparseMatrix-class.html">lu-method</a></td>
+<td>Virtual Class "dsparseMatrix" of Numeric Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="lu.html">lu-method</a></td>
+<td>(Generalized) Triangular Decomposition of a Matrix</td></tr>
+<tr><td 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 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 width="25%"><a href="ddenseMatrix-class.html">Math-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="denseMatrix-class.html">Math-method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">Math-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">Math-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">Math-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">Math2-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="Matrix.html">Matrix</a></td>
+<td>Construct a Classed Matrix</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">Matrix-class</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="MatrixFactorization-class.html">MatrixFactorization-class</a></td>
+<td>Class "MatrixFactorization" of Matrix Factorizations</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">mean-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">mean-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td 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 width="25%"><a href="CHMfactor-class.html">nCHMsimpl-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="CHMfactor-class.html">nCHMsuper-class</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="ndenseMatrix-class.html">ndenseMatrix-class</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="nearPD.html">nearPD</a></td>
+<td>Nearest Positive Definite Matrix</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">ngCMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="ngeMatrix-class.html">ngeMatrix-class</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">ngRMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">ngTMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="nMatrix-class.html">nMatrix-class</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td width="25%"><a href="nnzero.html">nnzero</a></td>
+<td>The Number of Non-Zero Values of a Matrix</td></tr>
+<tr><td width="25%"><a href="nnzero.html">nnzero-method</a></td>
+<td>The Number of Non-Zero Values of a Matrix</td></tr>
+<tr><td width="25%"><a href="norm.html">norm</a></td>
+<td>Matrix Norms</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">norm-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">norm-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">norm-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="dsyMatrix-class.html">norm-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dtpMatrix-class.html">norm-method</a></td>
+<td>Packed triangular dense matrices</td></tr>
+<tr><td width="25%"><a href="dtrMatrix-class.html">norm-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td width="25%"><a href="ldenseMatrix-class.html">norm-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ndenseMatrix-class.html">norm-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="norm.html">norm-method</a></td>
+<td>Matrix Norms</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">norm-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">nsCMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">nsparseMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">nsparseVector-class</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="nsyMatrix-class.html">nspMatrix-class</a></td>
+<td>Symmetric Dense Nonzero-Pattern Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">nsRMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">nsTMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="nsyMatrix-class.html">nsyMatrix-class</a></td>
+<td>Symmetric Dense Nonzero-Pattern Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">ntCMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="ntrMatrix-class.html">ntpMatrix-class</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">ntRMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="ntrMatrix-class.html">ntrMatrix-class</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">ntTMatrix-class</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td 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 width="25%"><a href="condest.html">onenormest</a></td>
+<td>Compute Approximate CONDition number and 1-Norm of (Large) Matrices</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">Ops-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">Ops-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">Ops-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">Ops-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="dpoMatrix-class.html">Ops-method</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="ldenseMatrix-class.html">Ops-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">Ops-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="nMatrix-class.html">Ops-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td width="25%"><a href="ndenseMatrix-class.html">Ops-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">Ops-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">Ops-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td 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 width="25%"><a href="unpack.html">pack</a></td>
+<td>Representation of Packed and Unpacked (Dense) Matrices</td></tr>
+<tr><td width="25%"><a href="unpack.html">pack-method</a></td>
+<td>Representation of Packed and Unpacked (Dense) Matrices</td></tr>
+<tr><td width="25%"><a href="Cholesky-class.html">pBunchKaufman-class</a></td>
+<td>Cholesky and Bunch-Kaufman Decompositions</td></tr>
+<tr><td width="25%"><a href="Cholesky-class.html">pCholesky-class</a></td>
+<td>Cholesky and Bunch-Kaufman Decompositions</td></tr>
+<tr><td width="25%"><a href="pMatrix-class.html">pMatrix-class</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">print-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">print-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="printSpMatrix.html">printSpMatrix</a></td>
+<td>Format and Print Sparse Matrices Flexibly</td></tr>
+<tr><td width="25%"><a href="printSpMatrix.html">printSpMatrix2</a></td>
+<td>Format and Print Sparse Matrices Flexibly</td></tr>
+<tr><td 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 width="25%"><a href="qr-methods.html">qr</a></td>
+<td>QR Decomposition - S4 Methods and Generic</td></tr>
+<tr><td width="25%"><a href="qr-methods.html">qr-method</a></td>
+<td>QR Decomposition - S4 Methods and Generic</td></tr>
+<tr><td width="25%"><a href="qr-methods.html">qr-methods</a></td>
+<td>QR Decomposition - S4 Methods and Generic</td></tr>
+<tr><td width="25%"><a href="sparseQR-class.html">qr.coef-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td width="25%"><a href="sparseQR-class.html">qr.fitted-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td width="25%"><a href="sparseQR-class.html">qr.qty-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td width="25%"><a href="sparseQR-class.html">qr.qy-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td width="25%"><a href="sparseQR-class.html">qr.R-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td width="25%"><a href="sparseQR-class.html">qr.resid-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="rankMatrix.html">rankMatrix</a></td>
+<td>Rank of a Matrix</td></tr>
+<tr><td width="25%"><a href="cBind.html">rBind</a></td>
+<td>Versions of 'cbind' and 'rbind' recursively built on cbind2/rbind2</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">rbind2-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="denseMatrix-class.html">rbind2-method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">rbind2-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">rbind2-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="rcond.html">rcond</a></td>
+<td>Estimate the Reciprocal Condition Number</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">rcond-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="denseMatrix-class.html">rcond-method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">rcond-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="dpoMatrix-class.html">rcond-method</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dsyMatrix-class.html">rcond-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dtpMatrix-class.html">rcond-method</a></td>
+<td>Packed triangular dense matrices</td></tr>
+<tr><td width="25%"><a href="dtrMatrix-class.html">rcond-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td width="25%"><a href="rcond.html">rcond-method</a></td>
+<td>Estimate the Reciprocal Condition Number</td></tr>
+<tr><td width="25%"><a href="externalFormats.html">readHB</a></td>
+<td>Read and write external matrix formats</td></tr>
+<tr><td width="25%"><a href="externalFormats.html">readMM</a></td>
+<td>Read and write external matrix formats</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">rep-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="rep2abI.html">rep2abI</a></td>
+<td>Replicate Vectors into 'abIndex' Result</td></tr>
+<tr><td width="25%"><a href="replValue-class.html">replValue-class</a></td>
+<td>Virtual Class "replValue" - Simple Class for subassignment Values</td></tr>
+<tr><td width="25%"><a href="rleDiff-class.html">rleDiff-class</a></td>
+<td>Class "rleDiff" of rle(diff(.)) Stored Vectors</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">round-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="colSums.html">rowMeans</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="colSums.html">rowMeans-method</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">rowMeans-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="colSums.html">rowSums</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="colSums.html">rowSums-method</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">rowSums-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td 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 width="25%"><a href="Schur.html">Schur</a></td>
+<td>Schur Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="Schur-class.html">Schur-class</a></td>
+<td>Class "Schur" of Schur Matrix Factorizations</td></tr>
+<tr><td width="25%"><a href="Schur.html">Schur-method</a></td>
+<td>Schur Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">seqMat-class</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="Cholesky-class.html">show-method</a></td>
+<td>Cholesky and Bunch-Kaufman Decompositions</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">show-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="MatrixFactorization-class.html">show-method</a></td>
+<td>Class "MatrixFactorization" of Matrix Factorizations</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">show-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">show-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">show-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="denseMatrix-class.html">show-method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">show-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="dsyMatrix-class.html">show-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dtrMatrix-class.html">show-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td width="25%"><a href="nMatrix-class.html">show-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td width="25%"><a href="rleDiff-class.html">show-method</a></td>
+<td>Class "rleDiff" of rle(diff(.)) Stored Vectors</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">show-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">show-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">signif-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="symmpart.html">skewpart</a></td>
+<td>Symmetric Part and Skew(symmetric) Part of a Matrix</td></tr>
+<tr><td width="25%"><a href="symmpart.html">skewpart-method</a></td>
+<td>Symmetric Part and Skew(symmetric) Part of a Matrix</td></tr>
+<tr><td width="25%"><a href="symmpart.html">skewpart-methods</a></td>
+<td>Symmetric Part and Skew(symmetric) Part of a Matrix</td></tr>
+<tr><td width="25%"><a href="CHMfactor-class.html">solve-method</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="LU-class.html">solve-method</a></td>
+<td>LU (dense) Matrix Decompositions</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">solve-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="MatrixFactorization-class.html">solve-method</a></td>
+<td>Class "MatrixFactorization" of Matrix Factorizations</td></tr>
+<tr><td width="25%"><a href="TsparseMatrix-class.html">solve-method</a></td>
+<td>Class "TsparseMatrix" of Sparse Matrices in Triplet Form</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">solve-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">solve-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">solve-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">solve-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">solve-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="dpoMatrix-class.html">solve-method</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dsCMatrix-class.html">solve-method</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td width="25%"><a href="dsyMatrix-class.html">solve-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dtCMatrix-class.html">solve-method</a></td>
+<td>Triangular, (compressed) sparse column matrices</td></tr>
+<tr><td width="25%"><a href="dtpMatrix-class.html">solve-method</a></td>
+<td>Packed triangular dense matrices</td></tr>
+<tr><td width="25%"><a href="dtrMatrix-class.html">solve-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td width="25%"><a href="pMatrix-class.html">solve-method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td width="25%"><a href="sparseQR-class.html">solve-method</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">solve-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="sparse.model.matrix.html">sparse.model.matrix</a></td>
+<td>Construct Sparse Design / Model Matrices</td></tr>
+<tr><td width="25%"><a href="sparseLU-class.html">sparseLU-class</a></td>
+<td>Sparse LU decomposition of a square sparse matrix</td></tr>
+<tr><td 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 width="25%"><a href="sparseMatrix.html">sparseMatrix</a></td>
+<td>General Sparse Matrix Construction from Nonzero Entries</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">sparseMatrix-class</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="sparseQR-class.html">sparseQR-class</a></td>
+<td>Sparse QR decomposition of a sparse matrix</td></tr>
+<tr><td width="25%"><a href="sparseVector.html">sparseVector</a></td>
+<td>Sparse Vector Construction from Nonzero Entries</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">sparseVector-class</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="spMatrix.html">spMatrix</a></td>
+<td>Sparse Matrix Constructor From Triplet</td></tr>
+<tr><td width="25%"><a href="Subassign-methods.html">Subassign-methods</a></td>
+<td>Methods for "[&lt;-" - Assigning to Subsets for 'Matrix'</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">sum-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">Summary-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">Summary-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">Summary-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">Summary-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">Summary-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="dsparseMatrix-class.html">Summary-method</a></td>
+<td>Virtual Class "dsparseMatrix" of Numeric Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="nMatrix-class.html">Summary-method</a></td>
+<td>Class "nMatrix" of Non-zero Pattern Matrices</td></tr>
+<tr><td width="25%"><a href="pMatrix-class.html">Summary-method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">Summary-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">summary-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">summary-method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="symmetricMatrix-class.html">symmetricMatrix-class</a></td>
+<td>Virtual Class of Symmetric Matrices in package:Matrix</td></tr>
+<tr><td width="25%"><a href="symmpart.html">symmpart</a></td>
+<td>Symmetric Part and Skew(symmetric) Part of a Matrix</td></tr>
+<tr><td width="25%"><a href="symmpart.html">symmpart-method</a></td>
+<td>Symmetric Part and Skew(symmetric) Part of a Matrix</td></tr>
+<tr><td 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 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 width="25%"><a href="Matrix-class.html">t-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td 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 width="25%"><a href="TsparseMatrix-class.html">t-method</a></td>
+<td>Class "TsparseMatrix" of Sparse Matrices in Triplet Form</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">t-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">t-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="dgRMatrix-class.html">t-method</a></td>
+<td>Sparse Compressed, Row-oriented Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">t-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">t-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="dpoMatrix-class.html">t-method</a></td>
+<td>Positive Semi-definite Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dsCMatrix-class.html">t-method</a></td>
+<td>Numeric Symmetric Sparse (column compressed) Matrices</td></tr>
+<tr><td width="25%"><a href="dsyMatrix-class.html">t-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dtCMatrix-class.html">t-method</a></td>
+<td>Triangular, (compressed) sparse column matrices</td></tr>
+<tr><td width="25%"><a href="dtpMatrix-class.html">t-method</a></td>
+<td>Packed triangular dense matrices</td></tr>
+<tr><td width="25%"><a href="dtrMatrix-class.html">t-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td width="25%"><a href="lgeMatrix-class.html">t-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">t-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="lsyMatrix-class.html">t-method</a></td>
+<td>Symmetric Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ltrMatrix-class.html">t-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ngeMatrix-class.html">t-method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">t-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="nsyMatrix-class.html">t-method</a></td>
+<td>Symmetric Dense Nonzero-Pattern Matrices</td></tr>
+<tr><td width="25%"><a href="ntrMatrix-class.html">t-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="pMatrix-class.html">t-method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">tail-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">tail-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="tcrossprod.html">tcrossprod</a></td>
+<td>Cross-product of transpose</td></tr>
+<tr><td width="25%"><a href="CsparseMatrix-class.html">tcrossprod-method</a></td>
+<td>Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">tcrossprod-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="TsparseMatrix-class.html">tcrossprod-method</a></td>
+<td>Class "TsparseMatrix" of Sparse Matrices in Triplet Form</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">tcrossprod-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">tcrossprod-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">tcrossprod-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="dtrMatrix-class.html">tcrossprod-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">tcrossprod-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">tcrossprod-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="pMatrix-class.html">tcrossprod-method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">tcrossprod-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="tcrossprod.html">tcrossprod-method</a></td>
+<td>Cross-product of transpose</td></tr>
+<tr><td width="25%"><a href="tcrossprod.html">tcrossprod-methods</a></td>
+<td>Cross-product of transpose</td></tr>
+<tr><td width="25%"><a href="triangularMatrix-class.html">triangularMatrix-class</a></td>
+<td>Virtual Class of Triangular Matrices in package:Matrix</td></tr>
+<tr><td width="25%"><a href="band.html">tril</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td width="25%"><a href="band.html">tril-method</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td width="25%"><a href="band.html">tril-methods</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td width="25%"><a href="band.html">triu</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td width="25%"><a href="band.html">triu-method</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td width="25%"><a href="band.html">triu-methods</a></td>
+<td>Extract bands of a matrix</td></tr>
+<tr><td 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 width="25%"><a href="Matrix-class.html">unname-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="unpack.html">unpack</a></td>
+<td>Representation of Packed and Unpacked (Dense) Matrices</td></tr>
+<tr><td width="25%"><a href="unpack.html">unpack-method</a></td>
+<td>Representation of Packed and Unpacked (Dense) Matrices</td></tr>
+<tr><td width="25%"><a href="CHMfactor-class.html">update-method</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="updown.html">updown</a></td>
+<td>Up- and Down-Dating a Cholesky Decomposition</td></tr>
+<tr><td width="25%"><a href="updown.html">updown-method</a></td>
+<td>Up- and Down-Dating a Cholesky Decomposition</td></tr>
+<tr><td width="25%"><a href="updown.html">updown-methods</a></td>
+<td>Up- and Down-Dating a Cholesky Decomposition</td></tr>
+<tr><td 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 width="25%"><a href="diagonalMatrix-class.html">which-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="ldenseMatrix-class.html">which-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">which-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="ndenseMatrix-class.html">which-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">which-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="externalFormats.html">writeMM</a></td>
+<td>Read and write external matrix formats</td></tr>
+<tr><td 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 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 width="25%"><a href="dMatrix-class.html">zapsmall-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="unused-classes.html">zMatrix-class</a></td>
+<td>Virtual Classes Not Yet Really Implemented and Used</td></tr>
+<tr><td 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 width="25%"><a href="Matrix-class.html">!-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="ldenseMatrix-class.html">!-method</a></td>
+<td>Virtual Class "ldenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ldiMatrix-class.html">!-method</a></td>
+<td>Class "ldiMatrix" of Diagonal Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lgeMatrix-class.html">!-method</a></td>
+<td>Class "lgeMatrix" of General Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">!-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="ltrMatrix-class.html">!-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ndenseMatrix-class.html">!-method</a></td>
+<td>Virtual Class "ndenseMatrix" of Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="ngeMatrix-class.html">!-method</a></td>
+<td>Class "ngeMatrix" of General Dense Nonzero-pattern Matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">!-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="ntrMatrix-class.html">!-method</a></td>
+<td>Triangular Dense Logical Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">!-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">%%-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="CsparseMatrix-class.html">%*%-method</a></td>
+<td>Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">%*%-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="TsparseMatrix-class.html">%*%-method</a></td>
+<td>Class "TsparseMatrix" of Sparse Matrices in Triplet Form</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">%*%-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="ddenseMatrix-class.html">%*%-method</a></td>
+<td>Virtual Class "ddenseMatrix" of Numeric Dense Matrices</td></tr>
+<tr><td width="25%"><a href="dgCMatrix-class.html">%*%-method</a></td>
+<td>Compressed, sparse, column-oriented numeric matrices</td></tr>
+<tr><td width="25%"><a href="dgeMatrix-class.html">%*%-method</a></td>
+<td>Class "dgeMatrix" of Dense Numeric (S4 Class) Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">%*%-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="dsparseMatrix-class.html">%*%-method</a></td>
+<td>Virtual Class "dsparseMatrix" of Numeric Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="dsyMatrix-class.html">%*%-method</a></td>
+<td>Symmetric Dense Numeric Matrices</td></tr>
+<tr><td width="25%"><a href="dtpMatrix-class.html">%*%-method</a></td>
+<td>Packed triangular dense matrices</td></tr>
+<tr><td width="25%"><a href="dtrMatrix-class.html">%*%-method</a></td>
+<td>Triangular, dense, numeric matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">%*%-method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">%*%-method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="pMatrix-class.html">%*%-method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">%*%-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">%/%-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">&amp;-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">*-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">+-method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="dgTMatrix-class.html">+-method</a></td>
+<td>Sparse matrices in triplet form</td></tr>
+<tr><td width="25%"><a href="Matrix-class.html">--method</a></td>
+<td>Virtual Class "Matrix" Class of Matrices</td></tr>
+<tr><td width="25%"><a href="denseMatrix-class.html">--method</a></td>
+<td>Virtual Class "denseMatrix" of All Dense Matrices</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">--method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="lsparseMatrix-classes.html">--method</a></td>
+<td>Sparse logical matrices</td></tr>
+<tr><td width="25%"><a href="nsparseMatrix-classes.html">--method</a></td>
+<td>Sparse "pattern" Matrices</td></tr>
+<tr><td width="25%"><a href="pMatrix-class.html">--method</a></td>
+<td>Permutation matrices</td></tr>
+<tr><td width="25%"><a href="sparseMatrix-class.html">--method</a></td>
+<td>Virtual Class "sparseMatrix" - Mother of Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">--method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="bdiag.html">.bdiag</a></td>
+<td>Construct a Block Diagonal Matrix</td></tr>
+<tr><td width="25%"><a href="diagU2N.html">.diagU2N</a></td>
+<td>Transform Triangular Matrices from Unit Triangular to General and back</td></tr>
+<tr><td width="25%"><a href="formatSparseM.html">.formatSparseSimple</a></td>
+<td>Formatting Sparse Numeric Matrices Utilities</td></tr>
+<tr><td width="25%"><a href="Diagonal.html">.sparseDiagonal</a></td>
+<td>Create Diagonal Matrix Object</td></tr>
+<tr><td width="25%"><a href="Diagonal.html">.symDiagonal</a></td>
+<td>Create Diagonal Matrix Object</td></tr>
+<tr><td width="25%"><a href="CHMfactor-class.html">.updateCHMfactor</a></td>
+<td>CHOLMOD-based Cholesky Factorizations</td></tr>
+<tr><td width="25%"><a href="CsparseMatrix-class.html">.validateCsparse</a></td>
+<td>Class "CsparseMatrix" of Sparse Matrices in Column-compressed Form</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">/-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+<tr><td width="25%"><a href="Xtrct-methods.html">[-method</a></td>
+<td>Methods for "[": Extraction or Subsetting in Package 'Matrix'</td></tr>
+<tr><td width="25%"><a href="abIndex-class.html">[-method</a></td>
+<td>Class "abIndex" of Abstract Index Vectors</td></tr>
+<tr><td width="25%"><a href="dMatrix-class.html">[-method</a></td>
+<td>(Virtual) Class "dMatrix" of "double" Matrices</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">[-method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="Xtrct-methods.html">[-methods</a></td>
+<td>Methods for "[": Extraction or Subsetting in Package 'Matrix'</td></tr>
+<tr><td width="25%"><a href="Subassign-methods.html">[&lt;--method</a></td>
+<td>Methods for "[&lt;-" - Assigning to Subsets for 'Matrix'</td></tr>
+<tr><td width="25%"><a href="sparseVector-class.html">[&lt;--method</a></td>
+<td>Sparse Vector Classes</td></tr>
+<tr><td width="25%"><a href="Subassign-methods.html">[&lt;--methods</a></td>
+<td>Methods for "[&lt;-" - Assigning to Subsets for 'Matrix'</td></tr>
+<tr><td width="25%"><a href="diagonalMatrix-class.html">^-method</a></td>
+<td>Class "diagonalMatrix" of Diagonal Matrices</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/Matrix/html/R.css b/win32/deps/library/Matrix/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/Matrix/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/Matrix/include/Matrix.h b/win32/deps/library/Matrix/include/Matrix.h
index 590a94c..2ba4a9c 100644
--- a/win32/deps/library/Matrix/include/Matrix.h
+++ b/win32/deps/library/Matrix/include/Matrix.h
@@ -2,10 +2,13 @@
 #define MATRIX_H
 #include <Rdefines.h>
 #include <Rconfig.h>
-#include "cholmod.h"
+#include "cholmod.h" //--->  M_cholmod_*() declarations
 
 #ifdef	__cplusplus
 extern "C" {
+// and  bool is defined
+#else
+# define bool Rboolean
 #endif
 
 #ifdef HAVE_VISIBILITY_ATTRIBUTE
@@ -14,13 +17,40 @@ extern "C" {
 # define attribute_hidden
 #endif
 
+// Copied from ../../src/Mutils.h ----------------------------------------
+#define MATRIX_VALID_dense			\
+        "dmatrix", "dgeMatrix",			\
+	"lmatrix", "lgeMatrix",			\
+	"nmatrix", "ngeMatrix",			\
+	"zmatrix", "zgeMatrix"
+
+#define MATRIX_VALID_Csparse			\
+ "dgCMatrix", "dsCMatrix", "dtCMatrix",		\
+ "lgCMatrix", "lsCMatrix", "ltCMatrix",		\
+ "ngCMatrix", "nsCMatrix", "ntCMatrix",		\
+ "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_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(CHM_FR f);
-CHM_FR M_chm_factor_update(CHM_FR f, CHM_SP A, double mult);
+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 )
@@ -34,14 +64,25 @@ CHM_FR M_chm_factor_update(CHM_FR f, CHM_SP A, double mult);
 #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(CHM_FR f, int dofree);
-SEXP M_chm_sparse_to_SEXP(CHM_SP a, int dofree, int uploT, int Rkind,
-			  char *diag, SEXP dn);
-SEXP M_chm_triplet_to_SEXP(CHM_TR a, int dofree, int uploT, int Rkind,
+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_dense(SEXP x);
+bool Matrix_isclass_CHMfactor(SEXP x);
+
+
+/* TODO:  Utilities for C level of model_matrix(*, sparse) */
+
 #ifdef	__cplusplus
 }
 #endif
diff --git a/win32/deps/library/Matrix/include/Matrix_stubs.c b/win32/deps/library/Matrix/include/Matrix_stubs.c
index 679ec78..210d115 100644
--- a/win32/deps/library/Matrix/include/Matrix_stubs.c
+++ b/win32/deps/library/Matrix/include/Matrix_stubs.c
@@ -1,10 +1,15 @@
 #include <Rconfig.h>
 #include <Rinternals.h>
 #include <R_ext/Rdynload.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
@@ -43,12 +48,12 @@ M_as_cholmod_sparse(CHM_SP ans, SEXP x, Rboolean check_Udiag, Rboolean sort_in_p
     return fun(ans, x, check_Udiag, sort_in_place);
 }
 
-CHM_SP attribute_hidden
-M_as_cholmod_triplet(CHM_SP ans, SEXP x, Rboolean check_Udiag)
+CHM_TR attribute_hidden
+M_as_cholmod_triplet(CHM_TR ans, SEXP x, Rboolean check_Udiag)
 {
-    static CHM_SP(*fun)(CHM_SP,SEXP,Rboolean)= NULL;
+    static CHM_TR(*fun)(CHM_TR,SEXP,Rboolean)= NULL;
     if(fun == NULL)
-	fun = (CHM_SP(*)(CHM_SP,SEXP,Rboolean))
+	fun = (CHM_TR(*)(CHM_TR,SEXP,Rboolean))
 	    R_GetCCallable("Matrix", "as_cholmod_triplet");
     return fun(ans, x, check_Udiag);
 }
@@ -64,83 +69,94 @@ M_Csparse_diagU2N(SEXP x)
 }
 
 SEXP attribute_hidden
-M_chm_factor_to_SEXP(CHM_FR f, int dofree)
+M_chm_factor_to_SEXP(const_CHM_FR f, int dofree)
 {
-    static SEXP(*fun)(CHM_FR,int) = NULL;
+    static SEXP(*fun)(const_CHM_FR,int) = NULL;
     if(fun == NULL)
-	fun = (SEXP(*)(CHM_FR,int))
+	fun = (SEXP(*)(const_CHM_FR,int))
 	    R_GetCCallable("Matrix", "chm_factor_to_SEXP");
     return fun(f, dofree);
 }
 
 double attribute_hidden
-M_chm_factor_ldetL2(CHM_FR f)
+M_chm_factor_ldetL2(const_CHM_FR f)
 {
-    static double(*fun)(CHM_FR) = NULL;
+    static double(*fun)(const_CHM_FR) = NULL;
     if(fun == NULL)
-	fun = (double(*)(CHM_FR))
+	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, CHM_SP A, double mult)
+M_chm_factor_update(CHM_FR f, const_CHM_SP A, double mult)
 {
-    static CHM_FR(*fun)(CHM_FR,CHM_SP,double) = NULL;
+    static CHM_FR(*fun)(CHM_FR,const_CHM_SP,double) = NULL;
     if(fun == NULL)
-	fun = (CHM_FR(*)(CHM_FR,CHM_SP,double))
+	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(CHM_SP a, int dofree,
-		     int uploT, int Rkind, char *diag, SEXP dn)
+M_chm_sparse_to_SEXP(const_CHM_SP a, int dofree,
+		     int uploT, int Rkind, const char *diag, SEXP dn)
 {
-    static SEXP(*fun)(CHM_SP,int,int,int,char*,SEXP) = NULL;
+    static SEXP(*fun)(const_CHM_SP,int,int,int,const char*,SEXP) = NULL;
     if(fun == NULL)
-	fun = (SEXP(*)(CHM_SP,int,int,int,char*,SEXP))
+	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(CHM_TR a, int dofree,
+M_chm_triplet_to_SEXP(const CHM_TR a, int dofree,
 		      int uploT, int Rkind, const char *diag, SEXP dn)
 {
-    static SEXP(*fun)(CHM_TR,int,int,int,const char*,SEXP) = NULL;
+    static SEXP(*fun)(const CHM_TR,int,int,int,const char*,SEXP) = NULL;
     if(fun == NULL)
-	fun = (SEXP(*)(CHM_TR,int,int,int,const char*,SEXP))
+	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(CHM_SP A, int *fset, size_t fsize,
+M_cholmod_aat(const_CHM_SP A, int *fset, size_t fsize,
 	      int mode, CHM_CM Common)
 {
-    static CHM_SP(*fun)(CHM_SP,int*,size_t,
+    static CHM_SP(*fun)(const_CHM_SP,int*,size_t,
 			int,CHM_CM) = NULL;
     if(fun == NULL)
-	fun = (CHM_SP(*)(CHM_SP,int*,size_t,
+	fun = (CHM_SP(*)(const_CHM_SP,int*,size_t,
 			 int,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_aat");
+	    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(CHM_SP A, CHM_SP B,
+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)(CHM_SP,CHM_SP,
+    static CHM_SP(*fun)(const_CHM_SP,const_CHM_SP,
 			double*,double*,int,int,
 			CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_SP(*)(CHM_SP,CHM_SP,
+	fun = (CHM_SP(*)(const_CHM_SP,const_CHM_SP,
 			 double*,double*,int,int,
 			 CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_add");
+	    R_GetCCallable("Matrix", "cholmod_add");
     return fun(A, B, alpha, beta, values, sorted, Common);
 }
 
@@ -153,7 +169,7 @@ M_cholmod_allocate_dense(size_t nrow, size_t ncol, size_t d,
     if (fun == NULL)
 	fun = (CHM_DN(*)(size_t,size_t,size_t,
 			 int,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_allocate_dense");
+	    R_GetCCallable("Matrix", "cholmod_allocate_dense");
     return fun(nrow, ncol, d, xtype, Common);
 }
 
@@ -167,7 +183,7 @@ M_cholmod_allocate_sparse(size_t nrow, size_t ncol, size_t nzmax,
     if (fun == NULL)
 	fun = (CHM_SP(*)
 	       (size_t,size_t,size_t,int,int,int,int,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_allocate_sparse");
+	    R_GetCCallable("Matrix", "cholmod_allocate_sparse");
     return fun(nrow,ncol,nzmax,sorted,packed,stype,xtype,Common);
 }
 
@@ -175,101 +191,95 @@ 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 cholmod_triplet*(*fun)(size_t,size_t,size_t,
-				  int,int,CHM_CM) = NULL;
+    static CHM_TR(*fun)(size_t,size_t,size_t, int,int,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (cholmod_triplet*(*)
-	       (size_t,size_t,size_t,int,int,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_allocate_triplet");
+	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(cholmod_triplet *T, int nzmax,
+M_cholmod_triplet_to_sparse(const cholmod_triplet* T, int nzmax,
 			    CHM_CM Common)
 {
-    static CHM_SP(*fun)
-	(cholmod_triplet*,int,CHM_CM) = NULL;
+    static CHM_SP(*fun)(const cholmod_triplet*,int,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_SP(*)(cholmod_triplet*,int,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_triplet_to_sparse");
+	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(CHM_SP A, CHM_CM Common)
+M_cholmod_sparse_to_triplet(const_CHM_SP A, CHM_CM Common)
 {
-    static cholmod_triplet*(*fun)
-	(CHM_SP,CHM_CM) = NULL;
+    static CHM_TR(*fun)(const_CHM_SP,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (cholmod_triplet*(*)(CHM_SP,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_sparse_to_triplet");
+	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(CHM_SP A, CHM_CM Common)
+M_cholmod_sparse_to_dense(const_CHM_SP A, CHM_CM Common)
 {
-    static CHM_DN(*fun)
-	(CHM_SP,CHM_CM) = NULL;
+    static CHM_DN(*fun)(const_CHM_SP,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_DN(*)(CHM_SP,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_sparse_to_dense");
+	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(CHM_SP A, CHM_CM Common)
+M_cholmod_analyze(const_CHM_SP A, CHM_CM Common)
 {
-    static CHM_FR(*fun)(CHM_SP,CHM_CM) = NULL;
+    static CHM_FR(*fun)(const_CHM_SP,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_FR(*)(CHM_SP,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_analyze");
+	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(CHM_SP A, int *Perm, int *fset,
+M_cholmod_analyze_p(const_CHM_SP A, int *Perm, int *fset,
 		    size_t fsize, CHM_CM Common)
 {
-    static CHM_FR(*fun)(CHM_SP,int*,int*,size_t,
+    static CHM_FR(*fun)(const_CHM_SP,int*,int*,size_t,
 			CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_FR(*)(CHM_SP,int*,int*,
+	fun = (CHM_FR(*)(const_CHM_SP,int*,int*,
 			 size_t,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_analyze_p");
+	    R_GetCCallable("Matrix", "cholmod_analyze_p");
     return fun(A, Perm, fset, fsize, Common);
 }
 
 CHM_SP attribute_hidden
-M_cholmod_copy(CHM_SP A, int stype,
+M_cholmod_copy(const_CHM_SP A, int stype,
 	       int mode, CHM_CM Common)
 {
-    static CHM_SP(*fun)
-	(CHM_SP,int,int,CHM_CM) = NULL;
+    static CHM_SP(*fun)(const_CHM_SP,int,int,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_SP(*)(CHM_SP,int,int,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_copy");
+	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(CHM_DN  A, CHM_CM Common)
+M_cholmod_copy_dense(const_CHM_DN  A, CHM_CM Common)
 {
-    static CHM_DN(*fun)(CHM_DN,CHM_CM) = NULL;
+    static CHM_DN(*fun)(const_CHM_DN,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_DN(*)(CHM_DN,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_copy_dense");
+	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(CHM_FR L, CHM_CM Common)
+M_cholmod_copy_factor(const_CHM_FR L, CHM_CM Common)
 {
-    static CHM_FR(*fun)(CHM_FR,CHM_CM) = NULL;
+    static CHM_FR(*fun)(const_CHM_FR,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_FR(*)(CHM_FR,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_copy_factor");
+	fun = (CHM_FR(*)(const_CHM_FR,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_copy_factor");
     return fun(L, Common);
 }
 
@@ -280,75 +290,74 @@ M_cholmod_change_factor(int to_xtype, int to_ll, int to_super, int to_packed,
     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_l_change_factor");
+	    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(CHM_SP A, CHM_CM Common)
+M_cholmod_copy_sparse(const_CHM_SP A, CHM_CM Common)
 {
-    static CHM_SP(*fun)(CHM_SP,CHM_CM) = NULL;
+    static CHM_SP(*fun)(const_CHM_SP,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_SP(*)(CHM_SP,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_copy_sparse");
+	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(CHM_FR L, CHM_CM Common)
+M_cholmod_factor_to_sparse(const_CHM_FR L, CHM_CM Common)
 {
-    static CHM_SP(*fun)(CHM_FR,CHM_CM) = NULL;
+    static CHM_SP(*fun)(const_CHM_FR,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_SP(*)(CHM_FR,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_factor_to_sparse");
+	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(CHM_SP A, int *rset, int rsize, int *cset,
+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)(CHM_SP,int*,int,int*,int,
+    static CHM_SP(*fun)(const_CHM_SP,int*,int,int*,int,
 			int,int,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_SP(*)(CHM_SP,int*,int,int*,
+	fun = (CHM_SP(*)(const_CHM_SP,int*,int,int*,
 			 int,int,int,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_submatrix");
+	    R_GetCCallable("Matrix", "cholmod_submatrix");
     return fun(A, rset, rsize, cset, csize, values, sorted, Common);
 }
 
 CHM_SP attribute_hidden
-M_cholmod_dense_to_sparse(CHM_DN  X, int values, CHM_CM Common)
+M_cholmod_dense_to_sparse(const_CHM_DN  X, int values, CHM_CM Common)
 {
-    static CHM_SP(*fun)(CHM_DN,int,CHM_CM) = NULL;
+    static CHM_SP(*fun)(const_CHM_DN,int,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_SP(*)(CHM_DN,int,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_dense_to_sparse");
+	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(CHM_SP A, CHM_FR L,
-		    CHM_CM Common)
+M_cholmod_factorize(const_CHM_SP A, CHM_FR L, CHM_CM Common)
 {
-    static int(*fun)(CHM_SP,CHM_FR,CHM_CM) = NULL;
+    static int(*fun)(const_CHM_SP,CHM_FR,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (int(*)(CHM_SP,CHM_FR,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_factorize");
+	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(CHM_SP A, double *beta, int *fset,
+M_cholmod_factorize_p(const_CHM_SP A, double *beta, int *fset,
 		      size_t fsize, CHM_FR L,
 		      CHM_CM Common)
 {
-    static int(*fun)(CHM_SP,double*,int*,size_t,
+    static int(*fun)(const_CHM_SP,double*,int*,size_t,
 		     CHM_FR,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (int(*)(CHM_SP,double*,int*,size_t,
+	fun = (int(*)(const_CHM_SP,double*,int*,size_t,
 		      CHM_FR,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_factorize_p");
+	    R_GetCCallable("Matrix", "cholmod_factorize_p");
     return fun(A, beta, fset, fsize, L, Common);
 }
 
@@ -359,7 +368,7 @@ M_cholmod_finish(CHM_CM Common)
     static int(*fun)(CHM_CM) = NULL;
     if (fun == NULL)
 	fun = (int(*)(CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_finish");
+	    R_GetCCallable("Matrix", "cholmod_finish");
     return fun(Common);
 }
 
@@ -369,7 +378,7 @@ 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_l_sort");
+	    R_GetCCallable("Matrix", "cholmod_sort");
     return fun(A, Common);
 }
 
@@ -379,7 +388,7 @@ 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_l_free_dense");
+	    R_GetCCallable("Matrix", "cholmod_free_dense");
     return fun(A, Common);
 }
 
@@ -389,7 +398,7 @@ 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_l_free_factor");
+	    R_GetCCallable("Matrix", "cholmod_free_factor");
     return fun(L, Common);
 }
 
@@ -399,7 +408,7 @@ 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_l_free_sparse");
+	    R_GetCCallable("Matrix", "cholmod_free_sparse");
     return fun(A, Common);
 }
 
@@ -409,59 +418,61 @@ 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_l_free_triplet");
+	    R_GetCCallable("Matrix", "cholmod_free_triplet");
     return fun(T, Common);
 }
 
 long attribute_hidden
-M_cholmod_nnz(CHM_SP A, CHM_CM Common)
+M_cholmod_nnz(const_CHM_SP A, CHM_CM Common)
 {
-    static long(*fun)(CHM_SP,CHM_CM) = NULL;
+    static long(*fun)(const_CHM_SP,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (long(*)(CHM_SP,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_nnz");
+	fun = (long(*)(const_CHM_SP,CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_nnz");
     return fun(A, Common);
 }
 
 int attribute_hidden
-M_cholmod_sdmult(CHM_SP A, int transpose,
-		 double alpha [2], double beta [2],
-		 CHM_DN  X, CHM_DN  Y,
+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)(CHM_SP,int,double*,double*,
-		     CHM_DN,CHM_DN,CHM_CM) = NULL;
+    static int(*fun)(const_CHM_SP,int,const double*,
+		     const double*,const_CHM_DN,
+		     CHM_DN,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (int(*)(CHM_SP,int,double*,double*,
-		      CHM_DN,CHM_DN,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_sdmult");
+	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(CHM_SP A, CHM_SP B,
+M_cholmod_ssmult(const_CHM_SP A, const_CHM_SP B,
 		 int stype, int values, int sorted,
 		 CHM_CM Common)
 {
-    static CHM_SP(*fun)(CHM_SP,CHM_SP,
+    static CHM_SP(*fun)(const_CHM_SP,const_CHM_SP,
 			int,int,int,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_SP(*)(CHM_SP,CHM_SP,
+	fun = (CHM_SP(*)(const_CHM_SP,const_CHM_SP,
 			 int,int,int,CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_ssmult");
+	    R_GetCCallable("Matrix", "cholmod_ssmult");
     return fun(A, B, stype, values, sorted, Common);
 }
 
 CHM_DN attribute_hidden
-M_cholmod_solve(int sys, CHM_FR L,
-		CHM_DN  B, CHM_CM Common)
+M_cholmod_solve(int sys, const_CHM_FR L,
+		const_CHM_DN B, CHM_CM Common)
 {
-    static CHM_DN(*fun)(int,CHM_FR,CHM_DN,
+    static CHM_DN(*fun)(int,const_CHM_FR,const_CHM_DN,
 			CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_DN(*)(int,CHM_FR,CHM_DN,
+	fun = (CHM_DN(*)(int,const_CHM_FR,const_CHM_DN,
 			 CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_solve");
+	    R_GetCCallable("Matrix", "cholmod_solve");
     return fun(sys, L, B, Common);
 }
 
@@ -472,29 +483,67 @@ M_cholmod_speye(size_t nrow, size_t ncol,
     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_l_speye");
+	    R_GetCCallable("Matrix", "cholmod_speye");
     return fun(nrow, ncol, xtype, Common);
 }
 
 CHM_SP attribute_hidden
-M_cholmod_spsolve(int sys, CHM_FR L,
-		  CHM_SP B, CHM_CM Common)
+M_cholmod_spsolve(int sys, const_CHM_FR L,
+		  const_CHM_SP B, CHM_CM Common)
 {
-    static CHM_SP(*fun)(int,CHM_FR,
-			CHM_SP, CHM_CM) = NULL;
+    static CHM_SP(*fun)(int,const_CHM_FR,
+			const_CHM_SP, CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_SP(*)(int,CHM_FR,
-			 CHM_SP, CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_spsolve");
+	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)
 {
-    error("Cholmod error `%s' at file:%s, line %d", message, file, line);
+/* 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, ...)
@@ -506,6 +555,7 @@ R_cholmod_printf(const char* fmt, ...)
     va_end(ap);
     return 0;
 }
+#endif
 
 int attribute_hidden
 M_R_cholmod_start(CHM_CM Common)
@@ -514,34 +564,33 @@ M_R_cholmod_start(CHM_CM Common)
     static int(*fun)(CHM_CM) = NULL;
     if (fun == NULL)
 	fun = (int(*)(CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_start");
+	    R_GetCCallable("Matrix", "cholmod_start");
     val = fun(Common);
-    Common->print_function = R_cholmod_printf; /* Rprintf gives warning */
+/*-- 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(CHM_SP A, int values, CHM_CM Common)
+M_cholmod_transpose(const_CHM_SP A, int values, CHM_CM Common)
 {
-    static CHM_SP(*fun)(CHM_SP,int,
-			CHM_CM) = NULL;
+    static CHM_SP(*fun)(const_CHM_SP,int,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_SP(*)(CHM_SP,int,
-			 CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_transpose");
+	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(CHM_SP A, CHM_SP B,
-		  int values, CHM_CM Common)
+M_cholmod_vertcat(const_CHM_SP A, const_CHM_SP B, int values, CHM_CM Common)
 {
-    static CHM_SP(*fun)(CHM_SP, CHM_SP,
-			int, CHM_CM) = NULL;
+    static CHM_SP(*fun)(const_CHM_SP,const_CHM_SP,int,CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (CHM_SP(*)(CHM_SP,CHM_SP, int, CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_vertcat");
+	fun = (CHM_SP(*)(const_CHM_SP,const_CHM_SP, int, CHM_CM))
+	    R_GetCCallable("Matrix", "cholmod_vertcat");
     return fun(A, B, values, Common);
 }
 
@@ -566,16 +615,53 @@ M_numeric_as_chm_dense(CHM_DN ans, double *v, int nr, int nc)
 }
 
 int attribute_hidden
-M_cholmod_scale(CHM_DN S, int scale, CHM_SP A,
+M_cholmod_scale(const_CHM_DN S, int scale, CHM_SP A,
 		CHM_CM Common)
 {
-    static int(*fun)(CHM_DN,int,CHM_SP, CHM_CM) = NULL;
+    static int(*fun)(const_CHM_DN,int,CHM_SP, CHM_CM) = NULL;
     if (fun == NULL)
-	fun = (int(*)(CHM_DN,int,CHM_SP, CHM_CM))
-	    R_GetCCallable("Matrix", "cholmod_l_scale");
+	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() -- deprecate it later__FIXME__
+int M_Matrix_check_class_etc(SEXP x, const char **valid)
+{
+#if R_VERSION < R_Version(2, 15, 0) // || R_SVN_REVISION < 57849
+    static int(*fun)(SEXP, const char**) = NULL;
+    if (fun == NULL)
+	fun = (int(*)(SEXP, const char**))
+	    R_GetCCallable("Matrix", "Matrix_check_class_etc");
+    return fun(x, valid);
+#else
+    return R_check_class_etc(x, valid);
+#endif
+}
+
+const char *Matrix_valid_Csparse[] = { MATRIX_VALID_Csparse, ""};
+const char *Matrix_valid_dense[]   = { MATRIX_VALID_dense, ""};
+const char *Matrix_valid_triplet[] = { MATRIX_VALID_Tsparse, ""};
+const char *Matrix_valid_CHMfactor[]={ MATRIX_VALID_CHMfactor, ""};
+
+bool Matrix_isclass_Csparse(SEXP x) {
+    return M_Matrix_check_class_etc(x, Matrix_valid_Csparse) >= 0;
+}
+
+bool Matrix_isclass_triplet(SEXP x) {
+    return M_Matrix_check_class_etc(x, Matrix_valid_triplet) >= 0;
+}
+
+bool Matrix_isclass_dense(SEXP x) {
+    return M_Matrix_check_class_etc(x, Matrix_valid_dense) >= 0;
+}
+
+bool Matrix_isclass_CHMfactor(SEXP x) {
+    return M_Matrix_check_class_etc(x, Matrix_valid_CHMfactor) >= 0;
+}
+
 #ifdef	__cplusplus
 }
 #endif
+
diff --git a/win32/deps/library/Matrix/include/cholmod.h b/win32/deps/library/Matrix/include/cholmod.h
index b8ee3e1..f592889 100644
--- a/win32/deps/library/Matrix/include/cholmod.h
+++ b/win32/deps/library/Matrix/include/cholmod.h
@@ -8,48 +8,92 @@
 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_id "%ld"
-#define UFSPARSE_DATE "Aug 31, 2006"
-#define UFSPARSE_VER_CODE(main,sub) ((main) * 1000 + (sub))
-#define UFSPARSE_MAIN_VERSION 2
-#define UFSPARSE_SUB_VERSION 1
-#define UFSPARSE_SUBSUB_VERSION 0
-#define UFSPARSE_VERSION \
-    UFSPARSE_VER_CODE(UFSPARSE_MAIN_VERSION,UFSPARSE_SUB_VERSION)
+#define UF_long_idd "ld"
+
+#endif
+#define UF_long_id "%" UF_long_idd
+#endif
+
+#define CHOLMOD_DATE "Jan 25, 2011"
+// 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 long */
-#define CHOLMOD_LONG 2		/* all integer arrays are long */
+#define CHOLMOD_INTLONG 1	/* most are int, some are UF_long */
+#define CHOLMOD_LONG 2		/* all integer arrays are UF_long */
+
+/* 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) */
 
-#define CHOLMOD_MAXMETHODS 9	/* maximum number of different methods that
-				 * cholmod_analyze can try. Must be >= 9. */
+/* 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_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 */
+#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
+#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 */
@@ -195,7 +239,8 @@ typedef struct cholmod_common_struct
 			 * 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) ;
+    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
@@ -562,12 +607,33 @@ typedef struct cholmod_common_struct
      * 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 and v1.2 are binary compatible.
+     * v1.1 to the current version are binary compatible.
      */
 
-    double  other1 [16] ;
-    UF_long other2 [16] ;
-    int     other3 [14] ;   /* reduced from size 16 in v1.1. */
+    /* ---------------------------------------------------------------------- */
+    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
@@ -580,11 +646,23 @@ typedef struct cholmod_common_struct
     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 */
@@ -635,6 +713,10 @@ typedef struct cholmod_sparse_struct
 
 } cholmod_sparse ;
 
+// in ../../src/CHOLMOD/Include/cholmod_core.h  skip forward to - line 1495 :
+/* 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
 {
     /* ---------------------------------------------------------------------- */
@@ -756,6 +838,11 @@ typedef struct cholmod_factor_struct
 
 } cholmod_factor ;
 
+// in ../../src/CHOLMOD/Include/cholmod_core.h  skip forward to - line 1773 :
+/* 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 */
@@ -769,6 +856,9 @@ typedef struct cholmod_dense_struct
 
 } cholmod_dense ;
 
+// in ../../src/CHOLMOD/Include/cholmod_core.h  skip forward to - line 1952 :
+/* A sparse matrix stored in triplet form. */
+
 typedef struct cholmod_triplet_struct
 {
     size_t nrow ;	/* the matrix is nrow-by-ncol */
@@ -782,40 +872,50 @@ typedef struct cholmod_triplet_struct
     void *z ;		/* size nzmax, if present */
 
     int stype ;		/* symmetry type */
+    //                  [................................]
     int itype ;		/* CHOLMOD_LONG: i and j are UF_long.  Otherwise int. */
     int xtype ;		/* pattern, real, complex, or zomplex */
     int dtype ;		/* x and z are double or float */
 
 } cholmod_triplet ;
 
-typedef struct cholmod_common_struct  *CHM_CM ;
-typedef struct cholmod_dense_struct   *CHM_DN ;
-typedef struct cholmod_factor_struct  *CHM_FR ;
-typedef struct cholmod_sparse_struct  *CHM_SP ;
-typedef struct cholmod_triplet_struct *CHM_TR ;
+// -------- 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;
+
 
-int M_R_cholmod_start(CHM_CM Common);
+// --------- 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 Common);
+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 Common);
-int M_cholmod_free_factor(CHM_FR *L, CHM_CM Common);
-int M_cholmod_free_dense(CHM_DN *A, CHM_CM Common);
-int M_cholmod_free_sparse(CHM_SP *A, CHM_CM Common);
-int M_cholmod_free_triplet(CHM_TR *T, CHM_CM Common);
-
-long M_cholmod_nnz(CHM_SP A, CHM_CM Common);
-CHM_SP M_cholmod_speye(size_t nrow, size_t ncol, int xtype, CHM_CM Common);
-CHM_SP M_cholmod_transpose(CHM_SP A, int values, CHM_CM Common);
-int M_cholmod_sort(CHM_SP A, CHM_CM Common);
-CHM_SP M_cholmod_vertcat(CHM_SP A, CHM_SP B, int values, CHM_CM Common);
-CHM_SP M_cholmod_copy(CHM_SP A, int stype, int mode, CHM_CM Common);
-CHM_SP M_cholmod_add(CHM_SP A, CHM_SP B, double alpha [2], double beta [2],
-		     int values, int sorted, CHM_CM Common);
-
+				 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 */
@@ -826,48 +926,51 @@ CHM_SP M_cholmod_add(CHM_SP A, CHM_SP B, double alpha [2], double beta [2],
 #define CHOLMOD_P    7		/* permute x=Px */
 #define CHOLMOD_Pt   8		/* permute x=P'x */
 
-CHM_DN M_cholmod_solve(int sys, CHM_FR L, CHM_DN B, CHM_CM Common);
-CHM_SP M_cholmod_spsolve(int sys, CHM_FR L, CHM_SP B, CHM_CM Common);
-int M_cholmod_sdmult(CHM_SP A, int transpose, double alpha [2],
-		     double beta [2], CHM_DN X, CHM_DN Y, CHM_CM Common);
-CHM_SP M_cholmod_ssmult(CHM_SP A, CHM_SP B, int stype, int values,
-			int sorted, CHM_CM Common);
-int M_cholmod_factorize(CHM_SP A, CHM_FR L, CHM_CM Common);
-int M_cholmod_factorize_p(CHM_SP A, double *beta, int *fset,
-			  size_t fsize, CHM_FR L, CHM_CM Common);
-CHM_SP M_cholmod_copy_sparse(CHM_SP A, CHM_CM Common);
-CHM_DN M_cholmod_copy_dense(CHM_DN A, CHM_CM Common);
-CHM_SP M_cholmod_aat(CHM_SP A, int *fset, size_t fsize, int mode,
-		     CHM_CM Common);
-CHM_SP M_cholmod_add(CHM_SP A, CHM_SP B, double alpha[2], double beta[2],
-		     int values, int sorted, CHM_CM Common); 
+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 Common);
-CHM_FR M_cholmod_analyze(CHM_SP A, CHM_CM Common);
-CHM_FR M_cholmod_analyze_p(CHM_SP A, int *Perm, int *fset,
-				    size_t fsize, CHM_CM Common);
+				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 Common);
-CHM_FR M_cholmod_copy_factor(CHM_FR L, CHM_CM Common);
-CHM_SP M_cholmod_factor_to_sparse(CHM_FR L, CHM_CM Common);
-CHM_SP M_cholmod_dense_to_sparse(CHM_DN X, int values, CHM_CM Common);
-CHM_SP M_cholmod_triplet_to_sparse(CHM_TR T, int nzmax, CHM_CM Common);
-CHM_SP M_cholmod_submatrix(CHM_SP A, int *rset, int rsize, int *cset,
+			    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 Common);
-CHM_TR M_cholmod_sparse_to_triplet(CHM_SP A, CHM_CM Common);
-CHM_DN M_cholmod_sparse_to_dense(CHM_SP A, CHM_CM Common);
+			   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 Common);
+				   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(CHM_DN S, int scale, CHM_SP A, CHM_CM Common);
+int M_cholmod_scale(const_CHM_DN, int scale, CHM_SP, CHM_CM);
 
 #ifdef	__cplusplus
 }
diff --git a/win32/deps/library/Matrix/libs/i386/Matrix.dll b/win32/deps/library/Matrix/libs/i386/Matrix.dll
new file mode 100644
index 0000000..d782235
Binary files /dev/null and b/win32/deps/library/Matrix/libs/i386/Matrix.dll differ
diff --git a/win32/deps/library/Matrix/po/de/LC_MESSAGES/Matrix.mo b/win32/deps/library/Matrix/po/de/LC_MESSAGES/Matrix.mo
new file mode 100644
index 0000000..02ce8ad
Binary files /dev/null and b/win32/deps/library/Matrix/po/de/LC_MESSAGES/Matrix.mo differ
diff --git a/win32/deps/library/Matrix/po/de/LC_MESSAGES/R-Matrix.mo b/win32/deps/library/Matrix/po/de/LC_MESSAGES/R-Matrix.mo
new file mode 100644
index 0000000..0553fc7
Binary files /dev/null and b/win32/deps/library/Matrix/po/de/LC_MESSAGES/R-Matrix.mo differ
diff --git a/win32/deps/library/Matrix/po/en quot/LC_MESSAGES/Matrix.mo b/win32/deps/library/Matrix/po/en quot/LC_MESSAGES/Matrix.mo
new file mode 100644
index 0000000..b1b54f6
Binary files /dev/null and b/win32/deps/library/Matrix/po/en quot/LC_MESSAGES/Matrix.mo differ
diff --git a/win32/deps/library/Matrix/po/en quot/LC_MESSAGES/R-Matrix.mo b/win32/deps/library/Matrix/po/en quot/LC_MESSAGES/R-Matrix.mo
new file mode 100644
index 0000000..e1bed5d
Binary files /dev/null and b/win32/deps/library/Matrix/po/en quot/LC_MESSAGES/R-Matrix.mo differ
diff --git a/win32/deps/library/Matrix/po/pl/LC_MESSAGES/Matrix.mo b/win32/deps/library/Matrix/po/pl/LC_MESSAGES/Matrix.mo
new file mode 100644
index 0000000..d980e80
Binary files /dev/null and b/win32/deps/library/Matrix/po/pl/LC_MESSAGES/Matrix.mo differ
diff --git a/win32/deps/library/Matrix/po/pl/LC_MESSAGES/R-Matrix.mo b/win32/deps/library/Matrix/po/pl/LC_MESSAGES/R-Matrix.mo
new file mode 100644
index 0000000..2e6bff0
Binary files /dev/null and b/win32/deps/library/Matrix/po/pl/LC_MESSAGES/R-Matrix.mo differ
diff --git a/win32/deps/library/Matrix/test-tools-1.R b/win32/deps/library/Matrix/test-tools-1.R
new file mode 100644
index 0000000..661053c
--- /dev/null
+++ b/win32/deps/library/Matrix/test-tools-1.R
@@ -0,0 +1,200 @@
+#### Tools for Package Testing  --- in Matrix, sourced by ./test-tools.R
+#### -------------------------
+## to be used as, e.g.,
+## source(system.file("test-tools-1.R", package="Matrix"), keep.source=FALSE)
+
+### ------- Part I --  unrelated to "Matrix" classes ---------------
+
+if(!exists("paste0", .BaseNamespaceEnv)) # have in R >= 2.15.0
+    paste0 <- function(...) paste(..., sep = '')
+
+identical3 <- function(x,y,z)	  identical(x,y) && identical (y,z)
+identical4 <- function(a,b,c,d)   identical(a,b) && identical3(b,c,d)
+identical5 <- function(a,b,c,d,e) identical(a,b) && identical4(b,c,d,e)
+
+## Make sure errors are signaled
+assertError <- function(expr) {
+    d.expr <- deparse(substitute(expr))
+    t.res <- tryCatch(expr, error = function(e) e)
+    if(!inherits(t.res, "error"))
+	stop(d.expr, "\n\t did not give an error", call. = FALSE)
+    invisible(t.res)
+}
+assertWarningAtLeast <- function(expr) {
+    d.expr <- deparse(substitute(expr))
+    t.res <- tryCatch(expr, error = function(e)e, warning = function(w)w)
+    if(!inherits(t.res, "error") && !inherits(t.res, "warning"))
+	stop(d.expr, "\n\t did not give an error or warning", call. = FALSE)
+    invisible(t.res)
+}
+assertWarning <- function(expr) {
+    d.expr <- deparse(substitute(expr))
+    t.res <- tryCatch(expr, warning = function(w)w)
+    if(!inherits(t.res, "warning"))
+	stop(d.expr, "\n\t did not give a warning", call. = FALSE)
+    invisible(t.res)
+}
+
+##' [ from R's  demo(error.catching) ]
+##' We want to catch *and* save both errors and warnings, and in the case of
+##' a warning, also keep the computed result.
+##'
+##' @title tryCatch both warnings and errors
+##' @param expr
+##' @return a list with 'value' and 'warning', where
+##'   'value' may be an error caught.
+##' @author Martin Maechler
+tryCatch.W.E <- function(expr)
+{
+    W <- NULL
+    w.handler <- function(w){ # warning handler
+	W <<- w
+	invokeRestart("muffleWarning")
+    }
+    list(value = withCallingHandlers(tryCatch(expr, error = function(e) e),
+				     warning = w.handler),
+	 warning = W)
+}
+
+
+isValid <- function(x, class) validObject(x, test=TRUE) && is(x, class)
+
+is.all.equal3 <- function(x,y,z, tol = .Machine$double.eps^0.5)
+    isTRUE(all.equal(x,y, tol=tol)) && isTRUE(all.equal(y,z, tol=tol))
+
+is.all.equal4 <- function(x,y,z,u, tol = .Machine$double.eps^0.5)
+    is.all.equal3(x,y,z, tol=tol) && isTRUE(all.equal(z,u, tol=tol))
+
+## A version of all.equal() for the slots
+all.slot.equal <- function(x,y, ...) {
+    slts <- slotNames(x)
+    for(sl in slts) {
+        aeq <- all.equal(slot(x,sl), slot(y,sl), ...)
+        if(!identical(TRUE, aeq))
+            return(paste("slot '",sl,"': ", aeq, sep=''))
+    }
+    TRUE
+}
+
+## all.equal() for list-coercible objects -- apart from *some* components
+all.equal.X <- function(x,y, except, ...)
+{
+    .trunc <- function(x) {
+	ll <- as.list(x)
+	ll[ - match(except, names(ll), nomatch = 0L)]
+    }
+    all.equal(.trunc(x), .trunc(y), ...)
+}
+## e.g. in lme4:
+##  all.equal.X(env(m1), env(m2), except = c("call", "frame"))
+
+## The relative error typically returned by all.equal:
+relErr <- function(target, current) { ## make this work for 'Matrix'
+    ## ==> no mean() ..
+    n <- length(current)
+    if(length(target) < n)
+        target <- rep(target, length.out = n)
+    sum(abs(target - current)) / sum(abs(target))
+}
+
+##' Compute the signed relative error between target and current vector -- vectorized
+##' @title Relative Error (:= 0 when absolute error == 0)
+##' @param target
+##' @param current {maybe scalar; need  length(current) a multiple of length(target)}
+##' @return *vector* of the same length as target and current
+##' @author Martin Maechler
+relErrV <- function(target, current) {
+    n <- length(target <- as.vector(target))
+    ## assert( <length current> is multiple of <length target>) :
+    if(length(current) %% n)
+	stop("length(current) must be a multiple of length(target)")
+    RE <- current
+    RE[] <- 0
+    fr <- current/target
+    neq <- is.na(current) | (current != target)
+    RE[neq] <- 1 - fr[neq]
+    RE
+}
+
+## is.R22 <- (paste(R.version$major, R.version$minor, sep=".") >= "2.2")
+
+pkgRversion <- function(pkgname)
+    sub("^R ([0-9.]+).*", "\\1", packageDescription(pkgname)[["Built"]])
+
+showSys.time <- function(expr) {
+    ## prepend 'Time' for R CMD Rdiff
+    st <- system.time(expr)
+    writeLines(paste("Time", capture.output(print(st))))
+    invisible(st)
+}
+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)
+    }
+})
+
+##' @title turn an S4 object (with slots) into a list with corresponding components
+##' @param obj an R object with a formal class (aka "S4")
+##' @return a list with named components where \code{obj} had slots
+##' @author Martin Maechler
+S4_2list <- function(obj) {
+   sn <- slotNames(obj)
+   structure(lapply(sn, slot, object = obj), .Names = sn)
+}
+
+
+### ------- Part II  -- related to matrices, but *not* "Matrix" -----------
+
+add.simpleDimnames <- function(m) {
+    stopifnot(length(d <- dim(m)) == 2)
+    dimnames(m) <- list(if(d[1]) paste0("r", seq_len(d[1])),
+                        if(d[2]) paste0("c", seq_len(d[2])))
+    m
+}
+
+as.mat <- function(m) {
+    ## as(., "matrix")	but with no extraneous empty dimnames
+    m <- as(m, "matrix")
+    if(identical(dimnames(m), list(NULL,NULL)))
+	dimnames(m) <- NULL
+    m
+}
+
+assert.EQ.mat <- function(M, m, tol = if(show) 0 else 1e-15, show=FALSE) {
+    ## Purpose: check equality of  'Matrix' M with  'matrix' m
+    ## ----------------------------------------------------------------------
+    ## Arguments: M: is(., "Matrix") typically {but just needs working as(., "matrix")}
+    ##            m: is(., "matrix")
+    ##            show: if TRUE, return (and hence typically print) all.equal(...)
+    validObject(M)
+    MM <- as.mat(M)                     # as(M, "matrix")
+    if(is.logical(MM) && is.numeric(m))
+	storage.mode(MM) <- "integer"
+    attr(MM, "dimnames") <- attr(m, "dimnames") <- NULL
+    if(show) all.equal(MM, m, tol = tol)
+    else if(!isTRUE(r <- all.equal(MM, m, tol = tol)))
+	stop("all.equal() |->  ", r)
+}
+## a short cut
+assert.EQ.Mat <- function(M, M2, tol = if(show) 0 else 1e-15, show=FALSE)
+    assert.EQ.mat(M, as.mat(M2), tol=tol, show=show)
+
+
+chk.matrix <- function(M) {
+    ## check object; including coercion to "matrix" :
+    cl <- class(M)
+    cat("class ", dQuote(cl), " [",nrow(M)," x ",ncol(M),"]; slots (",
+	paste(slotNames(M), collapse=","), ")\n", sep='')
+    stopifnot(validObject(M),
+	      dim(M) == c(nrow(M), ncol(M)),
+	      identical(dim(m <- as(M, "matrix")), dim(M))
+	      )
+}
+
+isOrthogonal <- function(x, tol = 1e-15) {
+    all.equal(diag(as(zapsmall(crossprod(x)), "diagonalMatrix")),
+              rep(1, ncol(x)), tol = tol)
+}
diff --git a/win32/deps/library/Matrix/test-tools-Matrix.R b/win32/deps/library/Matrix/test-tools-Matrix.R
new file mode 100644
index 0000000..9bd5cd3
--- /dev/null
+++ b/win32/deps/library/Matrix/test-tools-Matrix.R
@@ -0,0 +1,633 @@
+#### Tools for Package Testing --- in Matrix, sourced by ./test-tools.R
+#### -------------------------
+
+### ------- Part III --  "Matrix" (classes) specific ----------------------
+
+lsM <- function(...) {
+    for(n in ls(..., envir=parent.frame()))
+        if(is((. <- get(n)),"Matrix"))
+            cat(sprintf("%5s: '%s' [%d x %d]\n",n,class(.), nrow(.),ncol(.)))
+}
+
+asD <- function(m) { ## as "Dense"
+    if(canCoerce(m, "denseMatrix")) as(m, "denseMatrix")
+    else if(canCoerce(m, (cl <- paste(.M.kind(m), "denseMatrix", sep=''))))
+        as(m, cl)
+    else if(canCoerce(m, "dgeMatrix")) as(m, "dgeMatrix")
+    else stop("cannot coerce to a typical dense Matrix")
+}
+
+## "normal" sparse Matrix: Csparse, no diag="U"
+asCsp <- function(x) Matrix:::diagU2N(as(x, "CsparseMatrix"))
+
+isNull.dimnames <- function(dn) {
+    is.null(dn) || {
+	dn <- unname(dn)
+	ch0 <- character(0)
+	identical(dn, list(NULL,NULL)) ||
+	identical(dn, list(ch0, NULL)) ||
+	identical(dn, list(NULL, ch0)) ||
+	identical(dn, list(ch0, ch0))
+    }
+}
+
+Qidentical.DN <- function(dx, dy) {
+    ## quasi-identical dimnames
+    stopifnot(is.list(dx) || is.null(dx),
+	      is.list(dy) || is.null(dy))
+    ## "empty"
+    (isNull.dimnames(dx) && isNull.dimnames(dy)) || identical(dx, dy)
+}
+
+Qidentical <- function(x,y, strictClass = TRUE) {
+    ## quasi-identical - for 'Matrix' matrices
+    if(class(x) != class(y)) {
+        if(strictClass || !is(x, class(y)))
+           return(FALSE)
+        ## else try further
+    }
+    slts <- slotNames(x)
+    if("Dimnames" %in% slts) { ## always (or we have no 'Matrix')
+	slts <- slts[slts != "Dimnames"]
+	if(!(Qidentical.DN(x Dimnames, y Dimnames)))
+	    return(FALSE)
+    }
+    if("factors" %in% slts) { ## allow one empty and one non-empty 'factors'
+        slts <- slts[slts != "factors"]
+        ## if both are not empty, they must be the same:
+        if(length(xf <- x factors) && length(yf <- y factors))
+            if(!identical(xf, yf)) return(FALSE)
+    }
+    for(sl in slts)
+        if(!identical(slot(x,sl), slot(y,sl)))
+            return(FALSE)
+    TRUE
+}
+
+Q.C.identical <- function(x,y, sparse = is(x,"sparseMatrix"),
+                          checkClass = TRUE, strictClass = TRUE) {
+    if(checkClass && class(x) != class(y)) {
+        if(strictClass || !is(x, class(y)))
+	   return(FALSE) ## else try further
+    }
+    if(sparse)
+	Qidentical(as(x,"CsparseMatrix"), as(y,"CsparseMatrix"),
+		   strictClass=strictClass)
+    else Qidentical(x,y, strictClass=strictClass)
+}
+
+##' <description>
+##'
+##' <details>
+##' @title  Quasi-equal for  'Matrix' matrices
+##' @param x  Matrix
+##' @param y  Matrix
+##' @param superclasses   x and y must coincide in (not) extending these
+##' @param dimnames.check  logical indicating if dimnames(.) much match
+##' @param tol  NA (--> use "==") or numerical tolerance for all.equal()
+##' @return   logical:  Are x and y (quasi) equal ?
+Q.eq <- function(x, y,
+		 superclasses =
+		 c("sparseMatrix", "denseMatrix",
+		   "dMatrix", "lMatrix", "nMatrix"),
+		 dimnames.check = TRUE, tol = NA) {
+    ## quasi-equal - for 'Matrix' matrices
+    if(any(dim(x) != dim(y)))
+	return(FALSE)
+    if(dimnames.check &&
+       !identical(dimnames(x),
+		  dimnames(y))) return(FALSE)
+    xcl <- getClassDef(class(x))
+    ycl <- getClassDef(class(y))
+    for(SC in superclasses) {
+	if( extends(xcl, SC) &&
+	   !extends(ycl, SC)) return(FALSE)
+    }
+    asC <- ## asCommon
+        if((isDense <- extends(xcl,"denseMatrix")))
+            function(m) as(m, "matrix")
+        else function(m)
+            as(as(as(m,"CsparseMatrix"), "dMatrix"), "dgCMatrix")
+    if(is.na(tol)) {
+	if(isDense)
+	    all(x == y | (is.na(x) & is.na(y)))
+	else ## 'x == y' blows up for large sparse matrices:
+	    isTRUE(all.equal(asC(x), asC(y), tol = 0.,
+			     check.attributes = dimnames.check))
+    }
+    else if(is.numeric(tol) && tol >= 0) {
+        isTRUE(all.equal(asC(x), asC(y), tol = tol,
+                         check.attributes = dimnames.check))
+    }
+    else stop("'tol' must be NA or non-negative number")
+}
+
+Q.eq2 <- function(x, y,
+		  superclasses = c("sparseMatrix", "denseMatrix"),
+		  dimnames.check = FALSE, tol = NA)
+    Q.eq(x,y, superclasses=superclasses,
+         dimnames.check=dimnames.check, tol=tol)
+
+##' <description>
+##'
+##' <details>
+##' @title  Quasi-equality of  symmpart(m) + skewpart(m) with m
+##' @param m  Matrix
+##' @param tol  numerical tolerance for all.equal()
+##' @return logical
+##' @author Martin Maechler
+Q.eq.symmpart <- function(m, tol = 8 * .Machine$double.eps)
+{
+    ss <- symmpart(m) + skewpart(m)
+    if(hasNA <- any(iNA <- is.na(ss))) {
+	## ss has the NA's symmetrically, but typically m has *not*
+	iiNA <- which(iNA) # <- useful! -- this tests  which() methods!
+	## assign NA's too -- using correct kind of NA:
+	m[iiNA] <- as(NA, Matrix:::.type.kind[Matrix:::.M.kind(m)])
+    }
+    Q.eq2(m, ss, tol = tol)
+}
+
+##' sample.int(n, size, replace=FALSE) for large n:
+sampleL <- function(n, size) {
+    if(n < .Machine$integer.max)
+	sample(n, size, replace=FALSE)
+    else {
+	i <- unique(round(n * runif(1.8 * size)))
+	while(length(i) < size) {
+	    i <- unique(c(i, round(n * runif(size))))
+	}
+	i[seq_len(size)]
+    }
+}
+
+
+## Useful Matrix constructors for testing:
+
+##' @title Random Sparse Matrix
+##' @param n
+##' @param m number of columns; default (=n)  ==> square matrix
+##' @param density the desired sparseness density:
+##' @param nnz number of non-zero entries; default from \code{density}
+##' @param giveCsparse logical specifying if result should be CsparseMatrix
+##' @return a [TC]sparseMatrix,  n x m
+##' @author Martin Maechler, Mar 2008
+rspMat <- function(n, m = n, density = 1/4, nnz = round(density * n*m),
+                   giveCsparse = TRUE)
+{
+    stopifnot(length(n) == 1, n == as.integer(n),
+              length(m) == 1, m == as.integer(m),
+              0 <= density, density <= 1,
+              0 <= nnz,
+	      nnz <= (N <- n*m))
+    in0 <- sampleL(N, nnz)
+    x <- sparseVector(i = in0, x = as.numeric(1L + seq_along(in0)), length = N)
+    dim(x) <- c(n,m)#-> sparseMatrix
+    if (giveCsparse) as(x, "CsparseMatrix") else x
+}
+
+
+## From \examples{..}  in ../man/sparseMatrix.Rd :
+rSparseMatrix <- function(nrow, ncol, nnz,
+			  rand.x = function(n) round(rnorm(nnz), 2), ...)
+{
+    stopifnot((nnz <- as.integer(nnz)) >= 0,
+	      nrow >= 0, ncol >= 0, nnz <= nrow * ncol)
+    sparseMatrix(i = sample(nrow, nnz, replace = TRUE),
+		 j = sample(ncol, nnz, replace = TRUE),
+		 x = rand.x(nnz), dims = c(nrow, ncol), ...)
+}
+
+
+rUnitTri <- function(n, upper = TRUE, ...)
+{
+    ## Purpose: random unit-triangular sparse Matrix .. built from rspMat()
+    ## ----------------------------------------------------------------------
+    ## Arguments:  n: matrix dimension
+    ##         upper: logical indicating if upper or lower triangular
+    ##         ...  : further arguments passed to rspMat(), eg. 'density'
+    ## ----------------------------------------------------------------------
+    ## Author: Martin Maechler, Date:  5 Mar 2008, 11:35
+
+    r <- (if(upper) triu else tril)(rspMat(n, ...))
+    ## make sure the diagonal is empty
+    diag(r) <- 0
+    r <- drop0(r)
+    r diag <- "U"
+    r
+}
+
+mkLDL <- function(n, density = 1/3) {
+    ## Purpose: make nice artificial   A = L D L'  (with exact numbers) decomp
+    ## ----------------------------------------------------------------------
+    ## Author: Martin Maechler, Date: 15 Mar 2008
+    stopifnot(n == round(n))
+    n <- as.integer(n)
+    L <- Matrix(0, n,n)
+
+    nnz <- round(n*n * density)
+    L[sample(n*n, nnz)] <- seq_len(nnz)
+    L <- tril(L,-1)
+    diag(L) <- 1
+    d.half <- sample(10*(n:1))# random permutation ; use '10*' to be "different" from L entries
+    D <- Diagonal(x = d.half * d.half)
+    A <- tcrossprod(L * rep(d.half, each=n))
+    ## = as(L %*% D %*% t(L), "symmetricMatrix")
+    list(A = A, L = L, d.half = d.half, D = D)
+}
+
+eqDeterminant <- function(m1, m2, NA.Inf.ok=FALSE, ...) {
+    d1 <- determinant(m1) ## logarithm = TRUE
+    d2 <- determinant(m2)
+    d1m <- as.vector(d1$modulus)# dropping attribute
+    d2m <- as.vector(d2$modulus)
+    if((identical(d1m, -Inf) && identical(d2m, -Inf)) ||
+       ## <==> det(m1) == det(m2) == 0, then 'sign' may even differ !
+       (is.na(d1m) && is.na(d2m)))
+	## if both are NaN or NA, we "declare" that's fine here
+	return(TRUE)
+    else if(NA.Inf.ok && ## first can be NA, second infinite:
+            ## wanted: base::determinant.matrix() sometimes gives -Inf instead
+            ## of NA,e.g. for matrix(c(0,NA,0,0,NA,NA,0,NA,0,0,1,0,0,NA,0,1), 4,4))
+            is.na(d1m) && is.infinite(d2m)) return(TRUE)
+    ## else
+    if(is.infinite(d1m)) d1$modulus <- sign(d1m)* .Machine$double.xmax
+    if(is.infinite(d2m)) d2$modulus <- sign(d2m)* .Machine$double.xmax
+    ## now they are finite or *one* of them is NA/NaN, and all.equal() will tell so:
+    all.equal(d1, d2, ...)
+}
+
+##' @param A a non-negative definite sparseMatrix, typically "dsCMatrix"
+##'
+##' @return a list with components resulting from calling
+##'    Cholesky(.,  perm = .P., LDL = .L., super = .S.)
+##'
+##'    for all 2*2*3 combinations of (.P., .L., .S.)
+allCholesky <- function(A, verbose = FALSE, silentTry = FALSE)
+{
+    ## Author: Martin Maechler, Date: 16 Jul 2009
+
+    ##' @param r   list of CHMfactor objects, typically with names() as '. | .'
+    ##'
+    ##' @return an is(perm,LDL,super) matrix with interesting and *named* rownames
+    CHM_to_pLs <- function(r) {
+        is.perm <- function(.)
+            if(inherits(., "try-error")) NA else !all(  perm == 0:(  Dim[1]-1))
+        is.LDL <- function(.)if(inherits(., "try-error")) NA else isLDL(.)
+	r.st <-
+	    cbind(perm	= sapply(r, is.perm),
+		  LDL	= sapply(r, is.LDL),
+		  super = sapply(r, class) == "dCHMsuper")
+	names(dimnames(r.st)) <- list("  p L s", "")
+	r.st
+    }
+
+    my.Cholesky <- {
+	if(verbose)
+	    function (A, perm = TRUE, LDL = !super, super = FALSE, Imult = 0, ...) {
+		cat(sprintf("Chol..(*, perm= %1d, LDL= %1d, super=%1d):",
+			    perm, LDL, super))
+		r <- Cholesky(A, perm=perm, LDL=LDL, super=super, Imult=Imult, ...)
+		cat(" [Ok]\n")
+		r
+	    }
+	else Cholesky
+    }
+    logi <- c(FALSE, TRUE)
+    d12 <- expand.grid(perm = logi, LDL = logi, super = c(logi,NA),
+		       KEEP.OUT.ATTRS = FALSE)
+    r1 <- lapply(seq_len(nrow(d12)),
+		 function(i) try(do.call(my.Cholesky,
+                                         c(list(A = A), as.list(d12[i,]))),
+                                 silent=silentTry))
+    names(r1) <- apply(d12, 1,
+		       function(.) paste(symnum(.), collapse=" "))
+    dup.r1 <- duplicated(r1)
+    r.all <- CHM_to_pLs(r1)
+    if(!identical(dup.r1, duplicated(r.all)))
+        warning("duplicated( <pLs-matrix> ) differs from duplicated( <CHM-list> )",
+                immediate. = TRUE)
+    list(Chol.A = r1,
+         dup.r.all = dup.r1,
+	 r.all	= r.all,
+	 r.uniq = CHM_to_pLs(r1[ ! dup.r1]))
+}
+
+
+###----- Checking a "Matrix" -----------------------------------------
+
+##' <description>
+##'
+##' <details>
+##' @title Compatibility tests "Matrix" <-> "traditional matrix"
+##'        and many more consistency checks
+##'
+##' @param m   a "Matrix"
+##' @param m.m as(m, "matrix")  {if 'do.matrix' }
+##' @param do.matrix logical indicating if as(m, "matrix") should be applied;
+##'    typically false for large sparse matrices
+##' @param do.t  logical: is t(m) "feasible" ?
+##' @param doNorm
+##' @param doOps
+##' @param doSummary
+##' @param doCoerce
+##' @param doCoerce2
+##' @param do.prod
+##' @param verbose logical indicating if "progress output" is produced.
+##' @param catFUN (when 'verbose' is TRUE): function to be used as generalized cat()
+##' @return TRUE (invisibly), unless an error is signalled
+##' @author Martin Maechler, since 11 Apr 2008
+checkMatrix <- function(m, m.m = if(do.matrix) as(m, "matrix"),
+			do.matrix = !isSparse || prod(dim(m)) < 1e6,
+			do.t = TRUE, doNorm = TRUE, doOps = TRUE,
+                        doSummary = TRUE, doCoerce = TRUE,
+			doCoerce2 = doCoerce && !extends(cld, "RsparseMatrix"),
+			do.prod = do.t && do.matrix && !extends(cld, "RsparseMatrix"),
+			verbose = TRUE, catFUN = cat)
+{
+    ## is also called from  dotestMat()  in ../tests/Class+Meth.R
+
+    stopifnot(is(m, "Matrix"))
+    validObject(m) # or error(....)
+
+    clNam <- class(m)
+    cld <- getClassDef(clNam) ## extends(cld, FOO) is faster than is(m, FOO)
+    isCor    <- extends(cld, "corMatrix")
+    isSparse <- extends(cld, "sparseMatrix") # also true for diagonalMatrix !
+    isSym    <- extends(cld, "symmetricMatrix")
+    isDiag   <- extends(cld, "diagonalMatrix")
+    isPerm   <- extends(cld, "pMatrix")
+    isTri <- !isSym && !isDiag && !isPerm && extends(cld, "triangularMatrix")
+    is.n     <- extends(cld, "nMatrix")
+    nonMatr  <- clNam != Matrix:::MatrixClass(clNam, cld)
+
+    Cat	 <- function(...) if(verbose) cat(...)
+    CatF <- function(...) if(verbose) catFUN(...)
+    ## warnNow <- function(...) warning(..., call. = FALSE, immediate. = TRUE)
+
+    DO.m <- function(expr) if(do.matrix) eval(expr) else TRUE
+
+    vec <- function(x) {
+	dim(x) <- c(length(x), 1L)
+	dimnames(x) <- list(NULL,NULL)
+	x
+    }
+    eps16 <- 16 * .Machine$double.eps
+
+    ina <- is.na(m)
+    if(do.matrix) {
+	stopifnot(all(ina == is.na(m.m)),
+		  all(is.finite(m) == is.finite(m.m)),
+		  all(is.infinite(m) == is.infinite(m.m)),
+		  all(m == m | ina), ## check all() , "==" [Compare], "|" [Logic]
+		  if(ncol(m) > 0) identical3(unname(m[,1]), unname(m.m[,1]),
+					     as(m[,1,drop=FALSE], "vector"))
+		  else identical(as(m, "vector"), as.vector(m.m)))
+	if(any(m != m & !ina)) stop(" any (m != m) should not be true")
+    } else {
+	if(any(m != m)) stop(" any (m != m) should not be true")
+        if(ncol(m) > 0)
+             stopifnot(identical(unname(m[,1]), as(m[,1,drop=FALSE], "vector")))
+        else stopifnot(identical(as(m, "vector"), as.vector(as(m, "matrix"))))
+    }
+    if(do.t) {
+	tm <- t(m)
+	if(isSym) ## check that t() swaps 'uplo'  L <--> U :
+	    stopifnot(c("L","U") == sort(c(m uplo, tm uplo)))
+	ttm <- t(tm)
+	if(extends(cld, "CsparseMatrix") ||
+	   extends(cld, "generalMatrix") || isDiag)
+            stopifnot(Qidentical(m, ttm, strictClass = !nonMatr))
+	else if(do.matrix)
+	    stopifnot(nonMatr || class(ttm) == clNam,
+                      all(m == ttm | ina))
+        ## else : not testing
+
+	## crossprod()	%*%  etc
+	if(do.prod) {
+	    c.m <-  crossprod(m)
+	    tcm <- tcrossprod(m)
+            tolQ <- if(isSparse) NA else eps16
+	    stopifnot(dim(c.m) == rep.int(ncol(m), 2),
+		      dim(tcm) == rep.int(nrow(m), 2),
+		      ## FIXME: %*% drops dimnames
+		      Q.eq2(c.m, tm %*% m, tol = tolQ),
+		      Q.eq2(tcm, m %*% tm, tol = tolQ))
+	}
+    }
+    if(!do.matrix) {
+	CatF(" will *not* coerce to 'matrix' since do.matrix is FALSE\n")
+    } else if(doNorm) {
+	CatF(sprintf(" norm(m [%d x %d]) :", nrow(m), ncol(m)))
+	for(typ in c("1","I","F","M")) {
+	    Cat('', typ, '')
+	    stopifnot(all.equal(norm(m,typ), norm(m.m,typ)))
+	}
+	Cat(" ok\n")
+    }
+    if(do.matrix && doSummary) {
+	summList <- lapply(getGroupMembers("Summary"), get,
+			   envir = asNamespace("Matrix"))
+	CatF(" Summary: ")
+	for(f in summList) {
+	    ## suppressWarnings():  e.g. any(<double>)	would warn here:
+	    r <- suppressWarnings(if(isCor) all.equal(f(m), f(m.m)) else
+				  identical(f(m), f(m.m)))
+	    if(!isTRUE(r)) {
+		f.nam <- sub("..$", '', sub("^\\.Primitive..", '', format(f)))
+		## prod() is delicate: NA or NaN can both happen
+		(if(f.nam == "prod") message else stop)(
+		    sprintf("%s(m) [= %g] differs from %s(m.m) [= %g]",
+			    f.nam, f(m), f.nam, f(m.m)))
+	    }
+	}
+	if(verbose) cat(" ok\n")
+    }
+
+    ## and test 'dim()' as well:
+    d <- dim(m)
+    isSqr <- d[1] == d[2]
+    if(do.t) stopifnot(identical(diag(m), diag(t(m))))
+    ## TODO: also === diag(band(m,0,0))
+
+    if(prod(d) < .Machine$integer.max && !extends(cld, "modelMatrix")) {
+	vm <- vec(m)
+	stopifnot(is(vm, "Matrix"), validObject(vm), dim(vm) == c(d[1]*d[2], 1))
+    }
+
+    if(!isPerm)
+        m.d <- local({ m. <- m; diag(m.) <- diag(m); m. })
+    if(do.matrix)
+    stopifnot(identical(dim(m.m), dim(m)),
+	      ## base::diag() keeps names [Matrix FIXME]
+## now that "pMatrix" subsetting gives *LOGICAL*
+## 	      if(isPerm) {
+## 		  identical(as.integer(unname(diag(m))), unname(diag(m.m)))
+## 	      } else
+	      identical(unname(diag(m)),
+			unname(diag(m.m))),## not for NA: diag(m) == diag(m.m),
+	      identical(nnzero(m), sum(m.m != 0)),
+	      identical(nnzero(m, na.= FALSE), sum(m.m != 0, na.rm = TRUE)),
+	      identical(nnzero(m, na.= TRUE),  sum(m.m != 0 | is.na(m.m)))
+	      )
+
+    if(isSparse) {
+	n0m <- drop0(m) #==> n0m is Csparse
+	has0 <- !Qidentical(n0m, as(m,"CsparseMatrix"))
+	if(!isPerm && !extends(cld, "RsparseMatrix") &&
+           !(extends(cld, "TsparseMatrix") && Matrix:::is_duplicatedT(m, di = d)))
+                                        # 'diag<-' is does not change attrib:
+	    stopifnot(identical(m, m.d))
+    }
+    else if(!identical(m, m.d)) { # dense : 'diag<-' is does not change attrib
+	if(isTri && m diag == "U" && m d diag == "N" &&
+	   all(m == m.d))
+	    message("unitriangular m: diag(m) <- diag(m) lost \"U\" .. is ok")
+	else stop("diag(m) <- diag(m) has changed 'm' too much")
+    }
+    ## use non-square matrix when "allowed":
+
+    ## m12: sparse and may have 0s even if this is not: if(isSparse && has0)
+    m12 <- as(as(  m, "lMatrix"),"CsparseMatrix")
+    m12 <- drop0(m12)
+    if(do.matrix) {
+	## "!" should work (via as(*, "l...")) :
+	m11 <- as(as(!!m,"CsparseMatrix"), "lMatrix")
+	if(!Qidentical(m11, m12))
+	    stopifnot(Qidentical(as(m11, "generalMatrix"),
+				 as(m12, "generalMatrix")))
+    }
+    if(isSparse && !is.n) {
+	## ensure that as(., "nMatrix") gives nz-pattern
+	CatF("as(., \"nMatrix\") giving full nonzero-pattern: ")
+	n1 <- as(m, "nMatrix")
+	ns <- as(m, "nsparseMatrix")
+	stopifnot(identical(n1,ns),
+		  isDiag || ((if(isSym) Matrix:::nnzSparse else sum)(n1) ==
+			     length(if(isPerm) m perm else Matrix:::diagU2N(m)@x)))
+        Cat("ok\n")
+    }
+
+    if(doOps) {
+	## makes sense with non-trivial m (!)
+	CatF("2*m =?= m+m: ")
+	if(identical(2*m, m+m)) Cat("identical\n")
+	else if(do.matrix) {
+	    eq <- as(2*m,"matrix") == as(m+m, "matrix") # but work for NA's:
+	    stopifnot(all(eq | (is.na(m) & is.na(eq))))
+	    Cat("ok\n")
+	} else {# !do.matrix
+	    stopifnot(identical(as(2*m, "CsparseMatrix"),
+                                as(m+m, "CsparseMatrix")))
+	    Cat("ok\n")
+	}
+	if(do.matrix) {
+	    ## m == m etc, now for all, see above
+	    CatF("m >= m for all: "); stopifnot(all(m >= m | ina)); Cat("ok\n")
+	}
+	if(prod(d) > 0) {
+	    CatF("m < m for none: ")
+	    mlm <- m < m
+	    if(!any(ina)) stopifnot(!any(mlm))
+	    else if(do.matrix) stopifnot(!any(mlm & !ina))
+	    else { ## !do.matrix & any(ina) :  !ina can *not* be used
+		mlm[ina] <- FALSE
+		stopifnot(!any(mlm))
+	    }
+	    Cat("ok\n")
+	}
+
+	if(isSqr) {
+	    if(do.matrix) {
+		## determinant(<dense>) "fails" for triangular with NA such as
+		## (m <- matrix(c(1:0,NA,1), 2))
+		CatF("symmpart(m) + skewpart(m) == m: ")
+		Q.eq.symmpart(m)
+		CatF("ok;  determinant(): ")
+		if(any(is.na(m.m)) && extends(cld, "triangularMatrix"))
+		    Cat(" skipped: is triang. and has NA")
+		else
+		    stopifnot(eqDeterminant(m, m.m, NA.Inf.ok=TRUE))
+		Cat("ok\n")
+	    }
+	} else assertError(determinant(m))
+    }# end{doOps}
+
+    if(doCoerce && do.matrix && canCoerce("matrix", clNam)) {
+	CatF("as(<matrix>, ",clNam,"): ", sep='')
+	m3 <- as(m.m, clNam)
+	Cat("valid:", validObject(m3), "\n")
+	## m3 should ``ideally'' be identical to 'm'
+    }
+
+    if(doCoerce2 && do.matrix) { ## not for large m:  !m will be dense
+
+	if(is.n) {
+	    stopifnot(identical(m, as(as(m, "dMatrix"),"nMatrix")),
+		      identical(m, as(as(m, "lMatrix"),"nMatrix")),
+		      identical(which(m), which(m.m)))
+	}
+	else if(extends(cld, "lMatrix")) { ## should fulfill even with NA:
+	    stopifnot(all(m | !m | ina), !any(!m & m & !ina))
+	    if(extends(cld, "TsparseMatrix")) # allow modify, since at end here
+		m <- Matrix:::uniqTsparse(m, clNam)
+	    stopifnot(identical(m, m & TRUE),
+		      identical(m, FALSE | m))
+	    ## also check the  coercions to [dln]Matrix
+	    m. <- if(isSparse && has0) n0m else m
+	    m1. <- m. # replace NA by 1 in m1. , carefully not changing class:
+	    if(any(ina)) m1  x[is na(m1  x)] <- TRUE
+	    stopifnot(identical(m. , as(as(m. , "dMatrix"),"lMatrix")),
+		      clNam == "ldiMatrix" || # <- there's no "ndiMatrix"
+		      ## coercion to n* and back: only identical when no extra 0s:
+		      identical(m1., as(as(m1., "nMatrix"),"lMatrix")),
+		      identical(which(m), which(m.m)))
+	}
+	else if(extends(cld, "dMatrix")) {
+	    m. <- if(isSparse && has0) n0m else m
+	    m1 <- (m. != 0)*1
+	    if(!isSparse && substr(clNam,1,3) == "dpp")
+		## no "nppMatrix" possible
+		m1 <- unpack(m1)
+
+	    m1. <- m1 # replace NA by 1 in m1. , carefully not changing class:
+	    if(any(ina)) m1  x[is na(m1  x)] <- 1
+	    ## coercion to n* (nz-pattern!) and back: only identical when no extra 0s and no NAs:
+	    stopifnot(Q.C.identical(m1., as(as(m., "nMatrix"),"dMatrix"),
+				    isSparse, checkClass = FALSE),
+		      Q.C.identical(m1 , as(as(m., "lMatrix"),"dMatrix"),
+				    isSparse, checkClass = FALSE))
+	}
+
+	if(extends(cld, "triangularMatrix")) {
+	    mm. <- m
+	    i0 <- if(m uplo == "L")
+		upper.tri(mm.) else lower.tri(mm.)
+	    n.catchWarn <- if(is.n) suppressWarnings else identity
+	    n.catchWarn( mm.[i0] <- 0 ) # ideally, mm. remained triangular, but can be dge*
+	    CatF("as(<triangular (ge)matrix>, ",clNam,"): ", sep='')
+	    tm <- as(as(mm., "triangularMatrix"), clNam)
+	    Cat("valid:", validObject(tm), "\n")
+	    if(m uplo == tm uplo) ## otherwise, the matrix effectively was *diagonal*
+		## note that diagU2N(<dtr>) |-> dtC :
+		stopifnot(Qidentical(tm, as(Matrix:::diagU2N(m), clNam)))
+	}
+	else if(isDiag) {
+
+	    ## TODO
+
+	} else {
+
+	    ## TODO
+	}
+    }# end {doCoerce2 && ..}
+
+    if(doCoerce && isSparse) { ## coerce to sparseVector and back :
+	v <- as(m, "sparseVector")
+	stopifnot(length(v) == prod(d))
+	dim(v) <- d
+	stopifnot(Q.eq2(m, v))
+    }
+
+    invisible(TRUE)
+}
diff --git a/win32/deps/library/Matrix/test-tools.R b/win32/deps/library/Matrix/test-tools.R
index 918b662..9ae66f9 100644
--- a/win32/deps/library/Matrix/test-tools.R
+++ b/win32/deps/library/Matrix/test-tools.R
@@ -1,535 +1,10 @@
 #### Will be sourced by several R scripts in ../tests/
 
-### ------- Part I --  unrelated to "Matrix" classes ---------------
-
-paste0 <- function(...) paste(..., sep = '')
-
-identical3 <- function(x,y,z)	  identical(x,y) && identical (y,z)
-identical4 <- function(a,b,c,d)   identical(a,b) && identical3(b,c,d)
-identical5 <- function(a,b,c,d,e) identical(a,b) && identical4(b,c,d,e)
-
-## Make sure errors are signaled
-assertError <- function(expr) {
-    d.expr <- deparse(substitute(expr))
-    t.res <- try(expr, silent = TRUE)
-    if(!inherits(t.res, "try-error"))
-	stop(d.expr, "\n\t did not give an error", call. = FALSE)
-    invisible(t.res)
-}
-
-isValid <- function(x, class) validObject(x, test=TRUE) && is(x, class)
-
-is.all.equal3 <- function(x,y,z, tol = .Machine$double.eps^0.5)
-    isTRUE(all.equal(x,y, tol=tol)) && isTRUE(all.equal(y,z, tol=tol))
-
-is.all.equal4 <- function(x,y,z,u, tol = .Machine$double.eps^0.5)
-    is.all.equal3(x,y,z, tol=tol) && isTRUE(all.equal(z,u, tol=tol))
-
-## A version of all.equal() for the slots
-all.slot.equal <- function(x,y, ...) {
-    slts <- slotNames(x)
-    for(sl in slts) {
-        aeq <- all.equal(slot(x,sl), slot(y,sl), ...)
-        if(!identical(TRUE, aeq))
-            return(paste("slot '",sl,"': ", aeq, sep=''))
-    }
-    TRUE
-}
-
-## The relative error typically returned by all.equal:
-relErr <- function(target, current) { ## make this work for 'Matrix'
-    ## ==> no mean() ..
-    n <- length(current)
-    if(length(target) < n)
-        target <- rep(target, length.out = n)
-    sum(abs(target - current)) / sum(abs(target))
-}
-
-## is.R22 <- (paste(R.version$major, R.version$minor, sep=".") >= "2.2")
-
-pkgRversion <- function(pkgname)
-    substring(packageDescription(pkgname)[["Built"]], 3,5)
-
-
+### ------- Part I & -- unrelated to "Matrix" classes ---------------
 ### ------- Part II  -- related to matrices, but *not* "Matrix" -----------
-
-add.simpleDimnames <- function(m) {
-    stopifnot(length(d <- dim(m)) == 2)
-    dimnames(m) <- list(paste0("r", seq_len(d[1])),
-                        paste0("c", seq_len(d[2])))
-    m
-}
-
-as.mat <- function(m) {
-    ## as(., "matrix")	but with no extraneous empty dimnames
-    m <- as(m, "matrix")
-    if(identical(dimnames(m), list(NULL,NULL)))
-	dimnames(m) <- NULL
-    m
-}
-
-assert.EQ.mat <- function(M, m, tol = if(show) 0 else 1e-15, show=FALSE) {
-    ## Purpose: check equality of  'Matrix' M with  'matrix' m
-    ## ----------------------------------------------------------------------
-    ## Arguments: M: is(., "Matrix") typically {but just needs working as(., "matrix")}
-    ##            m: is(., "matrix")
-    ##            show: if TRUE, return (and hence typically print) all.equal(...)
-    validObject(M)
-    MM <- as.mat(M)                     # as(M, "matrix")
-    if(is.logical(MM) && is.numeric(m))
-	storage.mode(MM) <- "integer"
-    attr(MM, "dimnames") <- attr(m, "dimnames") <- NULL
-    if(show) all.equal(MM, m, tol = tol)
-    else if(!isTRUE(r <- all.equal(MM, m, tol = tol)))
-	stop("all.equal() |->  ", r)
-}
-
-chk.matrix <- function(M) {
-    ## check object; including coercion to "matrix" :
-    cl <- class(M)
-    cat("class ", dQuote(cl), " [",nrow(M)," x ",ncol(M),"]; slots (",
-	paste(slotNames(M), collapse=","), ")\n", sep='')
-    stopifnot(validObject(M),
-	      dim(M) == c(nrow(M), ncol(M)),
-	      identical(dim(m <- as(M, "matrix")), dim(M))
-	      )
-}
-
-isOrthogonal <- function(x, tol = 1e-15) {
-    all.equal(diag(as(zapsmall(crossprod(x)), "diagonalMatrix")),
-              rep(1, ncol(x)), tol = tol)
-}
-
-
+source(system.file("test-tools-1.R",      package = "Matrix"), keep.source = FALSE)
 ### ------- Part III --  "Matrix" (classes) specific ----------------------
+source(system.file("test-tools-Matrix.R", package = "Matrix"), keep.source = FALSE)
 
-lsM <- function(...) {
-    for(n in ls(..., envir=parent.frame()))
-        if(is((. <- get(n)),"Matrix"))
-            cat(sprintf("%5s: '%s' [%d x %d]\n",n,class(.), nrow(.),ncol(.)))
-}
-
-asD <- function(m) { ## as "Dense"
-    if(canCoerce(m, "denseMatrix")) as(m, "denseMatrix")
-    else if(canCoerce(m, (cl <- paste(.M.kind(m), "denseMatrix", sep=''))))
-        as(m, cl)
-    else if(canCoerce(m, "dgeMatrix")) as(m, "dgeMatrix")
-    else stop("cannot coerce to a typical dense Matrix")
-}
-
-## "normal" sparse Matrix: Csparse, no diag="U"
-asCsp <- function(x) Matrix:::diagU2N(as(x, "CsparseMatrix"))
-
-Qidentical <- function(x,y, strictClass = TRUE) {
-    ## quasi-identical - for 'Matrix' matrices
-    if(class(x) != class(y)) {
-        if(strictClass || !is(x, class(y)))
-           return(FALSE)
-        ## else try further
-    }
-    slts <- slotNames(x)
-    if("factors" %in% slts) { ## allow one empty and one non-empty 'factors'
-        slts <- slts[slts != "factors"]
-        ## if both are not empty, they must be the same:
-        if(length(xf <- x factors) && length(yf <- y factors))
-            if(!identical(xf, yf)) return(FALSE)
-    }
-    for(sl in slts)
-        if(!identical(slot(x,sl), slot(y,sl)))
-            return(FALSE)
-    TRUE
-}
-
-Q.C.identical <- function(x,y, sparse = is(x,"sparseMatrix")) {
-    if(sparse) Qidentical(as(x,"CsparseMatrix"), as(y,"CsparseMatrix"))
-    else Qidentical(x,y)
-}
-
-## Useful Matrix constructors for testing:
-
-rspMat <- function(n, m = n, density = 1/4, nnz = round(density * n*m))
-{
-    ## Purpose: random sparse Matrix
-    ## ----------------------------------------------------------------------
-    ## Arguments: (n,m) : dimension [default m=n ==> *square* matrix}
-    ##           density: the desired sparseness density:
-    ## ----------------------------------------------------------------------
-    ## Author: Martin Maechler, Date: 5 Mar 2008, 11:07
-    stopifnot(length(n) == 1, n == as.integer(n),
-              length(m) == 1, m == as.integer(m),
-              0 <= density, density <= 1,
-              0 <= nnz, nnz <= n*m)
-    x <- numeric(n*m)
-    ## entries 2 : (nnz+1) {so we can have '1' as 'special'}
-    x[sample(n*m, nnz, replace=FALSE)] <- as.numeric(1L + seq_len(nnz))
-    Matrix(x, n,m, sparse=TRUE)
-}
-
-
-
-rUnitTri <- function(n, upper = TRUE, ...)
-{
-    ## Purpose: random unit-triangular sparse Matrix .. built from rspMat()
-    ## ----------------------------------------------------------------------
-    ## Arguments:  n: matrix dimension
-    ##         upper: logical indicating if upper or lower triangular
-    ##         ...  : further arguments passed to rspMat(), eg. 'density'
-    ## ----------------------------------------------------------------------
-    ## Author: Martin Maechler, Date:  5 Mar 2008, 11:35
-
-    r <- (if(upper) triu else tril)(rspMat(n, ...))
-    ## make sure the diagonal is empty
-    diag(r) <- 0
-    r <- drop0(r)
-    r diag <- "U"
-    r
-}
-
-## This is related to rUnitTri(), ver
-mkLDL <- function(n, density = 1/3) {
-    ## Purpose: make nice artifical   A = L D L'  (with exact numbers) decomp
-    ## ----------------------------------------------------------------------
-    ## Author: Martin Maechler, Date: 15 Mar 2008
-    stopifnot(n == round(n))
-    n <- as.integer(n)
-    L <- Matrix(0, n,n)
-
-    nnz <- round(n*n * density)
-    L[sample(n*n, nnz)] <- seq_len(nnz)
-    L <- tril(L,-1)
-    diag(L) <- 1
-    d.half <- sample(10*(n:1))# random permutation ; use '10*' to be "different" from L entries
-    D <- Diagonal(x = d.half * d.half)
-    A <- tcrossprod(L * rep(d.half, each=n))
-    ## = as(L %*% D %*% t(L), "symmetricMatrix")
-    list(A = A, L = L, d.half = d.half, D = D)
-}
-
-eqDeterminant <- function(m1, m2, ...) {
-    d1 <- determinant(m1) ## logarithm = TRUE
-    d2 <- determinant(m2)
-    d1m <- as.vector(d1$modulus)# dropping attribute
-    d2m <- as.vector(d2$modulus)
-    if((identical(d1m, -Inf) && identical(d2m, -Inf)) ||
-       ## <==> det(m1) == det(m2) == 0, then 'sign' may even differ !
-       (is.na(d1m) && is.na(d2m)))
-	## if both are NaN or NA, we "declare" that's fine here
-	return(TRUE)
-    ## else
-    if(is.infinite(d1m)) d1$modulus <- sign(d1m)* .Machine$double.xmax
-    if(is.infinite(d2m)) d2$modulus <- sign(d2m)* .Machine$double.xmax
-    ## now they are finite or *one* of them is NA/NaN, and all.equal() will tell so:
-    all.equal(d1, d2, ...)
-}
-
-##' @param A a non-negative definite sparseMatrix, typically "dsCMatrix"
-##'
-##' @return a list with components resulting from calling
-##'    Cholesky(.,  perm = .P., LDL = .L., super = .S.)
-##'
-##'    for all 2*2*3 combinations of (.P., .L., .S.)
-allCholesky <- function(A, verbose = FALSE, silentTry = FALSE)
-{
-    ## Author: Martin Maechler, Date: 16 Jul 2009
-
-    ##' @param r   list of CHMfactor objects, typically with names() as '. | .'
-    ##'
-    ##' @return an is(perm,LDL,super) matrix with interesting and *named* rownames
-    CHM_to_pLs <- function(r) {
-        is.perm <- function(.)
-            if(inherits(., "try-error")) NA else !all(  perm == 0:(  Dim[1]-1))
-        is.LDL <- function(.)if(inherits(., "try-error")) NA else isLDL(.)
-	r.st <-
-	    cbind(perm	= sapply(r, is.perm),
-		  LDL	= sapply(r, is.LDL),
-		  super = sapply(r, class) == "dCHMsuper")
-	names(dimnames(r.st)) <- list("  p L s", "")
-	r.st
-    }
-
-    my.Cholesky <- {
-	if(verbose)
-	    function (A, perm = TRUE, LDL = !super, super = FALSE, Imult = 0, ...) {
-		cat(sprintf("Chol..(*, perm= %1d, LDL= %1d, super=%1d):",
-			    perm, LDL, super))
-		r <- Cholesky(A, perm=perm, LDL=LDL, super=super, Imult=Imult, ...)
-		cat(" [Ok]\n")
-		r
-	    }
-	else Cholesky
-    }
-    logi <- c(FALSE, TRUE)
-    d12 <- expand.grid(perm = logi, LDL = logi, super = c(logi,NA),
-		       KEEP.OUT.ATTRS = FALSE)
-    r1 <- lapply(seq_len(nrow(d12)),
-		 function(i) try(do.call(my.Cholesky,
-                                         c(list(A = A), as.list(d12[i,]))),
-                                 silent=silentTry))
-    names(r1) <- apply(d12, 1,
-		       function(.) paste(symnum(.), collapse=" "))
-    dup.r1 <- duplicated(r1)
-    r.all <- CHM_to_pLs(r1)
-    if(!identical(dup.r1, duplicated(r.all)))
-        warning("duplicated( <pLs-matrix> ) differs from duplicated( <CHM-list> )",
-                immediate. = TRUE)
-    list(dup.r.all = dup.r1,
-	 r.all	= r.all,
-	 r.uniq = CHM_to_pLs(r1[ ! dup.r1]))
-}
-
-
-##--- Compatibility tests "Matrix" =!= "traditional Matrix" ---
-checkMatrix <- function(m, m.m = if(do.matrix) as(m, "matrix"),
-			do.matrix = !(isSparse || isDiag) || prod(dim(m)) < 1e6,
-			do.t = TRUE, doNorm = TRUE, doOps = TRUE,
-                        doSummary = TRUE, doCoerce = TRUE,
-			doCoerce2 = doCoerce && !extends(cld, "RsparseMatrix"),
-			verbose = TRUE, catFUN = cat)
-{
-    ## Purpose: Compatibility tests "Matrix" <-> "traditional matrix"
-    ## ----------------------------------------------------------------------
-    ## Arguments: m: is(., "Matrix")
-    ## ----------------------------------------------------------------------
-    ## Author: Martin Maechler, Date: 11 Apr 2008; building on tests originally
-    ##	       in dotestMat()  ../tests/Class+Meth.R
-    stopifnot(is(m, "Matrix"))
-    validObject(m)
-
-    clNam <- class(m)
-    cld <- getClassDef(clNam) ## extends(cld, FOO) is faster than is(m, FOO)
-    isCor    <- extends(cld, "corMatrix")
-    isSparse <- extends(cld, "sparseMatrix")
-    isSym    <- extends(cld, "symmetricMatrix")
-    isDiag   <- extends(cld, "diagonalMatrix")
-    nonMatr  <- clNam != Matrix:::MatrixClass(clNam, cld)
-
-    Cat	 <- function(...) if(verbose) cat(...)
-    CatF <- function(...) if(verbose) catFUN(...)
-    ## warnNow <- function(...) warning(..., call. = FALSE, immediate. = TRUE)
-
-    DO.m <- function(expr) if(do.matrix) eval(expr) else TRUE
-
-    vec <- function(x) {
-	dim(x) <- c(length(x), 1L)
-	dimnames(x) <- list(NULL,NULL)
-	x
-    }
-
-    ina <- is.na(m)
-    if(do.matrix) {
-	stopifnot(all(ina == is.na(m.m)),
-		  all(m == m | ina), ## check all() , "==" [Compare], "|" [Logic]
-		  if(ncol(m) > 0) identical3(unname(m[,1]), unname(m.m[,1]),
-					     as(m[,1,drop=FALSE], "vector"))
-		  else identical(as(m, "vector"), as.vector(m.m)))
-	if(any(m != m & !ina)) stop(" any (m != m) should not be true")
-    } else {
-	if(any(m != m)) stop(" any (m != m) should not be true")
-        if(ncol(m) > 0)
-             stopifnot(identical(unname(m[,1]), as(m[,1,drop=FALSE], "vector")))
-        else stopifnot(identical(as(m, "vector"), as.vector(as(m, "matrix"))))
-    }
-    if(do.t) {
-	tm <- t(m)
-	if(isSym) ## check that t() swaps 'uplo'  L <--> U :
-	    stopifnot(c("L","U") == sort(c(m uplo, tm uplo)))
-	ttm <- t(tm)
-	if(extends(cld, "CsparseMatrix") ||
-	   extends(cld, "generalMatrix") || isDiag)
-            stopifnot(Qidentical(m, ttm, strictClass = !nonMatr))
-	else if(do.matrix)
-	    stopifnot(nonMatr || class(ttm) == clNam,
-                      all(m == ttm | ina))
-        ## else : not testing
-    }
-    if(!do.matrix) {
-	CatF(" will *not* coerce to 'matrix' since do.matrix is FALSE\n")
-    } else if(doNorm) {
-	CatF(sprintf(" norm(m [%d x %d]) :", nrow(m), ncol(m)))
-	for(typ in c("1","I","F","M")) {
-	    Cat('', typ, '')
-	    stopifnot(all.equal(norm(m,typ), norm(m.m,typ)))
-	}
-	Cat(" ok\n")
-    }
-    if(do.matrix && doSummary) {
-	summList <- lapply(getGroupMembers("Summary"), get,
-			   envir = asNamespace("Matrix"))
-	CatF(" Summary: ")
-	for(f in summList) {
-	    ## suppressWarnings():  e.g. any(<double>)	would warn here:
-	    r <- suppressWarnings(if(isCor) all.equal(f(m), f(m.m)) else
-				  identical(f(m), f(m.m)))
-	    if(!isTRUE(r)) {
-		f.nam <- sub("..$", '', sub("^\\.Primitive..", '', format(f)))
-		## prod() is delicate: NA or NaN can both happen
-		(if(f.nam == "prod") message else stop)(
-		    sprintf("%s(m) [= %g] differs from %s(m.m) [= %g]",
-			    f.nam, f(m), f.nam, f(m.m)))
-	    }
-	}
-	if(verbose) cat(" ok\n")
-    }
-
-    ## and test 'dim()' as well:
-    d <- dim(m)
-    isSqr <- d[1] == d[2]
-    isPerm <- extends(cld, "pMatrix")
-    if(do.t) stopifnot(identical(diag(m), diag(t(m))))
-    ## TODO: also === diag(band(m,0,0))
-
-    if(prod(d) < .Machine$integer.max) {
-	vm <- vec(m)
-	stopifnot(is(vm, "Matrix"), validObject(vm), dim(vm) == c(d[1]*d[2], 1))
-    }
-
-    if(do.matrix)
-    stopifnot(identical(dim(m.m), dim(m)),
-	      ## base::diag() keeps names [Matrix FIXME]
-## now that "pMatrix" subsetting gives *LOGICAL*
-## 	      if(isPerm) {
-## 		  identical(as.integer(unname(diag(m))), unname(diag(m.m)))
-## 	      } else
-	      identical(unname(diag(m)),
-			unname(diag(m.m))),## not for NA: diag(m) == diag(m.m),
-	      identical(nnzero(m), sum(m.m != 0)),
-	      identical(nnzero(m, na.= FALSE), sum(m.m != 0, na.rm = TRUE)),
-	      identical(nnzero(m, na.= TRUE),  sum(m.m != 0 | is.na(m.m)))
-	      )
-
-    if(isSparse) {
-	n0m <- drop0(m) #==> n0m is Csparse
-	has0 <- !Qidentical(n0m, as(m,"CsparseMatrix"))
-    }
-    ## use non-square matrix when "allowed":
-
-    ## m12: sparse and may have 0s even if this is not: if(isSparse && has0)
-    m12 <- as(as(  m, "lMatrix"),"CsparseMatrix")
-    m12 <- drop0(m12)
-    if(do.matrix) {
-	## "!" should work (via as(*, "l...")) :
-	m11 <- as(as(!!m,"CsparseMatrix"), "lMatrix")
-	if(!Qidentical(m11, m12))
-	    stopifnot(Qidentical(as(m11, "generalMatrix"),
-				 as(m12, "generalMatrix")))
-    }
-    if(isSparse && !extends(cld,"nMatrix")) {
-	## ensure that as(., "nMatrix") gives nz-pattern
-	CatF("as(., \"nMatrix\") giving full nonzero-pattern: ")
-	n1 <- as(m, "nMatrix")
-	ns <- as(m, "nsparseMatrix")
-	stopifnot(identical(n1,ns),
-		  isDiag || ((if(isSym) Matrix:::nnzSparse else sum)(n1) ==
-			     length(if(isPerm) m perm else Matrix:::diagU2N(m)@x)))
-        Cat("ok\n")
-    }
-
-    if(doOps) {
-	## makes sense with non-trivial m (!)
-	CatF("2*m =?= m+m: ")
-	if(identical(2*m, m+m)) Cat("identical\n")
-	else if(do.matrix) {
-	    eq <- as(2*m,"matrix") == as(m+m, "matrix") # but work for NA's:
-	    stopifnot(all(eq | (is.na(m) & is.na(eq))))
-	    Cat("ok\n")
-	} else {# !do.matrix
-	    stopifnot(identical(as(2*m, "CsparseMatrix"),
-                                as(m+m, "CsparseMatrix")))
-	    Cat("ok\n")
-	}
-	if(do.matrix) {
-	    ## m == m etc, now for all, see above
-	    CatF("m >= m for all: "); stopifnot(all(m >= m | ina)); Cat("ok\n")
-	}
-	if(prod(d) > 0) {
-	    CatF("m < m for none: ")
-	    mlm <- m < m
-	    if(!any(ina)) stopifnot(!any(mlm))
-	    else if(do.matrix) stopifnot(!any(mlm & !ina))
-	    else { ## !do.matrix & any(ina) :  !ina can *not* be used
-		mlm[ina] <- FALSE
-		stopifnot(!any(mlm))
-	    }
-	    Cat("ok\n")
-	}
-
-	if(isSqr) {
-	    if(do.matrix) {
-		## determinant(<dense>) "fails" for triangular with NA such as
-		## (m <- matrix(c(1:0,NA,1), 2))
-		CatF("det...(): ")
-		if(any(is.na(m.m)) && extends(cld, "triangularMatrix"))
-		    Cat(" skipped: is triang. and has NA")
-		else
-		    stopifnot(eqDeterminant(m, m.m))
-		Cat("ok\n")
-	    }
-	} else assertError(determinant(m))
-    }# end{doOps}
-
-    if(doCoerce && do.matrix && canCoerce("matrix", clNam)) {
-	CatF("as(<matrix>, ",clNam,"): ", sep='')
-	m3 <- as(m.m, clNam)
-	Cat("valid:", validObject(m3), "\n")
-	## m3 should ``ideally'' be identical to 'm'
-    }
-
-    if(doCoerce2 && do.matrix) { ## not for large m:  !m will be dense
-
-	if(extends(cld, "nMatrix")) {
-	    stopifnot(identical(m, as(as(m, "dMatrix"),"nMatrix")),
-		      identical(m, as(as(m, "lMatrix"),"nMatrix")))
-	}
-	else if(extends(cld, "lMatrix")) { ## should fulfill even with NA:
-	    stopifnot(all(m | !m | ina), !any(!m & m & !ina))
-	    if(extends(cld, "TsparseMatrix")) # allow modify, since at end here
-		m <- Matrix:::uniqTsparse(m, clNam)
-	    stopifnot(identical(m, m & TRUE),
-		      identical(m, FALSE | m))
-	    ## also check the  coercions to [dln]Matrix
-	    m. <- if(isSparse && has0) n0m else m
-	    m1. <- m. # replace NA by 1 in m1. , carefully not changing class:
-	    if(any(ina)) m1  x[is na(m1  x)] <- TRUE
-	    stopifnot(identical(m. , as(as(m. , "dMatrix"),"lMatrix")),
-		      clNam == "ldiMatrix" || # <- there's no "ndiMatrix"
-		      ## coercion to n* and back: only identical when no extra 0s:
-		      identical(m1., as(as(m1., "nMatrix"),"lMatrix")))
-	}
-	else if(extends(cld, "dMatrix")) {
-	    m. <- if(isSparse && has0) n0m else m
-	    m1 <- (m. != 0)*1
-	    if(!isSparse && substr(clNam,1,3) == "dpp")
-		## no "nppMatrix" possible
-		m1 <- unpack(m1)
-
-	    m1. <- m1 # replace NA by 1 in m1. , carefully not changing class:
-	    if(any(ina)) m1  x[is na(m1  x)] <- 1
-	    ## coercion to n* (nz-pattern!) and back: only identical when no extra 0s and no NAs:
-	    stopifnot(Q.C.identical(m1., as(as(m., "nMatrix"),"dMatrix"), isSparse),
-		      Q.C.identical(m1 , as(as(m., "lMatrix"),"dMatrix"), isSparse))
-	}
-
-	if(extends(cld, "triangularMatrix")) {
-	    mm. <- m
-	    i0 <- if(m uplo == "L")
-		upper.tri(mm.) else lower.tri(mm.)
-	    mm.[i0] <- 0 # ideally, mm. remained triangular, but can be dge*
-	    CatF("as(<triangular (ge)matrix>, ",clNam,"): ", sep='')
-	    tm <- as(as(mm., "triangularMatrix"), clNam)
-	    Cat("valid:", validObject(tm), "\n")
-	    if(m uplo == tm uplo) ## otherwise, the matrix effectively was *diagonal*
-		## note that diagU2N(<dtr>) |-> dtC :
-		stopifnot(Qidentical(tm, as(Matrix:::diagU2N(m), clNam)))
-	}
-	else if(extends(cld, "diagonalMatrix")) {
-
-	    ## TODO
-
-	} else {
-
-	    ## TODO
-	}
-    }
-    invisible(TRUE)
-}
-
+doExtras <- interactive() || nzchar(Sys.getenv("R_MATRIX_CHECK_EXTRA")) ||
+    identical("true", unname(Sys.getenv("R_PKG_CHECKING_doExtras")))
diff --git a/win32/deps/library/Matrix/tests/Class+Meth.R b/win32/deps/library/Matrix/tests/Class+Meth.R
new file mode 100644
index 0000000..8a2de69
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/Class+Meth.R
@@ -0,0 +1,348 @@
+library(Matrix)
+source(system.file("test-tools.R", package = "Matrix"))# identical3(),
+                                        # further  checkMatrix(), etc
+if(interactive()) options(error = recover)
+cat("doExtras:",doExtras,"\n")
+
+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")
+
+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(!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")
+
+
+
+### 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
+    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, "pMatrix")
+            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)
+}
+
+tstMatrixClass("Matrix")
+if(FALSE)## or just a sub class
+tstMatrixClass("triangularMatrix")
+
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
+
+if(!interactive()) warnings()
diff --git a/win32/deps/library/Matrix/tests/Simple.R b/win32/deps/library/Matrix/tests/Simple.R
new file mode 100644
index 0000000..4536ec2
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/Simple.R
@@ -0,0 +1,837 @@
+#### 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)
+} else options(Matrix.verbose = TRUE)# 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)
+class(mN <-  Matrix(NA, 3,4)) # NA *is* logical
+validObject(Matrix(NA))
+bd4 <- bdiag(M4,dM4,M4)
+stopifnot(isValid(o4, "dsyMatrix"),
+          isValid(M4, "dtCMatrix"),
+          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
+stopifnot(isValid(d4, "diagonalMatrix"),   isValid(z4,  "diagonalMatrix"),
+          isValid(tr, "triangularMatrix"), isValid(trS, "triangularMatrix"),
+          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)),
+          isValid(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
+
+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)
+}
+
+I <- Diagonal(3)
+stopifnot(identical(I != 0, Diagonal(3, TRUE)), I diag == "U")
+I[,1] <- NA; I[2,2] <- NA ; I[3,] <- NaN
+stopifnot(isValid(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")
+isValid(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, tol=0)
+	  )
+
+## 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))
+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
+e2 <- try(!Lrg) # error message was "bad", now perfect
+ina <- is.na(Lrg)# "all FALSE"
+stopifnot(grep("too large", e1) == 1,
+          grep("too large", e2) == 1,
+          !any(ina))# <- gave warning previously
+stopifnot(suppressWarnings(any(Lrg)))# (double -> logical  warning)
+
+## with dimnames:
+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")
+stopifnot(all.equal(rcond(dm), rcond(m.), tol = 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])))
+rm(m)
+
+###--  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))
+
+
+(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(t2  <-   t1  + I4)
+validObject(tt2 <- t(t1) + I4)
+validObject(t1c <- as(t1, "CsparseMatrix"))
+validObject(t2c <- as(t2, "CsparseMatrix"))
+stopifnot(validObject(t1),
+          isValid(2 * I4, "diagonalMatrix"),
+          isValid(D4 * 3, "diagonalMatrix"),
+          isValid(I4 / 5, "diagonalMatrix"),
+          isValid(D4 / 2, "diagonalMatrix"),
+          identical(t1, t(t(t1))),
+          identical(t1c, t(t(t1c))),
+          isValid(t1c + I4,"triangularMatrix"), isValid(t2c + I4,"triangularMatrix"),
+          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)))
+
+
+## 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 <- Matrix:::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, Matrix:::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 <- Matrix:::diagN2U(tril(C))) # dtC Unitriangular
+ntU <- as(tU, "nMatrix")
+nT <- as(ntU, "TsparseMatrix")
+R <- as(tU, "RsparseMatrix")
+Tt <- Matrix:::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 <- Matrix:::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, Matrix:::diagN2U(drop0(U.))))
+
+## <sparse> o <numeric> (of length > 1):
+stopifnot(isValid(tm <- tu * 1:8, "sparseMatrix"),
+          identical4(tm, cu * 1:8, 1:8 * cu, 1:8 * tu))
+
+cu[1,2] <- tu[1,2] <- NA
+mu <- as(tu,"matrix")
+stopifnot(isValid(cu, "CsparseMatrix"), isValid(cu, "triangularMatrix"),
+          isValid(tu, "TsparseMatrix"), isValid(tu, "triangularMatrix"),
+          identical(cu * 1:8, tu * 1:8), # but are no longer triangular
+          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()
+          isValid(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, tol= 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)
+(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, I2, tol = 1e-14),
+          all.equal(diag(4), as.mat(I2), tol = 1e-12),
+          all.equal(s.mm,  I2, tol = 1e-14),
+          all.equal(s.mms, I2, tol = 1e-14),
+          all.equal(s.ms2, s.msm, tol = 4e-15),
+          all.equal(s.ms2, I4c  , tol = 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.. <- Matrix:::diagN2U(I.)
+I <- Diagonal(5^5)
+stopifnot(isValid(IT3, "dtCMatrix"),
+          ## something like the equivalent of  all(I. == Diagonal(3125)) :
+          identical(as(I., "diagonalMatrix"), I),
+          identical(as(I..,"diagonalMatrix"), I)
+          )
+
+###-- 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)))
+
+###-- kronecker for nonsparse uses Matrix(.):
+stopifnot(isValid(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)
+	stopifnot(isValid(cs., "sparseVector"), identical(cs, as(cs., "vector")),
+                  isValid(rs., "sparseVector"), 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)
+stopifnot(isValid(mM, "dsCMatrix"), isValid(tM, "dtCMatrix")
+	  , 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)
+          , isValid(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))
+stopifnot(isValid(nkt, "ngCMatrix"),
+          isValid(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))
+stopifnot(isValid(c3 <- as(l3, "CsparseMatrix"), "CsparseMatrix"),# lgC
+          is(c3, "lMatrix"))
+(M <- Matrix(l3))
+stopifnot(isValid(M, "ltCMatrix"),
+          isValid(M2 <- M %x% M, "triangularMatrix"), # is "dtT" (why not "dtC" ?)
+          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
+stopifnot(isValid(as(Diagonal(3), "TsparseMatrix"), "TsparseMatrix"),
+          isValid(X <- Diagonal(7) + 1.5 * tM[1:7,1:7], "sparseMatrix"),
+          isValid(X, "triangularMatrix"),
+          isValid(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)),
+	  isValid(sM, "sparseMatrix"),
+	  isValid(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))
+##
+stopifnot(isValid(ms, "dsTMatrix"),
+          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) {
+        isValid(br1 <- band(r1, k1,k2), "ddenseMatrix")
+        isValid(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)
+stopifnot(isValid(sv,"sparseVector"),
+	  isValid(R, "sparseMatrix"),
+	  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"
+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"
+}
+
+if(!interactive()) warnings()
+
+## Platform - and other such info -- so we find it in old saved outputs
+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)])
+})
diff --git a/win32/deps/library/Matrix/tests/abIndex-tsts.R b/win32/deps/library/Matrix/tests/abIndex-tsts.R
new file mode 100644
index 0000000..d770f94
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/abIndex-tsts.R
@@ -0,0 +1,121 @@
+#### 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, tol = 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 == "/") 8e-16 else 0
+        ## now using special all.equal() method!
+        AEq <- function(a,b, ...) all.equal(a, b, tol=t.tol)
+        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 often "fails"
+                stopifnot(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)
+    stopifnot(isValid(ii <- Matrix:::abIindDiag(n), "abIndex"),
+              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))
+    stopifnot(isValid(ii <- Matrix:::abIindTri(n, diag=diag,upper=upper), "abIndex"),
+              Matrix:::indTri(n, diag=diag,upper=upper) == as(ii, "numeric"))
+
+cat('Time elapsed: ', (.pt <- proc.time()),'\n') # "stats"
diff --git a/win32/deps/library/Matrix/tests/base-matrix-fun.R b/win32/deps/library/Matrix/tests/base-matrix-fun.R
new file mode 100644
index 0000000..4f6862e
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/base-matrix-fun.R
@@ -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''
diff --git a/win32/deps/library/Matrix/tests/bind.R b/win32/deps/library/Matrix/tests/bind.R
new file mode 100644
index 0000000..4f25e34
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/bind.R
@@ -0,0 +1,131 @@
+#### Testing  cBind() & 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])
+
+stopifnot(identical(cBind ( m, 10*m) -> R,
+                    cbind2( m, 10*m))); R
+stopifnot(identical(cBind (m1,100+m1) -> R,
+                    cbind2(m1,100+m1))); R
+stopifnot(identical(cBind (m1, 10*m2) -> R,
+                    cbind2(m1, 10*m2))); R
+stopifnot(identical(cBind (m2, m1+m2) -> R,
+                    cbind2(m2, m1+m2))); R
+
+cBind(m1, MM = -1)
+rBind(R1 = 10:11, m1)
+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)
+
+## 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))
+stopifnot(TRUE
+	  ,isValid(D5.1, "dgCMatrix")
+	  ,isValid(print(rbind2(Matrix(1:10, 2,5), D5)),   "dgCMatrix")
+	  ,isValid(print(cbind2(Matrix(10:1, 5,2), D5.1)), "dgeMatrix")
+	  ,isValid(zz <- cbind2(z42, C86), "dgCMatrix")
+          ,identical(zz, cbind2(s42, C86))
+	  )
+
+showProc.time()
diff --git a/win32/deps/library/Matrix/tests/bind.Rout.save b/win32/deps/library/Matrix/tests/bind.Rout.save
new file mode 100644
index 0000000..68197df
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/bind.Rout.save
@@ -0,0 +1,385 @@
+
+R Under development (unstable) (2012-02-27 r58508)
+Copyright (C) 2012 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.
+
+> #### Testing  cBind() & rBind()
+> 
+> library(Matrix)
+Loading required package: lattice
+> 
+> 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])
+> 
+> stopifnot(identical(cBind ( m, 10*m) -> R,
++                     cbind2( m, 10*m))); R
+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
+> stopifnot(identical(cBind (m1,100+m1) -> R,
++                     cbind2(m1,100+m1))); R
+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
+> stopifnot(identical(cBind (m1, 10*m2) -> R,
++                     cbind2(m1, 10*m2))); R
+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
+> stopifnot(identical(cBind (m2, m1+m2) -> R,
++                     cbind2(m2, m1+m2))); R
+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
+> 
+> cBind(m1, MM = -1)
+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
+> rBind(R1 = 10:11, m1)
+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
+> 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.176 0.012 0.189 
+> 
+> ### --- Diagonal / Sparse - had bugs
+> 
+> D4 <- Diagonal(4)
+> (D4T <- as(D4, "TsparseMatrix"))
+4 x 4 sparse Matrix of class "dtTMatrix" (unitriangular)
+            
+[1,] 1 . . .
+[2,] . 1 . .
+[3,] . . 1 .
+[4,] . . . 1
+> 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.076 0 0.076 
+> 
+> ### --- 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.248 0 0.249 
+> 
+> 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  . . .
+> 
+> ## 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"
+            
+   | . . . .
+   . | . . .
+   . . | . .
+   . . . | .
+   . . . . |
+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,] . 1 . . 2
+[2,] . . 2 . 1
+[3,] 2 . 1 . .
+> (m2 <- cBind(m,m))
+3 x 10 sparse Matrix of class "dgCMatrix"
+                        
+[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,] . 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,] 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,] 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,]  1  1  1  1  1 1
+[2,]  .  .  .  .  . .
+[3,] 10  .  .  .  . 1
+[4,]  . 20  .  .  . 1
+[5,]  .  . 30  .  . 1
+[6,]  .  .  . 40  . 1
+[7,]  .  .  .  . 50 1
+[8,]  .  .  .  .  . .
+> stopifnot(TRUE
++ 	  ,isValid(D5.1, "dgCMatrix")
++ 	  ,isValid(print(rbind2(Matrix(1:10, 2,5), D5)),   "dgCMatrix")
++ 	  ,isValid(print(cbind2(Matrix(10:1, 5,2), D5.1)), "dgeMatrix")
++ 	  ,isValid(zz <- cbind2(z42, C86), "dgCMatrix")
++           ,identical(zz, cbind2(s42, C86))
++ 	  )
+7 x 5 sparse Matrix of class "dgCMatrix"
+                   
+[1,]  1  3  5  7  9
+[2,]  2  4  6  8 10
+[3,] 10  .  .  .  .
+[4,]  . 20  .  .  .
+[5,]  .  . 30  .  .
+[6,]  .  .  . 40  .
+[7,]  .  .  .  . 50
+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
+> 
+> showProc.time()
+Time elapsed:  0.208 0.004 0.213 
+> 
+> proc.time()
+   user  system elapsed 
+  2.716   0.060   2.779 
diff --git a/win32/deps/library/Matrix/tests/dg_Matrix.R b/win32/deps/library/Matrix/tests/dg_Matrix.R
new file mode 100644
index 0000000..32c678c
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/dg_Matrix.R
@@ -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"), tol = 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"), tol=1e-15),
+          all.equal(crossprod(m1), crossprod(m2), tol=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))## -> an error + a warning about singularity -- and caches the LU decomp
+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''
diff --git a/win32/deps/library/Matrix/tests/dpo-test.R b/win32/deps/library/Matrix/tests/dpo-test.R
new file mode 100644
index 0000000..eee9735
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/dpo-test.R
@@ -0,0 +1,171 @@
+### 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))
+str(h9)
+all.equal(c(determinant(h9)$modulus), -96.7369456, tol= 2e-8)
+stopifnot(0 == length(h9 factors))# nothing yet
+round(ch9 <- chol(h9), 3) ## round() preserves 'triangular' !
+str(f9 <- as(ch9, "dtrMatrix"))
+## h9 now has factorization
+stopifnot(names(h9 factors) == "Cholesky",
+          all.equal(rcond(h9), 9.0938e-13),
+          all.equal(rcond(f9), 9.1272e-7, tol = 1e-6))# more precision fails
+str(h9)# has 'factors $ Cholesky'
+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))
+h4  <- h9.[1:4, 1:4] # this and the next
+h9.[1,1] <- 10       # had failed in 0.995-14
+h9p[1,1] <- 10
+stopifnot(isValid(h9., "symmetricMatrix"),
+          isValid(h9p, "symmetricMatrix"),
+          isValid(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,
+          is(th9p <- t(h9p), "dppMatrix"),
+	  is(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), tol=1e-13),
+	  all.equal(h9, crossprod(hs factors$ Cholesky), tol=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), tol = 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),
+          tol=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),
+	      tol = 1e-9))
+showProc.time()
+
+
+set.seed(27)
+m9 <- h9 + rnorm(9^2)/1000 ; m9 <- (m9 + t(m9))/2
+nm9 <- nearPD(m9)
+
+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, tol = 8*.Machine$double.eps),
+		  all.equal(eigen(n.m$mat, only.values=TRUE)$values,
+			    n.m$eigenvalues, tol = 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), tol=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, tol=1e-15))
+
+showProc.time()
+
diff --git a/win32/deps/library/Matrix/tests/dtpMatrix.R b/win32/deps/library/Matrix/tests/dtpMatrix.R
new file mode 100644
index 0000000..fbe087b
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/dtpMatrix.R
@@ -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"), tol= 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''
diff --git a/win32/deps/library/Matrix/tests/factorizing.R b/win32/deps/library/Matrix/tests/factorizing.R
new file mode 100644
index 0000000..c0d0b74
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/factorizing.R
@@ -0,0 +1,399 @@
+#### Matrix Factorizations  --- of all kinds
+
+library(Matrix)
+
+source(system.file("test-tools.R", package = "Matrix"))# identical3() etc
+
+
+### "sparseQR" : Check consistency of methods
+##   --------
+data(KNex); mm <- KNex$mm; y <- KNex$y
+stopifnot(is((Y <- Matrix(y)), "dgeMatrix"))
+md <- as(mm, "matrix")                  # dense
+
+system.time(mmq <- qr(mm))
+system.time(mdq <- qr(md))# much (~ 150 x) slower
+
+## qr.qy and qr.qty should be inverses
+stopifnot(all.equal(qr.qy (mmq, qr.qty(mmq, y))@x, y),
+          all.equal(qr.qty(mmq, qr.qy (mmq, y))@x, y),
+          all.equal(qr.qty(mmq, y), qr.qty(mmq, Y)) )
+
+## consistency of results dense and sparse
+stopifnot(is.all.equal3(qr.coef  (mdq, y), qr.coef  (mmq,y)@x, qr.coef  (mmq,Y)@x) ,
+          is.all.equal3(qr.resid (mdq, y), qr.resid (mmq,y)@x, qr.resid (mmq,Y)@x) ,
+          is.all.equal3(qr.fitted(mdq, y), qr.fitted(mmq,y)@x, qr.fitted(mmq,Y)@x) )
+
+
+### "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"))
+## make sure 'factors' are *NOT* kept, when they should not:
+spm <- solve(pm)
+stopifnot(abs(as.vector(solve(Diagonal(30, x=10) %*% pm) / spm) - 1/10) < 1e-7,
+	  abs(as.vector(solve(rep.int(4, 30)	  *  pm) / spm) - 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)
+## *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
+    ldet <- Matrix:::.diag.dsC(Chx = CAp, res.kind = "sumLog")
+    ##
+    CA	<- Cholesky(A,perm=FALSE)
+    ldet2 <- 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")),
+	      all.equal(lDet, sum(log(Matrix:::.diag.dsC(Chx= CAp,res.kind="diag")))),
+	      relErr(d.^2, Matrix:::.diag.dsC(Chx= CA, res.kind="diag")) < 1e-14,
+	      all.equal(lDet, ldet),
+	      all.equal(lDet, ldet2),
+	      relErr(A[p,p], tcrossprod(mCAp)) < 1e-14)
+}## for()
+
+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 <- r12$r.all %*% (2^(2:0))
+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 chose
+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] == r$r.all[!iNA,] %*% (2^(2:0)))
+##     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.)
+stopifnot(isValid(CAinv <- solve(CA), "dsCMatrix"))
+MA <- as(CA, "Matrix") # with a confusing warning -- FIXME!
+isValid(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 this "TODO":
+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, tol = 1e-14),
+              all.equal(A,  A...,  tol = 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, tol = 1e-14),
+	  all.equal(ld.4, ld4, tol = 1e-14),
+	  all.equal(ld1, as.vector(ld1.$modulus), tol = 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), tol = 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)), tol = 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"))
+isValid(tA, "dsparseMatrix")# currently is dtTMatrix
+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), tol = 1e-15))
+
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
+if(!interactive()) warnings()
diff --git a/win32/deps/library/Matrix/tests/group-methods.R b/win32/deps/library/Matrix/tests/group-methods.R
new file mode 100644
index 0000000..98ff115
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/group-methods.R
@@ -0,0 +1,272 @@
+### 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
+
+stopifnot(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)
+}
+tmp <- sapply(1:16, tst) # failed in Matrix 1.0-4
+i <- sapply(1:16, function(i) sample(i,1))
+tmp <- mapply(tst, n= 1:16, i= i)# failed too
+
+showProc.time()
+set.seed(111)
+local({
+    for(i in 1:20) {
+        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(validObject(ll3), validObject(dsc),
+          identical(ll3, t(t(ll3))),
+          identical(dsc, t(t(dsc))),
+          isValid(dsc + 3 * Diagonal(nrow(dsc)), "dsCMatrix"),
+          isValid(dt3, "triangularMatrix"),   # remained triangular
+          isValid(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
+
+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))
+
+## 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
+
+stopifnot(identical(crossprod(lm1),# "lgC": here works!
+                    crossprod(as(lm1, "dMatrix"))
+                    ))
+
+## 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()
+
+### Systematically look at all "Ops" group generics for "all" Matrix classes
+### -------------- Main issue: Detect infinite recursion problems
+cl <- sapply(ls(), function(.) class(get(.)))
+Mcl <- c(grep("Matrix$", cl, value=TRUE),
+         grep("sparseVector", cl, value=TRUE))
+table(Mcl)
+## choose *one* of each class:
+## M.objs <- names(Mcl[!duplicated(Mcl)])
+## choose all
+M.objs <- names(Mcl)
+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 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")
+  }
+}
+
+stopifnot(identical(lm2, lm1 & lm2),
+	  identical(lm1, lm1 | lm2))
+
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
diff --git a/win32/deps/library/Matrix/tests/indexing.R b/win32/deps/library/Matrix/tests/indexing.R
new file mode 100644
index 0000000..134e15a
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/indexing.R
@@ -0,0 +1,839 @@
+#### 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
+    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()
+
+## 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 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
+                      show=FALSE)
+{
+    stopifnot(is(ms,"sparseMatrix"))
+    s1 <- function(n) sample(n, pmin(n, pmax(1, rpois(1, n.uniq))))
+    i <- sample(s1(nrow(ms)), k/2+ rpois(1, k/2), replace = TRUE)
+    j <- sample(s1(ncol(ms)), k/2+ rpois(1, k/2), replace = TRUE)
+    assert.EQ.mat(ms[i,j], mm[i,j])
+    ## now sub*assign* to these repeated indices, and then compare -----
+    v <- vRNG(length(i) * length(j))
+    mm[i,j] <- v
+    ms[i,j] <- v
+    if(!show) { op <- options(error = recover); on.exit(options(op)) }
+    assert.EQ.mat(ms, mm, show=show)
+}
+
+## 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 <- paste(kind, "Matrix", sep="")
+    Ckind <- paste(kind, "gCMatrix", sep="")
+    Tkind <- paste(kind, "gTMatrix", sep="")
+    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,20L))),
+              identical(unname(mT[,0]), new(Tkind, Dim = c(40L,0L))),
+              IDENT(mC[0,], as(mT[FALSE,], Ckind)),
+              IDENT(mC[,0], as(mT[,FALSE], Ckind)),
+              sapply(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 <- 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)
+    cat(" for(): ")
+    for(n in 1:(if(doExtras) 50 else 5)) {
+        chkAssign(mC, mm)
+        chkAssign(mC[-3,-2], mm[-3,-2])
+        cat(".")
+    }
+    cat(sprintf("\n[Ok]%s\n\n", repChar("-", 64)))
+ }
+ cat(sprintf("\nok( %s )\n== ###%s\n\n", kind, repChar("=", 70)))
+}## end{for}---------------------------------------------------------------
+showProc.time()
+
+##---- Symmetric indexing of symmetric Matrix ----------
+m. <- mC
+m.[, c(2, 7:12)] <- 0
+isValid(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 should error:
+    ## well... warning for now {back compatibility: gave *no* warning, nothing .. !}:
+    assertWarning(Nn[1:2,] <- -pi)
+    assertWarning(Nn[, 5] <- -pi)
+    assertWarning(Nn[2:4, 5:8] <- -pi)
+    ##
+    cat(".")
+    if(i %% 10 == 0) cat("\n")
+    if(i == 100) {
+        Nn0 <- as(Nn0, "CsparseMatrix")
+        cat("Now: class", class(Nn0)," :\n~~~~~~~~~~~~~~~~~\n")
+    }
+}
+showProc.time()
+
+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
+(m2 <- as(m0, "CsparseMatrix")) # dtCMatrix
+m1g <- as(m1, "generalMatrix")
+stopifnot(is(m1g, "dgTMatrix"))
+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(Matrix:::uniqTsparse(m1[, c(4,2)]),
+                    Matrix:::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
+stopifnot(identical(M, Diagonal(x=c(0, rep(1,4)))))
+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)
+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)))
+
+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)
+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)))
+showProc.time()
+
+
+## "Vector indices" -------------------
+.iniDiag.example <- expression({
+    D <- Diagonal(6)
+    M <- as(D,"dgeMatrix")
+    m <- as(D,"matrix")
+    s <- as(D,"TsparseMatrix")
+    S <- as(s,"CsparseMatrix")
+})
+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
+stopifnot(Q.C.identical(D,s, checkClass=FALSE))
+## logical
+eval(.iniDiag.example)
+m[L] <- z
+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
+
+## indexing [i]  vs  [i,] --- now ok
+eval(.iniDiag.example)
+stopifnot(identical5(m[i], M[i], D[i], s[i], S[i]))
+stopifnot(identical5(m[L], M[L], D[L], s[L], S[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]))
+stopifnot(identical5(m[L,drop=FALSE], M[L,drop=FALSE], D[L,drop=FALSE],
+		     s[L,drop=FALSE], S[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])
+
+## 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,])
+## 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])
+
+
+## --- negative 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"), tol=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)
+}
+showProc.time()
+}#--------------end if(doExtras) -----------------------------------------------
+
+if(!interactive()) warnings()
diff --git a/win32/deps/library/Matrix/tests/indexing.Rout.save b/win32/deps/library/Matrix/tests/indexing.Rout.save
new file mode 100644
index 0000000..7eebb30
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/indexing.Rout.save
@@ -0,0 +1,1634 @@
+
+R version 2.15.1 Patched (2012-07-24 r59961) -- "Roasted Marshmallows"
+Copyright (C) 2012 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 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")
+doExtras: FALSE 
+> 
+> if(interactive()) {
++     options(error = recover, warn = 1)
++ } else if(FALSE) { ## MM @ testing
++     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.652 0.008 0.661 
+> 
+> ## 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.16 0 0.16 
+> 
+> ## 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 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
++                       show=FALSE)
++ {
++     stopifnot(is(ms,"sparseMatrix"))
++     s1 <- function(n) sample(n, pmin(n, pmax(1, rpois(1, n.uniq))))
++     i <- sample(s1(nrow(ms)), k/2+ rpois(1, k/2), replace = TRUE)
++     j <- sample(s1(ncol(ms)), k/2+ rpois(1, k/2), replace = TRUE)
++     assert.EQ.mat(ms[i,j], mm[i,j])
++     ## now sub*assign* to these repeated indices, and then compare -----
++     v <- vRNG(length(i) * length(j))
++     mm[i,j] <- v
++     ms[i,j] <- v
++     if(!show) { op <- options(error = recover); on.exit(options(op)) }
++     assert.EQ.mat(ms, mm, show=show)
++ }
+> 
+> ## 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 <- paste(kind, "Matrix", sep="")
++     Ckind <- paste(kind, "gCMatrix", sep="")
++     Tkind <- paste(kind, "gTMatrix", sep="")
++     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,20L))),
++               identical(unname(mT[,0]), new(Tkind, Dim = c(40L,0L))),
++               IDENT(mC[0,], as(mT[FALSE,], Ckind)),
++               IDENT(mC[,0], as(mT[,FALSE], Ckind)),
++               sapply(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 <- 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)
++     cat(" for(): ")
++     for(n in 1:(if(doExtras) 50 else 5)) {
++         chkAssign(mC, mm)
++         chkAssign(mC[-3,-2], mm[-3,-2])
++         cat(".")
++     }
++     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:  2.344 0.016 2.367 
+> 
+> ##---- Symmetric indexing of symmetric Matrix ----------
+> m. <- mC
+> m.[, c(2, 7:12)] <- 0
+> isValid(S <- crossprod(add.simpleDimnames(m.) %% 100), "dsCMatrix")
+[1] TRUE
+> 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.532 0.004 0.539 
+> 
+> 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
+Note: Method with signature "numeric#sparseVector" chosen for function "coerce",
+ target signature "integer#sparseVector".
+ "atomicVector#sparseVector" would also be valid
+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
+diagnosing replTmat(x,i,j,v): nargs()= 3; missing (i,j) = (0,1)
+> C[C>0] <- 21
+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.712 0.004 0.719 
+> 
+> ##---  "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 should error:
++     ## well... warning for now {back compatibility: gave *no* warning, nothing .. !}:
++     assertWarning(Nn[1:2,] <- -pi)
++     assertWarning(Nn[, 5] <- -pi)
++     assertWarning(Nn[2:4, 5:8] <- -pi)
++     ##
++     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.552 0.008 0.562 
+> 
+> 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
+5 x 5 sparse Matrix of class "dtTMatrix" (unitriangular)
+              
+[1,] 1 . . . .
+[2,] . 1 . . .
+[3,] . . 1 . .
+[4,] . . . 1 .
+[5,] . . . . 1
+> (m2 <- as(m0, "CsparseMatrix")) # dtCMatrix
+5 x 5 sparse Matrix of class "dtCMatrix" (unitriangular)
+              
+[1,] 1 . . . .
+[2,] . 1 . . .
+[3,] . . 1 . .
+[4,] . . . 1 .
+[5,] . . . . 1
+> m1g <- as(m1, "generalMatrix")
+> stopifnot(is(m1g, "dgTMatrix"))
+> 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(Matrix:::uniqTsparse(m1[, c(4,2)]),
++                     Matrix:::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,] 1 . .
+[2,] . 1 .
+[3,] . . 1
+> uTr[1,] <- 0
+> assert.EQ.mat(uTr, cbind(0, rbind(0,diag(2))))
+> 
+> M <- m0; M[1,] <- 0
+> stopifnot(identical(M, Diagonal(x=c(0, rep(1,4)))))
+> 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
+> 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)))
+> 
+> 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
+> 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)))
+> showProc.time()
+Time elapsed:  2.196 0.016 2.219 
+> 
+> 
+> ## "Vector indices" -------------------
+> .iniDiag.example <- expression({
++     D <- Diagonal(6)
++     M <- as(D,"dgeMatrix")
++     m <- as(D,"matrix")
++     s <- as(D,"TsparseMatrix")
++     S <- as(s,"CsparseMatrix")
++ })
+> 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
+> stopifnot(Q.C.identical(D,s, checkClass=FALSE))
+> ## logical
+> eval(.iniDiag.example)
+> m[L] <- z
+> 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
+> 
+> ## indexing [i]  vs  [i,] --- now ok
+> eval(.iniDiag.example)
+> stopifnot(identical5(m[i], M[i], D[i], s[i], S[i]))
+> stopifnot(identical5(m[L], M[L], D[L], s[L], S[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
+> ## 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]))
+> stopifnot(identical5(m[L,drop=FALSE], M[L,drop=FALSE], D[L,drop=FALSE],
++ 		     s[L,drop=FALSE], S[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])
+> 
+> ## 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,])
+> ## 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])
+> 
+> 
+> ## --- negative 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.284 0.004 0.288 
+> 
+> ## 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.584 0.004 0.59 
+> 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:  2.536 0.016 2.562 
+> 
+> 
+> ## 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,] 1 2 . .
+[2,] . 1 . .
+[3,] . . 1 .
+[4,] . . . 1
+> (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:  2.521 0.016 2.545 
+> 
+> ## 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"), tol=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)
++ }
++ showProc.time()
++ }#--------------end if(doExtras) -----------------------------------------------
+> 
+> if(!interactive()) warnings()
+NULL
+> 
+> proc.time()
+   user  system elapsed 
+ 18.997   0.384  19.439 
diff --git a/win32/deps/library/Matrix/tests/matprod.R b/win32/deps/library/Matrix/tests/matprod.R
new file mode 100644
index 0000000..5890cc7
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/matprod.R
@@ -0,0 +1,435 @@
+library(Matrix)
+
+### Matrix Products including  cross products
+
+source(system.file("test-tools.R", package = "Matrix"))
+
+### dimnames -- notably for matrix products
+## from ../R/Auxiliaries.R :
+.M.DN <- function(x) if(!is.null(dn <- dimnames(x))) dn else list(NULL,NULL)
+dnIdentical <- function(x,y) identical(.M.DN(x), .M.DN(y))
+chkDnProd <- function(m, M = Matrix(m), browse=FALSE) {
+    ## TODO:
+    ## if(browse) stopifnot <- f.unction(...)  such that it enters browser()..
+    stopifnot(is.matrix(m), is(M, "Matrix"))
+    ## m is  n x d  (say)
+
+    p1 <- (tm <- t(m)) %*% m ## d x d
+    p1. <- crossprod(m)
+    stopifnot(dnIdentical(p1, p1.))
+
+    t1 <- m %*% tm ## n x n
+    t1. <- tcrossprod(m)
+    stopifnot(dnIdentical(t1, t1.))
+
+    ## 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(dnIdentical(P1, P1.), dnIdentical(P1, p1),
+		  dnIdentical(P1., crossprod(M,M)),
+		  dnIdentical(P1., crossprod(M,m)),
+		  dnIdentical(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),
+		  is(L,"triangularMatrix"), is(R,"triangularMatrix"),
+		  dnIdentical(PP1, (pp1 <- p1 %*% p1)),
+		  dnIdentical(PP1, R),
+		  dnIdentical(L, R))
+
+	T1 <- M %*% tM
+	T1. <- tcrossprod(M)
+	stopifnot(dnIdentical(T1, T1.), dnIdentical(T1, t1),
+		  dnIdentical(T1., tcrossprod(M,M)),
+		  dnIdentical(T1., tcrossprod(M,m)),
+		  dnIdentical(T1., tcrossprod(m,M)),
+		  dnIdentical(tcrossprod(T1., tM),
+			      tcrossprod(t1., tm)),
+		  dnIdentical(crossprod(T1., M),
+			      crossprod(t1., m)))
+
+	## Now, *mixing*  Matrix x matrix:
+	stopifnot(dnIdentical(tM %*% m, tm %*% M))
+
+	## Symmetric and Triangular
+	stopifnot(dnIdentical(PP1 %*% tM, pp1 %*% tm),
+		  dnIdentical(R %*% tM, r %*% tm),
+		  dnIdentical(L %*% tM, L %*% tm))
+    }
+    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
+##
+chkDnProd(m..)
+chkDnProd(m0.)
+chkDnProd(m.0)
+chkDnProd(m00)
+
+
+
+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})
+stopifnot(isValid(tr5, "dtrMatrix"),
+	  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)
+stopifnot(isValid(tr5.2, "dtrMatrix"),
+	  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
+## not sensical for tcrossprod() because of 'vec' --> cbind(vec) promotion:
+assert.EQ.mat( crossprod(rep(1,5), m5),	 rbind( colSums(m5)))
+assert.EQ.mat( crossprod(rep(1,5), m.),	 rbind( colSums(m5)))
+assert.EQ.mat( crossprod(m5, rep(1,5)),	 cbind( colSums(m5)))
+assert.EQ.mat( crossprod(m., rep(1,5)),	 cbind( colSums(m5)))
+
+## 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)
+
+### ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+### 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)
+(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)
+
+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),
+	      crossprod(trm, as.matrix(cu3)))
+## "FIXME" should return triangular ...
+
+cl2
+cu2. <- Diagonal(4) + Matrix(c(rep(0,9),14,0,0,6,0,0,0), 4,4)
+D4 <- Diagonal(4, x=10:7)
+stopifnot(all(cu2 == cu2.),# was wrong for ver. <= 0.999375-4
+	  is(cu2, "dtCMatrix"), is(cl2, "dtCMatrix"), # triangularity preserved
+	  cu2 diag == "U", cl2 diag == "U",# UNIT-triangularity preserved
+	  all.equal(D4 %*% cu, D4 %*% as.matrix(cu)),
+	  all.equal(cu %*% D4, as.matrix(cu) %*% D4),
+	  isValid(su <- crossprod(cu), "dsCMatrix"),
+	  all(D4 %*% su == D4 %*% as.mat(su)),
+	  all(su %*% D4 == as.mat(su) %*% D4),
+	  identical(t(cl2), cu2), # !!
+	  identical( crossprod(cu), Matrix( crossprod(as.matrix(cu)),sparse=TRUE)),
+	  identical(tcrossprod(cu), Matrix(tcrossprod(as.matrix(cu)),sparse=TRUE)))
+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))
+
+
+## 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)
+z  <- solve( B2, as(bb,"dgeMatrix"))
+stopifnot(identical(z, z.))
+## 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
+sM  <- new("ngTMatrix", i = rowi, j=coli, Dim=as.integer(c(N,N)))
+sM # nice
+
+sm <- as(sM, "matrix")
+sM %*% sM
+assert.EQ.mat(sM %*% sM,	sm %*% sm)
+assert.EQ.mat(t(sM) %*% sM,
+	      (t(sm) %*% sm) > 0, tol=0)
+crossprod(sM)
+tcrossprod(sM)
+stopifnot(identical(as( crossprod(sM), "ngCMatrix"), t(sM) %*%	 sM),
+	  identical(as(tcrossprod(sM), "ngCMatrix"),  sM  %*% t(sM)))
+
+assert.EQ.mat( crossprod(sM),  crossprod(sm) > 0)
+assert.EQ.mat(tcrossprod(sM), as(tcrossprod(sm),"matrix") > 0)
+
+## "l" --- logical Matrices -- use usual 0/1 arithmetic
+nsM <- sM
+sM  <- as(sM, "lMatrix")
+sm <- as(sM, "matrix")
+stopifnot(identical(sm, as.matrix(nsM)))
+sM %*% sM
+assert.EQ.mat(sM %*% sM,	sm %*% sm)
+assert.EQ.mat(t(sM) %*% sM,
+	      t(sm) %*% sm, tol=0)
+crossprod(sM)
+tcrossprod(sM)
+stopifnot(identical( crossprod(sM), as(t(sM) %*% sM, "symmetricMatrix")),
+	  identical(tcrossprod(sM), forceSymmetric(sM %*% t(sM))))
+assert.EQ.mat( crossprod(sM),  crossprod(sm))
+assert.EQ.mat(tcrossprod(sM), as(tcrossprod(sm),"matrix"))
+
+
+## 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
+
+isValid(tru %*% I3,		"triangularMatrix")
+isValid(crossprod(tru, I3),	"triangularMatrix")
+isValid(crossprod(I3, tru),	"triangularMatrix")
+isValid(tcrossprod(I3, tru),	"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
+stopifnot(isValid(tm1, "dsCMatrix"),
+	  all.equal(tm1, tm2, tol=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)
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
diff --git a/win32/deps/library/Matrix/tests/matr-exp.R b/win32/deps/library/Matrix/tests/matr-exp.R
new file mode 100644
index 0000000..0666c15
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/matr-exp.R
@@ -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, tol = 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), tol = 1e-12),
+          all.equal(exp.M6[,5], c(0,0,0,0, 1,0), tol = 1e-12),
+          all(exp.M6[3:4, c(1:2,5:6)] == 0)
+          )
+
+cat('Time elapsed: ', proc.time(),'\n') # for ``statistical reasons''
diff --git a/win32/deps/library/Matrix/tests/other-pkgs.R b/win32/deps/library/Matrix/tests/other-pkgs.R
new file mode 100644
index 0000000..23b389e
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/other-pkgs.R
@@ -0,0 +1,139 @@
+####--------- 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
+
+    pdf("other-pkg-graph.pdf")
+
+    ## 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))),
+		  identical(At.csr, t(A.csr)),
+		  identical(A, as.matrix(A.csr)),
+		  identical(M, as(A.csr, "CsparseMatrix")),
+		  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(as(M, "matrix.csr"), "Matrix") # dgC
+	M4 <- as(as(M, "matrix.csc"), "Matrix") # dgC
+	M5 <- as(as(M, "matrix.coo"), "Matrix") # dgT
+	uniqT <- Matrix:::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}
diff --git a/win32/deps/library/Matrix/tests/spModel.matrix.R b/win32/deps/library/Matrix/tests/spModel.matrix.R
new file mode 100644
index 0000000..a2407cb
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/spModel.matrix.R
@@ -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, tol=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()
diff --git a/win32/deps/library/Matrix/tests/validObj.R b/win32/deps/library/Matrix/tests/validObj.R
new file mode 100644
index 0000000..b1ac330
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/validObj.R
@@ -0,0 +1,177 @@
+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",
+	    "dMatrix", "denseMatrix", "compMatrix", "Matrix", "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"))
+stopifnot(validObject(T <- new("dtTMatrix", Dim = c(n,n), diag = "U")),
+	  identical(as.mat(T), diag(n)),
+	  validObject(M <- new("dtCMatrix", Dim = c(n,n), diag = "U",
+			       p = rep.int(0:0, n+1)))
+	  )
+
+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,]),
+	  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)
+##
+## 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)
+stopifnot(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()
diff --git a/win32/deps/library/Matrix/tests/write-read.R b/win32/deps/library/Matrix/tests/write-read.R
new file mode 100644
index 0000000..6381baf
--- /dev/null
+++ b/win32/deps/library/Matrix/tests/write-read.R
@@ -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
diff --git a/win32/deps/library/base/CITATION b/win32/deps/library/base/CITATION
index 03cef58..44c3b29 100644
--- a/win32/deps/library/base/CITATION
+++ b/win32/deps/library/base/CITATION
@@ -1,23 +1,24 @@
-citHeader("To cite R in publications use:")
-
-citEntry(entry="Manual",
+bibentry("Manual",
          title = "R: A Language and Environment for Statistical Computing",
-         author = person(last="R Development Core Team"),
+         author = person("R Core Team"),
          organization = "R Foundation for Statistical Computing",
          address      = "Vienna, Austria",
          year         = version$year,
          note         = "{ISBN} 3-900051-07-0",
-         url          = "http://www.R-project.org";,
+         url          = "http://www.R-project.org/";,
          
          textVersion = 
-         paste("R Development Core Team (", version$year, "). ", 
+         paste("R Core Team (", version$year, "). ", 
                "R: A language and environment for statistical computing. ",
                "R Foundation for Statistical Computing, Vienna, Austria. ",
-               "ISBN 3-900051-07-0, URL http://www.R-project.org.";,
-               sep="")
-         )
-
-citFooter("We have invested a lot of time and effort in creating R,",
+               "ISBN 3-900051-07-0, URL http://www.R-project.org/.";,
+               sep=""),
+	       
+         mheader = "To cite R in publications use:",
+	 
+	 mfooter = 
+         paste("We have invested a lot of time and effort in creating R,",
           "please cite it when using it for data analysis.",
 	  "See also", sQuote("citation(\"pkgname\")"),
-	  "for citing R packages.")
+	  "for citing R packages.", sep = " ")
+	)
diff --git a/win32/deps/library/base/DESCRIPTION b/win32/deps/library/base/DESCRIPTION
index 6fc50bb..131ef4b 100644
--- a/win32/deps/library/base/DESCRIPTION
+++ b/win32/deps/library/base/DESCRIPTION
@@ -1,9 +1,9 @@
 Package: base
-Version: 2.9.2
+Version: 2.15.2
 Priority: base
 Title: The R Base Package
-Author: R Development Core Team and contributors worldwide
+Author: R Core Team and contributors worldwide
 Maintainer: R Core Team <R-core r-project org>
 Description: Base R functions
-License: Part of R 2.9.2
-Built: R 2.9.2; ; 2009-08-24 12:46:30 UTC; windows
+License: Part of R 2.15.2
+Built: R 2.15.2; ; 2012-10-27 03:08:06 UTC; windows
diff --git a/win32/deps/library/base/INDEX b/win32/deps/library/base/INDEX
index e7c1b75..355b8db 100644
--- a/win32/deps/library/base/INDEX
+++ b/win32/deps/library/base/INDEX
@@ -1,12 +1,14 @@
+.Call                   Modern Interfaces to C/C++ code
 .Device                 Lists of Open/Active Graphics Devices
 .Internal               Call an Internal Function
 .Last.value             Value of Last Evaluated Expression
 .Library                Search Paths for Packages
 .Machine                Numerical Characteristics of the Machine
 .Platform               Platform Specific Variables
-.Primitive              Call a "Primitive" Internal Function
+.Primitive              Look Up a Primitive Function
+.bincode                Bin a Numeric Vector
 .deparseOpts            Options for Expression Deparsing
-.onLoad                 Hooks for Name Space events
+.onLoad                 Hooks for Namespace Events
 .packages               Listing of Packages
 .standard_regexps       Miscellaneous Internal/Programming Utilities
 :                       Colon Operator
@@ -16,6 +18,7 @@ Arithmetic              Arithmetic Operators
 AsIs                    Inhibit Interpretation/Conversion of Objects
 Bessel                  Bessel Functions
 Comparison              Relational Operators
+Constants               Built-in Constants
 Control                 Control Flow
 Cstack_info             Report Information on C Stack Size and Usage
 DateTimeClasses         Date-Time Classes
@@ -28,12 +31,13 @@ Extract                 Extract or Replace Parts of an Object
 Filter                  Common Higher-Order Functions in Functional
                         Programming Languages
 Foreign                 Foreign Function Interface
+ISOdatetime             Date-time Conversion Functions from Numeric
+                        Representations
 InternalMethods         Internal Generic Functions
-LETTERS                 Built-in Constants
 Logic                   Logical Operators
 Memory                  Memory Available for Data Storage
 Memory-limits           Memory Limits in R
-NA                      Not Available / "Missing" Values
+NA                      'Not Available' / Missing Values
 NULL                    The Null Object
 NotYetImplemented       Not Yet Implemented Functions and Unused
                         Arguments
@@ -43,12 +47,11 @@ Paren                   Parentheses and Braces
 Quotes                  Quotes
 R.Version               Version Information
 R.home                  Return the R Home Directory
-RNG                     Random Number Generation
+Random                  Random Number Generation
 Random.user             User-supplied Random Number Generation
 Rdconv                  Utilities for Processing Rd Files
 Recall                  Recursive Calling
 Reserved                Reserved Words in R
-S3groupGeneric          S3 Group Generic Functions
 Special                 Special Functions of Mathematics
 Startup                 Initialization at Start of an R Session
 Syntax                  Operator Syntax and Precedence
@@ -56,18 +59,23 @@ Sys.getenv              Get Environment Variables
 Sys.getpid              Get the Process ID of the R Session
 Sys.glob                Wildcard Expansion on File Paths
 Sys.info                Extract System and User Information
+Sys.localeconv          Find Details of the Numerical and Monetary
+                        Representations in the Current Locale
+Sys.readlink            Read File Symbolic Links
+Sys.setFileTime         Set File Time
 Sys.setenv              Set or Unset Environment Variables
 Sys.sleep               Suspend Execution for a Time Interval
 Sys.time                Get Current Date and Time
 Sys.timezone            Time Zones
-Sys.which               Find Full Paths of Executables
+Sys.which               Find Full Paths to Executables
 Trig                    Trigonometric Functions
 UseMethod               Class Methods
+Vectorize               Vectorize a Scalar Function
 [.data.frame            Extract or Replace Parts of a Data Frame
 [.factor                Extract or Replace Parts of a Factor
 abbreviate              Abbreviate Strings
 abs                     Miscellaneous Mathematical Functions
-addTaskCallback         Add or remove a top-level task callback
+addTaskCallback         Add or Remove a Top-Level Task Callback
 agrep                   Approximate String Matching (Fuzzy Matching)
 all                     Are All Values True?
 all.equal               Test if Two Objects are (Nearly) Equal
@@ -78,6 +86,7 @@ append                  Vector Merging
 apply                   Apply Functions Over Array Margins
 args                    Argument List of a Function
 array                   Multi-way Arrays
+as.Date                 Date Conversion Functions to and from Character
 as.POSIXct              Date-time Conversion Functions
 as.data.frame           Coerce to a Data Frame
 as.environment          Coerce to an Environment Object
@@ -85,12 +94,11 @@ as.function             Convert Object to Function
 assign                  Assign a Value to a Name
 assignOps               Assignment Operators
 attach                  Attach Set of R Objects to Search Path
-attachNamespace         Loading and Unloading Name Spaces
+attachNamespace         Loading and Unloading Namespaces
 attr                    Object Attributes
 attributes              Object Attribute Lists
 autoload                On-demand Loading of Packages
 backsolve               Solve an Upper or Lower Triangular System
-base-deprecated         Deprecated Functions in Base package
 base-package            The R Base Package
 basename                Manipulate File Paths
 bindenv                 Binding and Environment Adjustments
@@ -98,8 +106,10 @@ body                    Access to and Manipulation of the Body of a
                         Function
 bquote                  Partial substitution in expressions
 browser                 Environment Browser
+browserText             Functions to Retrieve Values Supplied by Calls
+                        to the Browser
 builtins                Returns the Names of All Built-in Objects
-by                      Apply a Function to a Data Frame split by
+by                      Apply a Function to a Data Frame Split by
                         Factors
 c                       Combine Values into a Vector or List
 call                    Function Calls
@@ -119,7 +129,7 @@ class                   Object Classes
 col                     Column Indexes
 colSums                 Form Row and Column Sums and Means
 commandArgs             Extract Command Line Arguments
-comment                 Query or Set a 'Comment' Attribute
+comment                 Query or Set a '"comment"' Attribute
 complex                 Complex Vectors
 conditions              Condition Handling and Recovery
 conflicts               Search for Masked Objects on the Search Path
@@ -145,15 +155,16 @@ diff                    Lagged Differences
 difftime                Time Intervals
 dim                     Dimensions of an Object
 dimnames                Dimnames of an Object
-dir.create              Manipulaton of Directories and file Permissions
+dir.create              Manipulaton of Directories and File Permissions
 do.call                 Execute a Function Call
 double                  Double-Precision Vectors
 dput                    Write an Object to a File or Recreate it
 drop                    Drop Redundant Extent Information
+droplevels              droplevels
 dump                    Text Representations of R Objects
 duplicated              Determine Duplicate Elements
 dyn.load                Foreign Function Interface
-eapply                  Apply a Function over values in an environment
+eapply                  Apply a Function Over Values in an Environment
 eigen                   Spectral Decomposition of a Matrix
 encodeString            Encode Character Vector as for Printing
 environment             Environment Access
@@ -170,12 +181,12 @@ file.info               Extract File Information
 file.path               Construct Path to File
 file.show               Display One or More Files
 files                   File Manipulation
+find.package            Find Packages
 findInterval            Find Interval Numbers or Indices
 force                   Force Evaluation of an Argument
 formals                 Access to and Manipulation of the Formal
                         Arguments
 format                  Encode in a Common Format
-format.Date             Date Conversion Functions to and from Character
 format.info             format(.) Information
 format.pval             Format P Values
 formatC                 Formatting Using C-style Formats
@@ -194,18 +205,20 @@ getLoadedDLLs           Get DLLs Loaded in Current Session
 getNativeSymbolInfo     Obtain a Description of one or more Native
                         (C/Fortran) Symbols
 getNumCConverters       Management of .C argument conversion list
-getTaskCallbackNames    Query the names of the current internal
-                        top-level task callbacks
+getTaskCallbackNames    Query the Names of the Current Internal
+                        Top-Level Task Callbacks
 gettext                 Translate Text Messages
 getwd                   Get or Set Working Directory
 gl                      Generate Factor Levels
 grep                    Pattern Matching and Replacement
+grepRaw                 Pattern Matching for Raw Vectors
+groupGeneric            S3 Group Generic Functions
 gzcon                   (De)compress I/O Through Connections
 hexmode                 Display Numbers in Hexadecimal
 iconv                   Convert Character Vector between Encodings
 icuSetCollate           Setup Collation by ICU
 identical               Test Objects for Exact Equality
-identity                Identity function
+identity                Identity Function
 ifelse                  Conditional Element Selection
 integer                 Integer Vectors
 interaction             Compute Factor Interactions
@@ -215,16 +228,16 @@ is.R                    Are we using R, rather than S?
 is.finite               Finite, Infinite and NaN Numbers
 is.function             Is an Object of Type (Primitive) Function?
 is.language             Is an Object a Language Object?
-is.object               Is an Object "internally classed"?
+is.object               Is an Object 'internally classed'?
 is.recursive            Is an Object Atomic or Recursive?
 is.single               Is an Object of Single Precision Type?
 is.unsorted             Test if an Object is Not Sorted
 isS4                    Test for an S4 object
 isSymmetric             Test if a Matrix or other Object is Symmetric
-jitter                  Add 'Jitter' (Noise) to Numbers
+jitter                  'Jitter' (Add Noise) to Numbers
 kappa                   Compute or Estimate the Condition Number of a
                         Matrix
-kronecker               Kronecker products on arrays
+kronecker               Kronecker Products on Arrays
 l10n_info               Localization Information
 labels                  Find Labels from Object
 lapply                  Apply a Function over a List or Vector
@@ -233,11 +246,10 @@ levels                  Levels Attributes
 library                 Loading and Listing of Packages
 library.dynam           Loading DLLs from Packages
 license                 The R License Terms
-list                    Lists -- Generic and Dotted Pairs
+list                    Lists - Generic and Dotted Pairs
 list.files              List the Files in a Directory/Folder
+list2env                From A List, Build or Add To an Environment
 load                    Reload Saved Datasets
-localeconv              Find Details of the Numerical and Monetary
-                        Representations in the Current Locale
 locales                 Query or Set Aspects of the Locale
 log                     Logarithms and Exponentials
 logical                 Logical Vectors
@@ -245,19 +257,20 @@ lower.tri               Lower and Upper Triangular Part of a Matrix
 ls                      List Objects
 make.names              Make Syntactically Valid Names
 make.unique             Make Character Strings Unique
-mapply                  Apply a function to multiple list or vector
-                        arguments
+mapply                  Apply a Function to Multiple List or Vector
+                        Arguments
 margin.table            Compute table margin
 mat.or.vec              Create a Matrix or a Vector
 match                   Value Matching
 match.arg               Argument Verification Using Partial Matching
 match.call              Argument Matching
-match.fun               Function Verification for "Function Variables"
+match.fun               Extract a Function Specified by Name
 matmult                 Matrix Multiplication
 matrix                  Matrices
 max                     Maxima and Minima
 max.col                 Find Maximum Position in Matrix
 mean                    Arithmetic Mean
+memCompress             In-memory Compression and Decompression
 memory.profile          Profile the Usage of Cons Cells
 merge                   Merge Two Data Frames
 message                 Diagnostic Messages
@@ -269,8 +282,10 @@ nargs                   The Number of Arguments to a Function
 nchar                   Count the Number of Characters (or Bytes or
                         Width)
 nlevels                 The Number of Levels of a Factor
-noquote                 Class for "no quote" Printing of Character
+noquote                 Class for 'no quote' Printing of Character
                         Strings
+norm                    Compute the Norm of a Matrix
+normalizePath           Express File Paths in Canonical Form
 nrow                    The Number of Rows/Columns of an Array
 numeric                 Numeric Vectors
 numeric_version         Numeric Versions
@@ -310,10 +325,13 @@ readBin                 Transfer Binary Data To and From Connections
 readChar                Transfer Character Strings To and From
                         Connections
 readLines               Read Text Lines from a Connection
+readRDS                 Serialization Interface for Single Objects
+readRenviron            Set Environment Variables from a File
 readline                Read a Line from the Terminal
 real                    Real Vectors
 reg.finalizer           Finalization of Objects
 regex                   Regular Expressions as used in R
+regmatches              Extract or Replace Matched Substrings
 remove                  Remove Objects from a Specified Environment
 rep                     Replicate Elements of Vectors and Lists
 replace                 Replace Values in a Vector
@@ -323,8 +341,8 @@ round.POSIXt            Round / Truncate Data-Time Objects
 row                     Row Indexes
 row.names               Get and Set Row Names for Data Frames
 rownames                Row and Column Names
-rowsum                  Give column sums of a matrix or data frame,
-                        based on a grouping variable
+rowsum                  Give Column Sums of a Matrix or Data Frame,
+                        Based on a Grouping Variable
 sQuote                  Quote Text
 sample                  Random Samples and Permutations
 save                    Save R Objects
@@ -334,7 +352,7 @@ search                  Give Search Path for R Objects
 seek                    Functions to Reposition Connections
 seq                     Sequence Generation
 seq.Date                Generate Regular Sequences of Dates
-seq.POSIXt              Generate Regular Sequences of Dates
+seq.POSIXt              Generate Regular Sequences of Times
 sequence                Create A Vector of Sequences
 serialize               Simple Serialization Interface
 setTimeLimit            Set CPU and/or Elapsed Time Limits
@@ -354,11 +372,13 @@ split                   Divide into Groups and Reassemble
 sprintf                 Use C-style String Formatting Commands
 srcfile                 References to source files
 stop                    Stop Function Execution
-stopifnot               Ensure the 'Truth' of R Expressions
+stopifnot               Ensure the Truth of R Expressions
 strptime                Date-time Conversion Functions to and from
                         Character
 strsplit                Split the Elements of a Character Vector
-strtrim                 Trim Character Strings to Specified Widths
+strtoi                  Convert Strings to Integers
+strtrim                 Trim Character Strings to Specified Display
+                        Widths
 structure               Attribute Specification
 strwrap                 Wrap Character Strings to Format Paragraphs
 subset                  Subsetting Vectors, Matrices and Data Frames
@@ -374,11 +394,12 @@ sys.source              Parse and Evaluate Expressions from a File
 system                  Invoke a System Command
 system.file             Find Names of R System Files
 system.time             CPU Time Used
+system2                 Invoke a System Command
 t                       Matrix Transpose
 table                   Cross Tabulation and Table Creation
 tabulate                Tabulation for Vectors
-tapply                  Apply a Function Over a "Ragged" Array
-taskCallbackManager     Create an R-level task callback manager
+tapply                  Apply a Function Over a Ragged Array
+taskCallbackManager     Create an R-level Task Callback Manager
 tempfile                Create Names for Temporary Files
 textConnection          Text Connections
 tilde                   Tilde Operator
@@ -409,3 +430,4 @@ withVisible             Return both a value and its visibility
 write                   Write Data to a File
 writeLines              Write Lines to a Connection
 xtfrm                   Auxiliary Function for Sorting and Ranking
+zapsmall                Rounding of Numbers
diff --git a/win32/deps/library/base/Meta/Rd.rds b/win32/deps/library/base/Meta/Rd.rds
index e982871..2a05420 100644
Binary files a/win32/deps/library/base/Meta/Rd.rds and b/win32/deps/library/base/Meta/Rd.rds differ
diff --git a/win32/deps/library/base/Meta/demo.rds b/win32/deps/library/base/Meta/demo.rds
index 4db926d..f729e47 100644
Binary files a/win32/deps/library/base/Meta/demo.rds and b/win32/deps/library/base/Meta/demo.rds differ
diff --git a/win32/deps/library/base/Meta/hsearch.rds b/win32/deps/library/base/Meta/hsearch.rds
index 18fb25f..2fa2f94 100644
Binary files a/win32/deps/library/base/Meta/hsearch.rds and b/win32/deps/library/base/Meta/hsearch.rds differ
diff --git a/win32/deps/library/base/Meta/links.rds b/win32/deps/library/base/Meta/links.rds
new file mode 100644
index 0000000..70f142b
Binary files /dev/null and b/win32/deps/library/base/Meta/links.rds differ
diff --git a/win32/deps/library/base/Meta/package.rds b/win32/deps/library/base/Meta/package.rds
index a77d121..573c2b6 100644
Binary files a/win32/deps/library/base/Meta/package.rds and b/win32/deps/library/base/Meta/package.rds differ
diff --git a/win32/deps/library/base/R/Rprofile b/win32/deps/library/base/R/Rprofile
index b48c326..9ad2407 100644
--- a/win32/deps/library/base/R/Rprofile
+++ b/win32/deps/library/base/R/Rprofile
@@ -1,5 +1,7 @@
 ### This is the system Rprofile file. It is always run on startup.
 ### Additional commands can be placed in site or user Rprofile files
+#
+#  Copyright (C) 1995-2012 The R Core Team
 ### (see ?Rprofile).
 
 ### Notice that it is a bad idea to use this file as a template for
@@ -37,7 +39,7 @@ options(stringsAsFactors = TRUE)
 if(!interactive() && is.null(getOption("showErrorCalls")))
     options(showErrorCalls = TRUE)
 
-local({dp <- as.vector(Sys.getenv("R_DEFAULT_PACKAGES"))
+local({dp <- Sys.getenv("R_DEFAULT_PACKAGES")
        if(identical(dp, "")) # marginally faster to do methods last
            dp <- c("datasets", "utils", "grDevices", "graphics",
                    "stats", "methods")
@@ -57,10 +59,10 @@ Sys.setenv(R_LIBS_USER =
 {
     for(pkg in getOption("defaultPackages")) {
         res <- require(pkg, quietly = TRUE, warn.conflicts = FALSE,
-                       character.only = TRUE, save = FALSE)
+                       character.only = TRUE)
         if(!res)
-            warning("package ", pkg,
-                    ' in options("defaultPackages") was not found', call.=FALSE)
+            warning(gettextf('package %s in options("defaultPackages") was not found', sQuote(pkg)),
+                    call.=FALSE, domain = NA)
     }
 }
 
@@ -68,14 +70,13 @@ Sys.setenv(R_LIBS_USER =
 {
       if("methods" %in% getOption("defaultPackages")) {
         res <- require("methods", quietly = TRUE, warn.conflicts = FALSE,
-                       character.only = TRUE, save = FALSE)
+                       character.only = TRUE)
         if(!res)
-            warning("package \"methods\"",
-                    ' in options("defaultPackages") was not found', call.=FALSE)
+            warning('package "methods" in options("defaultPackages") was not found', call.=FALSE)
     }
 }
 
-if(Sys.getenv("R_BATCH") != "") {
+if(nzchar(Sys.getenv("R_BATCH"))) {
     .Last.sys <- function()
     {
         cat("> proc.time()\n")
@@ -107,24 +108,23 @@ invisible(.libPaths(c(unlist(strsplit(Sys.getenv("R_LIBS"), ";")),
                       )))
 
 if(nzchar(Sys.getenv("R_PAPERSIZE"))) {
-    options(papersize = as.vector(Sys.getenv("R_PAPERSIZE")))
+    options(papersize = Sys.getenv("R_PAPERSIZE"))
 } else {
-    if(length(grep("united.states", Sys.getlocale("LC_MONETARY"), TRUE)) ||
-       length(grep("canada", Sys.getlocale("LC_MONETARY"), TRUE)))
-        options(papersize = "letter")
+    if(grepl("(canada|united.states)", Sys.getlocale("LC_MONETARY"),
+             ignore.case = TRUE)) options(papersize = "letter")
     else options(papersize = "a4")
 }
 
-options(pager = if(length(grep("--ess", commandArgs()))) "console" else "internal")
-options(useFancyQuotes = (.Platform$GUI == "Rgui"))
-options(pdfviewer = file.path(R.home(), "bin", "open.exe"))
+options(pager = if(length(grep("--ess", commandArgs()))) "console" else "internal",
+        useFancyQuotes = (.Platform$GUI == "Rgui"),
+        pdfviewer = Sys.getenv("R_PDFVIEWER", file.path(R.home("bin"), "open.exe")))
 
-if(.Platform$GUI == "Rgui") {
-    Sys.setenv(GFORTRAN_STDOUT_UNIT= "-1")
-    Sys.setenv(GFORTRAN_STDERR_UNIT= "-1")
-}
+if(.Platform$GUI == "Rgui")
+    Sys.setenv(GFORTRAN_STDOUT_UNIT = "-1", GFORTRAN_STDERR_UNIT = "-1")
 
 local({
+    br <- Sys.getenv("R_BROWSER", NA_character_)
+    if(!is.na(br)) options(browser = br)
     tests_startup <- Sys.getenv("R_TESTS")
     if(nzchar(tests_startup)) source(tests_startup)
 })
diff --git a/win32/deps/library/base/R/base b/win32/deps/library/base/R/base
index f7d68b7..635aaf5 100644
--- a/win32/deps/library/base/R/base
+++ b/win32/deps/library/base/R/base
@@ -1,4 +1,6 @@
-## this should be keep in step with lazyLoad in R/lazyload.R
+#  Copyright (C) 1995-2012 The R Core Team
+
+## this should be kept in step with code in R/lazyload.R
 .Internal(eval(quote({
 ..lazyLoad <- function(filebase, envir = parent.frame())
 {
@@ -46,10 +48,25 @@
             set(n, e, envenv)           # MUST do this immediately
             key <- getFromFrame(n, env)
             data <- lazyLoadDBfetch(key, datafile, compressed, envhook)
-            parent.env(e) <- data$enclos
+            ## comment from r41494
+            ## modified the loading of old environments, so that those
+            ## serialized with parent.env NULL are loaded with the
+            ## parent.env=emptyenv(); and yes an alternative would have been
+            ## baseenv(), but that was seldom the intention of folks that
+            ## set the environment to NULL.
+            if (is.null(data$enclos))
+                parent.env(e) <- emptyenv()
+            else
+                parent.env(e) <- data$enclos
             vars <- names(data$bindings)
             for (i in seq_along(vars))
                 set(vars[i], data$bindings[[i]], e)
+            if (! is.null(data$attributes))
+                attributes(e) <-data$attributes
+            if (! is.null(data$isS4) && data$isS4)
+                .Call("R_setS4Object", e, TRUE, TRUE, PACKAGE = "base")
+            if (! is.null(data$locked) && data$locked)
+                .Internal(lockEnvironment(e, FALSE))
             e
         }
     }
diff --git a/win32/deps/library/base/R/base.rdb b/win32/deps/library/base/R/base.rdb
index 65949a7..b49bca5 100644
Binary files a/win32/deps/library/base/R/base.rdb and b/win32/deps/library/base/R/base.rdb differ
diff --git a/win32/deps/library/base/R/base.rdx b/win32/deps/library/base/R/base.rdx
index d0e273e..b2b395c 100644
Binary files a/win32/deps/library/base/R/base.rdx and b/win32/deps/library/base/R/base.rdx differ
diff --git a/win32/deps/library/base/demo/error.catching.R b/win32/deps/library/base/demo/error.catching.R
new file mode 100644
index 0000000..55db352
--- /dev/null
+++ b/win32/deps/library/base/demo/error.catching.R
@@ -0,0 +1,36 @@
+	##================================================================##
+	###  In longer simulations, aka computer experiments,		 ###
+	###  you may want to						 ###
+	###  1) catch all errors and warnings (and continue)		 ###
+	###  2) store the error or warning messages			 ###
+	###								 ###
+	###  Here's a solution	(see R-help mailing list, Dec 9, 2010):	 ###
+	##================================================================##
+
+##' We want to catch *and* save both errors and warnings, and in the case of
+##' a warning, also keep the computed result.
+##'
+##' @title tryCatch both warnings and errors
+##' @param expr
+##' @return a list with 'value' and 'warning', where
+##'   'value' may be an error caught.
+##' @author Martin Maechler
+
+#  Copyright (C) 2010 The R Core Team
+
+
+tryCatch.W.E <- function(expr)
+{
+    W <- NULL
+    w.handler <- function(w){ # warning handler
+	W <<- w
+	invokeRestart("muffleWarning")
+    }
+    list(value = withCallingHandlers(tryCatch(expr, error = function(e) e),
+				     warning = w.handler),
+	 warning = W)
+}
+
+str( tryCatch.W.E( log( 2 ) ) )
+str( tryCatch.W.E( log( -1) ) )
+str( tryCatch.W.E( log("a") ) )
diff --git a/win32/deps/library/base/demo/is.things.R b/win32/deps/library/base/demo/is.things.R
index 252ebcc..b5dac61 100644
--- a/win32/deps/library/base/demo/is.things.R
+++ b/win32/deps/library/base/demo/is.things.R
@@ -1,12 +1,12 @@
+#  Copyright (C) 1997-2010 The R Core Team
+
 ## being a 'builtin' function is not the same as being in base
-## and what about objects starting with '.'?
 ls.base <- ls("package:base", all=TRUE)
 base.is.f <- sapply(ls.base, function(x) is.function(get(x)))
-bi <- ls.base[base.is.f]
 cat("\nNumber of base objects:\t\t", length(ls.base),
     "\nNumber of functions in base:\t", sum(base.is.f),
     "\n\t starting with 'is.' :\t  ",
-    length(is.bi <- bi[substring(bi,1,3) == "is."]), "\n")
+    sum(grepl("^is\\.", ls.base[base.is.f])), "\n", sep = "")
 ## 0.14  : 31
 ## 0.50  : 33
 ## 0.60  : 34
@@ -19,13 +19,13 @@ cat("\nNumber of base objects:\t\t", length(ls.base),
 ## Do we have a method (probably)?
 is.method <- function(fname) {
     isFun <- function(name) (exists(name, mode="function") &&
-                        is.na(match(name, c("is", "as"))))
+                             is.na(match(name, c("is", "as"))))
     np <- length(sp <- strsplit(fname, split = "\\.")[[1]])
     if(np <= 1 )
         FALSE
     else
         (isFun(paste(sp[1:(np-1)], collapse = '.')) ||
-         (np>=3 &&
+         (np >= 3 &&
           isFun(paste(sp[1:(np-2)], collapse = '.'))))
 }
 
@@ -54,6 +54,12 @@ is.ALL <- function(obj, func.names = ls(pos=length(search())),
 		next
 	    }
 	}
+	if(any(f == c("is.nan", "is.finite", "is.infinite"))) {
+	    if(!is.atomic(obj)) {
+	    	if(!true.only) r[[f]] <- NA
+	    	next
+	    }
+	}
 	if(debug) cat(f,"")
 	fn <- get(f)
 	rr <- if(is.primitive(fn) || length(formals(fn))>0)  fn(obj) else fn()
diff --git a/win32/deps/library/base/demo/recursion.R b/win32/deps/library/base/demo/recursion.R
index 8768565..3a6846c 100644
--- a/win32/deps/library/base/demo/recursion.R
+++ b/win32/deps/library/base/demo/recursion.R
@@ -1,3 +1,4 @@
+#  Copyright (C) 1997-2005 The R Core Team
 
 ## Adaptive integration:	 Venables and Ripley pp. 105-110
 ## This is the basic integrator.
diff --git a/win32/deps/library/base/demo/scoping.R b/win32/deps/library/base/demo/scoping.R
index 915fb6d..745048a 100644
--- a/win32/deps/library/base/demo/scoping.R
+++ b/win32/deps/library/base/demo/scoping.R
@@ -15,6 +15,8 @@
 ## This is a very nifty way of creating "closures" and a little thought
 ## will show you that there are many ways of using this in statistics.
 
+#  Copyright (C) 1997-8 The R Core Team
+
 open.account <- function(total) {
 
     list(
diff --git a/win32/deps/library/base/help/AnIndex b/win32/deps/library/base/help/AnIndex
index 7043ddc..1a75a9b 100644
--- a/win32/deps/library/base/help/AnIndex
+++ b/win32/deps/library/base/help/AnIndex
@@ -1,5 +1,7 @@
 base-package	base-package
 !	Logic
+!.hexmode	hexmode
+!.octmode	octmode
 !=	Comparison
 "	Quotes
 $	Extract
@@ -15,6 +17,8 @@ $<-.data.frame	Extract.data.frame
 %x%	kronecker
 &	Logic
 &&	Logic
+&.hexmode	hexmode
+&.octmode	octmode
 '	Quotes
 (	Paren
 *	Arithmetic
@@ -29,35 +33,45 @@ $<-.data.frame	Extract.data.frame
 ->	assignOps
 ->>	assignOps
 .Alias	base-defunct
+.amatch_bounds	agrep
+.amatch_costs	agrep
 .ArgsEnv	base-internal
 .Autoloaded	autoload
 .AutoloadEnv	autoload
 .BaseNamespaceEnv	environment
+.bincode	bincode
 .C	Foreign
-.Call	Foreign
-.Call.graphics	Foreign
+.cache_class	base-internal
+.Call	CallExternal
+.Call.graphics	Foreign-internal
 .Class	UseMethod
+.colMeans	colSums
+.colSums	colSums
+.conflicts.OK	attach
 .decode_numeric_version	numeric_version
 .Defunct	Defunct
 .deparseOpts	deparseOpts
 .Deprecated	Deprecated
 .Device	dev
 .Devices	dev
+.difftime	base-internal
 .doTrace	trace
 .Dyn.libs	base-defunct
 .dynLibs	library.dynam
 .encode_numeric_version	numeric_version
 .expand_R_libs_env_var	libPaths
-.Export	ns-alt
-.External	Foreign
-.External.graphics	Foreign
-.find.package	base-internal
+.Export	base-defunct
+.External	CallExternal
+.External.graphics	Foreign-internal
+.find.package	find.package
 .First	Startup
-.First.lib	library
+.First.lib	base-defunct
 .First.sys	Startup
+.Firstlib_as_onLoad	base-internal
 .Fortran	Foreign
 .Generic	UseMethod
 .GenericArgsEnv	base-internal
+.getNamespace	ns-internal
 .getRequiredPackages	base-internal
 .getRequiredPackages2	base-internal
 .GlobalEnv	environment
@@ -65,14 +79,16 @@ $<-.data.frame	Extract.data.frame
 .gt	base-internal
 .gtn	base-internal
 .handleSimpleError	conditions
-.Import	ns-alt
-.ImportFrom	ns-alt
+.Import	base-defunct
+.ImportFrom	base-defunct
 .Internal	Internal
 .isMethodsDispatchOn	base-internal
 .isOpen	srcfile
+.kappa_tri	kappa
 .knownS3Generics	ns-internal
+.kronecker	kronecker
 .Last	quit
-.Last.lib	library
+.Last.lib	ns-hooks
 .Last.sys	quit
 .Last.value	Last.value
 .leap.seconds	DateTimeClasses
@@ -86,6 +102,7 @@ $<-.data.frame	Extract.data.frame
 .mergeExportMethods	ns-internal
 .mergeImportMethods	ns-internal
 .Method	UseMethod
+.methodsNamespace	base-internal
 .noGenerics	library
 .NotYetImplemented	notyet
 .NotYetUsed	notyet
@@ -96,20 +113,24 @@ $<-.data.frame	Extract.data.frame
 .OptRequireMethods	Startup
 .packages	zpackages
 .packageStartupMessage	message
-.path.package	base-internal
+.path.package	find.package
 .Platform	Platform
+.POSIXct	base-internal
+.POSIXlt	base-internal
 .Primitive	Primitive
-.primTrace	trace
-.primUntrace	trace
+.primTrace	base-internal
+.primUntrace	base-internal
 .Provided	base-defunct
 .Random.seed	Random
-.readRDS	readRDS
+.readRDS	base-defunct
 .Renviron	Startup
+.rowMeans	colSums
+.rowSums	colSums
 .row_names_info	base-internal
 .Rprofile	Startup
-.S3method	ns-alt
-.S3PrimitiveGenerics	zMethods
-.saveRDS	readRDS
+.S3method	base-defunct
+.S3PrimitiveGenerics	InternalMethods
+.saveRDS	base-defunct
 .Script	zScript
 .set_row_names	base-internal
 .signalSimpleWarning	conditions
@@ -124,6 +145,9 @@ $<-.data.frame	Extract.data.frame
 .__S3MethodsTable__.	ns-internal
 /	Arithmetic
 /.difftime	difftime
+0x1	NumericConstants
+1i	NumericConstants
+1L	NumericConstants
 :	Colon
 ::	ns-dblcolon
 :::	ns-dblcolon
@@ -164,18 +188,21 @@ anyDuplicated.data.frame	duplicated
 anyDuplicated.default	duplicated
 anyDuplicated.matrix	duplicated
 aperm	aperm
+aperm.default	aperm
+aperm.table	aperm
 append	append
 apply	apply
 Arg	complex
 args	args
 Arithmetic	Arithmetic
 array	array
+arrayInd	which
 as.array	array
 as.array.default	array
 as.call	call
 as.character	character
 as.character.condition	conditions
-as.character.Date	format.Date
+as.character.Date	as.Date
 as.character.default	character
 as.character.error	conditions
 as.character.factor	character
@@ -209,15 +236,15 @@ as.data.frame.raw	as.data.frame
 as.data.frame.table	table
 as.data.frame.ts	as.data.frame
 as.data.frame.vector	as.data.frame
-as.Date	format.Date
-as.Date.character	format.Date
-as.Date.date	format.Date
-as.Date.dates	format.Date
-as.Date.default	format.Date
-as.Date.factor	format.Date
-as.Date.numeric	format.Date
-as.Date.POSIXct	format.Date
-as.Date.POSIXlt	format.Date
+as.Date	as.Date
+as.Date.character	as.Date
+as.Date.date	as.Date
+as.Date.dates	as.Date
+as.Date.default	as.Date
+as.Date.factor	as.Date
+as.Date.numeric	as.Date
+as.Date.POSIXct	as.Date
+as.Date.POSIXlt	as.Date
 as.difftime	difftime
 as.double	double
 as.double.difftime	difftime
@@ -232,12 +259,15 @@ as.hexmode	hexmode
 as.integer	integer
 as.list	list
 as.list.data.frame	list
+as.list.Date	Dates
 as.list.default	list
 as.list.environment	list
 as.list.factor	list
 as.list.function	list
 as.list.numeric_version	numeric_version
+as.list.POSIXct	DateTimeClasses
 as.logical	logical
+as.logical.factor	logical
 as.matrix	matrix
 as.matrix.data.frame	matrix
 as.matrix.default	matrix
@@ -282,6 +312,7 @@ asin	Trig
 asinh	Hyperbolic
 AsIs	AsIs
 asNamespace	ns-internal
+asS3	isS4
 asS4	isS4
 assign	assign
 assignOps	assignOps
@@ -323,6 +354,9 @@ body<-	body
 bquote	bquote
 break	Control
 browser	browser
+browserCondition	browserText
+browserSetDebug	browserText
+browserText	browserText
 builtins	builtins
 by	by
 by.data.frame	by
@@ -359,12 +393,15 @@ clipboard	connections
 close	connections
 close.connection	connections
 close.srcfile	srcfile
+close.srcfilealias	srcfile
 closeAllConnections	showConnections
+closure	function
 codes	base-defunct
 codes.factor	base-defunct
 codes.ordered	base-defunct
 codes<-	base-defunct
 col	col
+collation	Comparison
 colMeans	colSums
 colnames	colnames
 colnames<-	colnames
@@ -387,6 +424,7 @@ conflicts	conflicts
 Conj	complex
 connection	connections
 connections	connections
+Constants	Constants
 contributors	contributors
 Control	Control
 copyright	copyright
@@ -412,12 +450,15 @@ date-time	DateTimeClasses
 Dates	Dates
 DateTimeClasses	DateTimeClasses
 debug	debug
+debugonce	debug
 default.stringsAsFactors	data.frame
 Defunct	Defunct
+defunct	Defunct
 delay	base-defunct
 delayedAssign	delayedAssign
 deparse	deparse
 Deprecated	Deprecated
+deprecated	Deprecated
 det	det
 detach	detach
 determinant	det
@@ -441,12 +482,17 @@ dimnames<-.data.frame	dimnames
 dir	list.files
 dir.create	files2
 dirname	basename
+DLLInfo	getLoadedDLLs
+DLLInfoList	getLoadedDLLs
 DLLpath	dynload
 do.call	do.call
 double	double
 dput	dput
 dQuote	sQuote
 drop	drop
+droplevels	droplevels
+droplevels.data.frame	droplevels
+droplevels.factor	droplevels
 dump	dump
 duplicated	duplicated
 duplicated.array	duplicated
@@ -461,9 +507,13 @@ eapply	eapply
 eigen	eigen
 else	Control
 emptyenv	environment
+enc2native	Encoding
+enc2utf8	Encoding
+enclosure	environment
 encodeString	encodeString
 Encoding	Encoding
 Encoding<-	Encoding
+enquote	substitute
 env.profile	environment
 environment	environment
 environment variables	EnvVar
@@ -492,8 +542,8 @@ file.copy	files
 file.create	files
 file.exists	files
 file.info	file.info
+file.link	files
 file.path	file.path
-file.rcopy	files
 file.remove	files
 file.rename	files
 file.show	file.show
@@ -501,7 +551,8 @@ file.symlink	files
 files	files
 Filter	funprog
 Find	funprog
-findInterval	findInt
+find.package	find.package
+findInterval	findInterval
 findPackageEnv	base-internal
 findRestart	conditions
 finite	is.finite
@@ -517,16 +568,20 @@ format	format
 format.AsIs	format
 format.char	base-defunct
 format.data.frame	format
-format.Date	format.Date
+format.Date	as.Date
 format.default	format
 format.difftime	difftime
 format.factor	format
 format.hexmode	hexmode
 format.info	format.info
+format.libraryIQR	library
+format.numeric_version	numeric_version
 format.octmode	octmode
+format.packageInfo	library
 format.POSIXct	strptime
 format.POSIXlt	strptime
 format.pval	format.pval
+format.summaryDefault	summary
 formatC	formatc
 formatDL	formatDL
 forwardsolve	backsolve
@@ -538,6 +593,7 @@ gc	gc
 gc.time	gc.time
 gcinfo	gc
 gctorture	gctorture
+gctorture2	gctorture
 get	get
 getAllConnections	showConnections
 getCallingDLL	getCallingDLL
@@ -548,6 +604,7 @@ getConnection	showConnections
 getDLLRegisteredRoutines	getDLLRegisteredRoutines
 getDLLRegisteredRoutines.character	getDLLRegisteredRoutines
 getDLLRegisteredRoutines.DLLInfo	getDLLRegisteredRoutines
+getElement	Extract
 getenv	base-defunct
 geterrmessage	stop
 getExportedValue	ns-reflect
@@ -574,7 +631,9 @@ globalenv	environment
 gregexpr	grep
 grep	grep
 grepl	grep
+grepRaw	grepRaw
 group generic	groupGeneric
+groupGeneric	groupGeneric
 GSC	EnvVar
 gsub	grep
 gzcon	gzcon
@@ -598,10 +657,11 @@ inherits	class
 integer	integer
 interaction	interaction
 interactive	interactive
-internal generic	zMethods
-InternalGenerics	zMethods
-InternalMethods	zMethods
+internal generic	InternalMethods
+InternalGenerics	InternalMethods
+InternalMethods	InternalMethods
 intersect	sets
+intersection	sets
 intToBits	rawConversion
 intToUtf8	utf8Conversion
 inverse.rle	rle
@@ -630,6 +690,7 @@ is.logical	logical
 is.matrix	matrix
 is.na	NA
 is.na.data.frame	NA
+is.na.numeric_version	numeric_version
 is.na.POSIXlt	DateTimeClasses
 is.na<-	NA
 is.na<-.default	NA
@@ -639,6 +700,7 @@ is.nan	is.finite
 is.null	NULL
 is.numeric	numeric
 is.numeric.Date	numeric
+is.numeric.difftime	difftime
 is.numeric.POSIXt	numeric
 is.numeric_version	numeric_version
 is.object	is.object
@@ -656,12 +718,13 @@ is.symbol	name
 is.table	table
 is.unsorted	is.unsorted
 is.vector	vector
+isatty	showConnections
 isBaseNamespace	ns-internal
 isdebugged	debug
 isIncomplete	connections
 isNamespace	ns-internal
-ISOdate	strptime
-ISOdatetime	strptime
+ISOdate	ISOdatetime
+ISOdatetime	ISOdatetime
 isOpen	connections
 isRestart	conditions
 isS4	isS4
@@ -677,7 +740,6 @@ kappa	kappa
 kappa.default	kappa
 kappa.lm	kappa
 kappa.qr	kappa
-kappa.tri	kappa
 kronecker	kronecker
 l10n_info	l10n_info
 La.chol	base-defunct
@@ -690,6 +752,7 @@ LANGUAGE	EnvVar
 lapply	lapply
 last.warning	warnings
 lazyLoad	lazyload
+lazyLoadDBexec	lazyload
 lazyLoadDBfetch	base-internal
 lbeta	Special
 lchoose	Special
@@ -700,6 +763,7 @@ LC_MONETARY	locales
 LC_NUMERIC	locales
 LC_TIME	locales
 length	length
+length.POSIXlt	DateTimeClasses
 length<-	length
 length<-.factor	length
 LETTERS	Constants
@@ -716,10 +780,12 @@ library.dynam.unload	library.dynam
 licence	license
 license	license
 list	list
+list.dirs	list.files
 list.files	list.files
+list2env	list2env
 load	load
 loadedNamespaces	ns-load
-loadingNamespaceInfo	ns-lowlev
+loadingNamespaceInfo	ns-internal
 loadNamespace	ns-load
 loadURL	base-defunct
 local	eval
@@ -741,6 +807,7 @@ machine	base-defunct
 make.names	make.names
 make.unique	make.unique
 makeActiveBinding	bindenv
+MAKEINDEX	EnvVar
 manglePackageName	base-defunct
 Map	funprog
 mapply	mapply
@@ -768,7 +835,9 @@ mean.default	mean
 mean.difftime	difftime
 mean.POSIXct	DateTimeClasses
 mean.POSIXlt	DateTimeClasses
-mem.limits	Memory
+mem.limits	base-defunct
+memCompress	memCompress
+memDecompress	memCompress
 Memory	Memory
 Memory-limits	Memory-limits
 memory.profile	memory.profile
@@ -792,8 +861,10 @@ NA	NA
 name	name
 names	names
 names.default	names
+names.POSIXlt	DateTimeClasses
 names<-	names
 names<-.default	names
+names<-.POSIXlt	DateTimeClasses
 namespaceExport	ns-internal
 namespaceImport	ns-internal
 namespaceImportClasses	ns-internal
@@ -817,6 +888,8 @@ NextMethod	UseMethod
 ngettext	gettext
 nlevels	nlevels
 noquote	noquote
+norm	norm
+normalizePath	normalizePath
 NotYetImplemented	notyet
 NotYetUsed	notyet
 NROW	nrow
@@ -834,6 +907,7 @@ on.exit	on.exit
 open	connections
 open.connection	connections
 open.srcfile	srcfile
+open.srcfilealias	srcfile
 open.srcfilecopy	srcfile
 Ops	groupGeneric
 Ops.data.frame	groupGeneric
@@ -843,6 +917,7 @@ Ops.factor	factor
 Ops.numeric_version	numeric_version
 Ops.ordered	factor
 Ops.POSIXt	DateTimeClasses
+option	options
 options	options
 order	order
 ordered	factor
@@ -862,7 +937,9 @@ parse	parse
 parse.dcf	base-defunct
 parseNamespaceFile	ns-internal
 paste	paste
+paste0	paste
 path.expand	path.expand
+path.package	find.package
 pentagamma	base-defunct
 pi	Constants
 pipe	connections
@@ -879,6 +956,7 @@ POSIXct	DateTimeClasses
 POSIXlt	DateTimeClasses
 POSIXt	DateTimeClasses
 pretty	pretty
+pretty.default	pretty
 prettyNum	formatc
 primitive	Primitive
 print	print
@@ -897,6 +975,7 @@ print.DLLInfo	getLoadedDLLs
 print.DLLInfoList	getLoadedDLLs
 print.DLLRegisteredRoutines	getDLLRegisteredRoutines
 print.factor	print
+print.function	print
 print.hexmode	hexmode
 print.htest	print
 print.libraryIQR	library
@@ -917,6 +996,7 @@ print.simple.list	print
 print.srcfile	srcfile
 print.srcref	srcfile
 print.summary.table	table
+print.summaryDefault	summary
 print.table	print
 print.tabular	base-defunct
 print.warnings	warnings
@@ -953,6 +1033,7 @@ R.home	Rhome
 R.Version	Version
 R.version	Version
 R.version.string	Version
+Random	Random
 Random.user	Random-user
 range	range
 range.default	range
@@ -967,8 +1048,7 @@ rawToChar	rawConversion
 rbind	cbind
 rbind.data.frame	cbind
 rcond	kappa
-Rd2dvi	RdUtils
-Rd2txt	RdUtils
+Rd2pdf	RdUtils
 Rdconv	RdUtils
 Re	complex
 read.dcf	dcf
@@ -977,16 +1057,21 @@ readBin	readBin
 readChar	readChar
 readline	readline
 readLines	readLines
+readRDS	readRDS
+readRenviron	readRenviron
 real	real
 Recall	Recall
 Reduce	funprog
 reg.finalizer	reg.finalizer
 regex	regex
+regexec	grep
 regexp	regex
 regexpr	grep
 RegisteredNativeSymbol	getNativeSymbolInfo
 registerS3method	ns-internal
 registerS3methods	ns-internal
+regmatches	regmatches
+regmatches<-	regmatches
 regular expression	regex
 remove	rm
 removeCConverter	converters
@@ -1004,6 +1089,7 @@ repeat	Control
 replace	replace
 replicate	lapply
 require	library
+requireNamespace	ns-load
 Reserved	Reserved
 reserved	Reserved
 restart	base-defunct
@@ -1020,7 +1106,6 @@ RNGkind	Random
 RNGversion	Random
 round	Round
 round.Date	round.POSIXt
-round.difftime	difftime
 round.POSIXt	round.POSIXt
 row	row
 row.names	row.names
@@ -1043,7 +1128,6 @@ R_BROWSER	EnvVar
 R_COMPLETION	EnvVar
 R_DEFAULT_PACKAGES	Startup
 R_DOC_DIR	EnvVar
-R_DVIPSCMD	EnvVar
 R_ENVIRON	Startup
 R_ENVIRON_USER	Startup
 R_GSCMD	EnvVar
@@ -1051,18 +1135,14 @@ R_HISTFILE	EnvVar
 R_HISTSIZE	EnvVar
 R_HOME	Rhome
 R_INCLUDE_DIR	EnvVar
-R_LATEXCMD	EnvVar
 R_LIBS	libPaths
 R_LIBS_SITE	libPaths
 R_LIBS_USER	libPaths
-R_MAKEINDEXCMD	EnvVar
 R_PAPERSIZE	EnvVar
-R_PDFLATEXCMD	EnvVar
 R_PDFVIEWER	EnvVar
 R_PLATFORM	EnvVar
 R_PROFILE	Startup
 R_PROFILE_USER	Startup
-R_RD4DVI	EnvVar
 R_RD4PDF	EnvVar
 R_SHARE_DIR	EnvVar
 R_system_version	numeric_version
@@ -1079,12 +1159,11 @@ sapply	lapply
 save	save
 save.image	save
 save.plot	base-defunct
-saveNamespaceImage	ns-lowlev
+saveRDS	readRDS
 scale	scale
 scale.default	scale
 scan	scan
 scan.url	base-defunct
-Sd2Rd	RdUtils
 search	search
 searchpaths	search
 seek	seek
@@ -1118,6 +1197,7 @@ simpleCondition	conditions
 simpleError	conditions
 simpleMessage	conditions
 simpleWarning	conditions
+simplify2array	lapply
 sin	Trig
 single	double
 sinh	Hyperbolic
@@ -1150,6 +1230,8 @@ sqrt	MathFun
 sQuote	sQuote
 srcfile	srcfile
 srcfile-class	srcfile
+srcfilealias	srcfile
+srcfilealias-class	srcfile
 srcfilecopy	srcfile
 srcfilecopy-class	srcfile
 srcref	srcfile
@@ -1167,6 +1249,7 @@ str.POSIXt	DateTimeClasses
 strftime	strptime
 strptime	strptime
 strsplit	strsplit
+strtoi	strtoi
 strtrim	strtrim
 structure	structure
 strwrap	strwrap
@@ -1195,10 +1278,13 @@ Summary.factor	factor
 summary.factor	summary
 summary.matrix	summary
 Summary.numeric_version	numeric_version
+Summary.ordered	factor
 Summary.POSIXct	DateTimeClasses
 summary.POSIXct	DateTimeClasses
 Summary.POSIXlt	DateTimeClasses
 summary.POSIXlt	DateTimeClasses
+summary.srcfile	srcfile
+summary.srcref	srcfile
 summary.table	table
 suppressMessages	message
 suppressPackageStartupMessages	message
@@ -1221,15 +1307,18 @@ Sys.getlocale	locales
 Sys.getpid	Sys.getpid
 Sys.glob	Sys.glob
 Sys.info	Sys.info
+Sys.junction	files
 sys.load.image	base-internal
 Sys.localeconv	Sys.localeconv
 sys.nframe	sys.parent
 sys.on.exit	sys.parent
 sys.parent	sys.parent
 sys.parents	sys.parent
-Sys.putenv	base-deprecated
+Sys.putenv	base-defunct
+Sys.readlink	Sys.readlink
 sys.save.image	base-internal
 Sys.setenv	Sys.setenv
+Sys.setFileTime	Sys.setFileTime
 Sys.setlocale	locales
 Sys.sleep	Sys.sleep
 sys.source	sys.source
@@ -1243,6 +1332,7 @@ system	system
 system.file	system.file
 system.test	base-defunct
 system.time	system.time
+system2	system2
 T	logical
 t	t
 t.data.frame	t
@@ -1261,10 +1351,12 @@ tetragamma	base-defunct
 textConnection	textconnections
 textConnectionValue	textconnections
 tilde	tilde
+tilde expansion	path.expand
 time interval	difftime
 time zone	timezones
 time zones	timezones
 timezone	timezones
+TMPDIR	EnvVar
 tolower	chartr
 topenv	ns-topenv
 toString	toString
@@ -1291,6 +1383,7 @@ type	typeof
 typeof	typeof
 TZ	timezones
 TZDIR	timezones
+umask	files2
 unclass	class
 undebug	debug
 union	sets
@@ -1321,8 +1414,9 @@ upper.tri	lower.tri
 url	connections
 UseMethod	UseMethod
 utf8ToInt	utf8Conversion
+vapply	lapply
 vector	vector
-Vectorize	mapply
+Vectorize	Vectorize
 Version	base-defunct
 version	Version
 warning	warning
@@ -1349,16 +1443,21 @@ writeBin	readBin
 writeChar	readChar
 writeLines	writeLines
 xor	Logic
+xor.hexmode	hexmode
+xor.octmode	octmode
 xpdrows.data.frame	dataframeHelpers
 xtfrm	xtfrm
+xtfrm.AsIs	xtfrm
 xtfrm.Date	xtfrm
 xtfrm.default	xtfrm
+xtfrm.difftime	xtfrm
 xtfrm.factor	xtfrm
 xtfrm.numeric_version	numeric_version
 xtfrm.POSIXct	xtfrm
 xtfrm.POSIXlt	xtfrm
 xtfrm.Surv	xtfrm
-zapsmall	Round
+xzfile	connections
+zapsmall	zapsmall
 [	Extract
 [.AsIs	AsIs
 [.data.frame	Extract.data.frame
@@ -1387,10 +1486,13 @@ zapsmall	Round
 [[.POSIXct	DateTimeClasses
 [[<-	Extract
 [[<-.data.frame	Extract.data.frame
+[[<-.factor	Extract.factor
 [[<-.numeric_version	numeric_version
 ^	Arithmetic
 `	Quotes
 {	Paren
 |	Logic
+|.hexmode	hexmode
+|.octmode	octmode
 ||	Logic
 ~	tilde
diff --git a/win32/deps/library/base/help/aliases.rds b/win32/deps/library/base/help/aliases.rds
new file mode 100644
index 0000000..1bf7866
Binary files /dev/null and b/win32/deps/library/base/help/aliases.rds differ
diff --git a/win32/deps/library/base/help/base.rdb b/win32/deps/library/base/help/base.rdb
new file mode 100644
index 0000000..f39468b
Binary files /dev/null and b/win32/deps/library/base/help/base.rdb differ
diff --git a/win32/deps/library/base/help/base.rdx b/win32/deps/library/base/help/base.rdx
new file mode 100644
index 0000000..ffc4d72
Binary files /dev/null and b/win32/deps/library/base/help/base.rdx differ
diff --git a/win32/deps/library/base/help/paths.rds b/win32/deps/library/base/help/paths.rds
new file mode 100644
index 0000000..8afbb39
Binary files /dev/null and b/win32/deps/library/base/help/paths.rds differ
diff --git a/win32/deps/library/base/html/00Index.html b/win32/deps/library/base/html/00Index.html
new file mode 100644
index 0000000..ce65b04
--- /dev/null
+++ b/win32/deps/library/base/html/00Index.html
@@ -0,0 +1,2458 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: The R Base Package</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> The R Base Package
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;base&rsquo; version 2.15.2</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>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p 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="#H">H</a>
+<a href="#I">I</a>
+<a href="#J">J</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="#X">X</a>
+<a href="#Z">Z</a>
+<a href="#misc">misc</a>
+</p>
+
+<table width="100%">
+<tr><td width="25%"><a href="base-package.html">base-package</a></td>
+<td>The R Base Package</td></tr>
+</table>
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="abbreviate.html">abbreviate</a></td>
+<td>Abbreviate Strings</td></tr>
+<tr><td width="25%"><a href="MathFun.html">abs</a></td>
+<td>Miscellaneous Mathematical Functions</td></tr>
+<tr><td width="25%"><a href="Trig.html">acos</a></td>
+<td>Trigonometric Functions</td></tr>
+<tr><td width="25%"><a href="Hyperbolic.html">acosh</a></td>
+<td>Hyperbolic Functions</td></tr>
+<tr><td width="25%"><a href="factor.html">addNA</a></td>
+<td>Factors</td></tr>
+<tr><td width="25%"><a href="taskCallback.html">addTaskCallback</a></td>
+<td>Add or Remove a Top-Level Task Callback</td></tr>
+<tr><td width="25%"><a href="agrep.html">agrep</a></td>
+<td>Approximate String Matching (Fuzzy Matching)</td></tr>
+<tr><td width="25%"><a href="list.html">alist</a></td>
+<td>Lists - Generic and Dotted Pairs</td></tr>
+<tr><td width="25%"><a href="all.html">all</a></td>
+<td>Are All Values True?</td></tr>
+<tr><td width="25%"><a href="all.equal.html">all.equal</a></td>
+<td>Test if Two Objects are (Nearly) Equal</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">all.equal.POSIXct</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="allnames.html">all.names</a></td>
+<td>Find All Names in an Expression</td></tr>
+<tr><td width="25%"><a href="allnames.html">all.vars</a></td>
+<td>Find All Names in an Expression</td></tr>
+<tr><td width="25%"><a href="any.html">any</a></td>
+<td>Are Some Values True?</td></tr>
+<tr><td width="25%"><a href="duplicated.html">anyDuplicated</a></td>
+<td>Determine Duplicate Elements</td></tr>
+<tr><td width="25%"><a href="aperm.html">aperm</a></td>
+<td>Array Transposition</td></tr>
+<tr><td width="25%"><a href="append.html">append</a></td>
+<td>Vector Merging</td></tr>
+<tr><td width="25%"><a href="apply.html">apply</a></td>
+<td>Apply Functions Over Array Margins</td></tr>
+<tr><td width="25%"><a href="complex.html">Arg</a></td>
+<td>Complex Vectors</td></tr>
+<tr><td width="25%"><a href="args.html">args</a></td>
+<td>Argument List of a Function</td></tr>
+<tr><td width="25%"><a href="Arithmetic.html">Arithmetic</a></td>
+<td>Arithmetic Operators</td></tr>
+<tr><td width="25%"><a href="array.html">array</a></td>
+<td>Multi-way Arrays</td></tr>
+<tr><td width="25%"><a href="which.html">arrayInd</a></td>
+<td>Which indices are TRUE?</td></tr>
+<tr><td width="25%"><a href="array.html">as.array</a></td>
+<td>Multi-way Arrays</td></tr>
+<tr><td width="25%"><a href="call.html">as.call</a></td>
+<td>Function Calls</td></tr>
+<tr><td width="25%"><a href="character.html">as.character</a></td>
+<td>Character Vectors</td></tr>
+<tr><td width="25%"><a href="conditions.html">as.character.condition</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="as.Date.html">as.character.Date</a></td>
+<td>Date Conversion Functions to and from Character</td></tr>
+<tr><td width="25%"><a href="hexmode.html">as.character.hexmode</a></td>
+<td>Display Numbers in Hexadecimal</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">as.character.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="octmode.html">as.character.octmode</a></td>
+<td>Display Numbers in Octal</td></tr>
+<tr><td width="25%"><a href="strptime.html">as.character.POSIXt</a></td>
+<td>Date-time Conversion Functions to and from Character</td></tr>
+<tr><td width="25%"><a href="srcfile.html">as.character.srcref</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="complex.html">as.complex</a></td>
+<td>Complex Vectors</td></tr>
+<tr><td width="25%"><a href="as.data.frame.html">as.data.frame</a></td>
+<td>Coerce to a Data Frame</td></tr>
+<tr><td width="25%"><a href="as.data.frame.html">as.data.frame.AsIs</a></td>
+<td>Coerce to a Data Frame</td></tr>
+<tr><td width="25%"><a href="Dates.html">as.data.frame.Date</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">as.data.frame.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">as.data.frame.POSIXct</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="table.html">as.data.frame.table</a></td>
+<td>Cross Tabulation and Table Creation</td></tr>
+<tr><td width="25%"><a href="as.Date.html">as.Date</a></td>
+<td>Date Conversion Functions to and from Character</td></tr>
+<tr><td width="25%"><a href="difftime.html">as.difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="double.html">as.double</a></td>
+<td>Double-Precision Vectors</td></tr>
+<tr><td width="25%"><a href="difftime.html">as.double.difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="as.POSIXlt.html">as.double.POSIXlt</a></td>
+<td>Date-time Conversion Functions</td></tr>
+<tr><td width="25%"><a href="as.environment.html">as.environment</a></td>
+<td>Coerce to an Environment Object</td></tr>
+<tr><td width="25%"><a href="expression.html">as.expression</a></td>
+<td>Unevaluated Expressions</td></tr>
+<tr><td width="25%"><a href="factor.html">as.factor</a></td>
+<td>Factors</td></tr>
+<tr><td width="25%"><a href="as.function.html">as.function</a></td>
+<td>Convert Object to Function</td></tr>
+<tr><td width="25%"><a href="hexmode.html">as.hexmode</a></td>
+<td>Display Numbers in Hexadecimal</td></tr>
+<tr><td width="25%"><a href="integer.html">as.integer</a></td>
+<td>Integer Vectors</td></tr>
+<tr><td width="25%"><a href="list.html">as.list</a></td>
+<td>Lists - Generic and Dotted Pairs</td></tr>
+<tr><td width="25%"><a href="Dates.html">as.list.Date</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">as.list.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">as.list.POSIXct</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="logical.html">as.logical</a></td>
+<td>Logical Vectors</td></tr>
+<tr><td width="25%"><a href="matrix.html">as.matrix</a></td>
+<td>Matrices</td></tr>
+<tr><td width="25%"><a href="noquote.html">as.matrix.noquote</a></td>
+<td>Class for 'no quote' Printing of Character Strings</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">as.matrix.POSIXlt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="name.html">as.name</a></td>
+<td>Names and Symbols</td></tr>
+<tr><td width="25%"><a href="NULL.html">as.null</a></td>
+<td>The Null Object</td></tr>
+<tr><td width="25%"><a href="numeric.html">as.numeric</a></td>
+<td>Numeric Vectors</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">as.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="octmode.html">as.octmode</a></td>
+<td>Display Numbers in Octal</td></tr>
+<tr><td width="25%"><a href="factor.html">as.ordered</a></td>
+<td>Factors</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">as.package_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="list.html">as.pairlist</a></td>
+<td>Lists - Generic and Dotted Pairs</td></tr>
+<tr><td width="25%"><a href="as.POSIXlt.html">as.POSIXct</a></td>
+<td>Date-time Conversion Functions</td></tr>
+<tr><td width="25%"><a href="as.POSIXlt.html">as.POSIXlt</a></td>
+<td>Date-time Conversion Functions</td></tr>
+<tr><td width="25%"><a href="qr.html">as.qr</a></td>
+<td>The QR Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="raw.html">as.raw</a></td>
+<td>Raw Vectors</td></tr>
+<tr><td width="25%"><a href="real.html">as.real</a></td>
+<td>Real Vectors</td></tr>
+<tr><td width="25%"><a href="double.html">as.single</a></td>
+<td>Double-Precision Vectors</td></tr>
+<tr><td width="25%"><a href="name.html">as.symbol</a></td>
+<td>Names and Symbols</td></tr>
+<tr><td width="25%"><a href="table.html">as.table</a></td>
+<td>Cross Tabulation and Table Creation</td></tr>
+<tr><td width="25%"><a href="vector.html">as.vector</a></td>
+<td>Vectors</td></tr>
+<tr><td width="25%"><a href="Trig.html">asin</a></td>
+<td>Trigonometric Functions</td></tr>
+<tr><td width="25%"><a href="Hyperbolic.html">asinh</a></td>
+<td>Hyperbolic Functions</td></tr>
+<tr><td width="25%"><a href="AsIs.html">AsIs</a></td>
+<td>Inhibit Interpretation/Conversion of Objects</td></tr>
+<tr><td width="25%"><a href="isS4.html">asS3</a></td>
+<td>Test for an S4 object</td></tr>
+<tr><td width="25%"><a href="isS4.html">asS4</a></td>
+<td>Test for an S4 object</td></tr>
+<tr><td width="25%"><a href="assign.html">assign</a></td>
+<td>Assign a Value to a Name</td></tr>
+<tr><td width="25%"><a href="assignOps.html">assignOps</a></td>
+<td>Assignment Operators</td></tr>
+<tr><td width="25%"><a href="Trig.html">atan</a></td>
+<td>Trigonometric Functions</td></tr>
+<tr><td width="25%"><a href="Trig.html">atan2</a></td>
+<td>Trigonometric Functions</td></tr>
+<tr><td width="25%"><a href="Hyperbolic.html">atanh</a></td>
+<td>Hyperbolic Functions</td></tr>
+<tr><td width="25%"><a href="vector.html">atomic</a></td>
+<td>Vectors</td></tr>
+<tr><td width="25%"><a href="attach.html">attach</a></td>
+<td>Attach Set of R Objects to Search Path</td></tr>
+<tr><td width="25%"><a href="ns-load.html">attachNamespace</a></td>
+<td>Loading and Unloading Namespaces</td></tr>
+<tr><td width="25%"><a href="attr.html">attr</a></td>
+<td>Object Attributes</td></tr>
+<tr><td width="25%"><a href="all.equal.html">attr.all.equal</a></td>
+<td>Test if Two Objects are (Nearly) Equal</td></tr>
+<tr><td width="25%"><a href="attributes.html">attributes</a></td>
+<td>Object Attribute Lists</td></tr>
+<tr><td width="25%"><a href="autoload.html">autoload</a></td>
+<td>On-demand Loading of Packages</td></tr>
+<tr><td width="25%"><a href="autoload.html">autoloader</a></td>
+<td>On-demand Loading of Packages</td></tr>
+<tr><td width="25%"><a href="autoload.html">Autoloads</a></td>
+<td>On-demand Loading of Packages</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Quotes.html">backquote</a></td>
+<td>Quotes</td></tr>
+<tr><td width="25%"><a href="backsolve.html">backsolve</a></td>
+<td>Solve an Upper or Lower Triangular System</td></tr>
+<tr><td width="25%"><a href="Quotes.html">backtick</a></td>
+<td>Quotes</td></tr>
+<tr><td width="25%"><a href="base-package.html">base</a></td>
+<td>The R Base Package</td></tr>
+<tr><td width="25%"><a href="environment.html">baseenv</a></td>
+<td>Environment Access</td></tr>
+<tr><td width="25%"><a href="basename.html">basename</a></td>
+<td>Manipulate File Paths</td></tr>
+<tr><td width="25%"><a href="Bessel.html">Bessel</a></td>
+<td>Bessel Functions</td></tr>
+<tr><td width="25%"><a href="Bessel.html">bessel</a></td>
+<td>Bessel Functions</td></tr>
+<tr><td width="25%"><a href="Bessel.html">besselI</a></td>
+<td>Bessel Functions</td></tr>
+<tr><td width="25%"><a href="Bessel.html">besselJ</a></td>
+<td>Bessel Functions</td></tr>
+<tr><td width="25%"><a href="Bessel.html">besselK</a></td>
+<td>Bessel Functions</td></tr>
+<tr><td width="25%"><a href="Bessel.html">besselY</a></td>
+<td>Bessel Functions</td></tr>
+<tr><td width="25%"><a href="Special.html">beta</a></td>
+<td>Special Functions of Mathematics</td></tr>
+<tr><td width="25%"><a href="bindenv.html">bindenv</a></td>
+<td>Binding and Environment Adjustments</td></tr>
+<tr><td width="25%"><a href="bindenv.html">bindingIsActive</a></td>
+<td>Binding and Environment Adjustments</td></tr>
+<tr><td width="25%"><a href="bindenv.html">bindingIsLocked</a></td>
+<td>Binding and Environment Adjustments</td></tr>
+<tr><td width="25%"><a href="gettext.html">bindtextdomain</a></td>
+<td>Translate Text Messages</td></tr>
+<tr><td width="25%"><a href="body.html">body</a></td>
+<td>Access to and Manipulation of the Body of a Function</td></tr>
+<tr><td width="25%"><a href="bquote.html">bquote</a></td>
+<td>Partial substitution in expressions</td></tr>
+<tr><td width="25%"><a href="Control.html">break</a></td>
+<td>Control Flow</td></tr>
+<tr><td width="25%"><a href="browser.html">browser</a></td>
+<td>Environment Browser</td></tr>
+<tr><td width="25%"><a href="browserText.html">browserCondition</a></td>
+<td>Functions to Retrieve Values Supplied by Calls to the Browser</td></tr>
+<tr><td width="25%"><a href="browserText.html">browserSetDebug</a></td>
+<td>Functions to Retrieve Values Supplied by Calls to the Browser</td></tr>
+<tr><td width="25%"><a href="browserText.html">browserText</a></td>
+<td>Functions to Retrieve Values Supplied by Calls to the Browser</td></tr>
+<tr><td width="25%"><a href="builtins.html">builtins</a></td>
+<td>Returns the Names of All Built-in Objects</td></tr>
+<tr><td width="25%"><a href="by.html">by</a></td>
+<td>Apply a Function to a Data Frame Split by Factors</td></tr>
+<tr><td width="25%"><a href="connections.html">bzfile</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="c.html">c</a></td>
+<td>Combine Values into a Vector or List</td></tr>
+<tr><td width="25%"><a href="Dates.html">c.Date</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="noquote.html">c.noquote</a></td>
+<td>Class for 'no quote' Printing of Character Strings</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">c.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">c.POSIXct</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="call.html">call</a></td>
+<td>Function Calls</td></tr>
+<tr><td width="25%"><a href="callCC.html">callCC</a></td>
+<td>Call With Current Continuation</td></tr>
+<tr><td width="25%"><a href="capabilities.html">capabilities</a></td>
+<td>Report Capabilities of this Build of R</td></tr>
+<tr><td width="25%"><a href="chartr.html">casefold</a></td>
+<td>Character Translation and Casefolding</td></tr>
+<tr><td width="25%"><a href="cat.html">cat</a></td>
+<td>Concatenate and Print</td></tr>
+<tr><td width="25%"><a href="cbind.html">cbind</a></td>
+<td>Combine R Objects by Rows or Columns</td></tr>
+<tr><td width="25%"><a href="cbind.html">cbind.data.frame</a></td>
+<td>Combine R Objects by Rows or Columns</td></tr>
+<tr><td width="25%"><a href="Round.html">ceiling</a></td>
+<td>Rounding of Numbers</td></tr>
+<tr><td width="25%"><a href="char.expand.html">char.expand</a></td>
+<td>Expand a String with Respect to a Target Table</td></tr>
+<tr><td width="25%"><a href="character.html">character</a></td>
+<td>Character Vectors</td></tr>
+<tr><td width="25%"><a href="charmatch.html">charmatch</a></td>
+<td>Partial String Matching</td></tr>
+<tr><td width="25%"><a href="rawConversion.html">charToRaw</a></td>
+<td>Convert to or from Raw Vectors</td></tr>
+<tr><td width="25%"><a href="chartr.html">chartr</a></td>
+<td>Character Translation and Casefolding</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">check_tzones</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="chol.html">chol</a></td>
+<td>The Choleski Decomposition</td></tr>
+<tr><td width="25%"><a href="chol2inv.html">chol2inv</a></td>
+<td>Inverse from Choleski (or QR) Decomposition</td></tr>
+<tr><td width="25%"><a href="Special.html">choose</a></td>
+<td>Special Functions of Mathematics</td></tr>
+<tr><td width="25%"><a href="class.html">class</a></td>
+<td>Object Classes</td></tr>
+<tr><td width="25%"><a href="connections.html">clipboard</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="connections.html">close</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="srcfile.html">close.srcfile</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="srcfile.html">close.srcfilealias</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="showConnections.html">closeAllConnections</a></td>
+<td>Display Connections</td></tr>
+<tr><td width="25%"><a href="function.html">closure</a></td>
+<td>Function Definition</td></tr>
+<tr><td width="25%"><a href="col.html">col</a></td>
+<td>Column Indexes</td></tr>
+<tr><td width="25%"><a href="Comparison.html">collation</a></td>
+<td>Relational Operators</td></tr>
+<tr><td width="25%"><a href="colSums.html">colMeans</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="colnames.html">colnames</a></td>
+<td>Row and Column Names</td></tr>
+<tr><td width="25%"><a href="Colon.html">colon</a></td>
+<td>Colon Operator</td></tr>
+<tr><td width="25%"><a href="colSums.html">colSums</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="commandArgs.html">commandArgs</a></td>
+<td>Extract Command Line Arguments</td></tr>
+<tr><td width="25%"><a href="comment.html">comment</a></td>
+<td>Query or Set a '"comment"' Attribute</td></tr>
+<tr><td width="25%"><a href="Comparison.html">Comparison</a></td>
+<td>Relational Operators</td></tr>
+<tr><td width="25%"><a href="groupGeneric.html">Complex</a></td>
+<td>S3 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="complex.html">complex</a></td>
+<td>Complex Vectors</td></tr>
+<tr><td width="25%"><a href="conditions.html">computeRestarts</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="conditions.html">condition</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="conditions.html">conditionCall</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="conditions.html">conditionCall.condition</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="conditions.html">conditionMessage</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="conditions.html">conditionMessage.condition</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="conditions.html">conditions</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="conflicts.html">conflicts</a></td>
+<td>Search for Masked Objects on the Search Path</td></tr>
+<tr><td width="25%"><a href="complex.html">Conj</a></td>
+<td>Complex Vectors</td></tr>
+<tr><td width="25%"><a href="connections.html">connection</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="connections.html">connections</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="Constants.html">Constants</a></td>
+<td>Built-in Constants</td></tr>
+<tr><td width="25%"><a href="contributors.html">contributors</a></td>
+<td>R Project Contributors</td></tr>
+<tr><td width="25%"><a href="Control.html">Control</a></td>
+<td>Control Flow</td></tr>
+<tr><td width="25%"><a href="copyright.html">copyright</a></td>
+<td>Copyrights of Files Used to Build R</td></tr>
+<tr><td width="25%"><a href="copyright.html">copyrights</a></td>
+<td>Copyrights of Files Used to Build R</td></tr>
+<tr><td width="25%"><a href="Trig.html">cos</a></td>
+<td>Trigonometric Functions</td></tr>
+<tr><td width="25%"><a href="Hyperbolic.html">cosh</a></td>
+<td>Hyperbolic Functions</td></tr>
+<tr><td width="25%"><a href="crossprod.html">crossprod</a></td>
+<td>Matrix Crossproduct</td></tr>
+<tr><td width="25%"><a href="Cstack_info.html">Cstack_info</a></td>
+<td>Report Information on C Stack Size and Usage</td></tr>
+<tr><td width="25%"><a href="cumsum.html">cummax</a></td>
+<td>Cumulative Sums, Products, and Extremes</td></tr>
+<tr><td width="25%"><a href="cumsum.html">cummin</a></td>
+<td>Cumulative Sums, Products, and Extremes</td></tr>
+<tr><td width="25%"><a href="cumsum.html">cumprod</a></td>
+<td>Cumulative Sums, Products, and Extremes</td></tr>
+<tr><td width="25%"><a href="cumsum.html">cumsum</a></td>
+<td>Cumulative Sums, Products, and Extremes</td></tr>
+<tr><td width="25%"><a href="cut.html">cut</a></td>
+<td>Convert Numeric to Factor</td></tr>
+<tr><td width="25%"><a href="cut.POSIXt.html">cut.POSIXt</a></td>
+<td>Convert a Date or Date-Time Object to a Factor</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="data.class.html">data.class</a></td>
+<td>Object Classes</td></tr>
+<tr><td width="25%"><a href="data.frame.html">data.frame</a></td>
+<td>Data Frames</td></tr>
+<tr><td width="25%"><a href="data.matrix.html">data.matrix</a></td>
+<td>Convert a Data Frame to a Numeric Matrix</td></tr>
+<tr><td width="25%"><a href="Dates.html">Date</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="date.html">date</a></td>
+<td>System Date and Time</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">date-time</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="Dates.html">Dates</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">DateTimeClasses</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="debug.html">debug</a></td>
+<td>Debug a Function</td></tr>
+<tr><td width="25%"><a href="debug.html">debugonce</a></td>
+<td>Debug a Function</td></tr>
+<tr><td width="25%"><a href="data.frame.html">default.stringsAsFactors</a></td>
+<td>Data Frames</td></tr>
+<tr><td width="25%"><a href="Defunct.html">Defunct</a></td>
+<td>Marking Objects as Defunct</td></tr>
+<tr><td width="25%"><a href="Defunct.html">defunct</a></td>
+<td>Marking Objects as Defunct</td></tr>
+<tr><td width="25%"><a href="delayedAssign.html">delayedAssign</a></td>
+<td>Delay Evaluation</td></tr>
+<tr><td width="25%"><a href="deparse.html">deparse</a></td>
+<td>Expression Deparsing</td></tr>
+<tr><td width="25%"><a href="Deprecated.html">Deprecated</a></td>
+<td>Marking Objects as Deprecated</td></tr>
+<tr><td width="25%"><a href="Deprecated.html">deprecated</a></td>
+<td>Marking Objects as Deprecated</td></tr>
+<tr><td width="25%"><a href="det.html">det</a></td>
+<td>Calculate the Determinant of a Matrix</td></tr>
+<tr><td width="25%"><a href="detach.html">detach</a></td>
+<td>Detach Objects from the Search Path</td></tr>
+<tr><td width="25%"><a href="det.html">determinant</a></td>
+<td>Calculate the Determinant of a Matrix</td></tr>
+<tr><td width="25%"><a href="dput.html">dget</a></td>
+<td>Write an Object to a File or Recreate it</td></tr>
+<tr><td width="25%"><a href="diag.html">diag</a></td>
+<td>Matrix Diagonals</td></tr>
+<tr><td width="25%"><a href="diff.html">diff</a></td>
+<td>Lagged Differences</td></tr>
+<tr><td width="25%"><a href="difftime.html">difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="Special.html">digamma</a></td>
+<td>Special Functions of Mathematics</td></tr>
+<tr><td width="25%"><a href="dim.html">dim</a></td>
+<td>Dimensions of an Object</td></tr>
+<tr><td width="25%"><a href="dimnames.html">dimnames</a></td>
+<td>Dimnames of an Object</td></tr>
+<tr><td width="25%"><a href="list.files.html">dir</a></td>
+<td>List the Files in a Directory/Folder</td></tr>
+<tr><td width="25%"><a href="files2.html">dir.create</a></td>
+<td>Manipulaton of Directories and File Permissions</td></tr>
+<tr><td width="25%"><a href="basename.html">dirname</a></td>
+<td>Manipulate File Paths</td></tr>
+<tr><td width="25%"><a href="getLoadedDLLs.html">DLLInfo</a></td>
+<td>Get DLLs Loaded in Current Session</td></tr>
+<tr><td width="25%"><a href="getLoadedDLLs.html">DLLInfoList</a></td>
+<td>Get DLLs Loaded in Current Session</td></tr>
+<tr><td width="25%"><a href="dynload.html">DLLpath</a></td>
+<td>Foreign Function Interface</td></tr>
+<tr><td width="25%"><a href="do.call.html">do.call</a></td>
+<td>Execute a Function Call</td></tr>
+<tr><td width="25%"><a href="double.html">double</a></td>
+<td>Double-Precision Vectors</td></tr>
+<tr><td width="25%"><a href="dput.html">dput</a></td>
+<td>Write an Object to a File or Recreate it</td></tr>
+<tr><td width="25%"><a href="sQuote.html">dQuote</a></td>
+<td>Quote Text</td></tr>
+<tr><td width="25%"><a href="drop.html">drop</a></td>
+<td>Drop Redundant Extent Information</td></tr>
+<tr><td width="25%"><a href="droplevels.html">droplevels</a></td>
+<td>droplevels</td></tr>
+<tr><td width="25%"><a href="dump.html">dump</a></td>
+<td>Text Representations of R Objects</td></tr>
+<tr><td width="25%"><a href="duplicated.html">duplicated</a></td>
+<td>Determine Duplicate Elements</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">duplicated.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">duplicated.POSIXlt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="dynload.html">dyn.load</a></td>
+<td>Foreign Function Interface</td></tr>
+<tr><td width="25%"><a href="dynload.html">dyn.unload</a></td>
+<td>Foreign Function Interface</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="eapply.html">eapply</a></td>
+<td>Apply a Function Over Values in an Environment</td></tr>
+<tr><td width="25%"><a href="eigen.html">eigen</a></td>
+<td>Spectral Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="Control.html">else</a></td>
+<td>Control Flow</td></tr>
+<tr><td width="25%"><a href="environment.html">emptyenv</a></td>
+<td>Environment Access</td></tr>
+<tr><td width="25%"><a href="Encoding.html">enc2native</a></td>
+<td>Read or Set the Declared Encodings for a Character Vector</td></tr>
+<tr><td width="25%"><a href="Encoding.html">enc2utf8</a></td>
+<td>Read or Set the Declared Encodings for a Character Vector</td></tr>
+<tr><td width="25%"><a href="environment.html">enclosure</a></td>
+<td>Environment Access</td></tr>
+<tr><td width="25%"><a href="encodeString.html">encodeString</a></td>
+<td>Encode Character Vector as for Printing</td></tr>
+<tr><td width="25%"><a href="Encoding.html">Encoding</a></td>
+<td>Read or Set the Declared Encodings for a Character Vector</td></tr>
+<tr><td width="25%"><a href="substitute.html">enquote</a></td>
+<td>Substituting and Quoting Expressions</td></tr>
+<tr><td width="25%"><a href="environment.html">env.profile</a></td>
+<td>Environment Access</td></tr>
+<tr><td width="25%"><a href="environment.html">environment</a></td>
+<td>Environment Access</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">environment variables</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="bindenv.html">environmentIsLocked</a></td>
+<td>Binding and Environment Adjustments</td></tr>
+<tr><td width="25%"><a href="environment.html">environmentName</a></td>
+<td>Environment Access</td></tr>
+<tr><td width="25%"><a href="eval.html">eval</a></td>
+<td>Evaluate an (Unevaluated) Expression</td></tr>
+<tr><td width="25%"><a href="eval.html">eval.parent</a></td>
+<td>Evaluate an (Unevaluated) Expression</td></tr>
+<tr><td width="25%"><a href="eval.html">evalq</a></td>
+<td>Evaluate an (Unevaluated) Expression</td></tr>
+<tr><td width="25%"><a href="exists.html">exists</a></td>
+<td>Is an Object Defined?</td></tr>
+<tr><td width="25%"><a href="Log.html">exp</a></td>
+<td>Logarithms and Exponentials</td></tr>
+<tr><td width="25%"><a href="expand.grid.html">expand.grid</a></td>
+<td>Create a Data Frame from All Combinations of Factors</td></tr>
+<tr><td width="25%"><a href="Log.html">expm1</a></td>
+<td>Logarithms and Exponentials</td></tr>
+<tr><td width="25%"><a href="expression.html">expression</a></td>
+<td>Unevaluated Expressions</td></tr>
+<tr><td width="25%"><a href="Extract.html">Extract</a></td>
+<td>Extract or Replace Parts of an Object</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="logical.html">F</a></td>
+<td>Logical Vectors</td></tr>
+<tr><td width="25%"><a href="factor.html">factor</a></td>
+<td>Factors</td></tr>
+<tr><td width="25%"><a href="Special.html">factorial</a></td>
+<td>Special Functions of Mathematics</td></tr>
+<tr><td width="25%"><a href="logical.html">FALSE</a></td>
+<td>Logical Vectors</td></tr>
+<tr><td width="25%"><a href="connections.html">fifo</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="connections.html">file</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="file.access.html">file.access</a></td>
+<td>Ascertain File Accessibility</td></tr>
+<tr><td width="25%"><a href="files.html">file.append</a></td>
+<td>File Manipulation</td></tr>
+<tr><td width="25%"><a href="file.choose.html">file.choose</a></td>
+<td>Choose a File Interactively</td></tr>
+<tr><td width="25%"><a href="files.html">file.copy</a></td>
+<td>File Manipulation</td></tr>
+<tr><td width="25%"><a href="files.html">file.create</a></td>
+<td>File Manipulation</td></tr>
+<tr><td width="25%"><a href="files.html">file.exists</a></td>
+<td>File Manipulation</td></tr>
+<tr><td width="25%"><a href="file.info.html">file.info</a></td>
+<td>Extract File Information</td></tr>
+<tr><td width="25%"><a href="files.html">file.link</a></td>
+<td>File Manipulation</td></tr>
+<tr><td width="25%"><a href="file.path.html">file.path</a></td>
+<td>Construct Path to File</td></tr>
+<tr><td width="25%"><a href="files.html">file.remove</a></td>
+<td>File Manipulation</td></tr>
+<tr><td width="25%"><a href="files.html">file.rename</a></td>
+<td>File Manipulation</td></tr>
+<tr><td width="25%"><a href="file.show.html">file.show</a></td>
+<td>Display One or More Files</td></tr>
+<tr><td width="25%"><a href="files.html">file.symlink</a></td>
+<td>File Manipulation</td></tr>
+<tr><td width="25%"><a href="files.html">files</a></td>
+<td>File Manipulation</td></tr>
+<tr><td width="25%"><a href="funprog.html">Filter</a></td>
+<td>Common Higher-Order Functions in Functional Programming Languages</td></tr>
+<tr><td width="25%"><a href="funprog.html">Find</a></td>
+<td>Common Higher-Order Functions in Functional Programming Languages</td></tr>
+<tr><td width="25%"><a href="find.package.html">find.package</a></td>
+<td>Find Packages</td></tr>
+<tr><td width="25%"><a href="findInterval.html">findInterval</a></td>
+<td>Find Interval Numbers or Indices</td></tr>
+<tr><td width="25%"><a href="conditions.html">findRestart</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="is.finite.html">finite</a></td>
+<td>Finite, Infinite and NaN Numbers</td></tr>
+<tr><td width="25%"><a href="Round.html">floor</a></td>
+<td>Rounding of Numbers</td></tr>
+<tr><td width="25%"><a href="connections.html">flush</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="Control.html">for</a></td>
+<td>Control Flow</td></tr>
+<tr><td width="25%"><a href="force.html">force</a></td>
+<td>Force Evaluation of an Argument</td></tr>
+<tr><td width="25%"><a href="Foreign.html">Foreign</a></td>
+<td>Foreign Function Interface</td></tr>
+<tr><td width="25%"><a href="formals.html">formals</a></td>
+<td>Access to and Manipulation of the Formal Arguments</td></tr>
+<tr><td width="25%"><a href="format.html">format</a></td>
+<td>Encode in a Common Format</td></tr>
+<tr><td width="25%"><a href="as.Date.html">format.Date</a></td>
+<td>Date Conversion Functions to and from Character</td></tr>
+<tr><td width="25%"><a href="difftime.html">format.difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="hexmode.html">format.hexmode</a></td>
+<td>Display Numbers in Hexadecimal</td></tr>
+<tr><td width="25%"><a href="format.info.html">format.info</a></td>
+<td>format(.) Information</td></tr>
+<tr><td width="25%"><a href="library.html">format.libraryIQR</a></td>
+<td>Loading and Listing of Packages</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">format.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="octmode.html">format.octmode</a></td>
+<td>Display Numbers in Octal</td></tr>
+<tr><td width="25%"><a href="library.html">format.packageInfo</a></td>
+<td>Loading and Listing of Packages</td></tr>
+<tr><td width="25%"><a href="strptime.html">format.POSIXct</a></td>
+<td>Date-time Conversion Functions to and from Character</td></tr>
+<tr><td width="25%"><a href="format.pval.html">format.pval</a></td>
+<td>Format P Values</td></tr>
+<tr><td width="25%"><a href="summary.html">format.summaryDefault</a></td>
+<td>Object Summaries</td></tr>
+<tr><td width="25%"><a href="formatc.html">formatC</a></td>
+<td>Formatting Using C-style Formats</td></tr>
+<tr><td width="25%"><a href="formatDL.html">formatDL</a></td>
+<td>Format Description Lists</td></tr>
+<tr><td width="25%"><a href="backsolve.html">forwardsolve</a></td>
+<td>Solve an Upper or Lower Triangular System</td></tr>
+<tr><td width="25%"><a href="function.html">function</a></td>
+<td>Function Definition</td></tr>
+<tr><td width="25%"><a href="agrep.html">fuzzy matching</a></td>
+<td>Approximate String Matching (Fuzzy Matching)</td></tr>
+</table>
+
+<h2><a name="G">-- G --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Special.html">gamma</a></td>
+<td>Special Functions of Mathematics</td></tr>
+<tr><td width="25%"><a href="gc.html">gc</a></td>
+<td>Garbage Collection</td></tr>
+<tr><td width="25%"><a href="gc.time.html">gc.time</a></td>
+<td>Report Time Spent in Garbage Collection</td></tr>
+<tr><td width="25%"><a href="gc.html">gcinfo</a></td>
+<td>Garbage Collection</td></tr>
+<tr><td width="25%"><a href="gctorture.html">gctorture</a></td>
+<td>Torture Garbage Collector</td></tr>
+<tr><td width="25%"><a href="gctorture.html">gctorture2</a></td>
+<td>Torture Garbage Collector</td></tr>
+<tr><td width="25%"><a href="get.html">get</a></td>
+<td>Return the Value of a Named Object</td></tr>
+<tr><td width="25%"><a href="showConnections.html">getAllConnections</a></td>
+<td>Display Connections</td></tr>
+<tr><td width="25%"><a href="converters.html">getCConverterDescriptions</a></td>
+<td>Management of .C argument conversion list</td></tr>
+<tr><td width="25%"><a href="converters.html">getCConverterStatus</a></td>
+<td>Management of .C argument conversion list</td></tr>
+<tr><td width="25%"><a href="showConnections.html">getConnection</a></td>
+<td>Display Connections</td></tr>
+<tr><td width="25%"><a href="getDLLRegisteredRoutines.html">getDLLRegisteredRoutines</a></td>
+<td>Reflectance Information for C/Fortran routines in a DLL</td></tr>
+<tr><td width="25%"><a href="Extract.html">getElement</a></td>
+<td>Extract or Replace Parts of an Object</td></tr>
+<tr><td width="25%"><a href="stop.html">geterrmessage</a></td>
+<td>Stop Function Execution</td></tr>
+<tr><td width="25%"><a href="userhooks.html">getHook</a></td>
+<td>Functions to Get and Set Hooks for Load, Attach, Detach and Unload</td></tr>
+<tr><td width="25%"><a href="getLoadedDLLs.html">getLoadedDLLs</a></td>
+<td>Get DLLs Loaded in Current Session</td></tr>
+<tr><td width="25%"><a href="getNativeSymbolInfo.html">getNativeSymbolInfo</a></td>
+<td>Obtain a Description of one or more Native (C/Fortran) Symbols</td></tr>
+<tr><td width="25%"><a href="converters.html">getNumCConverters</a></td>
+<td>Management of .C argument conversion list</td></tr>
+<tr><td width="25%"><a href="options.html">getOption</a></td>
+<td>Options Settings</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">getRversion</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="srcfile.html">getSrcLines</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="taskCallbackNames.html">getTaskCallbackNames</a></td>
+<td>Query the Names of the Current Internal Top-Level Task Callbacks</td></tr>
+<tr><td width="25%"><a href="gettext.html">gettext</a></td>
+<td>Translate Text Messages</td></tr>
+<tr><td width="25%"><a href="sprintf.html">gettextf</a></td>
+<td>Use C-style String Formatting Commands</td></tr>
+<tr><td width="25%"><a href="getwd.html">getwd</a></td>
+<td>Get or Set Working Directory</td></tr>
+<tr><td width="25%"><a href="gl.html">gl</a></td>
+<td>Generate Factor Levels</td></tr>
+<tr><td width="25%"><a href="environment.html">globalenv</a></td>
+<td>Environment Access</td></tr>
+<tr><td width="25%"><a href="grep.html">gregexpr</a></td>
+<td>Pattern Matching and Replacement</td></tr>
+<tr><td width="25%"><a href="grep.html">grep</a></td>
+<td>Pattern Matching and Replacement</td></tr>
+<tr><td width="25%"><a href="grep.html">grepl</a></td>
+<td>Pattern Matching and Replacement</td></tr>
+<tr><td width="25%"><a href="grepRaw.html">grepRaw</a></td>
+<td>Pattern Matching for Raw Vectors</td></tr>
+<tr><td width="25%"><a href="groupGeneric.html">group generic</a></td>
+<td>S3 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="groupGeneric.html">groupGeneric</a></td>
+<td>S3 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">GSC</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="grep.html">gsub</a></td>
+<td>Pattern Matching and Replacement</td></tr>
+<tr><td width="25%"><a href="gzcon.html">gzcon</a></td>
+<td>(De)compress I/O Through Connections</td></tr>
+<tr><td width="25%"><a href="connections.html">gzfile</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="hexmode.html">hexmode</a></td>
+<td>Display Numbers in Hexadecimal</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">HOME</a></td>
+<td>Environment Variables</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="AsIs.html">I</a></td>
+<td>Inhibit Interpretation/Conversion of Objects</td></tr>
+<tr><td width="25%"><a href="iconv.html">iconv</a></td>
+<td>Convert Character Vector between Encodings</td></tr>
+<tr><td width="25%"><a href="iconv.html">iconvlist</a></td>
+<td>Convert Character Vector between Encodings</td></tr>
+<tr><td width="25%"><a href="icuSetCollate.html">icuSetCollate</a></td>
+<td>Setup Collation by ICU</td></tr>
+<tr><td width="25%"><a href="identical.html">identical</a></td>
+<td>Test Objects for Exact Equality</td></tr>
+<tr><td width="25%"><a href="identity.html">identity</a></td>
+<td>Identity Function</td></tr>
+<tr><td width="25%"><a href="Control.html">if</a></td>
+<td>Control Flow</td></tr>
+<tr><td width="25%"><a href="ifelse.html">ifelse</a></td>
+<td>Conditional Element Selection</td></tr>
+<tr><td width="25%"><a href="complex.html">Im</a></td>
+<td>Complex Vectors</td></tr>
+<tr><td width="25%"><a href="Control.html">in</a></td>
+<td>Control Flow</td></tr>
+<tr><td width="25%"><a href="is.finite.html">Inf</a></td>
+<td>Finite, Infinite and NaN Numbers</td></tr>
+<tr><td width="25%"><a href="class.html">inherits</a></td>
+<td>Object Classes</td></tr>
+<tr><td width="25%"><a href="integer.html">integer</a></td>
+<td>Integer Vectors</td></tr>
+<tr><td width="25%"><a href="interaction.html">interaction</a></td>
+<td>Compute Factor Interactions</td></tr>
+<tr><td width="25%"><a href="interactive.html">interactive</a></td>
+<td>Is R Running Interactively?</td></tr>
+<tr><td width="25%"><a href="InternalMethods.html">internal generic</a></td>
+<td>Internal Generic Functions</td></tr>
+<tr><td width="25%"><a href="InternalMethods.html">InternalGenerics</a></td>
+<td>Internal Generic Functions</td></tr>
+<tr><td width="25%"><a href="InternalMethods.html">InternalMethods</a></td>
+<td>Internal Generic Functions</td></tr>
+<tr><td width="25%"><a href="sets.html">intersect</a></td>
+<td>Set Operations</td></tr>
+<tr><td width="25%"><a href="sets.html">intersection</a></td>
+<td>Set Operations</td></tr>
+<tr><td width="25%"><a href="rawConversion.html">intToBits</a></td>
+<td>Convert to or from Raw Vectors</td></tr>
+<tr><td width="25%"><a href="utf8Conversion.html">intToUtf8</a></td>
+<td>Convert to or from UTF-8-encoded Character Vectors</td></tr>
+<tr><td width="25%"><a href="rle.html">inverse.rle</a></td>
+<td>Run Length Encoding</td></tr>
+<tr><td width="25%"><a href="invisible.html">invisible</a></td>
+<td>Change the Print Mode to Invisible</td></tr>
+<tr><td width="25%"><a href="conditions.html">invokeRestart</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="conditions.html">invokeRestartInteractively</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="array.html">is.array</a></td>
+<td>Multi-way Arrays</td></tr>
+<tr><td width="25%"><a href="is.recursive.html">is.atomic</a></td>
+<td>Is an Object Atomic or Recursive?</td></tr>
+<tr><td width="25%"><a href="call.html">is.call</a></td>
+<td>Function Calls</td></tr>
+<tr><td width="25%"><a href="character.html">is.character</a></td>
+<td>Character Vectors</td></tr>
+<tr><td width="25%"><a href="complex.html">is.complex</a></td>
+<td>Complex Vectors</td></tr>
+<tr><td width="25%"><a href="as.data.frame.html">is.data.frame</a></td>
+<td>Coerce to a Data Frame</td></tr>
+<tr><td width="25%"><a href="double.html">is.double</a></td>
+<td>Double-Precision Vectors</td></tr>
+<tr><td width="25%"><a href="sets.html">is.element</a></td>
+<td>Set Operations</td></tr>
+<tr><td width="25%"><a href="environment.html">is.environment</a></td>
+<td>Environment Access</td></tr>
+<tr><td width="25%"><a href="expression.html">is.expression</a></td>
+<td>Unevaluated Expressions</td></tr>
+<tr><td width="25%"><a href="factor.html">is.factor</a></td>
+<td>Factors</td></tr>
+<tr><td width="25%"><a href="is.finite.html">is.finite</a></td>
+<td>Finite, Infinite and NaN Numbers</td></tr>
+<tr><td width="25%"><a href="is.function.html">is.function</a></td>
+<td>Is an Object of Type (Primitive) Function?</td></tr>
+<tr><td width="25%"><a href="is.finite.html">is.infinite</a></td>
+<td>Finite, Infinite and NaN Numbers</td></tr>
+<tr><td width="25%"><a href="integer.html">is.integer</a></td>
+<td>Integer Vectors</td></tr>
+<tr><td width="25%"><a href="is.language.html">is.language</a></td>
+<td>Is an Object a Language Object?</td></tr>
+<tr><td width="25%"><a href="list.html">is.list</a></td>
+<td>Lists - Generic and Dotted Pairs</td></tr>
+<tr><td width="25%"><a href="dynload.html">is.loaded</a></td>
+<td>Foreign Function Interface</td></tr>
+<tr><td width="25%"><a href="logical.html">is.logical</a></td>
+<td>Logical Vectors</td></tr>
+<tr><td width="25%"><a href="matrix.html">is.matrix</a></td>
+<td>Matrices</td></tr>
+<tr><td width="25%"><a href="NA.html">is.na</a></td>
+<td>'Not Available' / Missing Values</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">is.na.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">is.na.POSIXlt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="name.html">is.name</a></td>
+<td>Names and Symbols</td></tr>
+<tr><td width="25%"><a href="is.finite.html">is.nan</a></td>
+<td>Finite, Infinite and NaN Numbers</td></tr>
+<tr><td width="25%"><a href="NULL.html">is.null</a></td>
+<td>The Null Object</td></tr>
+<tr><td width="25%"><a href="numeric.html">is.numeric</a></td>
+<td>Numeric Vectors</td></tr>
+<tr><td width="25%"><a href="difftime.html">is.numeric.difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">is.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="is.object.html">is.object</a></td>
+<td>Is an Object 'internally classed'?</td></tr>
+<tr><td width="25%"><a href="factor.html">is.ordered</a></td>
+<td>Factors</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">is.package_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="list.html">is.pairlist</a></td>
+<td>Lists - Generic and Dotted Pairs</td></tr>
+<tr><td width="25%"><a href="is.function.html">is.primitive</a></td>
+<td>Is an Object of Type (Primitive) Function?</td></tr>
+<tr><td width="25%"><a href="qr.html">is.qr</a></td>
+<td>The QR Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="isR.html">is.R</a></td>
+<td>Are we using R, rather than S?</td></tr>
+<tr><td width="25%"><a href="raw.html">is.raw</a></td>
+<td>Raw Vectors</td></tr>
+<tr><td width="25%"><a href="real.html">is.real</a></td>
+<td>Real Vectors</td></tr>
+<tr><td width="25%"><a href="is.recursive.html">is.recursive</a></td>
+<td>Is an Object Atomic or Recursive?</td></tr>
+<tr><td width="25%"><a href="is.single.html">is.single</a></td>
+<td>Is an Object of Single Precision Type?</td></tr>
+<tr><td width="25%"><a href="name.html">is.symbol</a></td>
+<td>Names and Symbols</td></tr>
+<tr><td width="25%"><a href="table.html">is.table</a></td>
+<td>Cross Tabulation and Table Creation</td></tr>
+<tr><td width="25%"><a href="is.unsorted.html">is.unsorted</a></td>
+<td>Test if an Object is Not Sorted</td></tr>
+<tr><td width="25%"><a href="vector.html">is.vector</a></td>
+<td>Vectors</td></tr>
+<tr><td width="25%"><a href="showConnections.html">isatty</a></td>
+<td>Display Connections</td></tr>
+<tr><td width="25%"><a href="debug.html">isdebugged</a></td>
+<td>Debug a Function</td></tr>
+<tr><td width="25%"><a href="connections.html">isIncomplete</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="ISOdatetime.html">ISOdate</a></td>
+<td>Date-time Conversion Functions from Numeric Representations</td></tr>
+<tr><td width="25%"><a href="ISOdatetime.html">ISOdatetime</a></td>
+<td>Date-time Conversion Functions from Numeric Representations</td></tr>
+<tr><td width="25%"><a href="connections.html">isOpen</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="conditions.html">isRestart</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="isS4.html">isS4</a></td>
+<td>Test for an S4 object</td></tr>
+<tr><td width="25%"><a href="seek.html">isSeekable</a></td>
+<td>Functions to Reposition Connections</td></tr>
+<tr><td width="25%"><a href="isSymmetric.html">isSymmetric</a></td>
+<td>Test if a Matrix or other Object is Symmetric</td></tr>
+<tr><td width="25%"><a href="Logic.html">isTRUE</a></td>
+<td>Logical Operators</td></tr>
+</table>
+
+<h2><a name="J">-- J --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="jitter.html">jitter</a></td>
+<td>'Jitter' (Add Noise) to Numbers</td></tr>
+<tr><td width="25%"><a href="weekday.POSIXt.html">julian</a></td>
+<td>Extract Parts of a POSIXt or Date Object</td></tr>
+</table>
+
+<h2><a name="K">-- K --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="kappa.html">kappa</a></td>
+<td>Compute or Estimate the Condition Number of a Matrix</td></tr>
+<tr><td width="25%"><a href="kronecker.html">kronecker</a></td>
+<td>Kronecker Products on Arrays</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="l10n_info.html">l10n_info</a></td>
+<td>Localization Information</td></tr>
+<tr><td width="25%"><a href="svd.html">La.svd</a></td>
+<td>Singular Value Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="labels.html">labels</a></td>
+<td>Find Labels from Object</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">LANGUAGE</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="lapply.html">lapply</a></td>
+<td>Apply a Function over a List or Vector</td></tr>
+<tr><td width="25%"><a href="warnings.html">last.warning</a></td>
+<td>Print Warning Messages</td></tr>
+<tr><td width="25%"><a href="Special.html">lbeta</a></td>
+<td>Special Functions of Mathematics</td></tr>
+<tr><td width="25%"><a href="Special.html">lchoose</a></td>
+<td>Special Functions of Mathematics</td></tr>
+<tr><td width="25%"><a href="locales.html">LC_ALL</a></td>
+<td>Query or Set Aspects of the Locale</td></tr>
+<tr><td width="25%"><a href="locales.html">LC_COLLATE</a></td>
+<td>Query or Set Aspects of the Locale</td></tr>
+<tr><td width="25%"><a href="locales.html">LC_CTYPE</a></td>
+<td>Query or Set Aspects of the Locale</td></tr>
+<tr><td width="25%"><a href="locales.html">LC_MONETARY</a></td>
+<td>Query or Set Aspects of the Locale</td></tr>
+<tr><td width="25%"><a href="locales.html">LC_NUMERIC</a></td>
+<td>Query or Set Aspects of the Locale</td></tr>
+<tr><td width="25%"><a href="locales.html">LC_TIME</a></td>
+<td>Query or Set Aspects of the Locale</td></tr>
+<tr><td width="25%"><a href="length.html">length</a></td>
+<td>Length of an Object</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">length.POSIXlt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="Constants.html">LETTERS</a></td>
+<td>Built-in Constants</td></tr>
+<tr><td width="25%"><a href="Constants.html">letters</a></td>
+<td>Built-in Constants</td></tr>
+<tr><td width="25%"><a href="levels.html">levels</a></td>
+<td>Levels Attributes</td></tr>
+<tr><td width="25%"><a href="Special.html">lfactorial</a></td>
+<td>Special Functions of Mathematics</td></tr>
+<tr><td width="25%"><a href="Special.html">lgamma</a></td>
+<td>Special Functions of Mathematics</td></tr>
+<tr><td width="25%"><a href="library.html">library</a></td>
+<td>Loading and Listing of Packages</td></tr>
+<tr><td width="25%"><a href="library.dynam.html">library.dynam</a></td>
+<td>Loading DLLs from Packages</td></tr>
+<tr><td width="25%"><a href="library.dynam.html">library.dynam.unload</a></td>
+<td>Loading DLLs from Packages</td></tr>
+<tr><td width="25%"><a href="license.html">licence</a></td>
+<td>The R License Terms</td></tr>
+<tr><td width="25%"><a href="license.html">license</a></td>
+<td>The R License Terms</td></tr>
+<tr><td width="25%"><a href="list.html">list</a></td>
+<td>Lists - Generic and Dotted Pairs</td></tr>
+<tr><td width="25%"><a href="list.files.html">list.dirs</a></td>
+<td>List the Files in a Directory/Folder</td></tr>
+<tr><td width="25%"><a href="list.files.html">list.files</a></td>
+<td>List the Files in a Directory/Folder</td></tr>
+<tr><td width="25%"><a href="list2env.html">list2env</a></td>
+<td>From A List, Build or Add To an Environment</td></tr>
+<tr><td width="25%"><a href="load.html">load</a></td>
+<td>Reload Saved Datasets</td></tr>
+<tr><td width="25%"><a href="ns-load.html">loadedNamespaces</a></td>
+<td>Loading and Unloading Namespaces</td></tr>
+<tr><td width="25%"><a href="ns-load.html">loadNamespace</a></td>
+<td>Loading and Unloading Namespaces</td></tr>
+<tr><td width="25%"><a href="eval.html">local</a></td>
+<td>Evaluate an (Unevaluated) Expression</td></tr>
+<tr><td width="25%"><a href="Sys.localeconv.html">localeconv</a></td>
+<td>Find Details of the Numerical and Monetary Representations in the Current Locale</td></tr>
+<tr><td width="25%"><a href="locales.html">locales</a></td>
+<td>Query or Set Aspects of the Locale</td></tr>
+<tr><td width="25%"><a href="bindenv.html">lockBinding</a></td>
+<td>Binding and Environment Adjustments</td></tr>
+<tr><td width="25%"><a href="bindenv.html">lockEnvironment</a></td>
+<td>Binding and Environment Adjustments</td></tr>
+<tr><td width="25%"><a href="Log.html">log</a></td>
+<td>Logarithms and Exponentials</td></tr>
+<tr><td width="25%"><a href="Log.html">log10</a></td>
+<td>Logarithms and Exponentials</td></tr>
+<tr><td width="25%"><a href="Log.html">log1p</a></td>
+<td>Logarithms and Exponentials</td></tr>
+<tr><td width="25%"><a href="Log.html">log2</a></td>
+<td>Logarithms and Exponentials</td></tr>
+<tr><td width="25%"><a href="Log.html">logb</a></td>
+<td>Logarithms and Exponentials</td></tr>
+<tr><td width="25%"><a href="Logic.html">Logic</a></td>
+<td>Logical Operators</td></tr>
+<tr><td width="25%"><a href="logical.html">logical</a></td>
+<td>Logical Vectors</td></tr>
+<tr><td width="25%"><a href="lower.tri.html">lower.tri</a></td>
+<td>Lower and Upper Triangular Part of a Matrix</td></tr>
+<tr><td width="25%"><a href="ls.html">ls</a></td>
+<td>List Objects</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="make.names.html">make.names</a></td>
+<td>Make Syntactically Valid Names</td></tr>
+<tr><td width="25%"><a href="make.unique.html">make.unique</a></td>
+<td>Make Character Strings Unique</td></tr>
+<tr><td width="25%"><a href="bindenv.html">makeActiveBinding</a></td>
+<td>Binding and Environment Adjustments</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">MAKEINDEX</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="funprog.html">Map</a></td>
+<td>Common Higher-Order Functions in Functional Programming Languages</td></tr>
+<tr><td width="25%"><a href="mapply.html">mapply</a></td>
+<td>Apply a Function to Multiple List or Vector Arguments</td></tr>
+<tr><td width="25%"><a href="margin.table.html">margin.table</a></td>
+<td>Compute table margin</td></tr>
+<tr><td width="25%"><a href="mat.or.vec.html">mat.or.vec</a></td>
+<td>Create a Matrix or a Vector</td></tr>
+<tr><td width="25%"><a href="match.html">match</a></td>
+<td>Value Matching</td></tr>
+<tr><td width="25%"><a href="match.arg.html">match.arg</a></td>
+<td>Argument Verification Using Partial Matching</td></tr>
+<tr><td width="25%"><a href="match.call.html">match.call</a></td>
+<td>Argument Matching</td></tr>
+<tr><td width="25%"><a href="match.fun.html">match.fun</a></td>
+<td>Extract a Function Specified by Name</td></tr>
+<tr><td width="25%"><a href="groupGeneric.html">Math</a></td>
+<td>S3 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="Dates.html">Math.Date</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="difftime.html">Math.difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="factor.html">Math.factor</a></td>
+<td>Factors</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">Math.POSIXlt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">Math.POSIXt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="matmult.html">matmult</a></td>
+<td>Matrix Multiplication</td></tr>
+<tr><td width="25%"><a href="matrix.html">matrix</a></td>
+<td>Matrices</td></tr>
+<tr><td width="25%"><a href="Extremes.html">max</a></td>
+<td>Maxima and Minima</td></tr>
+<tr><td width="25%"><a href="maxCol.html">max.col</a></td>
+<td>Find Maximum Position in Matrix</td></tr>
+<tr><td width="25%"><a href="mean.html">mean</a></td>
+<td>Arithmetic Mean</td></tr>
+<tr><td width="25%"><a href="Dates.html">mean.Date</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="difftime.html">mean.difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">mean.POSIXct</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="memCompress.html">memCompress</a></td>
+<td>In-memory Compression and Decompression</td></tr>
+<tr><td width="25%"><a href="memCompress.html">memDecompress</a></td>
+<td>In-memory Compression and Decompression</td></tr>
+<tr><td width="25%"><a href="Memory.html">Memory</a></td>
+<td>Memory Available for Data Storage</td></tr>
+<tr><td width="25%"><a href="Memory-limits.html">Memory-limits</a></td>
+<td>Memory Limits in R</td></tr>
+<tr><td width="25%"><a href="memory.profile.html">memory.profile</a></td>
+<td>Profile the Usage of Cons Cells</td></tr>
+<tr><td width="25%"><a href="merge.html">merge</a></td>
+<td>Merge Two Data Frames</td></tr>
+<tr><td width="25%"><a href="message.html">message</a></td>
+<td>Diagnostic Messages</td></tr>
+<tr><td width="25%"><a href="get.html">mget</a></td>
+<td>Return the Value of a Named Object</td></tr>
+<tr><td width="25%"><a href="Extremes.html">min</a></td>
+<td>Maxima and Minima</td></tr>
+<tr><td width="25%"><a href="missing.html">missing</a></td>
+<td>Does a Formal Argument have a Value?</td></tr>
+<tr><td width="25%"><a href="complex.html">Mod</a></td>
+<td>Complex Vectors</td></tr>
+<tr><td width="25%"><a href="mode.html">mode</a></td>
+<td>The (Storage) Mode of an Object</td></tr>
+<tr><td width="25%"><a href="Constants.html">month.abb</a></td>
+<td>Built-in Constants</td></tr>
+<tr><td width="25%"><a href="weekday.POSIXt.html">months</a></td>
+<td>Extract Parts of a POSIXt or Date Object</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="NA.html">NA</a></td>
+<td>'Not Available' / Missing Values</td></tr>
+<tr><td width="25%"><a href="name.html">name</a></td>
+<td>Names and Symbols</td></tr>
+<tr><td width="25%"><a href="names.html">names</a></td>
+<td>The Names of an Object</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">names.POSIXlt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="is.finite.html">NaN</a></td>
+<td>Finite, Infinite and NaN Numbers</td></tr>
+<tr><td width="25%"><a href="nargs.html">nargs</a></td>
+<td>The Number of Arguments to a Function</td></tr>
+<tr><td width="25%"><a href="getNativeSymbolInfo.html">NativeSymbol</a></td>
+<td>Obtain a Description of one or more Native (C/Fortran) Symbols</td></tr>
+<tr><td width="25%"><a href="getNativeSymbolInfo.html">NativeSymbolInfo</a></td>
+<td>Obtain a Description of one or more Native (C/Fortran) Symbols</td></tr>
+<tr><td width="25%"><a href="NA.html">NA_character_</a></td>
+<td>'Not Available' / Missing Values</td></tr>
+<tr><td width="25%"><a href="NA.html">NA_complex_</a></td>
+<td>'Not Available' / Missing Values</td></tr>
+<tr><td width="25%"><a href="NA.html">NA_integer_</a></td>
+<td>'Not Available' / Missing Values</td></tr>
+<tr><td width="25%"><a href="NA.html">NA_real_</a></td>
+<td>'Not Available' / Missing Values</td></tr>
+<tr><td width="25%"><a href="nchar.html">nchar</a></td>
+<td>Count the Number of Characters (or Bytes or Width)</td></tr>
+<tr><td width="25%"><a href="nrow.html">NCOL</a></td>
+<td>The Number of Rows/Columns of an Array</td></tr>
+<tr><td width="25%"><a href="nrow.html">ncol</a></td>
+<td>The Number of Rows/Columns of an Array</td></tr>
+<tr><td width="25%"><a href="funprog.html">Negate</a></td>
+<td>Common Higher-Order Functions in Functional Programming Languages</td></tr>
+<tr><td width="25%"><a href="environment.html">new.env</a></td>
+<td>Environment Access</td></tr>
+<tr><td width="25%"><a href="Control.html">next</a></td>
+<td>Control Flow</td></tr>
+<tr><td width="25%"><a href="UseMethod.html">NextMethod</a></td>
+<td>Class Methods</td></tr>
+<tr><td width="25%"><a href="gettext.html">ngettext</a></td>
+<td>Translate Text Messages</td></tr>
+<tr><td width="25%"><a href="nlevels.html">nlevels</a></td>
+<td>The Number of Levels of a Factor</td></tr>
+<tr><td width="25%"><a href="noquote.html">noquote</a></td>
+<td>Class for 'no quote' Printing of Character Strings</td></tr>
+<tr><td width="25%"><a href="norm.html">norm</a></td>
+<td>Compute the Norm of a Matrix</td></tr>
+<tr><td width="25%"><a href="normalizePath.html">normalizePath</a></td>
+<td>Express File Paths in Canonical Form</td></tr>
+<tr><td width="25%"><a href="notyet.html">NotYetImplemented</a></td>
+<td>Not Yet Implemented Functions and Unused Arguments</td></tr>
+<tr><td width="25%"><a href="notyet.html">NotYetUsed</a></td>
+<td>Not Yet Implemented Functions and Unused Arguments</td></tr>
+<tr><td width="25%"><a href="nrow.html">NROW</a></td>
+<td>The Number of Rows/Columns of an Array</td></tr>
+<tr><td width="25%"><a href="nrow.html">nrow</a></td>
+<td>The Number of Rows/Columns of an Array</td></tr>
+<tr><td width="25%"><a href="NULL.html">NULL</a></td>
+<td>The Null Object</td></tr>
+<tr><td width="25%"><a href="numeric.html">numeric</a></td>
+<td>Numeric Vectors</td></tr>
+<tr><td width="25%"><a href="NumericConstants.html">NumericConstants</a></td>
+<td>Numeric Constants</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="nchar.html">nzchar</a></td>
+<td>Count the Number of Characters (or Bytes or Width)</td></tr>
+</table>
+
+<h2><a name="O">-- O --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="ls.html">objects</a></td>
+<td>List Objects</td></tr>
+<tr><td width="25%"><a href="octmode.html">octmode</a></td>
+<td>Display Numbers in Octal</td></tr>
+<tr><td width="25%"><a href="class.html">oldClass</a></td>
+<td>Object Classes</td></tr>
+<tr><td width="25%"><a href="on.exit.html">on.exit</a></td>
+<td>Function Exit Code</td></tr>
+<tr><td width="25%"><a href="connections.html">open</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="srcfile.html">open.srcfile</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="srcfile.html">open.srcfilealias</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="groupGeneric.html">Ops</a></td>
+<td>S3 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="Ops.Date.html">Ops.Date</a></td>
+<td>Operators on the Date Class</td></tr>
+<tr><td width="25%"><a href="difftime.html">Ops.difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="factor.html">Ops.factor</a></td>
+<td>Factors</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">Ops.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="factor.html">Ops.ordered</a></td>
+<td>Factors</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">Ops.POSIXt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="options.html">option</a></td>
+<td>Options Settings</td></tr>
+<tr><td width="25%"><a href="options.html">options</a></td>
+<td>Options Settings</td></tr>
+<tr><td width="25%"><a href="order.html">order</a></td>
+<td>Ordering Permutation</td></tr>
+<tr><td width="25%"><a href="factor.html">ordered</a></td>
+<td>Factors</td></tr>
+<tr><td width="25%"><a href="outer.html">outer</a></td>
+<td>Outer Product of Arrays</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="userhooks.html">packageEvent</a></td>
+<td>Functions to Get and Set Hooks for Load, Attach, Detach and Unload</td></tr>
+<tr><td width="25%"><a href="message.html">packageStartupMessage</a></td>
+<td>Diagnostic Messages</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">package_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="rawConversion.html">packBits</a></td>
+<td>Convert to or from Raw Vectors</td></tr>
+<tr><td width="25%"><a href="list.html">pairlist</a></td>
+<td>Lists - Generic and Dotted Pairs</td></tr>
+<tr><td width="25%"><a href="Paren.html">Paren</a></td>
+<td>Parentheses and Braces</td></tr>
+<tr><td width="25%"><a href="environment.html">parent.env</a></td>
+<td>Environment Access</td></tr>
+<tr><td width="25%"><a href="sys.parent.html">parent.frame</a></td>
+<td>Functions to Access the Function Call Stack</td></tr>
+<tr><td width="25%"><a href="parse.html">parse</a></td>
+<td>Parse Expressions</td></tr>
+<tr><td width="25%"><a href="paste.html">paste</a></td>
+<td>Concatenate Strings</td></tr>
+<tr><td width="25%"><a href="paste.html">paste0</a></td>
+<td>Concatenate Strings</td></tr>
+<tr><td width="25%"><a href="path.expand.html">path.expand</a></td>
+<td>Expand File Paths</td></tr>
+<tr><td width="25%"><a href="find.package.html">path.package</a></td>
+<td>Find Packages</td></tr>
+<tr><td width="25%"><a href="Constants.html">pi</a></td>
+<td>Built-in Constants</td></tr>
+<tr><td width="25%"><a href="connections.html">pipe</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="pmatch.html">pmatch</a></td>
+<td>Partial String Matching</td></tr>
+<tr><td width="25%"><a href="Extremes.html">pmax</a></td>
+<td>Maxima and Minima</td></tr>
+<tr><td width="25%"><a href="Extremes.html">pmax.int</a></td>
+<td>Maxima and Minima</td></tr>
+<tr><td width="25%"><a href="Extremes.html">pmin</a></td>
+<td>Maxima and Minima</td></tr>
+<tr><td width="25%"><a href="Extremes.html">pmin.int</a></td>
+<td>Maxima and Minima</td></tr>
+<tr><td width="25%"><a href="polyroot.html">polyroot</a></td>
+<td>Find Zeros of a Real or Complex Polynomial</td></tr>
+<tr><td width="25%"><a href="pos.to.env.html">pos.to.env</a></td>
+<td>Convert Positions in the Search Path to Environments</td></tr>
+<tr><td width="25%"><a href="funprog.html">Position</a></td>
+<td>Common Higher-Order Functions in Functional Programming Languages</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">POSIXct</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">POSIXlt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">POSIXt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="pretty.html">pretty</a></td>
+<td>Pretty Breakpoints</td></tr>
+<tr><td width="25%"><a href="formatc.html">prettyNum</a></td>
+<td>Formatting Using C-style Formats</td></tr>
+<tr><td width="25%"><a href="Primitive.html">primitive</a></td>
+<td>Look Up a Primitive Function</td></tr>
+<tr><td width="25%"><a href="print.html">print</a></td>
+<td>Print Values</td></tr>
+<tr><td width="25%"><a href="AsIs.html">print.AsIs</a></td>
+<td>Inhibit Interpretation/Conversion of Objects</td></tr>
+<tr><td width="25%"><a href="by.html">print.by</a></td>
+<td>Apply a Function to a Data Frame Split by Factors</td></tr>
+<tr><td width="25%"><a href="conditions.html">print.condition</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="connections.html">print.connection</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="print.dataframe.html">print.data.frame</a></td>
+<td>Printing Data Frames</td></tr>
+<tr><td width="25%"><a href="Dates.html">print.Date</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="print.default.html">print.default</a></td>
+<td>Default Printing</td></tr>
+<tr><td width="25%"><a href="difftime.html">print.difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="getLoadedDLLs.html">print.DLLInfo</a></td>
+<td>Get DLLs Loaded in Current Session</td></tr>
+<tr><td width="25%"><a href="hexmode.html">print.hexmode</a></td>
+<td>Display Numbers in Hexadecimal</td></tr>
+<tr><td width="25%"><a href="library.html">print.libraryIQR</a></td>
+<td>Loading and Listing of Packages</td></tr>
+<tr><td width="25%"><a href="getDLLRegisteredRoutines.html">print.NativeRoutineList</a></td>
+<td>Reflectance Information for C/Fortran routines in a DLL</td></tr>
+<tr><td width="25%"><a href="noquote.html">print.noquote</a></td>
+<td>Class for 'no quote' Printing of Character Strings</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">print.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="octmode.html">print.octmode</a></td>
+<td>Display Numbers in Octal</td></tr>
+<tr><td width="25%"><a href="library.html">print.packageInfo</a></td>
+<td>Loading and Listing of Packages</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">print.POSIXct</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="proc.time.html">print.proc_time</a></td>
+<td>Running Time of R</td></tr>
+<tr><td width="25%"><a href="rle.html">print.rle</a></td>
+<td>Run Length Encoding</td></tr>
+<tr><td width="25%"><a href="print.html">print.simple.list</a></td>
+<td>Print Values</td></tr>
+<tr><td width="25%"><a href="srcfile.html">print.srcfile</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="srcfile.html">print.srcref</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="table.html">print.summary.table</a></td>
+<td>Cross Tabulation and Table Creation</td></tr>
+<tr><td width="25%"><a href="summary.html">print.summaryDefault</a></td>
+<td>Object Summaries</td></tr>
+<tr><td width="25%"><a href="print.html">print.table</a></td>
+<td>Print Values</td></tr>
+<tr><td width="25%"><a href="warnings.html">print.warnings</a></td>
+<td>Print Warning Messages</td></tr>
+<tr><td width="25%"><a href="prmatrix.html">prmatrix</a></td>
+<td>Print Matrices, Old-style</td></tr>
+<tr><td width="25%"><a href="proc.time.html">proc.time</a></td>
+<td>Running Time of R</td></tr>
+<tr><td width="25%"><a href="prod.html">prod</a></td>
+<td>Product of Vector Elements</td></tr>
+<tr><td width="25%"><a href="delayedAssign.html">promise</a></td>
+<td>Delay Evaluation</td></tr>
+<tr><td width="25%"><a href="delayedAssign.html">promises</a></td>
+<td>Delay Evaluation</td></tr>
+<tr><td width="25%"><a href="prop.table.html">prop.table</a></td>
+<td>Express Table Entries as Fraction of Marginal Table</td></tr>
+<tr><td width="25%"><a href="Special.html">psigamma</a></td>
+<td>Special Functions of Mathematics</td></tr>
+<tr><td width="25%"><a href="pushBack.html">pushBack</a></td>
+<td>Push Text Back on to a Connection</td></tr>
+<tr><td width="25%"><a href="pushBack.html">pushBackLength</a></td>
+<td>Push Text Back on to a Connection</td></tr>
+</table>
+
+<h2><a name="Q">-- Q --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="quit.html">q</a></td>
+<td>Terminate an R Session</td></tr>
+<tr><td width="25%"><a href="qr.html">qr</a></td>
+<td>The QR Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="qr.html">qr.coef</a></td>
+<td>The QR Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="qr.html">qr.default</a></td>
+<td>The QR Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="qr.html">qr.fitted</a></td>
+<td>The QR Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="qraux.html">qr.Q</a></td>
+<td>Reconstruct the Q, R, or X Matrices from a QR Object</td></tr>
+<tr><td width="25%"><a href="qr.html">qr.qty</a></td>
+<td>The QR Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="qr.html">qr.qy</a></td>
+<td>The QR Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="qraux.html">qr.R</a></td>
+<td>Reconstruct the Q, R, or X Matrices from a QR Object</td></tr>
+<tr><td width="25%"><a href="qr.html">qr.resid</a></td>
+<td>The QR Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="qr.html">qr.solve</a></td>
+<td>The QR Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="qraux.html">qr.X</a></td>
+<td>Reconstruct the Q, R, or X Matrices from a QR Object</td></tr>
+<tr><td width="25%"><a href="weekday.POSIXt.html">quarters</a></td>
+<td>Extract Parts of a POSIXt or Date Object</td></tr>
+<tr><td width="25%"><a href="quit.html">quit</a></td>
+<td>Terminate an R Session</td></tr>
+<tr><td width="25%"><a href="substitute.html">quote</a></td>
+<td>Substituting and Quoting Expressions</td></tr>
+<tr><td width="25%"><a href="Quotes.html">Quotes</a></td>
+<td>Quotes</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Rhome.html">R.home</a></td>
+<td>Return the R Home Directory</td></tr>
+<tr><td width="25%"><a href="Version.html">R.Version</a></td>
+<td>Version Information</td></tr>
+<tr><td width="25%"><a href="Version.html">R.version.string</a></td>
+<td>Version Information</td></tr>
+<tr><td width="25%"><a href="Random.html">Random</a></td>
+<td>Random Number Generation</td></tr>
+<tr><td width="25%"><a href="Random-user.html">Random.user</a></td>
+<td>User-supplied Random Number Generation</td></tr>
+<tr><td width="25%"><a href="range.html">range</a></td>
+<td>Range of Values</td></tr>
+<tr><td width="25%"><a href="rank.html">rank</a></td>
+<td>Sample Ranks</td></tr>
+<tr><td width="25%"><a href="rapply.html">rapply</a></td>
+<td>Recursively Apply a Function to a List</td></tr>
+<tr><td width="25%"><a href="raw.html">raw</a></td>
+<td>Raw Vectors</td></tr>
+<tr><td width="25%"><a href="rawConnection.html">rawConnection</a></td>
+<td>Raw Connections</td></tr>
+<tr><td width="25%"><a href="rawConnection.html">rawConnectionValue</a></td>
+<td>Raw Connections</td></tr>
+<tr><td width="25%"><a href="rawConversion.html">rawShift</a></td>
+<td>Convert to or from Raw Vectors</td></tr>
+<tr><td width="25%"><a href="rawConversion.html">rawToBits</a></td>
+<td>Convert to or from Raw Vectors</td></tr>
+<tr><td width="25%"><a href="rawConversion.html">rawToChar</a></td>
+<td>Convert to or from Raw Vectors</td></tr>
+<tr><td width="25%"><a href="cbind.html">rbind</a></td>
+<td>Combine R Objects by Rows or Columns</td></tr>
+<tr><td width="25%"><a href="cbind.html">rbind.data.frame</a></td>
+<td>Combine R Objects by Rows or Columns</td></tr>
+<tr><td width="25%"><a href="kappa.html">rcond</a></td>
+<td>Compute or Estimate the Condition Number of a Matrix</td></tr>
+<tr><td width="25%"><a href="RdUtils.html">Rd2pdf</a></td>
+<td>Utilities for Processing Rd Files</td></tr>
+<tr><td width="25%"><a href="RdUtils.html">Rdconv</a></td>
+<td>Utilities for Processing Rd Files</td></tr>
+<tr><td width="25%"><a href="complex.html">Re</a></td>
+<td>Complex Vectors</td></tr>
+<tr><td width="25%"><a href="dcf.html">read.dcf</a></td>
+<td>Read and Write Data in DCF Format</td></tr>
+<tr><td width="25%"><a href="readBin.html">readBin</a></td>
+<td>Transfer Binary Data To and From Connections</td></tr>
+<tr><td width="25%"><a href="readChar.html">readChar</a></td>
+<td>Transfer Character Strings To and From Connections</td></tr>
+<tr><td width="25%"><a href="readline.html">readline</a></td>
+<td>Read a Line from the Terminal</td></tr>
+<tr><td width="25%"><a href="readLines.html">readLines</a></td>
+<td>Read Text Lines from a Connection</td></tr>
+<tr><td width="25%"><a href="readRDS.html">readRDS</a></td>
+<td>Serialization Interface for Single Objects</td></tr>
+<tr><td width="25%"><a href="readRenviron.html">readRenviron</a></td>
+<td>Set Environment Variables from a File</td></tr>
+<tr><td width="25%"><a href="real.html">real</a></td>
+<td>Real Vectors</td></tr>
+<tr><td width="25%"><a href="Recall.html">Recall</a></td>
+<td>Recursive Calling</td></tr>
+<tr><td width="25%"><a href="funprog.html">Reduce</a></td>
+<td>Common Higher-Order Functions in Functional Programming Languages</td></tr>
+<tr><td width="25%"><a href="reg.finalizer.html">reg.finalizer</a></td>
+<td>Finalization of Objects</td></tr>
+<tr><td width="25%"><a href="regex.html">regex</a></td>
+<td>Regular Expressions as used in R</td></tr>
+<tr><td width="25%"><a href="grep.html">regexec</a></td>
+<td>Pattern Matching and Replacement</td></tr>
+<tr><td width="25%"><a href="regex.html">regexp</a></td>
+<td>Regular Expressions as used in R</td></tr>
+<tr><td width="25%"><a href="grep.html">regexpr</a></td>
+<td>Pattern Matching and Replacement</td></tr>
+<tr><td width="25%"><a href="getNativeSymbolInfo.html">RegisteredNativeSymbol</a></td>
+<td>Obtain a Description of one or more Native (C/Fortran) Symbols</td></tr>
+<tr><td width="25%"><a href="regmatches.html">regmatches</a></td>
+<td>Extract or Replace Matched Substrings</td></tr>
+<tr><td width="25%"><a href="regex.html">regular expression</a></td>
+<td>Regular Expressions as used in R</td></tr>
+<tr><td width="25%"><a href="rm.html">remove</a></td>
+<td>Remove Objects from a Specified Environment</td></tr>
+<tr><td width="25%"><a href="converters.html">removeCConverter</a></td>
+<td>Management of .C argument conversion list</td></tr>
+<tr><td width="25%"><a href="taskCallback.html">removeTaskCallback</a></td>
+<td>Add or Remove a Top-Level Task Callback</td></tr>
+<tr><td width="25%"><a href="Startup.html">Renviron</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="rep.html">rep</a></td>
+<td>Replicate Elements of Vectors and Lists</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">rep.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="Control.html">repeat</a></td>
+<td>Control Flow</td></tr>
+<tr><td width="25%"><a href="replace.html">replace</a></td>
+<td>Replace Values in a Vector</td></tr>
+<tr><td width="25%"><a href="lapply.html">replicate</a></td>
+<td>Apply a Function over a List or Vector</td></tr>
+<tr><td width="25%"><a href="library.html">require</a></td>
+<td>Loading and Listing of Packages</td></tr>
+<tr><td width="25%"><a href="ns-load.html">requireNamespace</a></td>
+<td>Loading and Unloading Namespaces</td></tr>
+<tr><td width="25%"><a href="Reserved.html">Reserved</a></td>
+<td>Reserved Words in R</td></tr>
+<tr><td width="25%"><a href="Reserved.html">reserved</a></td>
+<td>Reserved Words in R</td></tr>
+<tr><td width="25%"><a href="conditions.html">restartDescription</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="conditions.html">restartFormals</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="tracemem.html">retracemem</a></td>
+<td>Trace Copying of Objects</td></tr>
+<tr><td width="25%"><a href="function.html">return</a></td>
+<td>Function Definition</td></tr>
+<tr><td width="25%"><a href="rev.html">rev</a></td>
+<td>Reverse Elements</td></tr>
+<tr><td width="25%"><a href="rle.html">rle</a></td>
+<td>Run Length Encoding</td></tr>
+<tr><td width="25%"><a href="rm.html">rm</a></td>
+<td>Remove Objects from a Specified Environment</td></tr>
+<tr><td width="25%"><a href="Random.html">RNG</a></td>
+<td>Random Number Generation</td></tr>
+<tr><td width="25%"><a href="Random.html">RNGkind</a></td>
+<td>Random Number Generation</td></tr>
+<tr><td width="25%"><a href="Random.html">RNGversion</a></td>
+<td>Random Number Generation</td></tr>
+<tr><td width="25%"><a href="Round.html">round</a></td>
+<td>Rounding of Numbers</td></tr>
+<tr><td width="25%"><a href="round.POSIXt.html">round.Date</a></td>
+<td>Round / Truncate Data-Time Objects</td></tr>
+<tr><td width="25%"><a href="round.POSIXt.html">round.POSIXt</a></td>
+<td>Round / Truncate Data-Time Objects</td></tr>
+<tr><td width="25%"><a href="row.html">row</a></td>
+<td>Row Indexes</td></tr>
+<tr><td width="25%"><a href="row.names.html">row.names</a></td>
+<td>Get and Set Row Names for Data Frames</td></tr>
+<tr><td width="25%"><a href="colSums.html">rowMeans</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="colnames.html">rownames</a></td>
+<td>Row and Column Names</td></tr>
+<tr><td width="25%"><a href="rowsum.html">rowsum</a></td>
+<td>Give Column Sums of a Matrix or Data Frame, Based on a Grouping Variable</td></tr>
+<tr><td width="25%"><a href="colSums.html">rowSums</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="Startup.html">Rprofile</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="Startup.html">Rprofile.site</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_BATCH</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_BROWSER</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_COMPLETION</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="Startup.html">R_DEFAULT_PACKAGES</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_DOC_DIR</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="Startup.html">R_ENVIRON</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="Startup.html">R_ENVIRON_USER</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_GSCMD</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_HISTFILE</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_HISTSIZE</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="Rhome.html">R_HOME</a></td>
+<td>Return the R Home Directory</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_INCLUDE_DIR</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="libPaths.html">R_LIBS</a></td>
+<td>Search Paths for Packages</td></tr>
+<tr><td width="25%"><a href="libPaths.html">R_LIBS_SITE</a></td>
+<td>Search Paths for Packages</td></tr>
+<tr><td width="25%"><a href="libPaths.html">R_LIBS_USER</a></td>
+<td>Search Paths for Packages</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_PAPERSIZE</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_PDFVIEWER</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_PLATFORM</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="Startup.html">R_PROFILE</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="Startup.html">R_PROFILE_USER</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_RD4PDF</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_SHARE_DIR</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">R_system_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_TEXI2DVICMD</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_UNZIPCMD</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_USER</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">R_ZIPCMD</a></td>
+<td>Environment Variables</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="groupGeneric.html">S3groupGeneric</a></td>
+<td>S3 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="UseMethod.html">S3Methods</a></td>
+<td>Class Methods</td></tr>
+<tr><td width="25%"><a href="isS4.html">S4</a></td>
+<td>Test for an S4 object</td></tr>
+<tr><td width="25%"><a href="sample.html">sample</a></td>
+<td>Random Samples and Permutations</td></tr>
+<tr><td width="25%"><a href="lapply.html">sapply</a></td>
+<td>Apply a Function over a List or Vector</td></tr>
+<tr><td width="25%"><a href="save.html">save</a></td>
+<td>Save R Objects</td></tr>
+<tr><td width="25%"><a href="readRDS.html">saveRDS</a></td>
+<td>Serialization Interface for Single Objects</td></tr>
+<tr><td width="25%"><a href="scale.html">scale</a></td>
+<td>Scaling and Centering of Matrix-like Objects</td></tr>
+<tr><td width="25%"><a href="scan.html">scan</a></td>
+<td>Read Data Values</td></tr>
+<tr><td width="25%"><a href="search.html">search</a></td>
+<td>Give Search Path for R Objects</td></tr>
+<tr><td width="25%"><a href="search.html">searchpaths</a></td>
+<td>Give Search Path for R Objects</td></tr>
+<tr><td width="25%"><a href="seek.html">seek</a></td>
+<td>Functions to Reposition Connections</td></tr>
+<tr><td width="25%"><a href="seq.html">seq</a></td>
+<td>Sequence Generation</td></tr>
+<tr><td width="25%"><a href="seq.Date.html">seq.Date</a></td>
+<td>Generate Regular Sequences of Dates</td></tr>
+<tr><td width="25%"><a href="seq.POSIXt.html">seq.POSIXt</a></td>
+<td>Generate Regular Sequences of Times</td></tr>
+<tr><td width="25%"><a href="sequence.html">sequence</a></td>
+<td>Create A Vector of Sequences</td></tr>
+<tr><td width="25%"><a href="seq.html">seq_along</a></td>
+<td>Sequence Generation</td></tr>
+<tr><td width="25%"><a href="seq.html">seq_len</a></td>
+<td>Sequence Generation</td></tr>
+<tr><td width="25%"><a href="serialize.html">serialize</a></td>
+<td>Simple Serialization Interface</td></tr>
+<tr><td width="25%"><a href="Random.html">set.seed</a></td>
+<td>Random Number Generation</td></tr>
+<tr><td width="25%"><a href="converters.html">setCConverterStatus</a></td>
+<td>Management of .C argument conversion list</td></tr>
+<tr><td width="25%"><a href="sets.html">setdiff</a></td>
+<td>Set Operations</td></tr>
+<tr><td width="25%"><a href="sets.html">setequal</a></td>
+<td>Set Operations</td></tr>
+<tr><td width="25%"><a href="userhooks.html">setHook</a></td>
+<td>Functions to Get and Set Hooks for Load, Attach, Detach and Unload</td></tr>
+<tr><td width="25%"><a href="setTimeLimit.html">setSessionTimeLimit</a></td>
+<td>Set CPU and/or Elapsed Time Limits</td></tr>
+<tr><td width="25%"><a href="setTimeLimit.html">setTimeLimit</a></td>
+<td>Set CPU and/or Elapsed Time Limits</td></tr>
+<tr><td width="25%"><a href="getwd.html">setwd</a></td>
+<td>Get or Set Working Directory</td></tr>
+<tr><td width="25%"><a href="shell.html">shell</a></td>
+<td>Invoke a System Command, using a Shell</td></tr>
+<tr><td width="25%"><a href="shell.exec.html">shell.exec</a></td>
+<td>Open a File or URL using Windows File Associations</td></tr>
+<tr><td width="25%"><a href="showConnections.html">showConnections</a></td>
+<td>Display Connections</td></tr>
+<tr><td width="25%"><a href="shQuote.html">shQuote</a></td>
+<td>Quote Strings for Use in OS Shells</td></tr>
+<tr><td width="25%"><a href="sign.html">sign</a></td>
+<td>Sign Function</td></tr>
+<tr><td width="25%"><a href="conditions.html">signalCondition</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="Round.html">signif</a></td>
+<td>Rounding of Numbers</td></tr>
+<tr><td width="25%"><a href="conditions.html">simpleCondition</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="conditions.html">simpleError</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="conditions.html">simpleMessage</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="conditions.html">simpleWarning</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="lapply.html">simplify2array</a></td>
+<td>Apply a Function over a List or Vector</td></tr>
+<tr><td width="25%"><a href="Trig.html">sin</a></td>
+<td>Trigonometric Functions</td></tr>
+<tr><td width="25%"><a href="double.html">single</a></td>
+<td>Double-Precision Vectors</td></tr>
+<tr><td width="25%"><a href="Hyperbolic.html">sinh</a></td>
+<td>Hyperbolic Functions</td></tr>
+<tr><td width="25%"><a href="sink.html">sink</a></td>
+<td>Send R Output to a File</td></tr>
+<tr><td width="25%"><a href="slice.index.html">slice.index</a></td>
+<td>Slice Indexes in an Array</td></tr>
+<tr><td width="25%"><a href="connections.html">socketConnection</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="socketSelect.html">socketSelect</a></td>
+<td>Wait on Socket Connections</td></tr>
+<tr><td width="25%"><a href="solve.html">solve</a></td>
+<td>Solve a System of Equations</td></tr>
+<tr><td width="25%"><a href="qr.html">solve.qr</a></td>
+<td>The QR Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="sort.html">sort</a></td>
+<td>Sorting or Ordering Vectors</td></tr>
+<tr><td width="25%"><a href="order.html">sort.list</a></td>
+<td>Ordering Permutation</td></tr>
+<tr><td width="25%"><a href="source.html">source</a></td>
+<td>Read R Code from a File or a Connection</td></tr>
+<tr><td width="25%"><a href="Special.html">Special</a></td>
+<td>Special Functions of Mathematics</td></tr>
+<tr><td width="25%"><a href="split.html">split</a></td>
+<td>Divide into Groups and Reassemble</td></tr>
+<tr><td width="25%"><a href="Dates.html">split.Date</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">split.POSIXct</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="sprintf.html">sprintf</a></td>
+<td>Use C-style String Formatting Commands</td></tr>
+<tr><td width="25%"><a href="MathFun.html">sqrt</a></td>
+<td>Miscellaneous Mathematical Functions</td></tr>
+<tr><td width="25%"><a href="sQuote.html">sQuote</a></td>
+<td>Quote Text</td></tr>
+<tr><td width="25%"><a href="srcfile.html">srcfile</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="srcfile.html">srcfile-class</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="srcfile.html">srcfilealias</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="srcfile.html">srcfilealias-class</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="srcfile.html">srcfilecopy</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="srcfile.html">srcfilecopy-class</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="srcfile.html">srcref</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="srcfile.html">srcref-class</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="Startup.html">Startup</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="showConnections.html">stderr</a></td>
+<td>Display Connections</td></tr>
+<tr><td width="25%"><a href="showConnections.html">stdin</a></td>
+<td>Display Connections</td></tr>
+<tr><td width="25%"><a href="showConnections.html">stdout</a></td>
+<td>Display Connections</td></tr>
+<tr><td width="25%"><a href="stop.html">stop</a></td>
+<td>Stop Function Execution</td></tr>
+<tr><td width="25%"><a href="stopifnot.html">stopifnot</a></td>
+<td>Ensure the Truth of R Expressions</td></tr>
+<tr><td width="25%"><a href="mode.html">storage.mode</a></td>
+<td>The (Storage) Mode of an Object</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">str.POSIXt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="strptime.html">strftime</a></td>
+<td>Date-time Conversion Functions to and from Character</td></tr>
+<tr><td width="25%"><a href="strptime.html">strptime</a></td>
+<td>Date-time Conversion Functions to and from Character</td></tr>
+<tr><td width="25%"><a href="strsplit.html">strsplit</a></td>
+<td>Split the Elements of a Character Vector</td></tr>
+<tr><td width="25%"><a href="strtoi.html">strtoi</a></td>
+<td>Convert Strings to Integers</td></tr>
+<tr><td width="25%"><a href="strtrim.html">strtrim</a></td>
+<td>Trim Character Strings to Specified Display Widths</td></tr>
+<tr><td width="25%"><a href="structure.html">structure</a></td>
+<td>Attribute Specification</td></tr>
+<tr><td width="25%"><a href="strwrap.html">strwrap</a></td>
+<td>Wrap Character Strings to Format Paragraphs</td></tr>
+<tr><td width="25%"><a href="grep.html">sub</a></td>
+<td>Pattern Matching and Replacement</td></tr>
+<tr><td width="25%"><a href="Extract.html">Subscript</a></td>
+<td>Extract or Replace Parts of an Object</td></tr>
+<tr><td width="25%"><a href="subset.html">subset</a></td>
+<td>Subsetting Vectors, Matrices and Data Frames</td></tr>
+<tr><td width="25%"><a href="substitute.html">substitute</a></td>
+<td>Substituting and Quoting Expressions</td></tr>
+<tr><td width="25%"><a href="substr.html">substr</a></td>
+<td>Substrings of a Character Vector</td></tr>
+<tr><td width="25%"><a href="substr.html">substring</a></td>
+<td>Substrings of a Character Vector</td></tr>
+<tr><td width="25%"><a href="sum.html">sum</a></td>
+<td>Sum of Vector Elements</td></tr>
+<tr><td width="25%"><a href="groupGeneric.html">Summary</a></td>
+<td>S3 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="summary.html">summary</a></td>
+<td>Object Summaries</td></tr>
+<tr><td width="25%"><a href="connections.html">summary.connection</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="Dates.html">Summary.Date</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="Dates.html">summary.Date</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="difftime.html">Summary.difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="factor.html">Summary.factor</a></td>
+<td>Factors</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">Summary.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="factor.html">Summary.ordered</a></td>
+<td>Factors</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">Summary.POSIXct</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">summary.POSIXct</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">Summary.POSIXlt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="srcfile.html">summary.srcfile</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="srcfile.html">summary.srcref</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="table.html">summary.table</a></td>
+<td>Cross Tabulation and Table Creation</td></tr>
+<tr><td width="25%"><a href="message.html">suppressMessages</a></td>
+<td>Diagnostic Messages</td></tr>
+<tr><td width="25%"><a href="message.html">suppressPackageStartupMessages</a></td>
+<td>Diagnostic Messages</td></tr>
+<tr><td width="25%"><a href="warning.html">suppressWarnings</a></td>
+<td>Warning Messages</td></tr>
+<tr><td width="25%"><a href="svd.html">svd</a></td>
+<td>Singular Value Decomposition of a Matrix</td></tr>
+<tr><td width="25%"><a href="sweep.html">sweep</a></td>
+<td>Sweep out Array Summaries</td></tr>
+<tr><td width="25%"><a href="switch.html">switch</a></td>
+<td>Select One of a List of Alternatives</td></tr>
+<tr><td width="25%"><a href="Syntax.html">Syntax</a></td>
+<td>Operator Syntax and Precedence</td></tr>
+<tr><td width="25%"><a href="files2.html">Sys.chmod</a></td>
+<td>Manipulaton of Directories and File Permissions</td></tr>
+<tr><td width="25%"><a href="Sys.time.html">Sys.Date</a></td>
+<td>Get Current Date and Time</td></tr>
+<tr><td width="25%"><a href="Sys.getenv.html">Sys.getenv</a></td>
+<td>Get Environment Variables</td></tr>
+<tr><td width="25%"><a href="locales.html">Sys.getlocale</a></td>
+<td>Query or Set Aspects of the Locale</td></tr>
+<tr><td width="25%"><a href="Sys.getpid.html">Sys.getpid</a></td>
+<td>Get the Process ID of the R Session</td></tr>
+<tr><td width="25%"><a href="Sys.glob.html">Sys.glob</a></td>
+<td>Wildcard Expansion on File Paths</td></tr>
+<tr><td width="25%"><a href="Sys.info.html">Sys.info</a></td>
+<td>Extract System and User Information</td></tr>
+<tr><td width="25%"><a href="files.html">Sys.junction</a></td>
+<td>File Manipulation</td></tr>
+<tr><td width="25%"><a href="Sys.localeconv.html">Sys.localeconv</a></td>
+<td>Find Details of the Numerical and Monetary Representations in the Current Locale</td></tr>
+<tr><td width="25%"><a href="sys.parent.html">sys.on.exit</a></td>
+<td>Functions to Access the Function Call Stack</td></tr>
+<tr><td width="25%"><a href="sys.parent.html">sys.parent</a></td>
+<td>Functions to Access the Function Call Stack</td></tr>
+<tr><td width="25%"><a href="Sys.readlink.html">Sys.readlink</a></td>
+<td>Read File Symbolic Links</td></tr>
+<tr><td width="25%"><a href="Sys.setenv.html">Sys.setenv</a></td>
+<td>Set or Unset Environment Variables</td></tr>
+<tr><td width="25%"><a href="Sys.setFileTime.html">Sys.setFileTime</a></td>
+<td>Set File Time</td></tr>
+<tr><td width="25%"><a href="locales.html">Sys.setlocale</a></td>
+<td>Query or Set Aspects of the Locale</td></tr>
+<tr><td width="25%"><a href="Sys.sleep.html">Sys.sleep</a></td>
+<td>Suspend Execution for a Time Interval</td></tr>
+<tr><td width="25%"><a href="sys.source.html">sys.source</a></td>
+<td>Parse and Evaluate Expressions from a File</td></tr>
+<tr><td width="25%"><a href="sys.parent.html">sys.status</a></td>
+<td>Functions to Access the Function Call Stack</td></tr>
+<tr><td width="25%"><a href="Sys.time.html">Sys.time</a></td>
+<td>Get Current Date and Time</td></tr>
+<tr><td width="25%"><a href="timezones.html">Sys.timezone</a></td>
+<td>Time Zones</td></tr>
+<tr><td width="25%"><a href="files2.html">Sys.umask</a></td>
+<td>Manipulaton of Directories and File Permissions</td></tr>
+<tr><td width="25%"><a href="Sys.setenv.html">Sys.unsetenv</a></td>
+<td>Set or Unset Environment Variables</td></tr>
+<tr><td width="25%"><a href="Sys.which.html">Sys.which</a></td>
+<td>Find Full Paths to Executables</td></tr>
+<tr><td width="25%"><a href="system.html">system</a></td>
+<td>Invoke a System Command</td></tr>
+<tr><td width="25%"><a href="system.file.html">system.file</a></td>
+<td>Find Names of R System Files</td></tr>
+<tr><td width="25%"><a href="system.time.html">system.time</a></td>
+<td>CPU Time Used</td></tr>
+<tr><td width="25%"><a href="system2.html">system2</a></td>
+<td>Invoke a System Command</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="logical.html">T</a></td>
+<td>Logical Vectors</td></tr>
+<tr><td width="25%"><a href="t.html">t</a></td>
+<td>Matrix Transpose</td></tr>
+<tr><td width="25%"><a href="table.html">table</a></td>
+<td>Cross Tabulation and Table Creation</td></tr>
+<tr><td width="25%"><a href="tabulate.html">tabulate</a></td>
+<td>Tabulation for Vectors</td></tr>
+<tr><td width="25%"><a href="Trig.html">tan</a></td>
+<td>Trigonometric Functions</td></tr>
+<tr><td width="25%"><a href="Hyperbolic.html">tanh</a></td>
+<td>Hyperbolic Functions</td></tr>
+<tr><td width="25%"><a href="tapply.html">tapply</a></td>
+<td>Apply a Function Over a Ragged Array</td></tr>
+<tr><td width="25%"><a href="taskCallbackManager.html">taskCallbackManager</a></td>
+<td>Create an R-level Task Callback Manager</td></tr>
+<tr><td width="25%"><a href="crossprod.html">tcrossprod</a></td>
+<td>Matrix Crossproduct</td></tr>
+<tr><td width="25%"><a href="tempfile.html">tempdir</a></td>
+<td>Create Names for Temporary Files</td></tr>
+<tr><td width="25%"><a href="tempfile.html">tempfile</a></td>
+<td>Create Names for Temporary Files</td></tr>
+<tr><td width="25%"><a href="textconnections.html">textConnection</a></td>
+<td>Text Connections</td></tr>
+<tr><td width="25%"><a href="textconnections.html">textConnectionValue</a></td>
+<td>Text Connections</td></tr>
+<tr><td width="25%"><a href="tilde.html">tilde</a></td>
+<td>Tilde Operator</td></tr>
+<tr><td width="25%"><a href="path.expand.html">tilde expansion</a></td>
+<td>Expand File Paths</td></tr>
+<tr><td width="25%"><a href="difftime.html">time interval</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="timezones.html">time zone</a></td>
+<td>Time Zones</td></tr>
+<tr><td width="25%"><a href="timezones.html">time zones</a></td>
+<td>Time Zones</td></tr>
+<tr><td width="25%"><a href="timezones.html">timezone</a></td>
+<td>Time Zones</td></tr>
+<tr><td width="25%"><a href="EnvVar.html">TMPDIR</a></td>
+<td>Environment Variables</td></tr>
+<tr><td width="25%"><a href="chartr.html">tolower</a></td>
+<td>Character Translation and Casefolding</td></tr>
+<tr><td width="25%"><a href="ns-topenv.html">topenv</a></td>
+<td>Top Level Environment</td></tr>
+<tr><td width="25%"><a href="toString.html">toString</a></td>
+<td>Convert an R Object to a Character String</td></tr>
+<tr><td width="25%"><a href="chartr.html">toupper</a></td>
+<td>Character Translation and Casefolding</td></tr>
+<tr><td width="25%"><a href="trace.html">trace</a></td>
+<td>Interactive Tracing and Debugging of Calls to a Function or Method</td></tr>
+<tr><td width="25%"><a href="traceback.html">traceback</a></td>
+<td>Print Call Stacks</td></tr>
+<tr><td width="25%"><a href="tracemem.html">tracemem</a></td>
+<td>Trace Copying of Objects</td></tr>
+<tr><td width="25%"><a href="trace.html">tracingState</a></td>
+<td>Interactive Tracing and Debugging of Calls to a Function or Method</td></tr>
+<tr><td width="25%"><a href="transform.html">transform</a></td>
+<td>Transform an Object, for Example a Data Frame</td></tr>
+<tr><td width="25%"><a href="Trig.html">Trig</a></td>
+<td>Trigonometric Functions</td></tr>
+<tr><td width="25%"><a href="Special.html">trigamma</a></td>
+<td>Special Functions of Mathematics</td></tr>
+<tr><td width="25%"><a href="logical.html">TRUE</a></td>
+<td>Logical Vectors</td></tr>
+<tr><td width="25%"><a href="Round.html">trunc</a></td>
+<td>Rounding of Numbers</td></tr>
+<tr><td width="25%"><a href="round.POSIXt.html">trunc.Date</a></td>
+<td>Round / Truncate Data-Time Objects</td></tr>
+<tr><td width="25%"><a href="round.POSIXt.html">trunc.POSIXt</a></td>
+<td>Round / Truncate Data-Time Objects</td></tr>
+<tr><td width="25%"><a href="seek.html">truncate</a></td>
+<td>Functions to Reposition Connections</td></tr>
+<tr><td width="25%"><a href="try.html">try</a></td>
+<td>Try an Expression Allowing Error Recovery</td></tr>
+<tr><td width="25%"><a href="conditions.html">tryCatch</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="typeof.html">type</a></td>
+<td>The Type of an Object</td></tr>
+<tr><td width="25%"><a href="typeof.html">typeof</a></td>
+<td>The Type of an Object</td></tr>
+<tr><td width="25%"><a href="timezones.html">TZ</a></td>
+<td>Time Zones</td></tr>
+<tr><td width="25%"><a href="timezones.html">TZDIR</a></td>
+<td>Time Zones</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="files2.html">umask</a></td>
+<td>Manipulaton of Directories and File Permissions</td></tr>
+<tr><td width="25%"><a href="class.html">unclass</a></td>
+<td>Object Classes</td></tr>
+<tr><td width="25%"><a href="debug.html">undebug</a></td>
+<td>Debug a Function</td></tr>
+<tr><td width="25%"><a href="sets.html">union</a></td>
+<td>Set Operations</td></tr>
+<tr><td width="25%"><a href="unique.html">unique</a></td>
+<td>Extract Unique Elements</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">unique.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">unique.POSIXlt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="difftime.html">units</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="difftime.html">units.difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="system.time.html">unix.time</a></td>
+<td>CPU Time Used</td></tr>
+<tr><td width="25%"><a href="unlink.html">unlink</a></td>
+<td>Delete Files and Directories</td></tr>
+<tr><td width="25%"><a href="unlist.html">unlist</a></td>
+<td>Flatten Lists</td></tr>
+<tr><td width="25%"><a href="ns-load.html">unloadNamespace</a></td>
+<td>Loading and Unloading Namespaces</td></tr>
+<tr><td width="25%"><a href="bindenv.html">unlockBinding</a></td>
+<td>Binding and Environment Adjustments</td></tr>
+<tr><td width="25%"><a href="unname.html">unname</a></td>
+<td>Remove 'names' or 'dimnames'</td></tr>
+<tr><td width="25%"><a href="serialize.html">unserialize</a></td>
+<td>Simple Serialization Interface</td></tr>
+<tr><td width="25%"><a href="split.html">unsplit</a></td>
+<td>Divide into Groups and Reassemble</td></tr>
+<tr><td width="25%"><a href="trace.html">untrace</a></td>
+<td>Interactive Tracing and Debugging of Calls to a Function or Method</td></tr>
+<tr><td width="25%"><a href="tracemem.html">untracemem</a></td>
+<td>Trace Copying of Objects</td></tr>
+<tr><td width="25%"><a href="connections.html">unz</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="lower.tri.html">upper.tri</a></td>
+<td>Lower and Upper Triangular Part of a Matrix</td></tr>
+<tr><td width="25%"><a href="connections.html">url</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+<tr><td width="25%"><a href="UseMethod.html">UseMethod</a></td>
+<td>Class Methods</td></tr>
+<tr><td width="25%"><a href="utf8Conversion.html">utf8ToInt</a></td>
+<td>Convert to or from UTF-8-encoded Character Vectors</td></tr>
+</table>
+
+<h2><a name="V">-- V --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="lapply.html">vapply</a></td>
+<td>Apply a Function over a List or Vector</td></tr>
+<tr><td width="25%"><a href="vector.html">vector</a></td>
+<td>Vectors</td></tr>
+<tr><td width="25%"><a href="Vectorize.html">Vectorize</a></td>
+<td>Vectorize a Scalar Function</td></tr>
+<tr><td width="25%"><a href="Version.html">version</a></td>
+<td>Version Information</td></tr>
+</table>
+
+<h2><a name="W">-- W --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="warning.html">warning</a></td>
+<td>Warning Messages</td></tr>
+<tr><td width="25%"><a href="warnings.html">warnings</a></td>
+<td>Print Warning Messages</td></tr>
+<tr><td width="25%"><a href="weekday.POSIXt.html">weekdays</a></td>
+<td>Extract Parts of a POSIXt or Date Object</td></tr>
+<tr><td width="25%"><a href="which.html">which</a></td>
+<td>Which indices are TRUE?</td></tr>
+<tr><td width="25%"><a href="which.min.html">which.max</a></td>
+<td>Where is the Min() or Max() ?</td></tr>
+<tr><td width="25%"><a href="which.min.html">which.min</a></td>
+<td>Where is the Min() or Max() ?</td></tr>
+<tr><td width="25%"><a href="Control.html">while</a></td>
+<td>Control Flow</td></tr>
+<tr><td width="25%"><a href="with.html">with</a></td>
+<td>Evaluate an Expression in a Data Environment</td></tr>
+<tr><td width="25%"><a href="conditions.html">withCallingHandlers</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="with.html">within</a></td>
+<td>Evaluate an Expression in a Data Environment</td></tr>
+<tr><td width="25%"><a href="conditions.html">withRestarts</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="withVisible.html">withVisible</a></td>
+<td>Return both a value and its visibility</td></tr>
+<tr><td width="25%"><a href="write.html">write</a></td>
+<td>Write Data to a File</td></tr>
+<tr><td width="25%"><a href="dcf.html">write.dcf</a></td>
+<td>Read and Write Data in DCF Format</td></tr>
+<tr><td width="25%"><a href="readBin.html">writeBin</a></td>
+<td>Transfer Binary Data To and From Connections</td></tr>
+<tr><td width="25%"><a href="readChar.html">writeChar</a></td>
+<td>Transfer Character Strings To and From Connections</td></tr>
+<tr><td width="25%"><a href="writeLines.html">writeLines</a></td>
+<td>Write Lines to a Connection</td></tr>
+</table>
+
+<h2><a name="X">-- X --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Logic.html">xor</a></td>
+<td>Logical Operators</td></tr>
+<tr><td width="25%"><a href="hexmode.html">xor.hexmode</a></td>
+<td>Display Numbers in Hexadecimal</td></tr>
+<tr><td width="25%"><a href="octmode.html">xor.octmode</a></td>
+<td>Display Numbers in Octal</td></tr>
+<tr><td width="25%"><a href="xtfrm.html">xtfrm</a></td>
+<td>Auxiliary Function for Sorting and Ranking</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">xtfrm.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="connections.html">xzfile</a></td>
+<td>Functions to Manipulate Connections</td></tr>
+</table>
+
+<h2><a name="Z">-- Z --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="zapsmall.html">zapsmall</a></td>
+<td>Rounding of Numbers</td></tr>
+</table>
+
+<h2><a name="misc">-- misc --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Logic.html">!</a></td>
+<td>Logical Operators</td></tr>
+<tr><td width="25%"><a href="hexmode.html">!.hexmode</a></td>
+<td>Display Numbers in Hexadecimal</td></tr>
+<tr><td width="25%"><a href="octmode.html">!.octmode</a></td>
+<td>Display Numbers in Octal</td></tr>
+<tr><td width="25%"><a href="Comparison.html">!=</a></td>
+<td>Relational Operators</td></tr>
+<tr><td width="25%"><a href="Quotes.html">"</a></td>
+<td>Quotes</td></tr>
+<tr><td width="25%"><a href="Extract.html">$</a></td>
+<td>Extract or Replace Parts of an Object</td></tr>
+<tr><td width="25%"><a href="getLoadedDLLs.html">$.DLLInfo</a></td>
+<td>Get DLLs Loaded in Current Session</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">$.package_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="Extract.html">$&lt;-</a></td>
+<td>Extract or Replace Parts of an Object</td></tr>
+<tr><td width="25%"><a href="Extract.data.frame.html">$&lt;-.data.frame</a></td>
+<td>Extract or Replace Parts of a Data Frame</td></tr>
+<tr><td width="25%"><a href="Arithmetic.html">%%</a></td>
+<td>Arithmetic Operators</td></tr>
+<tr><td width="25%"><a href="matmult.html">%*%</a></td>
+<td>Matrix Multiplication</td></tr>
+<tr><td width="25%"><a href="Arithmetic.html">%/%</a></td>
+<td>Arithmetic Operators</td></tr>
+<tr><td width="25%"><a href="match.html">%in%</a></td>
+<td>Value Matching</td></tr>
+<tr><td width="25%"><a href="outer.html">%o%</a></td>
+<td>Outer Product of Arrays</td></tr>
+<tr><td width="25%"><a href="kronecker.html">%x%</a></td>
+<td>Kronecker Products on Arrays</td></tr>
+<tr><td width="25%"><a href="Logic.html">&amp;</a></td>
+<td>Logical Operators</td></tr>
+<tr><td width="25%"><a href="Logic.html">&amp;&amp;</a></td>
+<td>Logical Operators</td></tr>
+<tr><td width="25%"><a href="hexmode.html">&amp;.hexmode</a></td>
+<td>Display Numbers in Hexadecimal</td></tr>
+<tr><td width="25%"><a href="octmode.html">&amp;.octmode</a></td>
+<td>Display Numbers in Octal</td></tr>
+<tr><td width="25%"><a href="Quotes.html">'</a></td>
+<td>Quotes</td></tr>
+<tr><td width="25%"><a href="Paren.html">(</a></td>
+<td>Parentheses and Braces</td></tr>
+<tr><td width="25%"><a href="Arithmetic.html">*</a></td>
+<td>Arithmetic Operators</td></tr>
+<tr><td width="25%"><a href="Arithmetic.html">**</a></td>
+<td>Arithmetic Operators</td></tr>
+<tr><td width="25%"><a href="difftime.html">*.difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="Arithmetic.html">+</a></td>
+<td>Arithmetic Operators</td></tr>
+<tr><td width="25%"><a href="Ops.Date.html">+.Date</a></td>
+<td>Operators on the Date Class</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">+.POSIXt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="Arithmetic.html">-</a></td>
+<td>Arithmetic Operators</td></tr>
+<tr><td width="25%"><a href="Ops.Date.html">-.Date</a></td>
+<td>Operators on the Date Class</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">-.POSIXt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="assignOps.html">-&gt;</a></td>
+<td>Assignment Operators</td></tr>
+<tr><td width="25%"><a href="assignOps.html">-&gt;&gt;</a></td>
+<td>Assignment Operators</td></tr>
+<tr><td width="25%"><a href="agrep.html">.amatch_bounds</a></td>
+<td>Approximate String Matching (Fuzzy Matching)</td></tr>
+<tr><td width="25%"><a href="agrep.html">.amatch_costs</a></td>
+<td>Approximate String Matching (Fuzzy Matching)</td></tr>
+<tr><td width="25%"><a href="autoload.html">.Autoloaded</a></td>
+<td>On-demand Loading of Packages</td></tr>
+<tr><td width="25%"><a href="autoload.html">.AutoloadEnv</a></td>
+<td>On-demand Loading of Packages</td></tr>
+<tr><td width="25%"><a href="environment.html">.BaseNamespaceEnv</a></td>
+<td>Environment Access</td></tr>
+<tr><td width="25%"><a href="bincode.html">.bincode</a></td>
+<td>Bin a Numeric Vector</td></tr>
+<tr><td width="25%"><a href="Foreign.html">.C</a></td>
+<td>Foreign Function Interface</td></tr>
+<tr><td width="25%"><a href="CallExternal.html">.Call</a></td>
+<td>Modern Interfaces to C/C++ code</td></tr>
+<tr><td width="25%"><a href="UseMethod.html">.Class</a></td>
+<td>Class Methods</td></tr>
+<tr><td width="25%"><a href="colSums.html">.colMeans</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="colSums.html">.colSums</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="attach.html">.conflicts.OK</a></td>
+<td>Attach Set of R Objects to Search Path</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">.decode_numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="Defunct.html">.Defunct</a></td>
+<td>Marking Objects as Defunct</td></tr>
+<tr><td width="25%"><a href="deparseOpts.html">.deparseOpts</a></td>
+<td>Options for Expression Deparsing</td></tr>
+<tr><td width="25%"><a href="Deprecated.html">.Deprecated</a></td>
+<td>Marking Objects as Deprecated</td></tr>
+<tr><td width="25%"><a href="dev.html">.Device</a></td>
+<td>Lists of Open/Active Graphics Devices</td></tr>
+<tr><td width="25%"><a href="dev.html">.Devices</a></td>
+<td>Lists of Open/Active Graphics Devices</td></tr>
+<tr><td width="25%"><a href="trace.html">.doTrace</a></td>
+<td>Interactive Tracing and Debugging of Calls to a Function or Method</td></tr>
+<tr><td width="25%"><a href="library.dynam.html">.dynLibs</a></td>
+<td>Loading DLLs from Packages</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">.encode_numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="libPaths.html">.expand_R_libs_env_var</a></td>
+<td>Search Paths for Packages</td></tr>
+<tr><td width="25%"><a href="CallExternal.html">.External</a></td>
+<td>Modern Interfaces to C/C++ code</td></tr>
+<tr><td width="25%"><a href="find.package.html">.find.package</a></td>
+<td>Find Packages</td></tr>
+<tr><td width="25%"><a href="Startup.html">.First</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="Startup.html">.First.sys</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="Foreign.html">.Fortran</a></td>
+<td>Foreign Function Interface</td></tr>
+<tr><td width="25%"><a href="UseMethod.html">.Generic</a></td>
+<td>Class Methods</td></tr>
+<tr><td width="25%"><a href="environment.html">.GlobalEnv</a></td>
+<td>Environment Access</td></tr>
+<tr><td width="25%"><a href="groupGeneric.html">.Group</a></td>
+<td>S3 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="conditions.html">.handleSimpleError</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="Internal.html">.Internal</a></td>
+<td>Call an Internal Function</td></tr>
+<tr><td width="25%"><a href="srcfile.html">.isOpen</a></td>
+<td>References to source files</td></tr>
+<tr><td width="25%"><a href="kappa.html">.kappa_tri</a></td>
+<td>Compute or Estimate the Condition Number of a Matrix</td></tr>
+<tr><td width="25%"><a href="kronecker.html">.kronecker</a></td>
+<td>Kronecker Products on Arrays</td></tr>
+<tr><td width="25%"><a href="quit.html">.Last</a></td>
+<td>Terminate an R Session</td></tr>
+<tr><td width="25%"><a href="ns-hooks.html">.Last.lib</a></td>
+<td>Hooks for Namespace Events</td></tr>
+<tr><td width="25%"><a href="quit.html">.Last.sys</a></td>
+<td>Terminate an R Session</td></tr>
+<tr><td width="25%"><a href="Last.value.html">.Last.value</a></td>
+<td>Value of Last Evaluated Expression</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">.leap.seconds</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="libPaths.html">.libPaths</a></td>
+<td>Search Paths for Packages</td></tr>
+<tr><td width="25%"><a href="libPaths.html">.Library</a></td>
+<td>Search Paths for Packages</td></tr>
+<tr><td width="25%"><a href="libPaths.html">.Library.site</a></td>
+<td>Search Paths for Packages</td></tr>
+<tr><td width="25%"><a href="zMachine.html">.Machine</a></td>
+<td>Numerical Characteristics of the Machine</td></tr>
+<tr><td width="25%"><a href="message.html">.makeMessage</a></td>
+<td>Diagnostic Messages</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">.make_numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="UseMethod.html">.Method</a></td>
+<td>Class Methods</td></tr>
+<tr><td width="25%"><a href="library.html">.noGenerics</a></td>
+<td>Loading and Listing of Packages</td></tr>
+<tr><td width="25%"><a href="notyet.html">.NotYetImplemented</a></td>
+<td>Not Yet Implemented Functions and Unused Arguments</td></tr>
+<tr><td width="25%"><a href="notyet.html">.NotYetUsed</a></td>
+<td>Not Yet Implemented Functions and Unused Arguments</td></tr>
+<tr><td width="25%"><a href="ns-hooks.html">.onAttach</a></td>
+<td>Hooks for Namespace Events</td></tr>
+<tr><td width="25%"><a href="ns-hooks.html">.onLoad</a></td>
+<td>Hooks for Namespace Events</td></tr>
+<tr><td width="25%"><a href="ns-hooks.html">.onUnload</a></td>
+<td>Hooks for Namespace Events</td></tr>
+<tr><td width="25%"><a href="options.html">.Options</a></td>
+<td>Options Settings</td></tr>
+<tr><td width="25%"><a href="Startup.html">.OptRequireMethods</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="zpackages.html">.packages</a></td>
+<td>Listing of Packages</td></tr>
+<tr><td width="25%"><a href="message.html">.packageStartupMessage</a></td>
+<td>Diagnostic Messages</td></tr>
+<tr><td width="25%"><a href="find.package.html">.path.package</a></td>
+<td>Find Packages</td></tr>
+<tr><td width="25%"><a href="Platform.html">.Platform</a></td>
+<td>Platform Specific Variables</td></tr>
+<tr><td width="25%"><a href="Primitive.html">.Primitive</a></td>
+<td>Look Up a Primitive Function</td></tr>
+<tr><td width="25%"><a href="Random.html">.Random.seed</a></td>
+<td>Random Number Generation</td></tr>
+<tr><td width="25%"><a href="Startup.html">.Renviron</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="colSums.html">.rowMeans</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="colSums.html">.rowSums</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="Startup.html">.Rprofile</a></td>
+<td>Initialization at Start of an R Session</td></tr>
+<tr><td width="25%"><a href="InternalMethods.html">.S3PrimitiveGenerics</a></td>
+<td>Internal Generic Functions</td></tr>
+<tr><td width="25%"><a href="conditions.html">.signalSimpleWarning</a></td>
+<td>Condition Handling and Recovery</td></tr>
+<tr><td width="25%"><a href="zutils.html">.standard_regexps</a></td>
+<td>Miscellaneous Internal/Programming Utilities</td></tr>
+<tr><td width="25%"><a href="traceback.html">.Traceback</a></td>
+<td>Print Call Stacks</td></tr>
+<tr><td width="25%"><a href="userhooks.html">.userHooksEnv</a></td>
+<td>Functions to Get and Set Hooks for Load, Attach, Detach and Unload</td></tr>
+<tr><td width="25%"><a href="cbind.html">.__H__.cbind</a></td>
+<td>Combine R Objects by Rows or Columns</td></tr>
+<tr><td width="25%"><a href="cbind.html">.__H__.rbind</a></td>
+<td>Combine R Objects by Rows or Columns</td></tr>
+<tr><td width="25%"><a href="Arithmetic.html">/</a></td>
+<td>Arithmetic Operators</td></tr>
+<tr><td width="25%"><a href="difftime.html">/.difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="NumericConstants.html">0x1</a></td>
+<td>Numeric Constants</td></tr>
+<tr><td width="25%"><a href="NumericConstants.html">1i</a></td>
+<td>Numeric Constants</td></tr>
+<tr><td width="25%"><a href="NumericConstants.html">1L</a></td>
+<td>Numeric Constants</td></tr>
+<tr><td width="25%"><a href="Colon.html">:</a></td>
+<td>Colon Operator</td></tr>
+<tr><td width="25%"><a href="ns-dblcolon.html">::</a></td>
+<td>Double Colon and Triple Colon Operators</td></tr>
+<tr><td width="25%"><a href="ns-dblcolon.html">:::</a></td>
+<td>Double Colon and Triple Colon Operators</td></tr>
+<tr><td width="25%"><a href="Comparison.html">&lt;</a></td>
+<td>Relational Operators</td></tr>
+<tr><td width="25%"><a href="assignOps.html">&lt;-</a></td>
+<td>Assignment Operators</td></tr>
+<tr><td width="25%"><a href="assignOps.html">&lt;&lt;-</a></td>
+<td>Assignment Operators</td></tr>
+<tr><td width="25%"><a href="Comparison.html">&lt;=</a></td>
+<td>Relational Operators</td></tr>
+<tr><td width="25%"><a href="assignOps.html">=</a></td>
+<td>Assignment Operators</td></tr>
+<tr><td width="25%"><a href="Comparison.html">==</a></td>
+<td>Relational Operators</td></tr>
+<tr><td width="25%"><a href="Comparison.html">&gt;</a></td>
+<td>Relational Operators</td></tr>
+<tr><td width="25%"><a href="Comparison.html">&gt;=</a></td>
+<td>Relational Operators</td></tr>
+<tr><td width="25%"><a href="slotOp.html">@</a></td>
+<td>Extract Slots</td></tr>
+<tr><td width="25%"><a href="Extract.html">[</a></td>
+<td>Extract or Replace Parts of an Object</td></tr>
+<tr><td width="25%"><a href="AsIs.html">[.AsIs</a></td>
+<td>Inhibit Interpretation/Conversion of Objects</td></tr>
+<tr><td width="25%"><a href="Extract.data.frame.html">[.data.frame</a></td>
+<td>Extract or Replace Parts of a Data Frame</td></tr>
+<tr><td width="25%"><a href="Dates.html">[.Date</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="difftime.html">[.difftime</a></td>
+<td>Time Intervals</td></tr>
+<tr><td width="25%"><a href="Extract.factor.html">[.factor</a></td>
+<td>Extract or Replace Parts of a Factor</td></tr>
+<tr><td width="25%"><a href="hexmode.html">[.hexmode</a></td>
+<td>Display Numbers in Hexadecimal</td></tr>
+<tr><td width="25%"><a href="Extract.html">[.listof</a></td>
+<td>Extract or Replace Parts of an Object</td></tr>
+<tr><td width="25%"><a href="noquote.html">[.noquote</a></td>
+<td>Class for 'no quote' Printing of Character Strings</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">[.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="octmode.html">[.octmode</a></td>
+<td>Display Numbers in Octal</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">[.POSIXct</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">[.POSIXlt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="Extract.html">[.simple.list</a></td>
+<td>Extract or Replace Parts of an Object</td></tr>
+<tr><td width="25%"><a href="Extract.html">[&lt;-</a></td>
+<td>Extract or Replace Parts of an Object</td></tr>
+<tr><td width="25%"><a href="Extract.data.frame.html">[&lt;-.data.frame</a></td>
+<td>Extract or Replace Parts of a Data Frame</td></tr>
+<tr><td width="25%"><a href="Dates.html">[&lt;-.Date</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="Extract.factor.html">[&lt;-.factor</a></td>
+<td>Extract or Replace Parts of a Factor</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">[&lt;-.POSIXct</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">[&lt;-.POSIXlt</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="Extract.html">[[</a></td>
+<td>Extract or Replace Parts of an Object</td></tr>
+<tr><td width="25%"><a href="Extract.data.frame.html">[[.data.frame</a></td>
+<td>Extract or Replace Parts of a Data Frame</td></tr>
+<tr><td width="25%"><a href="Dates.html">[[.Date</a></td>
+<td>Date Class</td></tr>
+<tr><td width="25%"><a href="Extract.factor.html">[[.factor</a></td>
+<td>Extract or Replace Parts of a Factor</td></tr>
+<tr><td width="25%"><a href="numeric_version.html">[[.numeric_version</a></td>
+<td>Numeric Versions</td></tr>
+<tr><td width="25%"><a href="DateTimeClasses.html">[[.POSIXct</a></td>
+<td>Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="Arithmetic.html">^</a></td>
+<td>Arithmetic Operators</td></tr>
+<tr><td width="25%"><a href="Quotes.html">`</a></td>
+<td>Quotes</td></tr>
+<tr><td width="25%"><a href="Paren.html">{</a></td>
+<td>Parentheses and Braces</td></tr>
+<tr><td width="25%"><a href="Logic.html">|</a></td>
+<td>Logical Operators</td></tr>
+<tr><td width="25%"><a href="hexmode.html">|.hexmode</a></td>
+<td>Display Numbers in Hexadecimal</td></tr>
+<tr><td width="25%"><a href="octmode.html">|.octmode</a></td>
+<td>Display Numbers in Octal</td></tr>
+<tr><td width="25%"><a href="Logic.html">||</a></td>
+<td>Logical Operators</td></tr>
+<tr><td width="25%"><a href="tilde.html">~</a></td>
+<td>Tilde Operator</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/base/html/R.css b/win32/deps/library/base/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/base/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/base/po/da/LC_MESSAGES/R-base.mo b/win32/deps/library/base/po/da/LC_MESSAGES/R-base.mo
new file mode 100644
index 0000000..1434cd9
Binary files /dev/null and b/win32/deps/library/base/po/da/LC_MESSAGES/R-base.mo differ
diff --git a/win32/deps/library/base/po/de/LC_MESSAGES/R-base.mo b/win32/deps/library/base/po/de/LC_MESSAGES/R-base.mo
new file mode 100644
index 0000000..333275a
Binary files /dev/null and b/win32/deps/library/base/po/de/LC_MESSAGES/R-base.mo differ
diff --git a/win32/deps/library/base/po/en quot/LC_MESSAGES/R-base.mo b/win32/deps/library/base/po/en quot/LC_MESSAGES/R-base.mo
new file mode 100644
index 0000000..ccd4626
Binary files /dev/null and b/win32/deps/library/base/po/en quot/LC_MESSAGES/R-base.mo differ
diff --git a/win32/deps/library/base/po/fr/LC_MESSAGES/R-base.mo b/win32/deps/library/base/po/fr/LC_MESSAGES/R-base.mo
new file mode 100644
index 0000000..2fbe0ae
Binary files /dev/null and b/win32/deps/library/base/po/fr/LC_MESSAGES/R-base.mo differ
diff --git a/win32/deps/library/base/po/it/LC_MESSAGES/R-base.mo b/win32/deps/library/base/po/it/LC_MESSAGES/R-base.mo
new file mode 100644
index 0000000..1724cce
Binary files /dev/null and b/win32/deps/library/base/po/it/LC_MESSAGES/R-base.mo differ
diff --git a/win32/deps/library/base/po/ja/LC_MESSAGES/R-base.mo b/win32/deps/library/base/po/ja/LC_MESSAGES/R-base.mo
new file mode 100644
index 0000000..72f767a
Binary files /dev/null and b/win32/deps/library/base/po/ja/LC_MESSAGES/R-base.mo differ
diff --git a/win32/deps/library/base/po/ko/LC_MESSAGES/R-base.mo b/win32/deps/library/base/po/ko/LC_MESSAGES/R-base.mo
new file mode 100644
index 0000000..412dd15
Binary files /dev/null and b/win32/deps/library/base/po/ko/LC_MESSAGES/R-base.mo differ
diff --git a/win32/deps/library/base/po/nn/LC_MESSAGES/R-base.mo b/win32/deps/library/base/po/nn/LC_MESSAGES/R-base.mo
new file mode 100644
index 0000000..d22d915
Binary files /dev/null and b/win32/deps/library/base/po/nn/LC_MESSAGES/R-base.mo differ
diff --git a/win32/deps/library/base/po/pl/LC_MESSAGES/R-base.mo b/win32/deps/library/base/po/pl/LC_MESSAGES/R-base.mo
new file mode 100644
index 0000000..17ea2dc
Binary files /dev/null and b/win32/deps/library/base/po/pl/LC_MESSAGES/R-base.mo differ
diff --git a/win32/deps/library/base/po/pt_BR/LC_MESSAGES/R-base.mo b/win32/deps/library/base/po/pt_BR/LC_MESSAGES/R-base.mo
new file mode 100644
index 0000000..f3d69da
Binary files /dev/null and b/win32/deps/library/base/po/pt_BR/LC_MESSAGES/R-base.mo differ
diff --git a/win32/deps/library/base/po/ru/LC_MESSAGES/R-base.mo b/win32/deps/library/base/po/ru/LC_MESSAGES/R-base.mo
new file mode 100644
index 0000000..db39dbb
Binary files /dev/null and b/win32/deps/library/base/po/ru/LC_MESSAGES/R-base.mo differ
diff --git a/win32/deps/library/base/po/tr/LC_MESSAGES/R-base.mo b/win32/deps/library/base/po/tr/LC_MESSAGES/R-base.mo
new file mode 100644
index 0000000..66f0969
Binary files /dev/null and b/win32/deps/library/base/po/tr/LC_MESSAGES/R-base.mo differ
diff --git a/win32/deps/library/base/po/zh_CN/LC_MESSAGES/R-base.mo b/win32/deps/library/base/po/zh_CN/LC_MESSAGES/R-base.mo
new file mode 100644
index 0000000..0bd6a49
Binary files /dev/null and b/win32/deps/library/base/po/zh_CN/LC_MESSAGES/R-base.mo differ
diff --git a/win32/deps/library/boot/CITATION b/win32/deps/library/boot/CITATION
index c4a4cc3..3de4f2a 100644
--- a/win32/deps/library/boot/CITATION
+++ b/win32/deps/library/boot/CITATION
@@ -1,8 +1,7 @@
 citHeader("To cite the 'boot' package in publications use:")
 
-desc <- packageDescription("boot")
-year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", desc$Date)
-vers <- paste("R package version", desc$Version)
+year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date, perl = TRUE)
+vers <- paste("R package version", meta$Version)
 
 citEntry(entry="Manual",
          title = "boot: Bootstrap R (S-Plus) Functions",
diff --git a/win32/deps/library/boot/DESCRIPTION b/win32/deps/library/boot/DESCRIPTION
index e50af77..ce99932 100644
--- a/win32/deps/library/boot/DESCRIPTION
+++ b/win32/deps/library/boot/DESCRIPTION
@@ -1,21 +1,25 @@
-Package: boot
-Priority: recommended
-Version: 1.2-38
-Date: 2009-07-28
-Author: S original <http://statwww.epfl.ch/davison/BMA/library.html> by
-        Angelo Canty <cantya mcmaster ca>. R port by Brian Ripley
-        <ripley stats ox ac uk>.
-Maintainer: Brian Ripley <ripley stats ox ac uk>
-Description: functions and datasets for bootstrapping from the book
-        "Bootstrap Methods and Their Applications" by A. C. Davison and
-        D. V. Hinkley (1997, CUP).
-Title: Bootstrap R (S-Plus) Functions (Canty)
-Depends: R (>= 2.7.0), graphics, stats
-Suggests: survival
-LazyLoad: yes
-LazyData: yes
-License: Unlimited
-Packaged: 2009-07-29 08:48:14 UTC; ripley
-Repository: CRAN
-Date/Publication: 2009-08-05 11:21:38
-Built: R 2.9.2; ; 2009-08-24 13:01:44 UTC; windows
+Package: boot
+Priority: recommended
+Version: 1.3-7
+Date: 2012-10-12
+Authors R: c(person("Angelo", "Canty", role = "aut", email =
+        "cantya mcmaster ca"), person("Brian", "Ripley", role =
+        c("aut", "trl", "cre"), email = "ripley stats ox ac uk",
+        comment = "author of parallel support"))
+Author: S original <http://statwww.epfl.ch/davison/BMA/library.html>
+        by Angelo Canty <cantya mcmaster ca>.  
+        R port and many enhancements by Brian Ripley <ripley stats ox ac uk>.
+        Note that maintainers are not available to give advice on using a
+        package they did not author.
+Maintainer: Brian Ripley <ripley stats ox ac uk>
+Description: functions and datasets for bootstrapping from the
+  book "Bootstrap Methods and Their Applications" by A. C. Davison and 
+  D. V. Hinkley (1997, CUP).
+Title: Bootstrap Functions (originally by Angelo Canty for S)
+Depends: R (>= 2.14.0), graphics, stats
+Suggests: MASS, survival
+LazyData: yes
+ByteCompile: yes
+License: Unlimited
+Packaged: 2012-10-12 11:52:51 UTC; ripley
+Built: R 2.15.2; ; 2012-10-27 03:14:35 UTC; windows
diff --git a/win32/deps/library/boot/INDEX b/win32/deps/library/boot/INDEX
index 9c54c23..78e8d67 100644
--- a/win32/deps/library/boot/INDEX
+++ b/win32/deps/library/boot/INDEX
@@ -1,12 +1,27 @@
-Bootstrap S-Plus Functions  (Version 1.2; March 2001)
-===========================================================
+Bootstrap R Functions
+=====================
+
+Version 1.3; May 2011:
+
+The main change is support for parallel computation in functions
+boot(), censboot() and tsboot().
+
+Many of the examples have been tidied up.
+
+
+Version 1.2; March 2001:
 
 This version corrects some minor errors in Version 1.0 of the code
 distributed with the first printing of Davison and Hinkley (1997).
 The author would like to thank those users who pointed out errors or
 possible improvements to the code.  Any further errors found should be
-reported to the author at the address below for correction in the
-next version.
+reported to the author (Angelo Canty) for correction in the next
+version.
+
+Version 1.3; May 2011:
+
+Added parallel support, some code cleanup for efficiency.
+
 
 The package contains the following functions, all of which
 have online help available.
@@ -59,17 +74,3 @@ cd4.nested	A nested bootstrap referred to in Practical 5.5
 corr.nested	The statistic used in cd4.nested
 EL.profile, EEF.profile, and lik.CI 
 	functions defined for use in the practicals of chapter 10.
-
-
-
-Angelo J. Canty
-Department of Mathematics and Statistics
-Concordia University
-1455 Blvd de Maisonneuve, Ouest
-Montreal, 
-Quebec H3G 1M8
-Canada
-
-Tel : 1-514-848-3244
-Fax : 1-514-848-4511
-email : canty cicma concordia ca
diff --git a/win32/deps/library/boot/Meta/Rd.rds b/win32/deps/library/boot/Meta/Rd.rds
index b1f3807..e99c9b2 100644
Binary files a/win32/deps/library/boot/Meta/Rd.rds and b/win32/deps/library/boot/Meta/Rd.rds differ
diff --git a/win32/deps/library/boot/Meta/data.rds b/win32/deps/library/boot/Meta/data.rds
index 9db8181..1c7ad1a 100644
Binary files a/win32/deps/library/boot/Meta/data.rds and b/win32/deps/library/boot/Meta/data.rds differ
diff --git a/win32/deps/library/boot/Meta/hsearch.rds b/win32/deps/library/boot/Meta/hsearch.rds
index 2301ca5..460dad6 100644
Binary files a/win32/deps/library/boot/Meta/hsearch.rds and b/win32/deps/library/boot/Meta/hsearch.rds differ
diff --git a/win32/deps/library/boot/Meta/links.rds b/win32/deps/library/boot/Meta/links.rds
new file mode 100644
index 0000000..74163fa
Binary files /dev/null and b/win32/deps/library/boot/Meta/links.rds differ
diff --git a/win32/deps/library/boot/Meta/nsInfo.rds b/win32/deps/library/boot/Meta/nsInfo.rds
index eba5895..3fa33a9 100644
Binary files a/win32/deps/library/boot/Meta/nsInfo.rds and b/win32/deps/library/boot/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/boot/Meta/package.rds b/win32/deps/library/boot/Meta/package.rds
index 4e7d7b9..bb9f155 100644
Binary files a/win32/deps/library/boot/Meta/package.rds and b/win32/deps/library/boot/Meta/package.rds differ
diff --git a/win32/deps/library/boot/NAMESPACE b/win32/deps/library/boot/NAMESPACE
index 3ee3ba8..21a096a 100644
--- a/win32/deps/library/boot/NAMESPACE
+++ b/win32/deps/library/boot/NAMESPACE
@@ -10,6 +10,7 @@ export(abc.ci, boot, boot.array, boot.ci, censboot, control, corr,
 # export(lines.saddle.distn, plot.boot, print.boot, print.bootci, print.simplex)
 importFrom(graphics, lines, plot)
 
+S3method(c, boot)
 S3method(lines, saddle.distn)
 S3method(plot, boot)
 S3method(print, boot)
diff --git a/win32/deps/library/boot/R/boot b/win32/deps/library/boot/R/boot
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/boot/R/boot
+++ b/win32/deps/library/boot/R/boot
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/boot/R/boot.rdb b/win32/deps/library/boot/R/boot.rdb
index 3dc49fb..09508cf 100644
Binary files a/win32/deps/library/boot/R/boot.rdb and b/win32/deps/library/boot/R/boot.rdb differ
diff --git a/win32/deps/library/boot/R/boot.rdx b/win32/deps/library/boot/R/boot.rdx
index 28c3025..53c9394 100644
Binary files a/win32/deps/library/boot/R/boot.rdx and b/win32/deps/library/boot/R/boot.rdx differ
diff --git a/win32/deps/library/boot/data/Rdata.rdb b/win32/deps/library/boot/data/Rdata.rdb
index 162e6ee..7fcef03 100644
Binary files a/win32/deps/library/boot/data/Rdata.rdb and b/win32/deps/library/boot/data/Rdata.rdb differ
diff --git a/win32/deps/library/boot/data/Rdata.rds b/win32/deps/library/boot/data/Rdata.rds
index 223ccf7..06eb36f 100644
Binary files a/win32/deps/library/boot/data/Rdata.rds and b/win32/deps/library/boot/data/Rdata.rds differ
diff --git a/win32/deps/library/boot/data/Rdata.rdx b/win32/deps/library/boot/data/Rdata.rdx
index 7d77165..95f14ad 100644
Binary files a/win32/deps/library/boot/data/Rdata.rdx and b/win32/deps/library/boot/data/Rdata.rdx differ
diff --git a/win32/deps/library/boot/help/AnIndex b/win32/deps/library/boot/help/AnIndex
index 7966f5f..4cf2c0b 100644
--- a/win32/deps/library/boot/help/AnIndex
+++ b/win32/deps/library/boot/help/AnIndex
@@ -13,6 +13,7 @@ boot.ci	boot.ci
 boot.return	boot
 brambles	brambles
 breslow	breslow
+c.boot	boot
 calcium	calcium
 cane	cane
 capability	capability
diff --git a/win32/deps/library/boot/help/aliases.rds b/win32/deps/library/boot/help/aliases.rds
new file mode 100644
index 0000000..443b311
Binary files /dev/null and b/win32/deps/library/boot/help/aliases.rds differ
diff --git a/win32/deps/library/boot/help/boot.rdb b/win32/deps/library/boot/help/boot.rdb
new file mode 100644
index 0000000..97cd38c
Binary files /dev/null and b/win32/deps/library/boot/help/boot.rdb differ
diff --git a/win32/deps/library/boot/help/boot.rdx b/win32/deps/library/boot/help/boot.rdx
new file mode 100644
index 0000000..97e29a8
Binary files /dev/null and b/win32/deps/library/boot/help/boot.rdx differ
diff --git a/win32/deps/library/boot/help/paths.rds b/win32/deps/library/boot/help/paths.rds
new file mode 100644
index 0000000..f9fba4c
Binary files /dev/null and b/win32/deps/library/boot/help/paths.rds differ
diff --git a/win32/deps/library/boot/html/00Index.html b/win32/deps/library/boot/html/00Index.html
new file mode 100644
index 0000000..9c9a56d
--- /dev/null
+++ b/win32/deps/library/boot/html/00Index.html
@@ -0,0 +1,221 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Bootstrap Functions (originally by Angelo Canty for S)</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Bootstrap Functions (originally by Angelo Canty for S)
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;boot&rsquo; version 1.3-7</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td width="25%"><a href="abc.ci.html">abc.ci</a></td>
+<td>Nonparametric ABC Confidence Intervals</td></tr>
+<tr><td width="25%"><a href="acme.html">acme</a></td>
+<td>Monthly Excess Returns</td></tr>
+<tr><td width="25%"><a href="aids.html">aids</a></td>
+<td>Delay in AIDS Reporting in England and Wales</td></tr>
+<tr><td width="25%"><a href="aircondit.html">aircondit</a></td>
+<td>Failures of Air-conditioning Equipment</td></tr>
+<tr><td width="25%"><a href="aircondit.html">aircondit7</a></td>
+<td>Failures of Air-conditioning Equipment</td></tr>
+<tr><td width="25%"><a href="amis.html">amis</a></td>
+<td>Car Speeding and Warning Signs</td></tr>
+<tr><td width="25%"><a href="aml.html">aml</a></td>
+<td>Remission Times for Acute Myelogenous Leukaemia</td></tr>
+<tr><td width="25%"><a href="beaver.html">beaver</a></td>
+<td>Beaver Body Temperature Data</td></tr>
+<tr><td width="25%"><a href="bigcity.html">bigcity</a></td>
+<td>Population of U.S. Cities</td></tr>
+<tr><td width="25%"><a href="boot.html">boot</a></td>
+<td>Bootstrap Resampling</td></tr>
+<tr><td width="25%"><a href="boot.array.html">boot.array</a></td>
+<td>Bootstrap Resampling Arrays</td></tr>
+<tr><td width="25%"><a href="boot.ci.html">boot.ci</a></td>
+<td>Nonparametric Bootstrap Confidence Intervals</td></tr>
+<tr><td width="25%"><a href="boot.html">boot.return</a></td>
+<td>Bootstrap Resampling</td></tr>
+<tr><td width="25%"><a href="brambles.html">brambles</a></td>
+<td>Spatial Location of Bramble Canes</td></tr>
+<tr><td width="25%"><a href="breslow.html">breslow</a></td>
+<td>Smoking Deaths Among Doctors</td></tr>
+<tr><td width="25%"><a href="boot.html">c.boot</a></td>
+<td>Bootstrap Resampling</td></tr>
+<tr><td width="25%"><a href="calcium.html">calcium</a></td>
+<td>Calcium Uptake Data</td></tr>
+<tr><td width="25%"><a href="cane.html">cane</a></td>
+<td>Sugar-cane Disease Data</td></tr>
+<tr><td width="25%"><a href="capability.html">capability</a></td>
+<td>Simulated Manufacturing Process Data</td></tr>
+<tr><td width="25%"><a href="catsM.html">catsM</a></td>
+<td>Weight Data for Domestic Cats</td></tr>
+<tr><td width="25%"><a href="cav.html">cav</a></td>
+<td>Position of Muscle Caveolae</td></tr>
+<tr><td width="25%"><a href="cd4.html">cd4</a></td>
+<td>CD4 Counts for HIV-Positive Patients</td></tr>
+<tr><td width="25%"><a href="cd4.nested.html">cd4.nested</a></td>
+<td>Nested Bootstrap of cd4 data</td></tr>
+<tr><td width="25%"><a href="censboot.html">cens.return</a></td>
+<td>Bootstrap for Censored Data</td></tr>
+<tr><td width="25%"><a href="censboot.html">censboot</a></td>
+<td>Bootstrap for Censored Data</td></tr>
+<tr><td width="25%"><a href="channing.html">channing</a></td>
+<td>Channing House Data</td></tr>
+<tr><td width="25%"><a href="bigcity.html">city</a></td>
+<td>Population of U.S. Cities</td></tr>
+<tr><td width="25%"><a href="claridge.html">claridge</a></td>
+<td>Genetic Links to Left-handedness</td></tr>
+<tr><td width="25%"><a href="cloth.html">cloth</a></td>
+<td>Number of Flaws in Cloth</td></tr>
+<tr><td width="25%"><a href="co.transfer.html">co.transfer</a></td>
+<td>Carbon Monoxide Transfer</td></tr>
+<tr><td width="25%"><a href="coal.html">coal</a></td>
+<td>Dates of Coal Mining Disasters</td></tr>
+<tr><td width="25%"><a href="control.html">control</a></td>
+<td>Control Variate Calculations</td></tr>
+<tr><td width="25%"><a href="corr.html">corr</a></td>
+<td>Correlation Coefficient</td></tr>
+<tr><td width="25%"><a href="cum3.html">cum3</a></td>
+<td>Calculate Third Order Cumulants</td></tr>
+<tr><td width="25%"><a href="cv.glm.html">cv.glm</a></td>
+<td>Cross-validation for Generalized Linear Models</td></tr>
+<tr><td width="25%"><a href="darwin.html">darwin</a></td>
+<td>Darwin's Plant Height Differences</td></tr>
+<tr><td width="25%"><a href="dogs.html">dogs</a></td>
+<td>Cardiac Data for Domestic Dogs</td></tr>
+<tr><td width="25%"><a href="downs.bc.html">downs.bc</a></td>
+<td>Incidence of Down's Syndrome in British Columbia</td></tr>
+<tr><td width="25%"><a href="ducks.html">ducks</a></td>
+<td>Behavioral and Plumage Characteristics of Hybrid Ducks</td></tr>
+<tr><td width="25%"><a href="EEF.profile.html">EEF.profile</a></td>
+<td>Empirical Likelihoods</td></tr>
+<tr><td width="25%"><a href="EEF.profile.html">EL.profile</a></td>
+<td>Empirical Likelihoods</td></tr>
+<tr><td width="25%"><a href="empinf.html">empinf</a></td>
+<td>Empirical Influence Values</td></tr>
+<tr><td width="25%"><a href="envelope.html">envelope</a></td>
+<td>Confidence Envelopes for Curves</td></tr>
+<tr><td width="25%"><a href="exp.tilt.html">exp.tilt</a></td>
+<td>Exponential Tilting</td></tr>
+<tr><td width="25%"><a href="fir.html">fir</a></td>
+<td>Counts of Balsam-fir Seedlings</td></tr>
+<tr><td width="25%"><a href="freq.array.html">freq.array</a></td>
+<td>Bootstrap Frequency Arrays</td></tr>
+<tr><td width="25%"><a href="frets.html">frets</a></td>
+<td>Head Dimensions in Brothers</td></tr>
+<tr><td width="25%"><a href="glm.diag.html">glm.diag</a></td>
+<td>Generalized Linear Model Diagnostics</td></tr>
+<tr><td width="25%"><a href="glm.diag.plots.html">glm.diag.plots</a></td>
+<td>Diagnostics plots for generalized linear models</td></tr>
+<tr><td width="25%"><a href="gravity.html">grav</a></td>
+<td>Acceleration Due to Gravity</td></tr>
+<tr><td width="25%"><a href="gravity.html">gravity</a></td>
+<td>Acceleration Due to Gravity</td></tr>
+<tr><td width="25%"><a href="hirose.html">hirose</a></td>
+<td>Failure Time of PET Film</td></tr>
+<tr><td width="25%"><a href="Imp.Estimates.html">Imp.Estimates</a></td>
+<td>Importance Sampling Estimates</td></tr>
+<tr><td width="25%"><a href="Imp.Estimates.html">imp.moments</a></td>
+<td>Importance Sampling Estimates</td></tr>
+<tr><td width="25%"><a href="Imp.Estimates.html">imp.prob</a></td>
+<td>Importance Sampling Estimates</td></tr>
+<tr><td width="25%"><a href="Imp.Estimates.html">imp.quantile</a></td>
+<td>Importance Sampling Estimates</td></tr>
+<tr><td width="25%"><a href="Imp.Estimates.html">imp.reg</a></td>
+<td>Importance Sampling Estimates</td></tr>
+<tr><td width="25%"><a href="imp.weights.html">imp.weights</a></td>
+<td>Importance Sampling Weights</td></tr>
+<tr><td width="25%"><a href="inv.logit.html">inv.logit</a></td>
+<td>Inverse Logit Function</td></tr>
+<tr><td width="25%"><a href="islay.html">islay</a></td>
+<td>Jura Quartzite Azimuths on Islay</td></tr>
+<tr><td width="25%"><a href="jack.after.boot.html">jack.after.boot</a></td>
+<td>Jackknife-after-Bootstrap Plots</td></tr>
+<tr><td width="25%"><a href="k3.linear.html">k3.linear</a></td>
+<td>Linear Skewness Estimate</td></tr>
+<tr><td width="25%"><a href="linear.approx.html">linear.approx</a></td>
+<td>Linear Approximation of Bootstrap Replicates</td></tr>
+<tr><td width="25%"><a href="lines.saddle.distn.html">lines.saddle.distn</a></td>
+<td>Add a Saddlepoint Approximation to a Plot</td></tr>
+<tr><td width="25%"><a href="logit.html">logit</a></td>
+<td>Logit of Proportions</td></tr>
+<tr><td width="25%"><a href="manaus.html">manaus</a></td>
+<td>Average Heights of the Rio Negro river at Manaus</td></tr>
+<tr><td width="25%"><a href="melanoma.html">melanoma</a></td>
+<td>Survival from Malignant Melanoma</td></tr>
+<tr><td width="25%"><a href="motor.html">motor</a></td>
+<td>Data from a Simulated Motorcycle Accident</td></tr>
+<tr><td width="25%"><a href="neuro.html">neuro</a></td>
+<td>Neurophysiological Point Process Data</td></tr>
+<tr><td width="25%"><a href="nitrofen.html">nitrofen</a></td>
+<td>Toxicity of Nitrofen in Aquatic Systems</td></tr>
+<tr><td width="25%"><a href="nodal.html">nodal</a></td>
+<td>Nodal Involvement in Prostate Cancer</td></tr>
+<tr><td width="25%"><a href="norm.ci.html">norm.ci</a></td>
+<td>Normal Approximation Confidence Intervals</td></tr>
+<tr><td width="25%"><a href="nuclear.html">nuclear</a></td>
+<td>Nuclear Power Station Construction Data</td></tr>
+<tr><td width="25%"><a href="paulsen.html">paulsen</a></td>
+<td>Neurotransmission in Guinea Pig Brains</td></tr>
+<tr><td width="25%"><a href="plot.boot.html">plot.boot</a></td>
+<td>Plots of the Output of a Bootstrap Simulation</td></tr>
+<tr><td width="25%"><a href="poisons.html">poisons</a></td>
+<td>Animal Survival Times</td></tr>
+<tr><td width="25%"><a href="polar.html">polar</a></td>
+<td>Pole Positions of New Caledonian Laterites</td></tr>
+<tr><td width="25%"><a href="print.boot.html">print.boot</a></td>
+<td>Print a Summary of a Bootstrap Object</td></tr>
+<tr><td width="25%"><a href="print.bootci.html">print.bootci</a></td>
+<td>Print Bootstrap Confidence Intervals</td></tr>
+<tr><td width="25%"><a href="print.saddle.distn.html">print.saddle.distn</a></td>
+<td>Print Quantiles of Saddlepoint Approximations</td></tr>
+<tr><td width="25%"><a href="print.simplex.html">print.simplex</a></td>
+<td>Print Solution to Linear Programming Problem</td></tr>
+<tr><td width="25%"><a href="remission.html">remission</a></td>
+<td>Cancer Remission and Cell Activity</td></tr>
+<tr><td width="25%"><a href="saddle.html">saddle</a></td>
+<td>Saddlepoint Approximations for Bootstrap Statistics</td></tr>
+<tr><td width="25%"><a href="saddle.distn.html">saddle.distn</a></td>
+<td>Saddlepoint Distribution Approximations for Bootstrap Statistics</td></tr>
+<tr><td width="25%"><a href="saddle.distn.object.html">saddle.distn.object</a></td>
+<td>Saddlepoint Distribution Approximation Objects</td></tr>
+<tr><td width="25%"><a href="salinity.html">salinity</a></td>
+<td>Water Salinity and River Discharge</td></tr>
+<tr><td width="25%"><a href="simplex.html">simplex</a></td>
+<td>Simplex Method for Linear Programming Problems</td></tr>
+<tr><td width="25%"><a href="simplex.object.html">simplex.object</a></td>
+<td>Linear Programming Solution Objects</td></tr>
+<tr><td width="25%"><a href="smooth.f.html">smooth.f</a></td>
+<td>Smooth Distributions on Data Points</td></tr>
+<tr><td width="25%"><a href="sunspot.html">sunspot</a></td>
+<td>Annual Mean Sunspot Numbers</td></tr>
+<tr><td width="25%"><a href="survival.html">survival</a></td>
+<td>Survival of Rats after Radiation Doses</td></tr>
+<tr><td width="25%"><a href="tau.html">tau</a></td>
+<td>Tau Particle Decay Modes</td></tr>
+<tr><td width="25%"><a href="tilt.boot.html">tilt.boot</a></td>
+<td>Non-parametric Tilted Bootstrap</td></tr>
+<tr><td width="25%"><a href="tsboot.html">ts.return</a></td>
+<td>Bootstrapping of Time Series</td></tr>
+<tr><td width="25%"><a href="tsboot.html">tsboot</a></td>
+<td>Bootstrapping of Time Series</td></tr>
+<tr><td width="25%"><a href="tuna.html">tuna</a></td>
+<td>Tuna Sighting Data</td></tr>
+<tr><td width="25%"><a href="urine.html">urine</a></td>
+<td>Urine Analysis Data</td></tr>
+<tr><td width="25%"><a href="var.linear.html">var.linear</a></td>
+<td>Linear Variance Estimate</td></tr>
+<tr><td width="25%"><a href="wool.html">wool</a></td>
+<td>Australian Relative Wool Prices</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/boot/html/R.css b/win32/deps/library/boot/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/boot/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/boot/po/de/LC_MESSAGES/R-boot.mo b/win32/deps/library/boot/po/de/LC_MESSAGES/R-boot.mo
new file mode 100644
index 0000000..e9d4ff8
Binary files /dev/null and b/win32/deps/library/boot/po/de/LC_MESSAGES/R-boot.mo differ
diff --git a/win32/deps/library/boot/po/en quot/LC_MESSAGES/R-boot.mo b/win32/deps/library/boot/po/en quot/LC_MESSAGES/R-boot.mo
new file mode 100644
index 0000000..eb06cda
Binary files /dev/null and b/win32/deps/library/boot/po/en quot/LC_MESSAGES/R-boot.mo differ
diff --git a/win32/deps/library/boot/po/fr/LC_MESSAGES/R-boot.mo b/win32/deps/library/boot/po/fr/LC_MESSAGES/R-boot.mo
new file mode 100644
index 0000000..14ffd92
Binary files /dev/null and b/win32/deps/library/boot/po/fr/LC_MESSAGES/R-boot.mo differ
diff --git a/win32/deps/library/boot/po/pl/LC_MESSAGES/R-boot.mo b/win32/deps/library/boot/po/pl/LC_MESSAGES/R-boot.mo
new file mode 100644
index 0000000..e7a76a1
Binary files /dev/null and b/win32/deps/library/boot/po/pl/LC_MESSAGES/R-boot.mo differ
diff --git a/win32/deps/library/boot/po/ru/LC_MESSAGES/R-boot.mo b/win32/deps/library/boot/po/ru/LC_MESSAGES/R-boot.mo
new file mode 100644
index 0000000..8ca7e4f
Binary files /dev/null and b/win32/deps/library/boot/po/ru/LC_MESSAGES/R-boot.mo differ
diff --git a/win32/deps/library/boot/tests/Examples/boot-Ex.Rout.save b/win32/deps/library/boot/tests/Examples/boot-Ex.Rout.save
new file mode 100644
index 0000000..a675d9a
--- /dev/null
+++ b/win32/deps/library/boot/tests/Examples/boot-Ex.Rout.save
@@ -0,0 +1,2029 @@
+
+R Under development (unstable) (2011-07-12 r56366)
+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.
+
+  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 <- "boot"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('boot')
+> 
+> assign(".oldSearch", search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("Imp.Estimates")
+> ### * Imp.Estimates
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Imp.Estimates
+> ### Title: Importance Sampling Estimates
+> ### Aliases: Imp.Estimates imp.moments imp.prob imp.quantile imp.reg
+> ### Keywords: htest nonparametric
+> 
+> ### ** Examples
+> 
+> # Example 9.8 of Davison and Hinkley (1997) requires tilting the 
+> # resampling distribution of the studentized statistic to be centred 
+> # at the observed value of the test statistic, 1.84.  In this example
+> # we show how certain estimates can be found using resamples taken from
+> # the tilted distribution.
+> grav1 <- gravity[as.numeric(gravity[,2]) >= 7, ]
+> grav.fun <- function(dat, w, orig) {
++      strata <- tapply(dat[, 2], as.numeric(dat[, 2]))
++      d <- dat[, 1]
++      ns <- tabulate(strata)
++      w <- w/tapply(w, strata, sum)[strata]
++      mns <- as.vector(tapply(d * w, strata, sum)) # drop names
++      mn2 <- tapply(d * d * w, strata, sum)
++      s2hat <- sum((mn2 - mns^2)/ns)
++      c(mns[2] - mns[1], s2hat, (mns[2] - mns[1] - orig)/sqrt(s2hat))
++ }
+> grav.z0 <- grav.fun(grav1, rep(1, 26), 0)
+> grav.L <- empinf(data = grav1, statistic = grav.fun, stype = "w", 
++                  strata = grav1[,2], index = 3, orig = grav.z0[1])
+> grav.tilt <- exp.tilt(grav.L, grav.z0[3], strata = grav1[, 2])
+> grav.tilt.boot <- boot(grav1, grav.fun, R = 199, stype = "w", 
++                        strata = grav1[, 2], weights = grav.tilt$p,
++                        orig = grav.z0[1])
+> # Since the weights are needed for all calculations, we shall calculate
+> # them once only.
+> grav.w <- imp.weights(grav.tilt.boot)
+> grav.mom <- imp.moments(grav.tilt.boot, w = grav.w, index = 3)
+> grav.p <- imp.prob(grav.tilt.boot, w = grav.w, index = 3, t0 = grav.z0[3])
+> unlist(grav.p)
+       t0       raw       rat       reg 
+1.8401182 1.0222447 0.9778246 0.9767292 
+> grav.q <- imp.quantile(grav.tilt.boot, w = grav.w, index = 3, 
++                        alpha = c(0.9, 0.95, 0.975, 0.99))
+> as.data.frame(grav.q)
+  alpha      raw      rat      reg
+1 0.900 3.048484 1.170707 5.056004
+2 0.950 3.237935 1.565928 5.056004
+3 0.975 3.629448 1.895876 5.056004
+4 0.990 3.629448 2.258157 5.056004
+> 
+> 
+> 
+> cleanEx()
+> nameEx("abc.ci")
+> ### * abc.ci
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: abc.ci
+> ### Title: Nonparametric ABC Confidence Intervals
+> ### Aliases: abc.ci
+> ### Keywords: nonparametric htest
+> 
+> ### ** Examples
+> 
+> # 90% and 95% confidence intervals for the correlation 
+> # coefficient between the columns of the bigcity data
+> 
+> abc.ci(bigcity, corr, conf=c(0.90,0.95))
+     conf                    
+[1,] 0.90 0.9581503 0.9917271
+[2,] 0.95 0.9493699 0.9930713
+> 
+> # A 95% confidence interval for the difference between the means of
+> # the last two samples in gravity
+> mean.diff <- function(y, w)
++ {    gp1 <- 1:table(as.numeric(y$series))[1]
++      sum(y[gp1, 1] * w[gp1]) - sum(y[-gp1, 1] * w[-gp1])
++ }
+> grav1 <- gravity[as.numeric(gravity[, 2]) >= 7, ]
+> abc.ci(grav1, mean.diff, strata = grav1$series)
+[1]  0.9500000 -6.7075791 -0.3939377
+> 
+> 
+> 
+> cleanEx()
+> nameEx("boot")
+> ### * boot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: boot
+> ### Title: Bootstrap Resampling
+> ### Aliases: boot boot.return c.boot
+> ### Keywords: nonparametric htest
+> 
+> ### ** Examples
+> 
+> # Usual bootstrap of the ratio of means using the city data
+> ratio <- function(d, w) sum(d$x * w)/sum(d$u * w)
+> boot(city, ratio, R = 999, stype = "w")
+
+ORDINARY NONPARAMETRIC BOOTSTRAP
+
+
+Call:
+boot(data = city, statistic = ratio, R = 999, stype = "w")
+
+
+Bootstrap Statistics :
+    original     bias    std. error
+t1* 1.520313 0.03959996   0.2167146
+> 
+> 
+> # Stratified resampling for the difference of means.  In this
+> # example we will look at the difference of means between the final
+> # two series in the gravity data.
+> diff.means <- function(d, f)
++ {    n <- nrow(d)
++      gp1 <- 1:table(as.numeric(d$series))[1]
++      m1 <- sum(d[gp1,1] * f[gp1])/sum(f[gp1])
++      m2 <- sum(d[-gp1,1] * f[-gp1])/sum(f[-gp1])
++      ss1 <- sum(d[gp1,1]^2 * f[gp1]) - (m1 *  m1 * sum(f[gp1]))
++      ss2 <- sum(d[-gp1,1]^2 * f[-gp1]) - (m2 *  m2 * sum(f[-gp1]))
++      c(m1 - m2, (ss1 + ss2)/(sum(f) - 2))
++ }
+> grav1 <- gravity[as.numeric(gravity[,2]) >= 7,]
+> boot(grav1, diff.means, R = 999, stype = "f", strata = grav1[,2])
+
+STRATIFIED BOOTSTRAP
+
+
+Call:
+boot(data = grav1, statistic = diff.means, R = 999, stype = "f", 
+    strata = grav1[, 2])
+
+
+Bootstrap Statistics :
+     original       bias    std. error
+t1* -2.846154  0.002541003    1.546664
+t2* 16.846154 -1.457662791    6.759103
+> 
+> # In this example we show the use of boot in a prediction from
+> # regression based on the nuclear data.  This example is taken
+> # from Example 6.8 of Davison and Hinkley (1997).  Notice also
+> # that two extra arguments to 'statistic' are passed through boot.
+> nuke <- nuclear[, c(1, 2, 5, 7, 8, 10, 11)]
+> nuke.lm <- glm(log(cost) ~ date+log(cap)+ne+ct+log(cum.n)+pt, data = nuke)
+> nuke.diag <- glm.diag(nuke.lm)
+> nuke.res <- nuke.diag$res * nuke.diag$sd
+> nuke.res <- nuke.res - mean(nuke.res)
+> 
+> # We set up a new data frame with the data, the standardized 
+> # residuals and the fitted values for use in the bootstrap.
+> nuke.data <- data.frame(nuke, resid = nuke.res, fit = fitted(nuke.lm))
+> 
+> # Now we want a prediction of plant number 32 but at date 73.00
+> new.data <- data.frame(cost = 1, date = 73.00, cap = 886, ne = 0,
++                        ct = 0, cum.n = 11, pt = 1)
+> new.fit <- predict(nuke.lm, new.data)
+> 
+> nuke.fun <- function(dat, inds, i.pred, fit.pred, x.pred)
++ {
++      lm.b <- glm(fit+resid[inds] ~ date+log(cap)+ne+ct+log(cum.n)+pt,
++                  data = dat)
++      pred.b <- predict(lm.b, x.pred)
++      c(coef(lm.b), pred.b - (fit.pred + dat$resid[i.pred]))
++ }
+> 
+> nuke.boot <- boot(nuke.data, nuke.fun, R = 999, m = 1, 
++                   fit.pred = new.fit, x.pred = new.data)
+> # The bootstrap prediction squared error would then be found by
+> mean(nuke.boot$t[, 8]^2)
+[1] 0.08815734
+> # Basic bootstrap prediction limits would be
+> new.fit - sort(nuke.boot$t[, 8])[c(975, 25)]
+[1] 6.160255 7.298819
+> 
+> 
+> # Finally a parametric bootstrap.  For this example we shall look 
+> # at the air-conditioning data.  In this example our aim is to test 
+> # the hypothesis that the true value of the index is 1 (i.e. that 
+> # the data come from an exponential distribution) against the 
+> # alternative that the data come from a gamma distribution with
+> # index not equal to 1.
+> air.fun <- function(data) {
++      ybar <- mean(data$hours)
++      para <- c(log(ybar), mean(log(data$hours)))
++      ll <- function(k) {
++           if (k <= 0) 1e200 else lgamma(k)-k*(log(k)-1-para[1]+para[2])
++      }
++      khat <- nlm(ll, ybar^2/var(data$hours))$estimate
++      c(ybar, khat)
++ }
+> 
+> air.rg <- function(data, mle) {
++     # Function to generate random exponential variates.
++     # mle will contain the mean of the original data
++     out <- data
++     out$hours <- rexp(nrow(out), 1/mle)
++     out
++ }
+> 
+> air.boot <- boot(aircondit, air.fun, R = 999, sim = "parametric",
++                  ran.gen = air.rg, mle = mean(aircondit$hours))
+> 
+> # The bootstrap p-value can then be approximated by
+> sum(abs(air.boot$t[,2]-1) > abs(air.boot$t0[2]-1))/(1+air.boot$R)
+[1] 0.461
+> 
+> 
+> 
+> cleanEx()
+> nameEx("boot.array")
+> ### * boot.array
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: boot.array
+> ### Title: Bootstrap Resampling Arrays
+> ### Aliases: boot.array
+> ### Keywords: nonparametric
+> 
+> ### ** Examples
+> 
+> #  A frequency array for a nonparametric bootstrap
+> city.boot <- boot(city, corr, R = 40, stype = "w")
+> boot.array(city.boot)
+      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
+ [1,]    1    1    3    1    1    0    1    0    1     1
+ [2,]    0    0    1    3    1    2    1    1    1     0
+ [3,]    0    0    0    1    3    2    0    1    2     1
+ [4,]    0    2    2    2    0    1    0    1    0     2
+ [5,]    1    1    1    0    1    2    0    2    2     0
+ [6,]    0    1    2    0    2    1    0    1    2     1
+ [7,]    3    0    0    1    1    2    0    1    1     1
+ [8,]    0    4    1    1    1    0    1    2    0     0
+ [9,]    0    1    4    0    1    0    2    2    0     0
+[10,]    1    1    1    1    1    1    1    2    0     1
+[11,]    0    0    3    0    2    1    1    1    0     2
+[12,]    2    3    1    0    0    1    0    0    2     1
+[13,]    1    0    0    1    2    0    2    1    1     2
+[14,]    0    0    2    3    0    0    2    0    2     1
+[15,]    2    0    1    1    1    1    0    2    1     1
+[16,]    1    1    0    2    2    1    1    1    1     0
+[17,]    1    0    1    2    2    1    2    1    0     0
+[18,]    0    2    0    0    2    2    0    1    1     2
+[19,]    1    1    0    2    0    1    2    0    1     2
+[20,]    0    0    0    1    2    1    1    1    0     4
+[21,]    0    0    2    0    1    1    3    0    0     3
+[22,]    1    3    2    2    0    1    1    0    0     0
+[23,]    0    0    3    1    2    1    2    0    1     0
+[24,]    0    1    1    2    1    2    0    1    0     2
+[25,]    0    0    2    1    0    0    3    2    1     1
+[26,]    0    2    4    1    1    1    0    0    0     1
+[27,]    2    3    1    0    2    0    0    2    0     0
+[28,]    1    1    0    1    1    0    0    4    2     0
+[29,]    2    2    0    1    1    0    1    0    1     2
+[30,]    0    1    0    1    1    2    0    1    3     1
+[31,]    1    2    0    2    2    0    1    1    0     1
+[32,]    1    4    0    1    0    2    0    1    1     0
+[33,]    0    1    0    5    1    0    0    1    1     1
+[34,]    0    2    0    1    3    1    1    1    0     1
+[35,]    0    2    3    1    1    1    0    0    1     1
+[36,]    1    2    1    1    1    1    2    0    1     0
+[37,]    1    1    1    0    0    1    2    2    2     0
+[38,]    2    3    0    3    0    1    0    0    1     0
+[39,]    0    0    1    2    3    0    0    2    1     1
+[40,]    0    1    1    0    3    0    2    2    0     1
+> 
+> perm.cor <- function(d,i) cor(d$x,d$u[i])
+> city.perm <- boot(city, perm.cor, R = 40, sim = "permutation")
+> boot.array(city.perm, indices = TRUE)
+      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
+ [1,]    7    2    8   10    6    4    9    3    1     5
+ [2,]   10    4    6    8    5    3    2    1    9     7
+ [3,]    5   10    6    2    3    8    1    9    7     4
+ [4,]   10    1    4    8    9    5    3    6    7     2
+ [5,]    1    3    5    8    2    9    6    7   10     4
+ [6,]   10    4    3    2    1    9    8    5    7     6
+ [7,]    2    5    1    4   10    9    3    8    7     6
+ [8,]    5    9    6    3    1    2    4   10    8     7
+ [9,]    8    2    7   10    4    3    1    6    9     5
+[10,]    1    9    3    2    8    6    7    4    5    10
+[11,]    6    7   10    5    3    9    2    8    4     1
+[12,]    9    5    1    6   10    8    3    2    7     4
+[13,]    9    7    3    1    8    5    4    6    2    10
+[14,]    7    1    3    2    9    6   10    4    5     8
+[15,]    4    9    6    3    2    1   10    8    7     5
+[16,]    9    6    1    7    5    2    8    4   10     3
+[17,]    7    2    3    6   10    4    1    9    5     8
+[18,]    2    4    3    1    5    8    6   10    9     7
+[19,]    4    9    6    1   10    3    7    2    5     8
+[20,]    6    3    7    5    8    4    2   10    1     9
+[21,]    9   10    2    6    7    5    8    4    3     1
+[22,]   10    4    5    9    8    3    1    2    6     7
+[23,]    9    2    5    1   10    4    6    8    7     3
+[24,]    9    4    3    6    8    2    1   10    5     7
+[25,]   10    3    8    2    5    7    1    9    6     4
+[26,]    7    8    3    9    4    1    5    2   10     6
+[27,]    4    8    1    5    3    6   10    9    7     2
+[28,]    8    5    7    4   10    3    2    1    9     6
+[29,]    8   10    2    4    7    3    9    6    1     5
+[30,]    1    5    7    9    3    6    4   10    2     8
+[31,]   10    9    7    5    4    1    2    6    3     8
+[32,]    8    5    1    6    3    7   10    4    9     2
+[33,]    1    6    8    5    2    7    9    4   10     3
+[34,]    8    5    7    1    9    2    6    3   10     4
+[35,]    4    5    9    2    7    6    8    3    1    10
+[36,]    5    9   10    1    3    7    2    8    4     6
+[37,]    8    2    7    9   10    1    3    4    6     5
+[38,]    5    8    1    7    4    3    9   10    6     2
+[39,]   10    7    6    4    8    1    3    5    9     2
+[40,]    2    1    8    3    4    6    9   10    7     5
+> 
+> 
+> 
+> cleanEx()
+> nameEx("boot.ci")
+> ### * boot.ci
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: boot.ci
+> ### Title: Nonparametric Bootstrap Confidence Intervals
+> ### Aliases: boot.ci
+> ### Keywords: nonparametric htest
+> 
+> ### ** Examples
+> 
+> # confidence intervals for the city data
+> ratio <- function(d, w) sum(d$x * w)/sum(d$u * w)
+> city.boot <- boot(city, ratio, R = 999, stype = "w", sim = "ordinary")
+> boot.ci(city.boot, conf = c(0.90, 0.95),
++         type = c("norm", "basic", "perc", "bca"))
+BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
+Based on 999 bootstrap replicates
+
+CALL : 
+boot.ci(boot.out = city.boot, conf = c(0.9, 0.95), type = c("norm", 
+    "basic", "perc", "bca"))
+
+Intervals : 
+Level      Normal              Basic         
+90%   ( 1.124,  1.837 )   ( 1.059,  1.740 )   
+95%   ( 1.056,  1.905 )   ( 0.932,  1.799 )  
+
+Level     Percentile            BCa          
+90%   ( 1.301,  1.982 )   ( 1.301,  1.984 )   
+95%   ( 1.242,  2.109 )   ( 1.243,  2.110 )  
+Calculations and Intervals on Original Scale
+> 
+> # studentized confidence interval for the two sample 
+> # difference of means problem using the final two series
+> # of the gravity data. 
+> diff.means <- function(d, f)
++ {    n <- nrow(d)
++      gp1 <- 1:table(as.numeric(d$series))[1]
++      m1 <- sum(d[gp1,1] * f[gp1])/sum(f[gp1])
++      m2 <- sum(d[-gp1,1] * f[-gp1])/sum(f[-gp1])
++      ss1 <- sum(d[gp1,1]^2 * f[gp1]) - (m1 *  m1 * sum(f[gp1]))
++      ss2 <- sum(d[-gp1,1]^2 * f[-gp1]) - (m2 *  m2 * sum(f[-gp1]))
++      c(m1 - m2, (ss1 + ss2)/(sum(f) - 2))
++ }
+> grav1 <- gravity[as.numeric(gravity[,2]) >= 7, ]
+> grav1.boot <- boot(grav1, diff.means, R = 999, stype = "f",
++                    strata = grav1[ ,2])
+> boot.ci(grav1.boot, type = c("stud", "norm"))
+BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
+Based on 999 bootstrap replicates
+
+CALL : 
+boot.ci(boot.out = grav1.boot, type = c("stud", "norm"))
+
+Intervals : 
+Level      Normal            Studentized     
+95%   (-5.880,  0.183 )   (-7.059, -0.101 )  
+Calculations and Intervals on Original Scale
+> 
+> # Nonparametric confidence intervals for mean failure time 
+> # of the air-conditioning data as in Example 5.4 of Davison
+> # and Hinkley (1997)
+> mean.fun <- function(d, i) 
++ {    m <- mean(d$hours[i])
++      n <- length(i)
++      v <- (n-1)*var(d$hours[i])/n^2
++      c(m, v)
++ }
+> air.boot <- boot(aircondit, mean.fun, R = 999)
+> boot.ci(air.boot, type = c("norm", "basic", "perc", "stud"))
+BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
+Based on 999 bootstrap replicates
+
+CALL : 
+boot.ci(boot.out = air.boot, type = c("norm", "basic", "perc", 
+    "stud"))
+
+Intervals : 
+Level      Normal              Basic         
+95%   ( 35.5, 181.9 )   ( 26.0, 170.6 )  
+
+Level    Studentized          Percentile     
+95%   ( 47.9, 294.5 )   ( 45.6, 190.2 )  
+Calculations and Intervals on Original Scale
+> 
+> # Now using the log transformation
+> # There are two ways of doing this and they both give the
+> # same intervals.
+> 
+> # Method 1
+> boot.ci(air.boot, type = c("norm", "basic", "perc", "stud"), 
++         h = log, hdot = function(x) 1/x)
+BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
+Based on 999 bootstrap replicates
+
+CALL : 
+boot.ci(boot.out = air.boot, type = c("norm", "basic", "perc", 
+    "stud"), h = log, hdot = function(x) 1/x)
+
+Intervals : 
+Level      Normal              Basic         
+95%   ( 4.035,  5.469 )   ( 4.118,  5.546 )  
+
+Level    Studentized          Percentile     
+95%   ( 3.959,  5.808 )   ( 3.820,  5.248 )  
+Calculations and Intervals on  Transformed Scale
+> 
+> # Method 2
+> vt0 <- air.boot$t0[2]/air.boot$t0[1]^2
+> vt <- air.boot$t[, 2]/air.boot$t[ ,1]^2
+> boot.ci(air.boot, type = c("norm", "basic", "perc", "stud"), 
++         t0 = log(air.boot$t0[1]), t = log(air.boot$t[,1]),
++         var.t0 = vt0, var.t = vt)
+BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
+Based on 999 bootstrap replicates
+
+CALL : 
+boot.ci(boot.out = air.boot, type = c("norm", "basic", "perc", 
+    "stud"), var.t0 = vt0, var.t = vt, t0 = log(air.boot$t0[1]), 
+    t = log(air.boot$t[, 1]))
+
+Intervals : 
+Level      Normal              Basic         
+95%   ( 4.069,  5.435 )   ( 4.118,  5.546 )  
+
+Level    Studentized          Percentile     
+95%   ( 3.959,  5.808 )   ( 3.820,  5.248 )  
+Calculations and Intervals on Original Scale
+> 
+> 
+> 
+> cleanEx()
+> nameEx("censboot")
+> ### * censboot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: censboot
+> ### Title: Bootstrap for Censored Data
+> ### Aliases: censboot cens.return
+> ### Keywords: survival
+> 
+> ### ** Examples
+> 
+> library(survival)
+Loading required package: splines
+
+Attaching package: âsurvivalâ
+
+The following object(s) are masked from âpackage:bootâ:
+
+    aml
+
+> # Example 3.9 of Davison and Hinkley (1997) does a bootstrap on some
+> # remission times for patients with a type of leukaemia.  The patients
+> # were divided into those who received maintenance chemotherapy and 
+> # those who did not.  Here we are interested in the median remission 
+> # time for the two groups.
+> data(aml, package = "boot") # not the version in survival.
+> aml.fun <- function(data) {
++      surv <- survfit(Surv(time, cens) ~ group, data = data)
++      out <- NULL
++      st <- 1
++      for (s in 1:length(surv$strata)) {
++           inds <- st:(st + surv$strata[s]-1)
++           md <- min(surv$time[inds[1-surv$surv[inds] >= 0.5]])
++           st <- st + surv$strata[s]
++           out <- c(out, md)
++      }
++      out
++ }
+> aml.case <- censboot(aml, aml.fun, R = 499, strata = aml$group)
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+> 
+> # Now we will look at the same statistic using the conditional 
+> # bootstrap and the weird bootstrap.  For the conditional bootstrap 
+> # the survival distribution is stratified but the censoring 
+> # distribution is not. 
+> 
+> aml.s1 <- survfit(Surv(time, cens) ~ group, data = aml)
+> aml.s2 <- survfit(Surv(time-0.001*cens, 1-cens) ~ 1, data = aml)
+> aml.cond <- censboot(aml, aml.fun, R = 499, strata = aml$group,
++      F.surv = aml.s1, G.surv = aml.s2, sim = "cond")
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+> 
+> 
+> # For the weird bootstrap we must redefine our function slightly since
+> # the data will not contain the group number.
+> aml.fun1 <- function(data, str) {
++      surv <- survfit(Surv(data[, 1], data[, 2]) ~ str)
++      out <- NULL
++      st <- 1
++      for (s in 1:length(surv$strata)) {
++           inds <- st:(st + surv$strata[s] - 1)
++           md <- min(surv$time[inds[1-surv$surv[inds] >= 0.5]])
++           st <- st + surv$strata[s]
++           out <- c(out, md)
++      }
++      out
++ }
+> aml.wei <- censboot(cbind(aml$time, aml$cens), aml.fun1, R = 499,
++      strata = aml$group,  F.surv = aml.s1, sim = "weird")
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+Warning in min(surv$time[inds[1 - surv$surv[inds] >= 0.5]]) :
+  no non-missing arguments to min; returning Inf
+> 
+> # Now for an example where a cox regression model has been fitted
+> # the data we will look at the melanoma data of Example 7.6 from 
+> # Davison and Hinkley (1997).  The fitted model assumes that there
+> # is a different survival distribution for the ulcerated and 
+> # non-ulcerated groups but that the thickness of the tumour has a
+> # common effect.  We will also assume that the censoring distribution
+> # is different in different age groups.  The statistic of interest
+> # is the linear predictor.  This is returned as the values at a
+> # number of equally spaced points in the range of interest.
+> data(melanoma, package = "boot")
+> library(splines)# for ns
+> mel.cox <- coxph(Surv(time, status == 1) ~ ns(thickness, df=4) + strata(ulcer),
++                  data = melanoma)
+> mel.surv <- survfit(mel.cox)
+> agec <- cut(melanoma$age, c(0, 39, 49, 59, 69, 100))
+> mel.cens <- survfit(Surv(time - 0.001*(status == 1), status != 1) ~
++                     strata(agec), data = melanoma)
+> mel.fun <- function(d) { 
++      t1 <- ns(d$thickness, df=4)
++      cox <- coxph(Surv(d$time, d$status == 1) ~ t1+strata(d$ulcer))
++      ind <- !duplicated(d$thickness)
++      u <- d$thickness[!ind]
++      eta <- cox$linear.predictors[!ind]
++      sp <- smooth.spline(u, eta, df=20)
++      th <- seq(from = 0.25, to = 10, by = 0.25)
++      predict(sp, th)$y
++ }
+> mel.str <- cbind(melanoma$ulcer, agec)
+> 
+> # this is slow!
+> mel.mod <- censboot(melanoma, mel.fun, R = 499, F.surv = mel.surv,
++      G.surv = mel.cens, cox = mel.cox, strata = mel.str, sim = "model")
+> # To plot the original predictor and a 95% pointwise envelope for it
+> mel.env <- envelope(mel.mod)$point
+> th <- seq(0.25, 10, by = 0.25)
+> plot(th, mel.env[1, ],  ylim = c(-2, 2),
++      xlab = "thickness (mm)", ylab = "linear predictor", type = "n")
+> lines(th, mel.mod$t0, lty = 1)
+> matlines(th, t(mel.env), lty = 2)
+> 
+> 
+> 
+> cleanEx()
+
+detaching âpackage:survivalâ, âpackage:splinesâ
+
+> nameEx("control")
+> ### * control
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: control
+> ### Title: Control Variate Calculations
+> ### Aliases: control
+> ### Keywords: nonparametric
+> 
+> ### ** Examples
+> 
+> # Use of control variates for the variance of the air-conditioning data
+> mean.fun <- function(d, i)
++ {    m <- mean(d$hours[i])
++      n <- nrow(d)
++      v <- (n-1)*var(d$hours[i])/n^2
++      c(m, v)
++ }
+> air.boot <- boot(aircondit, mean.fun, R = 999)
+> control(air.boot, index = 2, bias.adj = TRUE)
+[1] -6.298101
+> air.cont <- control(air.boot, index = 2)
+> # Now let us try the variance on the log scale.
+> air.cont1 <- control(air.boot, t0 = log(air.boot$t0[2]),
++                      t = log(air.boot$t[, 2]))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cv.glm")
+> ### * cv.glm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cv.glm
+> ### Title: Cross-validation for Generalized Linear Models
+> ### Aliases: cv.glm
+> ### Keywords: regression
+> 
+> ### ** Examples
+> 
+> # leave-one-out and 6-fold cross-validation prediction error for 
+> # the mammals data set.
+> data(mammals, package="MASS")
+> mammals.glm <- glm(log(brain) ~ log(body), data = mammals)
+> (cv.err <- cv.glm(mammals, mammals.glm)$delta)
+[1] 0.4918650 0.4916571
+> (cv.err.6 <- cv.glm(mammals, mammals.glm, K = 6)$delta)
+[1] 0.4851491 0.4834641
+> 
+> # As this is a linear model we could calculate the leave-one-out 
+> # cross-validation estimate without any extra model-fitting.
+> muhat <- fitted(mammals.glm)
+> mammals.diag <- glm.diag(mammals.glm)
+> (cv.err <- mean((mammals.glm$y - muhat)^2/(1 - mammals.diag$h)^2))
+[1] 0.491865
+> 
+> 
+> # leave-one-out and 11-fold cross-validation prediction error for 
+> # the nodal data set.  Since the response is a binary variable an
+> # appropriate cost function is
+> cost <- function(r, pi = 0) mean(abs(r-pi) > 0.5)
+> 
+> nodal.glm <- glm(r ~ stage+xray+acid, binomial, data = nodal)
+> (cv.err <- cv.glm(nodal, nodal.glm, cost, K = nrow(nodal))$delta)
+[1] 0.1886792 0.1886792
+> (cv.11.err <- cv.glm(nodal, nodal.glm, cost, K = 11)$delta)
+[1] 0.2264151 0.2217871
+> 
+> 
+> 
+> cleanEx()
+> nameEx("empinf")
+> ### * empinf
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: empinf
+> ### Title: Empirical Influence Values
+> ### Aliases: empinf
+> ### Keywords: nonparametric math
+> 
+> ### ** Examples
+> 
+> # The empirical influence values for the ratio of means in
+> # the city data.
+> ratio <- function(d, w) sum(d$x *w)/sum(d$u*w)
+> empinf(data = city, statistic = ratio)
+ [1] -1.04367815 -0.58417763 -0.37092459 -0.18958996  0.03164142  0.10544878
+ [7]  0.09236345  0.20365074  1.02178280  0.73381132
+> city.boot <- boot(city, ratio, 499, stype="w")
+> empinf(boot.out = city.boot, type = "reg")
+          1           1           1           1           1           1 
+-1.13619987 -0.69728210 -0.45301061 -0.27615882  0.02108999  0.14896336 
+          1           1           1           1 
+ 0.09746429  0.20622340  1.18798956  0.90092079 
+> 
+> # A statistic that may be of interest in the difference of means
+> # problem is the t-statistic for testing equality of means.  In
+> # the bootstrap we get replicates of the difference of means and
+> # the variance of that statistic and then want to use this output
+> # to get the empirical influence values of the t-statistic.
+> grav1 <- gravity[as.numeric(gravity[,2]) >= 7,]
+> grav.fun <- function(dat, w) {
++      strata <- tapply(dat[, 2], as.numeric(dat[, 2]))
++      d <- dat[, 1]
++      ns <- tabulate(strata)
++      w <- w/tapply(w, strata, sum)[strata]
++      mns <- as.vector(tapply(d * w, strata, sum)) # drop names
++      mn2 <- tapply(d * d * w, strata, sum)
++      s2hat <- sum((mn2 - mns^2)/ns)
++      c(mns[2] - mns[1], s2hat)
++ }
+> 
+> grav.boot <- boot(grav1, grav.fun, R = 499, stype = "w",
++                   strata = grav1[, 2])
+> 
+> # Since the statistic of interest is a function of the bootstrap
+> # statistics, we must calculate the bootstrap replicates and pass
+> # them to empinf using the t argument.
+> grav.z <- (grav.boot$t[,1]-grav.boot$t0[1])/sqrt(grav.boot$t[,2])
+> empinf(boot.out = grav.boot, t = grav.z)
+         1          1          1          1          1          1          1 
+-2.9326019 -1.3760327 -2.4400720 -1.2175846  0.2795352 -0.8258764 -0.8156286 
+         1          1          1          1          1          1          2 
+-0.5573332 -1.1275252 -3.1603140  1.2840693  3.5434781  9.3458860  2.6692589 
+         2          2          2          2          2          2          2 
+ 4.4496570  3.6948000  0.9929002 -3.0100985 -3.2237464 -2.5493305 -0.6551745 
+         2          2          2          2          2 
+ 1.9065308  0.4980530 -1.6219628 -1.6980508 -1.4528364 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("envelope")
+> ### * envelope
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: envelope
+> ### Title: Confidence Envelopes for Curves
+> ### Aliases: envelope
+> ### Keywords: dplot htest
+> 
+> ### ** Examples
+> 
+> # Testing whether the final series of measurements of the gravity data
+> # may come from a normal distribution.  This is done in Examples 4.7 
+> # and 4.8 of Davison and Hinkley (1997).
+> grav1 <- gravity$g[gravity$series == 8]
+> grav.z <- (grav1 - mean(grav1))/sqrt(var(grav1))
+> grav.gen <- function(dat, mle) rnorm(length(dat))
+> grav.qqboot <- boot(grav.z, sort, R = 999, sim = "parametric",
++                     ran.gen = grav.gen)
+> grav.qq <- qqnorm(grav.z, plot.it = FALSE)
+> grav.qq <- lapply(grav.qq, sort)
+> plot(grav.qq, ylim = c(-3.5, 3.5), ylab = "Studentized Order Statistics",
++      xlab = "Normal Quantiles")
+> grav.env <- envelope(grav.qqboot, level = 0.9)
+> lines(grav.qq$x, grav.env$point[1, ], lty = 4)
+> lines(grav.qq$x, grav.env$point[2, ], lty = 4)
+> lines(grav.qq$x, grav.env$overall[1, ], lty = 1)
+> lines(grav.qq$x, grav.env$overall[2, ], lty = 1)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("exp.tilt")
+> ### * exp.tilt
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: exp.tilt
+> ### Title: Exponential Tilting
+> ### Aliases: exp.tilt
+> ### Keywords: nonparametric smooth
+> 
+> ### ** Examples
+> 
+> # Example 9.8 of Davison and Hinkley (1997) requires tilting the resampling
+> # distribution of the studentized statistic to be centred at the observed
+> # value of the test statistic 1.84.  This can be achieved as follows.
+> grav1 <- gravity[as.numeric(gravity[,2]) >=7 , ]
+> grav.fun <- function(dat, w, orig) {
++      strata <- tapply(dat[, 2], as.numeric(dat[, 2]))
++      d <- dat[, 1]
++      ns <- tabulate(strata)
++      w <- w/tapply(w, strata, sum)[strata]
++      mns <- as.vector(tapply(d * w, strata, sum)) # drop names
++      mn2 <- tapply(d * d * w, strata, sum)
++      s2hat <- sum((mn2 - mns^2)/ns)
++      c(mns[2]-mns[1], s2hat, (mns[2]-mns[1]-orig)/sqrt(s2hat))
++ }
+> grav.z0 <- grav.fun(grav1, rep(1, 26), 0)
+> grav.L <- empinf(data = grav1, statistic = grav.fun, stype = "w", 
++                  strata = grav1[,2], index = 3, orig = grav.z0[1])
+> grav.tilt <- exp.tilt(grav.L, grav.z0[3], strata = grav1[,2])
+> boot(grav1, grav.fun, R = 499, stype = "w", weights = grav.tilt$p,
++      strata = grav1[,2], orig = grav.z0[1])
+
+STRATIFIED WEIGHTED BOOTSTRAP
+
+
+Call:
+boot(data = grav1, statistic = grav.fun, R = 499, stype = "w", 
+    strata = grav1[, 2], weights = grav.tilt$p, orig = grav.z0[1])
+
+
+Bootstrap Statistics :
+    original     bias    std. error  mean(t*)
+t1* 2.846154 -0.3661063    1.705171  5.702944
+t2* 2.392353 -0.3538294    1.002889  3.444050
+t3* 0.000000 -0.5160619    1.314298  1.473456
+> 
+> 
+> 
+> cleanEx()
+> nameEx("glm.diag.plots")
+> ### * glm.diag.plots
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: glm.diag.plots
+> ### Title: Diagnostics plots for generalized linear models
+> ### Aliases: glm.diag.plots
+> ### Keywords: regression dplot hplot
+> 
+> ### ** Examples
+> 
+> # In this example we look at the leukaemia data which was looked at in 
+> # Example 7.1 of Davison and Hinkley (1997)
+> data(leuk, package = "MASS")
+> leuk.mod <- glm(time ~ ag-1+log10(wbc), family = Gamma(log), data = leuk)
+> leuk.diag <- glm.diag(leuk.mod)
+> glm.diag.plots(leuk.mod, leuk.diag)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("jack.after.boot")
+> ### * jack.after.boot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: jack.after.boot
+> ### Title: Jackknife-after-Bootstrap Plots
+> ### Aliases: jack.after.boot
+> ### Keywords: hplot nonparametric
+> 
+> ### ** Examples
+> 
+> #  To draw the jackknife-after-bootstrap plot for the head size data as in
+> #  Example 3.24 of Davison and Hinkley (1997)
+> frets.fun <- function(data, i) {
++     pcorr <- function(x) { 
++     #  Function to find the correlations and partial correlations between
++     #  the four measurements.
++          v <- cor(x)
++          v.d <- diag(var(x))
++          iv <- solve(v)
++          iv.d <- sqrt(diag(iv))
++          iv <- - diag(1/iv.d) %*% iv %*% diag(1/iv.d)
++          q <- NULL
++          n <- nrow(v)
++          for (i in 1:(n-1)) 
++               q <- rbind( q, c(v[i, 1:i], iv[i,(i+1):n]) )
++          q <- rbind( q, v[n, ] )
++          diag(q) <- round(diag(q))
++          q
++     }
++     d <- data[i, ]
++     v <- pcorr(d)
++     c(v[1,], v[2,], v[3,], v[4,])
++ }
+> frets.boot <- boot(log(as.matrix(frets)), frets.fun, R = 999)
+> #  we will concentrate on the partial correlation between head breadth
+> #  for the first son and head length for the second.  This is the 7th
+> #  element in the output of frets.fun so we set index = 7
+> jack.after.boot(frets.boot, useJ = FALSE, stinf = FALSE, index = 7)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("k3.linear")
+> ### * k3.linear
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: k3.linear
+> ### Title: Linear Skewness Estimate
+> ### Aliases: k3.linear
+> ### Keywords: nonparametric
+> 
+> ### ** Examples
+> 
+> #  To estimate the skewness of the ratio of means for the city data.
+> ratio <- function(d, w) sum(d$x * w)/sum(d$u * w)
+> k3.linear(empinf(data = city, statistic = ratio))
+[1] 7.831452e-05
+> 
+> 
+> 
+> cleanEx()
+> nameEx("linear.approx")
+> ### * linear.approx
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: linear.approx
+> ### Title: Linear Approximation of Bootstrap Replicates
+> ### Aliases: linear.approx
+> ### Keywords: nonparametric
+> 
+> ### ** Examples
+> 
+> # Using the city data let us look at the linear approximation to the 
+> # ratio statistic and its logarithm. We compare these with the 
+> # corresponding plots for the bigcity data 
+> 
+> ratio <- function(d, w) sum(d$x * w)/sum(d$u * w)
+> city.boot <- boot(city, ratio, R = 499, stype = "w")
+> bigcity.boot <- boot(bigcity, ratio, R = 499, stype = "w")
+> op <- par(pty = "s", mfrow = c(2, 2))
+> 
+> # The first plot is for the city data ratio statistic.
+> city.lin1 <- linear.approx(city.boot)
+> lim <- range(c(city.boot$t,city.lin1))
+> plot(city.boot$t, city.lin1, xlim = lim, ylim = lim, 
++      main = "Ratio; n=10", xlab = "t*", ylab = "tL*")
+> abline(0, 1)
+> 
+> # Now for the log of the ratio statistic for the city data.
+> city.lin2 <- linear.approx(city.boot,t0 = log(city.boot$t0), 
++                            t = log(city.boot$t))
+> lim <- range(c(log(city.boot$t),city.lin2))
+> plot(log(city.boot$t), city.lin2, xlim = lim, ylim = lim, 
++      main = "Log(Ratio); n=10", xlab = "t*", ylab = "tL*")
+> abline(0, 1)
+> 
+> # The ratio statistic for the bigcity data.
+> bigcity.lin1 <- linear.approx(bigcity.boot)
+> lim <- range(c(bigcity.boot$t,bigcity.lin1))
+> plot(bigcity.lin1, bigcity.boot$t, xlim = lim, ylim = lim,
++      main = "Ratio; n=49", xlab = "t*", ylab = "tL*")
+> abline(0, 1)
+> 
+> # Finally the log of the ratio statistic for the bigcity data.
+> bigcity.lin2 <- linear.approx(bigcity.boot,t0 = log(bigcity.boot$t0), 
++                               t = log(bigcity.boot$t))
+> lim <- range(c(log(bigcity.boot$t),bigcity.lin2))
+> plot(bigcity.lin2, log(bigcity.boot$t), xlim = lim, ylim = lim,
++      main = "Log(Ratio); n=49", xlab = "t*", ylab = "tL*")
+> abline(0, 1)
+> 
+> par(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("lines.saddle.distn")
+> ### * lines.saddle.distn
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lines.saddle.distn
+> ### Title: Add a Saddlepoint Approximation to a Plot
+> ### Aliases: lines.saddle.distn
+> ### Keywords: aplot smooth nonparametric
+> 
+> ### ** Examples
+> 
+> # In this example we show how a plot such as that in Figure 9.9 of
+> # Davison and Hinkley (1997) may be produced.  Note the large number of
+> # bootstrap replicates required in this example.
+> expdata <- rexp(12)
+> vfun <- function(d, i) {
++      n <- length(d)
++      (n-1)/n*var(d[i])
++ }
+> exp.boot <- boot(expdata,vfun, R = 9999)
+> exp.L <- (expdata - mean(expdata))^2 - exp.boot$t0
+> exp.tL <- linear.approx(exp.boot, L = exp.L)
+> hist(exp.tL, nclass = 50, probability = TRUE)
+> exp.t0 <- c(0, sqrt(var(exp.boot$t)))
+> exp.sp <- saddle.distn(A = exp.L/12,wdist = "m", t0 = exp.t0)
+> 
+> # The saddlepoint approximation in this case is to the density of
+> # t-t0 and so t0 must be added for the plot.
+> lines(exp.sp, h = function(u, t0) u+t0, J = function(u, t0) 1,
++       t0 = exp.boot$t0)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("norm.ci")
+> ### * norm.ci
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: norm.ci
+> ### Title: Normal Approximation Confidence Intervals
+> ### Aliases: norm.ci
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> #  In Example 5.1 of Davison and Hinkley (1997), normal approximation 
+> #  confidence intervals are found for the air-conditioning data.
+> air.mean <- mean(aircondit$hours)
+> air.n <- nrow(aircondit)
+> air.v <- air.mean^2/air.n
+> norm.ci(t0 = air.mean, var.t0 = air.v)
+     conf                  
+[1,] 0.95 46.93055 169.2361
+> exp(norm.ci(t0 = log(air.mean), var.t0 = 1/air.n)[2:3])
+[1]  61.38157 190.31782
+> 
+> # Now a more complicated example - the ratio estimate for the city data.
+> ratio <- function(d, w)
++      sum(d$x * w)/sum(d$u *w)
+> city.v <- var.linear(empinf(data = city, statistic = ratio))
+> norm.ci(t0 = ratio(city,rep(0.1,10)), var.t0 = city.v)
+     conf                  
+[1,] 0.95 1.167046 1.873579
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plot.boot")
+> ### * plot.boot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.boot
+> ### Title: Plots of the Output of a Bootstrap Simulation
+> ### Aliases: plot.boot
+> ### Keywords: hplot nonparametric
+> 
+> ### ** Examples
+> 
+> # We fit an exponential model to the air-conditioning data and use
+> # that for a parametric bootstrap.  Then we look at plots of the
+> # resampled means.
+> air.rg <- function(data, mle) rexp(length(data), 1/mle)
+> 
+> air.boot <- boot(aircondit$hours, mean, R = 999, sim = "parametric",
++                  ran.gen = air.rg, mle = mean(aircondit$hours))
+> plot(air.boot)
+> 
+> # In the difference of means example for the last two series of the 
+> # gravity data
+> grav1 <- gravity[as.numeric(gravity[, 2]) >= 7, ]
+> grav.fun <- function(dat, w) {
++      strata <- tapply(dat[, 2], as.numeric(dat[, 2]))
++      d <- dat[, 1]
++      ns <- tabulate(strata)
++      w <- w/tapply(w, strata, sum)[strata]
++      mns <- as.vector(tapply(d * w, strata, sum)) # drop names
++      mn2 <- tapply(d * d * w, strata, sum)
++      s2hat <- sum((mn2 - mns^2)/ns)
++      c(mns[2] - mns[1], s2hat)
++ }
+> 
+> grav.boot <- boot(grav1, grav.fun, R = 499, stype = "w", strata = grav1[, 2])
+> plot(grav.boot)
+> # now suppose we want to look at the studentized differences.
+> grav.z <- (grav.boot$t[, 1]-grav.boot$t0[1])/sqrt(grav.boot$t[, 2])
+> plot(grav.boot, t = grav.z, t0 = 0)
+> 
+> # In this example we look at the one of the partial correlations for the
+> # head dimensions in the dataset frets.
+> frets.fun <- function(data, i) {
++     pcorr <- function(x) { 
++     #  Function to find the correlations and partial correlations between
++     #  the four measurements.
++          v <- cor(x)
++          v.d <- diag(var(x))
++          iv <- solve(v)
++          iv.d <- sqrt(diag(iv))
++          iv <- - diag(1/iv.d) %*% iv %*% diag(1/iv.d)
++          q <- NULL
++          n <- nrow(v)
++          for (i in 1:(n-1)) 
++               q <- rbind( q, c(v[i, 1:i], iv[i,(i+1):n]) )
++          q <- rbind( q, v[n, ] )
++          diag(q) <- round(diag(q))
++          q
++     }
++     d <- data[i, ]
++     v <- pcorr(d)
++     c(v[1,], v[2,], v[3,], v[4,])
++ }
+> frets.boot <- boot(log(as.matrix(frets)),  frets.fun,  R = 999)
+> plot(frets.boot, index = 7, jack = TRUE, stinf = FALSE, useJ = FALSE)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("saddle")
+> ### * saddle
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: saddle
+> ### Title: Saddlepoint Approximations for Bootstrap Statistics
+> ### Aliases: saddle
+> ### Keywords: smooth nonparametric
+> 
+> ### ** Examples
+> 
+> # To evaluate the bootstrap distribution of the mean failure time of 
+> # air-conditioning equipment at 80 hours
+> saddle(A = aircondit$hours/12, u = 80)
+$spa
+       pdf        cdf 
+0.01005866 0.24446677 
+
+$zeta.hat
+[1] -0.02580078
+
+> 
+> # Alternatively this can be done using a conditional poisson
+> saddle(A = cbind(aircondit$hours/12,1), u = c(80, 12),
++        wdist = "p", type = "cond")
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 10.090909
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.909091
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 10.090909
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.909091
+$spa
+       pdf        cdf 
+0.01005943 0.24438736 
+
+$zeta.hat
+         A1          A2 
+-0.02580805  0.89261577 
+
+$zeta2.hat
+[1] 0.6931472
+
+> 
+> # To use the Lugananni-Rice approximation to this
+> saddle(A = cbind(aircondit$hours/12,1), u = c(80, 12),
++        wdist = "p", type = "cond", 
++        LR = TRUE)
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 10.090909
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.909091
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 10.090909
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.909091
+$spa
+       pdf        cdf 
+0.01005943 0.24447362 
+
+$zeta.hat
+         A1          A2 
+-0.02580805  0.89261577 
+
+$zeta2.hat
+[1] 0.6931472
+
+> 
+> # Example 9.16 of Davison and Hinkley (1997) calculates saddlepoint 
+> # approximations to the distribution of the ratio statistic for the
+> # city data. Since the statistic is not in itself a linear combination
+> # of random Variables, its distribution cannot be found directly.  
+> # Instead the statistic is expressed as the solution to a linear 
+> # estimating equation and hence its distribution can be found.  We
+> # get the saddlepoint approximation to the pdf and cdf evaluated at
+> # t = 1.25 as follows.
+> jacobian <- function(dat,t,zeta)
++ {
++      p <- exp(zeta*(dat$x-t*dat$u))
++      abs(sum(dat$u*p)/sum(p))
++ }
+> city.sp1 <- saddle(A = city$x-1.25*city$u, u = 0)
+> city.sp1$spa[1] <- jacobian(city, 1.25, city.sp1$zeta.hat) * city.sp1$spa[1]
+> city.sp1
+$spa
+       pdf        cdf 
+0.05565040 0.02436306 
+
+$zeta.hat
+[1] -0.02435547
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("saddle.distn")
+> ### * saddle.distn
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: saddle.distn
+> ### Title: Saddlepoint Distribution Approximations for Bootstrap Statistics
+> ### Aliases: saddle.distn
+> ### Keywords: nonparametric smooth dplot
+> 
+> ### ** Examples
+> 
+> #  The bootstrap distribution of the mean of the air-conditioning 
+> #  failure data: fails to find value on R (and probably on S too)
+> air.t0 <- c(mean(aircondit$hours), sqrt(var(aircondit$hours)/12))
+> ## Not run: saddle.distn(A = aircondit$hours/12, t0 = air.t0)
+> 
+> # alternatively using the conditional poisson
+> saddle.distn(A = cbind(aircondit$hours/12, 1), u = 12, wdist = "p",
++              type = "cond", t0 = air.t0)
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 11.344718
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.655282
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 11.344718
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.655282
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 11.832240
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.167760
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 11.832240
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.167760
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.444538
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.555462
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.444538
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.555462
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.494449
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.505551
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.494449
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.505551
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.594269
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 10.405731
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.594269
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 10.405731
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.544359
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 8.455641
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.544359
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 8.455641
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.519404
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.480596
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.519404
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.480596
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 11.561394
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.438606
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 11.561394
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.438606
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 11.290549
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.709451
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 11.290549
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.709451
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 11.019703
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.980297
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 11.019703
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.980297
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 10.748857
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.251143
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 10.748857
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.251143
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 10.478011
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.521989
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 10.478011
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.521989
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 10.207165
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.792835
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 10.207165
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.792835
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 9.936320
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.063680
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 9.936320
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.063680
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 9.665474
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.334526
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 9.665474
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.334526
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 8.785225
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.214775
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 8.785225
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.214775
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 8.175822
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.824178
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 8.175822
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.824178
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.566419
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.433581
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.566419
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.433581
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.957016
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.042984
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.957016
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.042984
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.347613
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.652387
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.347613
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.652387
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.738210
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.261790
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.738210
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.261790
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.128807
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.871193
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.128807
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.871193
+
+Saddlepoint Distribution Approximations
+
+Call : 
+saddle.distn(A = cbind(aircondit$hours/12, 1), u = 12, wdist = "p", 
+    type = "cond", t0 = air.t0)
+
+Quantiles of the Distribution
+
+ 0.1%       27.4 
+ 0.5%       35.4 
+ 1.0%       39.7 
+ 2.5%       46.7 
+ 5.0%       53.5 
+10.0%       62.5 
+20.0%       75.3 
+50.0%      104.5 
+80.0%      139.0 
+90.0%      158.8 
+95.0%      175.9 
+97.5%      191.2 
+99.0%      209.6 
+99.5%      222.4 
+99.9%      249.5
+
+Smoothing spline used 20 points in the range 9.8 to 304.7.
+> 
+> # Distribution of the ratio of a sample of size 10 from the bigcity 
+> # data, taken from Example 9.16 of Davison and Hinkley (1997).
+> ratio <- function(d, w) sum(d$x *w)/sum(d$u * w)
+> city.v <- var.linear(empinf(data = city, statistic = ratio))
+> bigcity.t0 <- c(mean(bigcity$x)/mean(bigcity$u), sqrt(city.v))
+> Afn <- function(t, data) cbind(data$x - t*data$u, 1)
+> ufn <- function(t, data) c(0,10)
+> saddle.distn(A = Afn, u = ufn, wdist = "b", type = "cond",
++              t0 = bigcity.t0, data = bigcity)
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+Warning in eval(expr, envir, enclos) :
+  non-integer counts in a binomial glm!
+
+Saddlepoint Distribution Approximations
+
+Call : 
+saddle.distn(A = Afn, u = ufn, wdist = "b", type = "cond", t0 = bigcity.t0, 
+    data = bigcity)
+
+Quantiles of the Distribution
+
+ 0.1%      1.070 
+ 0.5%      1.092 
+ 1.0%      1.104 
+ 2.5%      1.122 
+ 5.0%      1.139 
+10.0%      1.158 
+20.0%      1.184 
+50.0%      1.237 
+80.0%      1.304 
+90.0%      1.348 
+95.0%      1.392 
+97.5%      1.436 
+99.0%      1.494 
+99.5%      1.537 
+99.9%      1.636
+
+Smoothing spline used 20 points in the range 1.014 to 1.96.
+> 
+> # From Example 9.16 of Davison and Hinkley (1997) again, we find the 
+> # conditional distribution of the ratio given the sum of city$u.
+> Afn <- function(t, data) cbind(data$x-t*data$u, data$u, 1)
+> ufn <- function(t, data) c(0, sum(data$u), 10)
+> city.t0 <- c(mean(city$x)/mean(city$u), sqrt(city.v))
+> saddle.distn(A = Afn, u = ufn, wdist = "p", type = "cond", t0 = city.t0, 
++              data = city)
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.866400
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 8.511350
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.622251
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.866400
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 8.511350
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.622251
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.210844
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.107208
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.681949
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.210844
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.107208
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.681949
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.038622
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.809279
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.152100
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.038622
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.809279
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.152100
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.452511
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.160314
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.387175
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.452511
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.160314
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.387175
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.159455
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.835832
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.004713
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.159455
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.835832
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.004713
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.155629
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.115412
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.728960
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.155629
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.115412
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.728960
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.205022
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.133273
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.661705
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.205022
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.133273
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.661705
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.722845
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.033105
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.244049
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.722845
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.033105
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.244049
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.787431
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.388294
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.824275
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.787431
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.388294
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.824275
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.415407
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.940756
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.643837
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.415407
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.940756
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.643837
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.043383
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.493218
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.463399
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.043383
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.493218
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.463399
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.671359
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.045680
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.282961
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.671359
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.045680
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.282961
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.299336
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.598142
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.102523
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.299336
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.598142
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.102523
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.433935
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.409277
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.156788
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.433935
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.409277
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.156788
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.360158
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.271008
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.368834
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.360158
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.271008
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.368834
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.319252
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.639889
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.040859
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.319252
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.639889
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.040859
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.278346
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.008770
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.712884
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.278346
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.008770
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 4.712884
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.237440
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.377650
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.384909
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.237440
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 1.377650
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 5.384909
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.196534
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.746531
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.056935
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.196534
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.746531
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.056935
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.155629
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.115412
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.728960
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 3.155629
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.115412
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.728960
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.734728
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.299661
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.965612
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.734728
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.299661
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 6.965612
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.228786
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.666383
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.104831
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 2.228786
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 0.666383
+Warning in aic(y, n, mu, weights, dev) : non-integer x = 7.104831
+
+Saddlepoint Distribution Approximations
+
+Call : 
+saddle.distn(A = Afn, u = ufn, wdist = "p", type = "cond", t0 = city.t0, 
+    data = city)
+
+Quantiles of the Distribution
+
+ 0.1%      1.216 
+ 0.5%      1.236 
+ 1.0%      1.248 
+ 2.5%      1.272 
+ 5.0%      1.301 
+10.0%      1.340 
+20.0%      1.393 
+50.0%      1.502 
+80.0%      1.618 
+90.0%      1.680 
+95.0%      1.732 
+97.5%      1.777 
+99.0%      1.830 
+99.5%      1.866 
+99.9%      1.938
+
+Smoothing spline used 20 points in the range 1.182 to 2.061.
+> 
+> 
+> 
+> cleanEx()
+> nameEx("simplex")
+> ### * simplex
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: simplex
+> ### Title: Simplex Method for Linear Programming Problems
+> ### Aliases: simplex
+> ### Keywords: optimize
+> 
+> ### ** Examples
+> 
+> # This example is taken from Exercise 7.5 of Gill, Murray and Wright (1991).
+> enj <- c(200, 6000, 3000, -200)
+> fat <- c(800, 6000, 1000, 400)
+> vitx <- c(50, 3, 150, 100)
+> vity <- c(10, 10, 75, 100)
+> vitz <- c(150, 35, 75, 5)
+> simplex(a = enj, A1 = fat, b1 = 13800, A2 = rbind(vitx, vity, vitz),
++         b2 = c(600, 300, 550), maxi = TRUE)
+
+Linear Programming Results
+
+Call : simplex(a = enj, A1 = fat, b1 = 13800, A2 = rbind(vitx, vity, 
+    vitz), b2 = c(600, 300, 550), maxi = TRUE)
+
+Maximization Problem with Objective Function Coefficients
+  x1   x2   x3   x4 
+ 200 6000 3000 -200 
+
+
+Optimal solution has the following values
+  x1   x2   x3   x4 
+ 0.0  0.0 13.8  0.0 
+The optimal value of the objective  function is 41400.
+> 
+> 
+> 
+> cleanEx()
+> nameEx("smooth.f")
+> ### * smooth.f
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: smooth.f
+> ### Title: Smooth Distributions on Data Points
+> ### Aliases: smooth.f
+> ### Keywords: smooth nonparametric
+> 
+> ### ** Examples
+> 
+> # Example 9.8 of Davison and Hinkley (1997) requires tilting the resampling
+> # distribution of the studentized statistic to be centred at the observed
+> # value of the test statistic 1.84.  In the book exponential tilting was used
+> # but it is also possible to use smooth.f.
+> grav1 <- gravity[as.numeric(gravity[, 2]) >= 7, ]
+> grav.fun <- function(dat, w, orig) {
++      strata <- tapply(dat[, 2], as.numeric(dat[, 2]))
++      d <- dat[, 1]
++      ns <- tabulate(strata)
++      w <- w/tapply(w, strata, sum)[strata]
++      mns <- as.vector(tapply(d * w, strata, sum)) # drop names
++      mn2 <- tapply(d * d * w, strata, sum)
++      s2hat <- sum((mn2 - mns^2)/ns)
++      c(mns[2] - mns[1], s2hat, (mns[2]-mns[1]-orig)/sqrt(s2hat))
++ }
+> grav.z0 <- grav.fun(grav1, rep(1, 26), 0)
+> grav.boot <- boot(grav1, grav.fun, R = 499, stype = "w", 
++                   strata = grav1[, 2], orig = grav.z0[1])
+> grav.sm <- smooth.f(grav.z0[3], grav.boot, index = 3)
+> 
+> # Now we can run another bootstrap using these weights
+> grav.boot2 <- boot(grav1, grav.fun, R = 499, stype = "w", 
++                    strata = grav1[, 2], orig = grav.z0[1],
++                    weights = grav.sm)
+> 
+> # Estimated p-values can be found from these as follows
+> mean(grav.boot$t[, 3] >= grav.z0[3])
+[1] 0.01402806
+> imp.prob(grav.boot2, t0 = -grav.z0[3], t = -grav.boot2$t[, 3])
+$t0
+[1] -1.840118
+
+$raw
+[1] 0.02163715
+
+$rat
+[1] 0.02099078
+
+$reg
+[1] 0.02174393
+
+> 
+> 
+> # Note that for the importance sampling probability we must 
+> # multiply everything by -1 to ensure that we find the correct
+> # probability.  Raw resampling is not reliable for probabilities
+> # greater than 0.5. Thus
+> 1 - imp.prob(grav.boot2, index = 3, t0 = grav.z0[3])$raw
+[1] -0.009155757
+> # can give very strange results (negative probabilities).
+> 
+> 
+> 
+> cleanEx()
+> nameEx("tilt.boot")
+> ### * tilt.boot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: tilt.boot
+> ### Title: Non-parametric Tilted Bootstrap
+> ### Aliases: tilt.boot
+> ### Keywords: nonparametric
+> 
+> ### ** Examples
+> 
+> # Note that these examples can take a while to run.
+> 
+> # Example 9.9 of Davison and Hinkley (1997).
+> grav1 <- gravity[as.numeric(gravity[,2]) >= 7, ]
+> grav.fun <- function(dat, w, orig) {
++      strata <- tapply(dat[, 2], as.numeric(dat[, 2]))
++      d <- dat[, 1]
++      ns <- tabulate(strata)
++      w <- w/tapply(w, strata, sum)[strata]
++      mns <- as.vector(tapply(d * w, strata, sum)) # drop names
++      mn2 <- tapply(d * d * w, strata, sum)
++      s2hat <- sum((mn2 - mns^2)/ns)
++      c(mns[2]-mns[1],s2hat,(mns[2]-mns[1]-orig)/sqrt(s2hat))
++ }
+> grav.z0 <- grav.fun(grav1, rep(1, 26), 0)
+> tilt.boot(grav1, grav.fun, R = c(249, 375, 375), stype = "w", 
++           strata = grav1[,2], tilt = TRUE, index = 3, orig = grav.z0[1]) 
+
+TILTED BOOTSTRAP
+
+Exponential tilting used
+First 249 replicates untilted,
+Next 375 replicates tilted to -2.821,
+Next 375 replicates tilted to 1.636.
+
+Call:
+tilt.boot(data = grav1, statistic = grav.fun, R = c(249, 375, 
+    375), stype = "w", strata = grav1[, 2], tilt = TRUE, index = 3, 
+    orig = grav.z0[1])
+
+
+Bootstrap Statistics :
+    original     bias    std. error
+t1* 2.846154 -0.4487564    2.500644
+t2* 2.392353 -0.3221155    1.187574
+t3* 0.000000 -0.8862944    2.208945
+> 
+> 
+> #  Example 9.10 of Davison and Hinkley (1997) requires a balanced 
+> #  importance resampling bootstrap to be run.  In this example we 
+> #  show how this might be run.  
+> acme.fun <- function(data, i, bhat) {
++      d <- data[i,]
++      n <- nrow(d)
++      d.lm <- glm(d$acme~d$market)
++      beta.b <- coef(d.lm)[2]
++      d.diag <- boot::glm.diag(d.lm)
++      SSx <- (n-1)*var(d$market)
++      tmp <- (d$market-mean(d$market))*d.diag$res*d.diag$sd
++      sr <- sqrt(sum(tmp^2))/SSx
++      c(beta.b, sr, (beta.b-bhat)/sr)
++ }
+> acme.b <- acme.fun(acme, 1:nrow(acme), 0)
+> acme.boot1 <- tilt.boot(acme, acme.fun, R = c(499, 250, 250), 
++                         stype = "i", sim = "balanced", alpha = c(0.05, 0.95), 
++                         tilt = TRUE, index = 3, bhat = acme.b[1])
+> 
+> 
+> 
+> cleanEx()
+> nameEx("tsboot")
+> ### * tsboot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: tsboot
+> ### Title: Bootstrapping of Time Series
+> ### Aliases: tsboot ts.return
+> ### Keywords: nonparametric ts
+> 
+> ### ** Examples
+> 
+> lynx.fun <- function(tsb) {
++      ar.fit <- ar(tsb, order.max = 25)
++      c(ar.fit$order, mean(tsb), tsb)
++ }
+> 
+> # the stationary bootstrap with mean block length 20
+> lynx.1 <- tsboot(log(lynx), lynx.fun, R = 99, l = 20, sim = "geom")
+> 
+> # the fixed block bootstrap with length 20
+> lynx.2 <- tsboot(log(lynx), lynx.fun, R = 99, l = 20, sim = "fixed")
+> 
+> # Now for model based resampling we need the original model
+> # Note that for all of the bootstraps which use the residuals as their
+> # data, we set orig.t to FALSE since the function applied to the residual
+> # time series will be meaningless.
+> lynx.ar <- ar(log(lynx))
+> lynx.model <- list(order = c(lynx.ar$order, 0, 0), ar = lynx.ar$ar)
+> lynx.res <- lynx.ar$resid[!is.na(lynx.ar$resid)]
+> lynx.res <- lynx.res - mean(lynx.res)
+> 
+> lynx.sim <- function(res,n.sim, ran.args) {
++      # random generation of replicate series using arima.sim 
++      rg1 <- function(n, res) sample(res, n, replace = TRUE)
++      ts.orig <- ran.args$ts
++      ts.mod <- ran.args$model
++      mean(ts.orig)+ts(arima.sim(model = ts.mod, n = n.sim,
++                       rand.gen = rg1, res = as.vector(res)))
++ }
+> 
+> lynx.3 <- tsboot(lynx.res, lynx.fun, R = 99, sim = "model", n.sim = 114,
++                  orig.t = FALSE, ran.gen = lynx.sim, 
++                  ran.args = list(ts = log(lynx), model = lynx.model))
+> 
+> #  For "post-blackening" we need to define another function
+> lynx.black <- function(res, n.sim, ran.args) {
++      ts.orig <- ran.args$ts
++      ts.mod <- ran.args$model
++      mean(ts.orig) + ts(arima.sim(model = ts.mod,n = n.sim,innov = res))
++ }
+> 
+> # Now we can run apply the two types of block resampling again but this
+> # time applying post-blackening.
+> lynx.1b <- tsboot(lynx.res, lynx.fun, R = 99, l = 20, sim = "fixed",
++                   n.sim = 114, orig.t = FALSE, ran.gen = lynx.black, 
++                   ran.args = list(ts = log(lynx), model = lynx.model))
+> 
+> lynx.2b <- tsboot(lynx.res, lynx.fun, R = 99, l = 20, sim = "geom",
++                   n.sim = 114, orig.t = FALSE, ran.gen = lynx.black, 
++                   ran.args = list(ts = log(lynx), model = lynx.model))
+> 
+> # To compare the observed order of the bootstrap replicates we
+> # proceed as follows.
+> table(lynx.1$t[, 1])
+
+ 2  3  4  5  7  8 10 11 12 13 14 
+16 19 38  4  6  3  1  9  1  1  1 
+> table(lynx.1b$t[, 1])
+
+ 2  3  4  5  6  7  8 11 12 14 15 
+ 6  2 22  6  4  6  3 40  7  1  2 
+> table(lynx.2$t[, 1])
+
+ 2  3  4  5  6  7  8 10 11 13 
+12 18 51  5  2  3  1  2  4  1 
+> table(lynx.2b$t[, 1])
+
+ 2  3  4  5  6  7  8  9 10 11 12 13 15 21 
+ 2  1 21  4  1 10  4  1  3 45  3  1  2  1 
+> table(lynx.3$t[, 1])
+
+ 2  3  4  5  6  7  8  9 10 11 12 13 14 15 
+ 4  8 11  2  1  4  2  2  2 54  6  1  1  1 
+> # Notice that the post-blackened and model-based bootstraps preserve
+> # the true order of the model (11) in many more cases than the others.
+> 
+> 
+> 
+> cleanEx()
+> nameEx("var.linear")
+> ### * var.linear
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: var.linear
+> ### Title: Linear Variance Estimate
+> ### Aliases: var.linear
+> ### Keywords: nonparametric
+> 
+> ### ** Examples
+> 
+> #  To estimate the variance of the ratio of means for the city data.
+> ratio <- function(d,w) sum(d$x * w)/sum(d$u * w)
+> var.linear(empinf(data = city, statistic = ratio))
+[1] 0.03248701
+> 
+> 
+> 
+> ### * <FOOTER>
+> ###
+> cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  35.015 0.065 35.309 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
diff --git a/win32/deps/library/class/CITATION b/win32/deps/library/class/CITATION
index f6a6566..420318b 100644
--- a/win32/deps/library/class/CITATION
+++ b/win32/deps/library/class/CITATION
@@ -1,4 +1,4 @@
-citHeader("To cite the VR bundle (MASS, class, nnet, spatial) in publications use:")
+citHeader("To cite the class package in publications use:")
 
 citEntry(entry="Book",
          title = "Modern Applied Statistics with S",
diff --git a/win32/deps/library/class/DESCRIPTION b/win32/deps/library/class/DESCRIPTION
index e46e7b2..06090a5 100644
--- a/win32/deps/library/class/DESCRIPTION
+++ b/win32/deps/library/class/DESCRIPTION
@@ -1,23 +1,18 @@
-Bundle: VR
-Contains: MASS class nnet spatial
-Priority: recommended
-Version: 7.2-48
-Date: 2009-07-29
-Depends: R (>= 2.5.0), grDevices, graphics, stats, utils
-Suggests: lattice, nlme, survival
-Author: S original by Venables & Ripley. R port by Brian Ripley
-        <ripley stats ox ac uk>, following earlier work by Kurt Hornik
-        and Albrecht Gebhardt.
-Maintainer: Brian Ripley <ripley stats ox ac uk>
-BundleDescription: Functions and datasets to support Venables and
-        Ripley, 'Modern Applied Statistics with S' (4th edition).
-License: GPL-2 | GPL-3
-URL: http://www.stats.ox.ac.uk/pub/MASS4/
-Packaged: 2009-07-31 13:56:57 UTC; ripley
-Repository: CRAN
-Date/Publication: 2009-08-05 11:20:53
-Package: class
-Description: Various functions for classification.
-Title: Functions for Classification
-LazyLoad: yes
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 13:00:51 UTC; windows
+Package: class
+Priority: recommended
+Version: 7.3-5
+Date: 2012-10-08
+Depends: R (>= 2.5.0), stats, utils
+Imports: MASS
+Authors R: c(person("Brian", "Ripley", role = c("aut", "cre", "cph"),
+        email = "ripley stats ox ac uk"))
+Author: Brian Ripley <ripley stats ox ac uk>.
+Maintainer: Brian Ripley <ripley stats ox ac uk>
+Description: Various functions for classification.
+Title: Functions for Classification
+License: GPL-2 | GPL-3
+URL: http://www.stats.ox.ac.uk/pub/MASS4/
+LazyLoad: yes
+Packaged: 2012-10-08 10:07:19 UTC; ripley
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:15:17 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/class/LICENCE b/win32/deps/library/class/LICENCE
index e694c08..14b4e51 100644
--- a/win32/deps/library/class/LICENCE
+++ b/win32/deps/library/class/LICENCE
@@ -15,16 +15,7 @@ possible individual files also carry brief copyright notices.
 Copyrights
 ==========
 
-File MASS/R/profiles.R copyright (C) 1996 D. M. Bates and W. N. Venables.
-                       port to R by B. D. Ripley copyright (C) 1998
-                       corrections copyright (C) 2000,3,6 B. D. Ripley
-
-Our understanding is that the dataset files MASS/data/*.rda are not copyright.
-
-Files spatial/data/*.dat were generated or digitized by B. D. Ripley: no
-copyright is asserted.
-
-All other files are copyright (C) 1994-2007  W. N. Venables and
+All files are copyright (C) 1994-2009 W. N. Venables and
 B. D. Ripley. Those parts which were distributed with the first
 edition are also copyright (C) 1994 Springer-Verlag New York Inc, with
 all rights assigned to W. N. Venables and B. D. Ripley.
diff --git a/win32/deps/library/class/Meta/Rd.rds b/win32/deps/library/class/Meta/Rd.rds
index e5c9ce8..cdbd4d5 100644
Binary files a/win32/deps/library/class/Meta/Rd.rds and b/win32/deps/library/class/Meta/Rd.rds differ
diff --git a/win32/deps/library/class/Meta/hsearch.rds b/win32/deps/library/class/Meta/hsearch.rds
index 10646d8..49c9115 100644
Binary files a/win32/deps/library/class/Meta/hsearch.rds and b/win32/deps/library/class/Meta/hsearch.rds differ
diff --git a/win32/deps/library/class/Meta/links.rds b/win32/deps/library/class/Meta/links.rds
new file mode 100644
index 0000000..5ed5c2c
Binary files /dev/null and b/win32/deps/library/class/Meta/links.rds differ
diff --git a/win32/deps/library/class/Meta/nsInfo.rds b/win32/deps/library/class/Meta/nsInfo.rds
index fa497ee..45e3590 100644
Binary files a/win32/deps/library/class/Meta/nsInfo.rds and b/win32/deps/library/class/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/class/Meta/package.rds b/win32/deps/library/class/Meta/package.rds
index 88674a0..9438b87 100644
Binary files a/win32/deps/library/class/Meta/package.rds and b/win32/deps/library/class/Meta/package.rds differ
diff --git a/win32/deps/library/class/R/class b/win32/deps/library/class/R/class
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/class/R/class
+++ b/win32/deps/library/class/R/class
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/class/R/class.rdb b/win32/deps/library/class/R/class.rdb
index 3bcf808..f98a7a7 100644
Binary files a/win32/deps/library/class/R/class.rdb and b/win32/deps/library/class/R/class.rdb differ
diff --git a/win32/deps/library/class/R/class.rdx b/win32/deps/library/class/R/class.rdx
index c28332c..f2b6343 100644
Binary files a/win32/deps/library/class/R/class.rdx and b/win32/deps/library/class/R/class.rdx differ
diff --git a/win32/deps/library/class/help/aliases.rds b/win32/deps/library/class/help/aliases.rds
new file mode 100644
index 0000000..25d9ee6
Binary files /dev/null and b/win32/deps/library/class/help/aliases.rds differ
diff --git a/win32/deps/library/class/help/class.rdb b/win32/deps/library/class/help/class.rdb
new file mode 100644
index 0000000..190b4b4
Binary files /dev/null and b/win32/deps/library/class/help/class.rdb differ
diff --git a/win32/deps/library/class/help/class.rdx b/win32/deps/library/class/help/class.rdx
new file mode 100644
index 0000000..40d58e6
Binary files /dev/null and b/win32/deps/library/class/help/class.rdx differ
diff --git a/win32/deps/library/class/help/paths.rds b/win32/deps/library/class/help/paths.rds
new file mode 100644
index 0000000..54fb771
Binary files /dev/null and b/win32/deps/library/class/help/paths.rds differ
diff --git a/win32/deps/library/class/html/00Index.html b/win32/deps/library/class/html/00Index.html
new file mode 100644
index 0000000..0c3931c
--- /dev/null
+++ b/win32/deps/library/class/html/00Index.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Functions for Classification</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Functions for Classification
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;class&rsquo; version 7.3-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 width="25%"><a href="batchSOM.html">batchSOM</a></td>
+<td>Self-Organizing Maps: Batch Algorithm</td></tr>
+<tr><td width="25%"><a href="condense.html">condense</a></td>
+<td>Condense training set for k-NN classifier</td></tr>
+<tr><td width="25%"><a href="knn.html">knn</a></td>
+<td>k-Nearest Neighbour Classification</td></tr>
+<tr><td width="25%"><a href="knn.cv.html">knn.cv</a></td>
+<td>k-Nearest Neighbour Cross-Validatory Classification</td></tr>
+<tr><td width="25%"><a href="knn1.html">knn1</a></td>
+<td>1-nearest neighbour classification</td></tr>
+<tr><td width="25%"><a href="lvq1.html">lvq1</a></td>
+<td>Learning Vector Quantization 1</td></tr>
+<tr><td width="25%"><a href="lvq2.html">lvq2</a></td>
+<td>Learning Vector Quantization 2.1</td></tr>
+<tr><td width="25%"><a href="lvq3.html">lvq3</a></td>
+<td>Learning Vector Quantization 3</td></tr>
+<tr><td width="25%"><a href="lvqinit.html">lvqinit</a></td>
+<td>Initialize a LVQ Codebook</td></tr>
+<tr><td width="25%"><a href="lvqtest.html">lvqtest</a></td>
+<td>Classify Test Set from LVQ Codebook</td></tr>
+<tr><td width="25%"><a href="multiedit.html">multiedit</a></td>
+<td>Multiedit for k-NN Classifier</td></tr>
+<tr><td width="25%"><a href="olvq1.html">olvq1</a></td>
+<td>Optimized Learning Vector Quantization 1</td></tr>
+<tr><td width="25%"><a href="somgrid.html">plot.SOM</a></td>
+<td>Plot SOM Fits</td></tr>
+<tr><td width="25%"><a href="somgrid.html">plot.somgrid</a></td>
+<td>Plot SOM Fits</td></tr>
+<tr><td width="25%"><a href="reduce.nn.html">reduce.nn</a></td>
+<td>Reduce Training Set for a k-NN Classifier</td></tr>
+<tr><td width="25%"><a href="SOM.html">SOM</a></td>
+<td>Self-Organizing Maps: Online Algorithm</td></tr>
+<tr><td width="25%"><a href="somgrid.html">somgrid</a></td>
+<td>Plot SOM Fits</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/class/html/R.css b/win32/deps/library/class/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/class/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/class/libs/i386/class.dll b/win32/deps/library/class/libs/i386/class.dll
new file mode 100644
index 0000000..5ff4c93
Binary files /dev/null and b/win32/deps/library/class/libs/i386/class.dll differ
diff --git a/win32/deps/library/class/po/de/LC_MESSAGES/R-class.mo b/win32/deps/library/class/po/de/LC_MESSAGES/R-class.mo
new file mode 100644
index 0000000..fe8cc12
Binary files /dev/null and b/win32/deps/library/class/po/de/LC_MESSAGES/R-class.mo differ
diff --git a/win32/deps/library/class/po/en quot/LC_MESSAGES/R-class.mo b/win32/deps/library/class/po/en quot/LC_MESSAGES/R-class.mo
new file mode 100644
index 0000000..cd0af48
Binary files /dev/null and b/win32/deps/library/class/po/en quot/LC_MESSAGES/R-class.mo differ
diff --git a/win32/deps/library/class/po/fr/LC_MESSAGES/R-class.mo b/win32/deps/library/class/po/fr/LC_MESSAGES/R-class.mo
new file mode 100644
index 0000000..dbe830e
Binary files /dev/null and b/win32/deps/library/class/po/fr/LC_MESSAGES/R-class.mo differ
diff --git a/win32/deps/library/class/po/pl/LC_MESSAGES/R-class.mo b/win32/deps/library/class/po/pl/LC_MESSAGES/R-class.mo
new file mode 100644
index 0000000..c51acdc
Binary files /dev/null and b/win32/deps/library/class/po/pl/LC_MESSAGES/R-class.mo differ
diff --git a/win32/deps/library/class/tests/Examples/class-Ex.Rout.save b/win32/deps/library/class/tests/Examples/class-Ex.Rout.save
new file mode 100644
index 0000000..681aee0
--- /dev/null
+++ b/win32/deps/library/class/tests/Examples/class-Ex.Rout.save
@@ -0,0 +1,580 @@
+
+R version 2.10.0 Patched (2009-11-23 r50545)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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 <- "class"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('class')
+> 
+> assign(".oldSearch", search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("SOM")
+> ### * SOM
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SOM
+> ### Title: Self-Organizing Maps: Online Algorithm
+> ### Aliases: SOM
+> ### Keywords: classif
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> data(crabs, package = "MASS")
+> 
+> lcrabs <- log(crabs[, 4:8])
+> crabs.grp <- factor(c("B", "b", "O", "o")[rep(1:4, rep(50,4))])
+> gr <- somgrid(topo = "hexagonal")
+> crabs.som <- SOM(lcrabs, gr)
+> plot(crabs.som)
+> 
+> ## 2-phase training
+> crabs.som2 <- SOM(lcrabs, gr,
++     alpha = list(seq(0.05, 0, len = 1e4), seq(0.02, 0, len = 1e5)),
++     radii = list(seq(8, 1, len = 1e4), seq(4, 1, len = 1e5)))
+> plot(crabs.som2)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("batchSOM")
+> ### * batchSOM
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: batchSOM
+> ### Title: Self-Organizing Maps: Batch Algorithm
+> ### Aliases: batchSOM
+> ### Keywords: classif
+> 
+> ### ** Examples
+> 
+> require(graphics)
+> data(crabs, package = "MASS")
+> 
+> lcrabs <- log(crabs[, 4:8])
+> crabs.grp <- factor(c("B", "b", "O", "o")[rep(1:4, rep(50,4))])
+> 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))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("condense")
+> ### * condense
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: condense
+> ### Title: Condense training set for k-NN classifier
+> ### Aliases: condense
+> ### Keywords: classif
+> 
+> ### ** Examples
+> 
+> train <- rbind(iris3[1:25,,1], iris3[1:25,,2], iris3[1:25,,3])
+> test <- rbind(iris3[26:50,,1], iris3[26:50,,2], iris3[26:50,,3])
+> cl <- factor(c(rep("s",25), rep("c",25), rep("v",25)))
+> keep <- condense(train, cl)
+[1] 20
+[1] 20 44
+[1] 20 44 65
+[1] 20 44 65 74
+[1] 20 28 44 65 74
+[1] 20 28 44 65 73 74
+[1] 20 28 44 65 73 74 75
+[1] 20 28 44 48 65 73 74 75
+[1] 20 28 44 46 48 65 73 74 75
+ [1] 20 28 44 46 48 57 65 73 74 75
+ [1] 20 28 35 44 46 48 57 65 73 74 75
+ [1] 20 28 35 44 46 48 57 65 70 73 74 75
+> knn(train[keep, , drop=FALSE], test, cl[keep])
+ [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 v c c c c
+[39] c c c c c c c c c c c c v v c v v v v v c v v v v c v v v v v v v v v v c
+Levels: c s v
+> keep2 <- reduce.nn(train, keep, cl)
+> knn(train[keep2, , drop=FALSE], test, cl[keep2])
+ [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 v c c c c
+[39] c c c c c c c c c c c c v v c v v v v v c v v v v c v v v v v v v v v v c
+Levels: c s v
+> 
+> 
+> 
+> cleanEx()
+> nameEx("knn")
+> ### * knn
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: knn
+> ### Title: k-Nearest Neighbour Classification
+> ### Aliases: knn
+> ### Keywords: classif
+> 
+> ### ** Examples
+> 
+> train <- rbind(iris3[1:25,,1], iris3[1:25,,2], iris3[1:25,,3])
+> test <- rbind(iris3[26:50,,1], iris3[26:50,,2], iris3[26:50,,3])
+> cl <- factor(c(rep("s",25), rep("c",25), rep("v",25)))
+> knn(train, test, cl, k = 3, prob=TRUE)
+ [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 v c c c c c v c c c c
+[39] c c c c c c c c c c c c v c c v v v v v v v v v v c v v v v v v v v v v v
+attr(,"prob")
+ [1] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [8] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[15] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[22] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.6666667
+[29] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.6666667 1.0000000
+[36] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[43] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[50] 1.0000000 1.0000000 0.6666667 0.7500000 1.0000000 1.0000000 1.0000000
+[57] 1.0000000 1.0000000 0.5000000 1.0000000 1.0000000 1.0000000 1.0000000
+[64] 0.6666667 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[71] 1.0000000 0.6666667 1.0000000 1.0000000 0.6666667
+Levels: c s v
+> attributes(.Last.value)
+$levels
+[1] "c" "s" "v"
+
+$class
+[1] "factor"
+
+$prob
+ [1] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [8] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[15] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[22] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.6666667
+[29] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.6666667 1.0000000
+[36] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[43] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[50] 1.0000000 1.0000000 0.6666667 0.7500000 1.0000000 1.0000000 1.0000000
+[57] 1.0000000 1.0000000 0.5000000 1.0000000 1.0000000 1.0000000 1.0000000
+[64] 0.6666667 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[71] 1.0000000 0.6666667 1.0000000 1.0000000 0.6666667
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("knn.cv")
+> ### * knn.cv
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: knn.cv
+> ### Title: k-Nearest Neighbour Cross-Validatory Classification
+> ### Aliases: knn.cv
+> ### Keywords: classif
+> 
+> ### ** Examples
+> 
+> train <- rbind(iris3[,,1], iris3[,,2], iris3[,,3])
+> cl <- factor(c(rep("s",50), rep("c",50), rep("v",50)))
+> knn.cv(train, cl, k = 3, prob = TRUE)
+  [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 s s s s s s s s s s
+ [38] 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 c c c c c c v c v c
+ [75] c c c c c c c c c v c c c c c c c c c c c c c c c c v v v v v v c v v v v
+[112] v v v v v v v v c v v v v v v v v v v v v v c v v v v v v v v v v v v v v
+[149] v v
+attr(,"prob")
+  [1] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+  [8] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [15] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [22] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [29] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [36] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [43] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [50] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [57] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [64] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.6666667 1.0000000
+ [71] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [78] 0.6666667 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [85] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [92] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [99] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[106] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.7500000 1.0000000
+[113] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[120] 1.0000000 1.0000000 1.0000000 1.0000000 0.7500000 1.0000000 1.0000000
+[127] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[134] 0.6666667 0.6666667 1.0000000 1.0000000 1.0000000 0.6666667 1.0000000
+[141] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[148] 1.0000000 1.0000000 1.0000000
+Levels: c s v
+> attributes(.Last.value)
+$levels
+[1] "c" "s" "v"
+
+$class
+[1] "factor"
+
+$prob
+  [1] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+  [8] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [15] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [22] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [29] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [36] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [43] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [50] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [57] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [64] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.6666667 1.0000000
+ [71] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [78] 0.6666667 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [85] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [92] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+ [99] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[106] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.7500000 1.0000000
+[113] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[120] 1.0000000 1.0000000 1.0000000 1.0000000 0.7500000 1.0000000 1.0000000
+[127] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[134] 0.6666667 0.6666667 1.0000000 1.0000000 1.0000000 0.6666667 1.0000000
+[141] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000
+[148] 1.0000000 1.0000000 1.0000000
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("knn1")
+> ### * knn1
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: knn1
+> ### Title: 1-nearest neighbour classification
+> ### Aliases: knn1
+> ### Keywords: classif
+> 
+> ### ** Examples
+> 
+> train <- rbind(iris3[1:25,,1], iris3[1:25,,2], iris3[1:25,,3])
+> test <- rbind(iris3[26:50,,1], iris3[26:50,,2], iris3[26:50,,3])
+> cl <- factor(c(rep("s",25), rep("c",25), rep("v",25)))
+> knn1(train, test, cl)
+ [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 v c c c c
+[39] c c c c c c c c c c c c v v c v v v v v c v v v v c v v v v v v v v v v v
+Levels: c s v
+> 
+> 
+> 
+> cleanEx()
+> nameEx("lvq1")
+> ### * lvq1
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lvq1
+> ### Title: Learning Vector Quantization 1
+> ### Aliases: lvq1
+> ### Keywords: classif
+> 
+> ### ** Examples
+> 
+> train <- rbind(iris3[1:25,,1], iris3[1:25,,2], iris3[1:25,,3])
+> test <- rbind(iris3[26:50,,1], iris3[26:50,,2], iris3[26:50,,3])
+> cl <- factor(c(rep("s",25), rep("c",25), rep("v",25)))
+> cd <- lvqinit(train, cl, 10)
+> lvqtest(cd, train)
+ [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 c c c
+[39] c c c c c v c v c v 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
+> cd0 <- olvq1(train, cl, cd)
+> lvqtest(cd0, train)
+ [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 c 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 c v
+Levels: c s v
+> cd1 <- lvq1(train, cl, cd0)
+> lvqtest(cd1, train)
+ [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 c c c
+[39] c c c c c c c v 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 c v
+Levels: c s v
+> 
+> 
+> 
+> cleanEx()
+> nameEx("lvq2")
+> ### * lvq2
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lvq2
+> ### Title: Learning Vector Quantization 2.1
+> ### Aliases: lvq2
+> ### Keywords: classif
+> 
+> ### ** Examples
+> 
+> train <- rbind(iris3[1:25,,1], iris3[1:25,,2], iris3[1:25,,3])
+> test <- rbind(iris3[26:50,,1], iris3[26:50,,2], iris3[26:50,,3])
+> cl <- factor(c(rep("s",25), rep("c",25), rep("v",25)))
+> cd <- lvqinit(train, cl, 10)
+> lvqtest(cd, train)
+ [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 c c c
+[39] c c c c c v c v c v 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
+> cd0 <- olvq1(train, cl, cd)
+> lvqtest(cd0, train)
+ [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 c 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 c v
+Levels: c s v
+> cd2 <- lvq2(train, cl, cd0)
+> lvqtest(cd2, train)
+ [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 c 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 c v
+Levels: c s v
+> 
+> 
+> 
+> cleanEx()
+> nameEx("lvq3")
+> ### * lvq3
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lvq3
+> ### Title: Learning Vector Quantization 3
+> ### Aliases: lvq3
+> ### Keywords: classif
+> 
+> ### ** Examples
+> 
+> train <- rbind(iris3[1:25,,1], iris3[1:25,,2], iris3[1:25,,3])
+> test <- rbind(iris3[26:50,,1], iris3[26:50,,2], iris3[26:50,,3])
+> cl <- factor(c(rep("s",25), rep("c",25), rep("v",25)))
+> cd <- lvqinit(train, cl, 10)
+> lvqtest(cd, train)
+ [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 c c c
+[39] c c c c c v c v c v 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
+> cd0 <- olvq1(train, cl, cd)
+> lvqtest(cd0, train)
+ [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 c 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 c v
+Levels: c s v
+> cd3 <- lvq3(train, cl, cd0)
+> lvqtest(cd3, train)
+ [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 c 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 c v
+Levels: c s v
+> 
+> 
+> 
+> cleanEx()
+> nameEx("lvqinit")
+> ### * lvqinit
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lvqinit
+> ### Title: Initialize a LVQ Codebook
+> ### Aliases: lvqinit
+> ### Keywords: classif
+> 
+> ### ** Examples
+> 
+> train <- rbind(iris3[1:25,,1], iris3[1:25,,2], iris3[1:25,,3])
+> test <- rbind(iris3[26:50,,1], iris3[26:50,,2], iris3[26:50,,3])
+> cl <- factor(c(rep("s",25), rep("c",25), rep("v",25)))
+> cd <- lvqinit(train, cl, 10)
+> lvqtest(cd, train)
+ [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 c c c
+[39] c c c c c v c v c v 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
+> cd1 <- olvq1(train, cl, cd)
+> lvqtest(cd1, train)
+ [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 c 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 c v
+Levels: c s v
+> 
+> 
+> 
+> cleanEx()
+> nameEx("lvqtest")
+> ### * lvqtest
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: lvqtest
+> ### Title: Classify Test Set from LVQ Codebook
+> ### Aliases: lvqtest
+> ### Keywords: classif
+> 
+> ### ** Examples
+> 
+> # The function is currently defined as
+> function(codebk, test) knn1(codebk$x, test, codebk$cl)
+function (codebk, test) 
+knn1(codebk$x, test, codebk$cl)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("multiedit")
+> ### * multiedit
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: multiedit
+> ### Title: Multiedit for k-NN Classifier
+> ### Aliases: multiedit
+> ### Keywords: classif
+> 
+> ### ** 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(1,25),rep(2,25), rep(3,25)), labels=c("s", "c", "v"))
+> table(cl, knn(train, test, cl, 3))
+   
+cl   s  c  v
+  s 25  0  0
+  c  0 23  2
+  v  0  1 24
+> ind1 <- multiedit(train, cl, 3)
+pass  1  size  70
+pass  2  size  67
+pass  3  size  65
+pass  4  size  62
+pass  5  size  61
+pass  6  size  61
+pass  7  size  59
+pass  8  size  59
+pass  9  size  59
+pass  10  size  58
+pass  11  size  58
+pass  12  size  58
+pass  13  size  58
+pass  14  size  58
+> length(ind1)
+[1] 58
+> table(cl, knn(train[ind1, , drop=FALSE], test, cl[ind1], 1))
+   
+cl   s  c  v
+  s 25  0  0
+  c  0 25  0
+  v  0  2 23
+> ntrain <- train[ind1,]; ncl <- cl[ind1]
+> ind2 <- condense(ntrain, ncl)
+[1] 15
+[1] 15 26
+[1] 15 26 50
+> length(ind2)
+[1] 3
+> table(cl, knn(ntrain[ind2, , drop=FALSE], test, ncl[ind2], 1))
+   
+cl   s  c  v
+  s 25  0  0
+  c  0 25  0
+  v  0  5 20
+> 
+> 
+> 
+> cleanEx()
+> nameEx("olvq1")
+> ### * olvq1
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: olvq1
+> ### Title: Optimized Learning Vector Quantization 1
+> ### Aliases: olvq1
+> ### Keywords: classif
+> 
+> ### ** Examples
+> 
+> train <- rbind(iris3[1:25,,1], iris3[1:25,,2], iris3[1:25,,3])
+> test <- rbind(iris3[26:50,,1], iris3[26:50,,2], iris3[26:50,,3])
+> cl <- factor(c(rep("s",25), rep("c",25), rep("v",25)))
+> cd <- lvqinit(train, cl, 10)
+> lvqtest(cd, train)
+ [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 c c c
+[39] c c c c c v c v c v 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
+> cd1 <- olvq1(train, cl, cd)
+> lvqtest(cd1, train)
+ [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 c 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 c v
+Levels: c s v
+> 
+> 
+> 
+> cleanEx()
+> nameEx("reduce.nn")
+> ### * reduce.nn
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: reduce.nn
+> ### Title: Reduce Training Set for a k-NN Classifier
+> ### Aliases: reduce.nn
+> ### Keywords: classif
+> 
+> ### ** Examples
+> 
+> train <- rbind(iris3[1:25,,1], iris3[1:25,,2], iris3[1:25,,3])
+> test <- rbind(iris3[26:50,,1], iris3[26:50,,2], iris3[26:50,,3])
+> cl <- factor(c(rep("s",25), rep("c",25), rep("v",25)))
+> keep <- condense(train, cl)
+[1] 20
+[1] 20 44
+[1] 20 44 65
+[1] 20 44 65 74
+[1] 20 28 44 65 74
+[1] 20 28 44 65 73 74
+[1] 20 28 44 65 73 74 75
+[1] 20 28 44 48 65 73 74 75
+[1] 20 28 44 46 48 65 73 74 75
+ [1] 20 28 44 46 48 57 65 73 74 75
+ [1] 20 28 35 44 46 48 57 65 73 74 75
+ [1] 20 28 35 44 46 48 57 65 70 73 74 75
+> knn(train[keep,], test, cl[keep])
+ [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 v c c c c
+[39] c c c c c c c c c c c c v v c v v v v v c v v v v c v v v v v v v v v v c
+Levels: c s v
+> keep2 <- reduce.nn(train, keep, cl)
+> knn(train[keep2,], test, cl[keep2])
+ [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 v c c c c
+[39] c c c c c c c c c c c c v v c v v v v v c v v v v c v v v v v v v v v v c
+Levels: c s v
+> 
+> 
+> 
+> ### * <FOOTER>
+> ###
+> cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  0.285 0.016 0.302 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
diff --git a/win32/deps/library/cluster/CITATION b/win32/deps/library/cluster/CITATION
index 9420a74..76acd57 100644
--- a/win32/deps/library/cluster/CITATION
+++ b/win32/deps/library/cluster/CITATION
@@ -1,28 +1,27 @@
 ## -*- R -*-
 citHeader("To cite the R package 'cluster' in publications use:")
 
-citEntry(entry  = "unpublished",
-         title  = "Cluster Analysis Basics and Extensions",
-         author = personList(
-                 person(first="Martin", last="Maechler",
-                        email="maechler stat math ethz ch"),
-                 person(first="Peter", last="Rousseeuw",
-                        email="rousse uia ua ac be"),
-                 person(first="Anja", last="Struyf",
-                        email="Anja Struyf uia ua ac be"),
-                 person(first="Mia", last="Hubert",
-                        email="Mia Hubert uia ua ac be")),
-         year = 2005,
-         note = paste("Rousseeuw et al provided the S original",
-         "which has been ported to R by Kurt Hornik",
-         "and has since been enhanced by Martin Maechler:",
-         "speed improvements, silhouette() functionality, bug fixes, etc. ",
-         "See the 'Changelog' file (in the package source)"),
-## FIXME:  rather give the URL to the manual on CRAN ???
-##         url = "http://stat.ethz.ch/CRAN/src/contrib/........";,
-         textVersion = paste(
-         "Maechler, M., Rousseeuw, P., Struyf, A., Hubert, M. (2005). ",
-         "Cluster Analysis Basics and Extensions;",
-         "unpublished")
-         )
+if(!exists("meta") || is.null(meta)) meta <- packageDescription("cluster")
+year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date)
+vers <- paste("R package version", meta$Version)
 
+citEntry(entry	= "Manual",
+	 title	= "cluster: Cluster Analysis Basics and Extensions",
+	 author = c(
+         person("Martin", "Maechler", email="maechler stat math ethz ch",
+                role = c("aut", "cre"),
+                comment = "enhancements, speed improvements, bug fixes, since 2000"),
+         person("Peter", "Rousseeuw", email="rousse uia ua ac be", role="aut"),
+         person("Anja", "Struyf", email="Anja Struyf uia ua ac be", role="aut"),
+         person("Mia", "Hubert", email="Mia Hubert uia ua ac be", role="aut"),
+         person("Kurt", "Hornik", role=c("trl","ctb"), comment = "R port; and much initial help file fixing, 1998--2000")
+         ),
+	 year = year,
+	 note = paste(vers,"---",
+	 "For new features, see the 'Changelog' file (in the package source)"),
+## FIXME:  rather give the URL to the manual on CRAN ???
+##	   url = "http://stat.ethz.ch/CRAN/src/contrib/........";,
+	 textVersion = paste(
+	 "Maechler, M., Rousseeuw, P., Struyf, A., Hubert, M., Hornik, K.(",
+         year, ").  cluster: Cluster Analysis Basics and Extensions. ",
+	 vers, ".", sep=""))
diff --git a/win32/deps/library/cluster/DESCRIPTION b/win32/deps/library/cluster/DESCRIPTION
index 24eba91..77b786d 100644
--- a/win32/deps/library/cluster/DESCRIPTION
+++ b/win32/deps/library/cluster/DESCRIPTION
@@ -1,20 +1,22 @@
-Package: cluster
-Version: 1.12.0
-Date: 2009-05-13
-Priority: recommended
-Author: Martin Maechler, based on S original by Peter Rousseeuw
-        <rousse uia ua ac be>, Anja Struyf uia ua ac be and
-        Mia Hubert uia ua ac be, and initial R port by
-        Kurt Hornik R-project org
-Maintainer: Martin Maechler <maechler stat math ethz ch>
-Title: Cluster Analysis Extended Rousseeuw et al.
-Description: Cluster Analysis, extended original from Peter Rousseeuw,
-        Anja Struyf and Mia Hubert.
-Depends: R (>= 2.5.0), stats, graphics, utils
-LazyLoad: yes
-LazyData: yes
-License: GPL (>= 2)
-Packaged: 2009-05-13 12:25:09 UTC; maechler
-Repository: CRAN
-Date/Publication: 2009-05-13 19:17:08
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 13:02:40 UTC; windows
+Package: cluster
+Version: 1.14.3
+Date: 2012-10-12
+Priority: recommended
+Author: Martin Maechler, based on S original by Peter Rousseeuw <rousse uia ua ac be>,
+	Anja Struyf uia ua ac be and Mia Hubert uia ua ac be,
+	and initial R port by Kurt Hornik R-project org
+Maintainer: Martin Maechler <maechler stat math ethz ch>
+Title: Cluster Analysis Extended Rousseeuw et al.
+Description: Cluster Analysis, extended original from
+  Peter Rousseeuw, Anja Struyf and Mia Hubert.
+Depends: R (>= 2.10.0), stats, graphics, utils
+Suggests: MASS
+SuggestsNote: two small examples using MASS' cov.rob() and mvrnorm()
+LazyLoad: yes
+LazyData: yes
+ByteCompile: yes
+BuildResaveData: no
+License: GPL (>= 2)
+Packaged: 2012-10-12 22:25:05 UTC; maechler
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:14:44 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/cluster/Meta/Rd.rds b/win32/deps/library/cluster/Meta/Rd.rds
index e1e8f5b..c7f5134 100644
Binary files a/win32/deps/library/cluster/Meta/Rd.rds and b/win32/deps/library/cluster/Meta/Rd.rds differ
diff --git a/win32/deps/library/cluster/Meta/data.rds b/win32/deps/library/cluster/Meta/data.rds
index 8eec852..629f3cb 100644
Binary files a/win32/deps/library/cluster/Meta/data.rds and b/win32/deps/library/cluster/Meta/data.rds differ
diff --git a/win32/deps/library/cluster/Meta/hsearch.rds b/win32/deps/library/cluster/Meta/hsearch.rds
index 2c61d3b..4f404da 100644
Binary files a/win32/deps/library/cluster/Meta/hsearch.rds and b/win32/deps/library/cluster/Meta/hsearch.rds differ
diff --git a/win32/deps/library/cluster/Meta/links.rds b/win32/deps/library/cluster/Meta/links.rds
new file mode 100644
index 0000000..917a86a
Binary files /dev/null and b/win32/deps/library/cluster/Meta/links.rds differ
diff --git a/win32/deps/library/cluster/Meta/nsInfo.rds b/win32/deps/library/cluster/Meta/nsInfo.rds
index e71bb8e..9b51e78 100644
Binary files a/win32/deps/library/cluster/Meta/nsInfo.rds and b/win32/deps/library/cluster/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/cluster/Meta/package.rds b/win32/deps/library/cluster/Meta/package.rds
index cca3cb5..03c9a2d 100644
Binary files a/win32/deps/library/cluster/Meta/package.rds and b/win32/deps/library/cluster/Meta/package.rds differ
diff --git a/win32/deps/library/cluster/NAMESPACE b/win32/deps/library/cluster/NAMESPACE
index 0c1ac3e..2f68a81 100644
--- a/win32/deps/library/cluster/NAMESPACE
+++ b/win32/deps/library/cluster/NAMESPACE
@@ -1,4 +1,4 @@
-useDynLib(cluster)
+useDynLib(cluster, .registration=TRUE)
 
 ## S3 Generics:
 export(clusplot, pltree, silhouette, volume)
@@ -7,12 +7,13 @@ export(clusplot, pltree, silhouette, volume)
 export(agnes, clara, daisy, diana, fanny, mona, pam)
 ## and the rest
 export(bannerplot, ellipsoidhull, ellipsoidPoints,
+       clusGap, maxSE,
        lower.to.upper.tri.inds, upper.to.lower.tri.inds,
        meanabsdev, sizeDiss, sortSilhouette)
 
 ## Methods also useful as 'standalone functions':
 export(predict.ellipsoid)
-export(coef.hclust)
+export(coef.hclust, coefHier)
 
 ## things from (ex-)mva -- not really needed..
 #importFrom(stats, as.hclust, as.dist, as.dendrogram, cutree)
@@ -34,7 +35,7 @@ S3method(volume, ellipsoid)
 
 ## register all the method for generics elsewhere in case namespace is
 ## loaded but not currently attached.
-S3method(as.dendrogram, agnes)
+S3method(as.dendrogram, twins)
 S3method(coef, hclust)
 S3method(coef, twins)
 
@@ -43,6 +44,7 @@ S3method(plot, diana)
 S3method(plot, mona)
 S3method(plot, partition)
 S3method(plot, silhouette)
+S3method(plot, clusGap)
 
 #exported: S3method(predict, ellipsoid)
 
@@ -54,6 +56,7 @@ S3method(print, ellipsoid)
 S3method(print, fanny)
 S3method(print, mona)
 S3method(print, pam)
+S3method(print, clusGap)
 S3method(print, summary.agnes)
 S3method(print, summary.clara)
 S3method(print, summary.diana)
diff --git a/win32/deps/library/cluster/R/cluster b/win32/deps/library/cluster/R/cluster
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/cluster/R/cluster
+++ b/win32/deps/library/cluster/R/cluster
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/cluster/R/cluster.rdb b/win32/deps/library/cluster/R/cluster.rdb
index 3112d67..6911e18 100644
Binary files a/win32/deps/library/cluster/R/cluster.rdb and b/win32/deps/library/cluster/R/cluster.rdb differ
diff --git a/win32/deps/library/cluster/R/cluster.rdx b/win32/deps/library/cluster/R/cluster.rdx
index 2c39ab2..51c5d7c 100644
Binary files a/win32/deps/library/cluster/R/cluster.rdx and b/win32/deps/library/cluster/R/cluster.rdx differ
diff --git a/win32/deps/library/cluster/data/Rdata.rdb b/win32/deps/library/cluster/data/Rdata.rdb
index 3edea71..84f17b5 100644
Binary files a/win32/deps/library/cluster/data/Rdata.rdb and b/win32/deps/library/cluster/data/Rdata.rdb differ
diff --git a/win32/deps/library/cluster/data/Rdata.rds b/win32/deps/library/cluster/data/Rdata.rds
index 9514bdc..83c12a8 100644
Binary files a/win32/deps/library/cluster/data/Rdata.rds and b/win32/deps/library/cluster/data/Rdata.rds differ
diff --git a/win32/deps/library/cluster/data/Rdata.rdx b/win32/deps/library/cluster/data/Rdata.rdx
index f7cac94..184666a 100644
Binary files a/win32/deps/library/cluster/data/Rdata.rdx and b/win32/deps/library/cluster/data/Rdata.rdx differ
diff --git a/win32/deps/library/cluster/help/AnIndex b/win32/deps/library/cluster/help/AnIndex
index 122e8a3..336353a 100644
--- a/win32/deps/library/cluster/help/AnIndex
+++ b/win32/deps/library/cluster/help/AnIndex
@@ -6,11 +6,13 @@ bannerplot	bannerplot
 chorSub	chorSub
 clara	clara
 clara.object	clara.object
-clusplot	clusplot
+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
@@ -21,6 +23,7 @@ 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
@@ -30,6 +33,7 @@ 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
@@ -40,6 +44,7 @@ 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
diff --git a/win32/deps/library/cluster/help/aliases.rds b/win32/deps/library/cluster/help/aliases.rds
new file mode 100644
index 0000000..ac09ac2
Binary files /dev/null and b/win32/deps/library/cluster/help/aliases.rds differ
diff --git a/win32/deps/library/cluster/help/cluster.rdb b/win32/deps/library/cluster/help/cluster.rdb
new file mode 100644
index 0000000..78e660e
Binary files /dev/null and b/win32/deps/library/cluster/help/cluster.rdb differ
diff --git a/win32/deps/library/cluster/help/cluster.rdx b/win32/deps/library/cluster/help/cluster.rdx
new file mode 100644
index 0000000..9628136
Binary files /dev/null and b/win32/deps/library/cluster/help/cluster.rdx differ
diff --git a/win32/deps/library/cluster/help/paths.rds b/win32/deps/library/cluster/help/paths.rds
new file mode 100644
index 0000000..6baac32
Binary files /dev/null and b/win32/deps/library/cluster/help/paths.rds differ
diff --git a/win32/deps/library/cluster/html/00Index.html b/win32/deps/library/cluster/html/00Index.html
new file mode 100644
index 0000000..d3d2583
--- /dev/null
+++ b/win32/deps/library/cluster/html/00Index.html
@@ -0,0 +1,187 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: 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> Cluster Analysis Extended Rousseeuw et al.
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;cluster&rsquo; version 1.14.3</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td width="25%"><a href="agnes.html">agnes</a></td>
+<td>Agglomerative Nesting (Hierarchical Clustering)</td></tr>
+<tr><td width="25%"><a href="agnes.object.html">agnes.object</a></td>
+<td>Agglomerative Nesting (AGNES) Object</td></tr>
+<tr><td width="25%"><a href="agriculture.html">agriculture</a></td>
+<td>European Union Agricultural Workforces</td></tr>
+<tr><td width="25%"><a href="animals.html">animals</a></td>
+<td>Attributes of Animals</td></tr>
+<tr><td width="25%"><a href="bannerplot.html">bannerplot</a></td>
+<td>Plot Banner (of Hierarchical Clustering)</td></tr>
+<tr><td width="25%"><a href="chorSub.html">chorSub</a></td>
+<td>Subset of C-horizon of Kola Data</td></tr>
+<tr><td width="25%"><a href="clara.html">clara</a></td>
+<td>Clustering Large Applications</td></tr>
+<tr><td width="25%"><a href="clara.object.html">clara.object</a></td>
+<td>Clustering Large Applications (CLARA) Object</td></tr>
+<tr><td width="25%"><a href="clusGap.html">clusGap</a></td>
+<td>Gap Statistic for Estimating the Number of Clusters</td></tr>
+<tr><td width="25%"><a href="clusplot.partition.html">clusplot</a></td>
+<td>Bivariate Cluster Plot (of a Partitioning Object)</td></tr>
+<tr><td width="25%"><a href="clusplot.default.html">clusplot.default</a></td>
+<td>Bivariate Cluster Plot (clusplot) Default Method</td></tr>
+<tr><td width="25%"><a href="clusplot.partition.html">clusplot.partition</a></td>
+<td>Bivariate Cluster Plot (of a Partitioning Object)</td></tr>
+<tr><td width="25%"><a href="coef.hclust.html">coef.hclust</a></td>
+<td>Agglomerative / Divisive Coefficient for 'hclust' Objects</td></tr>
+<tr><td width="25%"><a href="coef.hclust.html">coef.twins</a></td>
+<td>Agglomerative / Divisive Coefficient for 'hclust' Objects</td></tr>
+<tr><td width="25%"><a href="coef.hclust.html">coefHier</a></td>
+<td>Agglomerative / Divisive Coefficient for 'hclust' Objects</td></tr>
+<tr><td width="25%"><a href="daisy.html">daisy</a></td>
+<td>Dissimilarity Matrix Calculation</td></tr>
+<tr><td width="25%"><a href="diana.html">diana</a></td>
+<td>DIvisive ANAlysis Clustering</td></tr>
+<tr><td width="25%"><a href="diana.html">diana.object</a></td>
+<td>DIvisive ANAlysis Clustering</td></tr>
+<tr><td width="25%"><a href="dissimilarity.object.html">dissimilarity.object</a></td>
+<td>Dissimilarity Matrix Object</td></tr>
+<tr><td 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 width="25%"><a href="predict.ellipsoid.html">ellipsoidPoints</a></td>
+<td>Predict Method for Ellipsoid Objects</td></tr>
+<tr><td width="25%"><a href="fanny.html">fanny</a></td>
+<td>Fuzzy Analysis Clustering</td></tr>
+<tr><td width="25%"><a href="fanny.object.html">fanny.object</a></td>
+<td>Fuzzy Analysis (FANNY) Object</td></tr>
+<tr><td width="25%"><a href="flower.html">flower</a></td>
+<td>Flower Characteristics</td></tr>
+<tr><td 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 width="25%"><a href="clusGap.html">maxSE</a></td>
+<td>Gap Statistic for Estimating the Number of Clusters</td></tr>
+<tr><td width="25%"><a href="mona.html">mona</a></td>
+<td>MONothetic Analysis Clustering of Binary Variables</td></tr>
+<tr><td width="25%"><a href="mona.object.html">mona.object</a></td>
+<td>Monothetic Analysis (MONA) Object</td></tr>
+<tr><td width="25%"><a href="pam.html">pam</a></td>
+<td>Partitioning Around Medoids</td></tr>
+<tr><td width="25%"><a href="pam.object.html">pam.object</a></td>
+<td>Partitioning Around Medoids (PAM) Object</td></tr>
+<tr><td width="25%"><a href="partition.object.html">partition</a></td>
+<td>Partitioning Object</td></tr>
+<tr><td width="25%"><a href="partition.object.html">partition.object</a></td>
+<td>Partitioning Object</td></tr>
+<tr><td width="25%"><a href="plantTraits.html">plantTraits</a></td>
+<td>Plant Species Traits Data</td></tr>
+<tr><td width="25%"><a href="plot.agnes.html">plot.agnes</a></td>
+<td>Plots of an Agglomerative Hierarchical Clustering</td></tr>
+<tr><td width="25%"><a href="clusGap.html">plot.clusGap</a></td>
+<td>Gap Statistic for Estimating the Number of Clusters</td></tr>
+<tr><td width="25%"><a href="plot.diana.html">plot.diana</a></td>
+<td>Plots of a Divisive Hierarchical Clustering</td></tr>
+<tr><td width="25%"><a href="plot.mona.html">plot.mona</a></td>
+<td>Banner of Monothetic Divisive Hierarchical Clusterings</td></tr>
+<tr><td width="25%"><a href="plot.partition.html">plot.partition</a></td>
+<td>Plot of a Partition of the Data Set</td></tr>
+<tr><td width="25%"><a href="silhouette.html">plot.silhouette</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td width="25%"><a href="pltree.html">pltree</a></td>
+<td>Clustering Trees - Generic Function</td></tr>
+<tr><td width="25%"><a href="pltree.twins.html">pltree.twins</a></td>
+<td>Clustering Tree of a Hierarchical Clustering</td></tr>
+<tr><td width="25%"><a href="pluton.html">pluton</a></td>
+<td>Isotopic Composition Plutonium Batches</td></tr>
+<tr><td width="25%"><a href="predict.ellipsoid.html">predict.ellipsoid</a></td>
+<td>Predict Method for Ellipsoid Objects</td></tr>
+<tr><td width="25%"><a href="print.agnes.html">print.agnes</a></td>
+<td>Print Method for AGNES Objects</td></tr>
+<tr><td width="25%"><a href="print.clara.html">print.clara</a></td>
+<td>Print Method for CLARA Objects</td></tr>
+<tr><td width="25%"><a href="clusGap.html">print.clusGap</a></td>
+<td>Gap Statistic for Estimating the Number of Clusters</td></tr>
+<tr><td width="25%"><a href="print.diana.html">print.diana</a></td>
+<td>Print Method for DIANA Objects</td></tr>
+<tr><td width="25%"><a href="print.dissimilarity.html">print.dissimilarity</a></td>
+<td>Print and Summary Methods for Dissimilarity Objects</td></tr>
+<tr><td 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 width="25%"><a href="print.fanny.html">print.fanny</a></td>
+<td>Print and Summary Methods for FANNY Objects</td></tr>
+<tr><td width="25%"><a href="print.mona.html">print.mona</a></td>
+<td>Print Method for MONA Objects</td></tr>
+<tr><td width="25%"><a href="print.pam.html">print.pam</a></td>
+<td>Print Method for PAM Objects</td></tr>
+<tr><td width="25%"><a href="summary.agnes.html">print.summary.agnes</a></td>
+<td>Summary Method for 'agnes' Objects</td></tr>
+<tr><td width="25%"><a href="summary.clara.html">print.summary.clara</a></td>
+<td>Summary Method for 'clara' Objects</td></tr>
+<tr><td width="25%"><a href="summary.diana.html">print.summary.diana</a></td>
+<td>Summary Method for 'diana' Objects</td></tr>
+<tr><td width="25%"><a href="print.dissimilarity.html">print.summary.dissimilarity</a></td>
+<td>Print and Summary Methods for Dissimilarity Objects</td></tr>
+<tr><td width="25%"><a href="print.fanny.html">print.summary.fanny</a></td>
+<td>Print and Summary Methods for FANNY Objects</td></tr>
+<tr><td width="25%"><a href="summary.mona.html">print.summary.mona</a></td>
+<td>Summary Method for 'mona' Objects</td></tr>
+<tr><td width="25%"><a href="summary.pam.html">print.summary.pam</a></td>
+<td>Summary Method for PAM Objects</td></tr>
+<tr><td width="25%"><a href="silhouette.html">print.summary.silhouette</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td width="25%"><a href="ruspini.html">ruspini</a></td>
+<td>Ruspini Data</td></tr>
+<tr><td width="25%"><a href="silhouette.html">silhouette</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td width="25%"><a href="silhouette.html">silhouette.clara</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td width="25%"><a href="silhouette.html">silhouette.default</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td width="25%"><a href="silhouette.html">silhouette.partition</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td width="25%"><a href="sizeDiss.html">sizeDiss</a></td>
+<td>Sample Size of Dissimilarity Like Object</td></tr>
+<tr><td width="25%"><a href="silhouette.html">sortSilhouette</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td width="25%"><a href="summary.agnes.html">summary.agnes</a></td>
+<td>Summary Method for 'agnes' Objects</td></tr>
+<tr><td width="25%"><a href="summary.clara.html">summary.clara</a></td>
+<td>Summary Method for 'clara' Objects</td></tr>
+<tr><td width="25%"><a href="summary.diana.html">summary.diana</a></td>
+<td>Summary Method for 'diana' Objects</td></tr>
+<tr><td width="25%"><a href="print.dissimilarity.html">summary.dissimilarity</a></td>
+<td>Print and Summary Methods for Dissimilarity Objects</td></tr>
+<tr><td width="25%"><a href="print.fanny.html">summary.fanny</a></td>
+<td>Print and Summary Methods for FANNY Objects</td></tr>
+<tr><td width="25%"><a href="summary.mona.html">summary.mona</a></td>
+<td>Summary Method for 'mona' Objects</td></tr>
+<tr><td width="25%"><a href="summary.pam.html">summary.pam</a></td>
+<td>Summary Method for PAM Objects</td></tr>
+<tr><td width="25%"><a href="silhouette.html">summary.silhouette</a></td>
+<td>Compute or Extract Silhouette Information from Clustering</td></tr>
+<tr><td width="25%"><a href="twins.object.html">twins</a></td>
+<td>Hierarchical Clustering Object</td></tr>
+<tr><td width="25%"><a href="twins.object.html">twins.object</a></td>
+<td>Hierarchical Clustering Object</td></tr>
+<tr><td 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 width="25%"><a href="volume.ellipsoid.html">volume</a></td>
+<td>Compute the Volume of Planar Object</td></tr>
+<tr><td width="25%"><a href="volume.ellipsoid.html">volume.ellipsoid</a></td>
+<td>Compute the Volume of Planar Object</td></tr>
+<tr><td width="25%"><a href="votes.repub.html">votes.repub</a></td>
+<td>Votes for Republican Candidate in Presidential Elections</td></tr>
+<tr><td width="25%"><a href="xclara.html">xclara</a></td>
+<td>Bivariate Data Set with 3 Clusters</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/cluster/html/R.css b/win32/deps/library/cluster/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/cluster/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/cluster/libs/i386/cluster.dll b/win32/deps/library/cluster/libs/i386/cluster.dll
new file mode 100644
index 0000000..c2c6345
Binary files /dev/null and b/win32/deps/library/cluster/libs/i386/cluster.dll differ
diff --git a/win32/deps/library/cluster/po/de/LC_MESSAGES/R-cluster.mo b/win32/deps/library/cluster/po/de/LC_MESSAGES/R-cluster.mo
new file mode 100644
index 0000000..94ca3bf
Binary files /dev/null and b/win32/deps/library/cluster/po/de/LC_MESSAGES/R-cluster.mo differ
diff --git a/win32/deps/library/cluster/po/en quot/LC_MESSAGES/R-cluster.mo b/win32/deps/library/cluster/po/en quot/LC_MESSAGES/R-cluster.mo
new file mode 100644
index 0000000..59240c5
Binary files /dev/null and b/win32/deps/library/cluster/po/en quot/LC_MESSAGES/R-cluster.mo differ
diff --git a/win32/deps/library/cluster/po/pl/LC_MESSAGES/R-cluster.mo b/win32/deps/library/cluster/po/pl/LC_MESSAGES/R-cluster.mo
new file mode 100644
index 0000000..61ea628
Binary files /dev/null and b/win32/deps/library/cluster/po/pl/LC_MESSAGES/R-cluster.mo differ
diff --git a/win32/deps/library/cluster/tests/agnes-ex.R b/win32/deps/library/cluster/tests/agnes-ex.R
new file mode 100644
index 0000000..7dc1cb7
--- /dev/null
+++ b/win32/deps/library/cluster/tests/agnes-ex.R
@@ -0,0 +1,35 @@
+library(cluster)
+options(digits = 6)
+data(votes.repub)
+
+.proctime00 <- proc.time()
+
+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)
+
+cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+
+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))
+
+cat('Time elapsed: ', proc.time() - .proctime00,'\n')
diff --git a/win32/deps/library/cluster/tests/agnes-ex.Rout.save b/win32/deps/library/cluster/tests/agnes-ex.Rout.save
new file mode 100644
index 0000000..e7a7cdb
--- /dev/null
+++ b/win32/deps/library/cluster/tests/agnes-ex.Rout.save
@@ -0,0 +1,610 @@
+
+R version 2.8.1 Patched (2009-01-19 r47658)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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)
+> 
+> .proctime00 <- proc.time()
+> 
+> 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"
+> 
+> cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+Time elapsed:  0.11 0.02 0.136 0 0 
+> 
+> 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))
+> 
+> cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+Time elapsed:  0.123 0.028 0.157 0 0 
+> 
diff --git a/win32/deps/library/cluster/tests/clara-NAs.R b/win32/deps/library/cluster/tests/clara-NAs.R
new file mode 100644
index 0000000..8892fa8
--- /dev/null
+++ b/win32/deps/library/cluster/tests/clara-NAs.R
@@ -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
diff --git a/win32/deps/library/cluster/tests/clara-NAs.Rout.save b/win32/deps/library/cluster/tests/clara-NAs.Rout.save
new file mode 100644
index 0000000..acfeb1e
--- /dev/null
+++ b/win32/deps/library/cluster/tests/clara-NAs.Rout.save
@@ -0,0 +1,635 @@
+
+R version 2.15.1 Patched (2012-10-12 r60924) -- "Roasted Marshmallows"
+Copyright (C) 2012 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)
+> 
+> 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) )
+calling .C(cl_clara, ..., DUP = FALSE):
+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{bswap}: 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{bswap}: 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{bswap}: 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
+> ## 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
+calling .C(cl_clara, ..., DUP = FALSE):
+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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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
+> ## 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 --> na.omit() them for clustering!
+> 
+> x <- x[-33,]
+> ## still had the ** dysta2() .. OUT" problem {no longer!}
+> clara(x, 2, samples = 12, trace = 3)
+calling .C(cl_clara, ..., DUP = FALSE):
+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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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{bswap}: 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 1 1 2 1 1 1 2 1 1 1 1 ...
+Cluster sizes:	    	 74 13 
+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"      
+> 
+> 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 --> na.omit() them for clustering!
+> 
+> proc.time()
+   user  system elapsed 
+  0.228   0.024   0.240 
diff --git a/win32/deps/library/cluster/tests/clara-ex.R b/win32/deps/library/cluster/tests/clara-ex.R
new file mode 100644
index 0000000..4333342
--- /dev/null
+++ b/win32/deps/library/cluster/tests/clara-ex.R
@@ -0,0 +1,23 @@
+#### 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:
+if(R.version$major != "1" || as.numeric(R.version$minor) >= 7) RNGversion("1.6")
+
+nSim <- 100
+nCl <- 3 # = no.classes
+set.seed(421)# (reproducibility)
+## unknown problem: this is still platform dependent to some extent:
+cl <- matrix(NA,nrow(xclara), nSim)
+for(i in 1:nSim) cl[,i] <- 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(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
+}
diff --git a/win32/deps/library/cluster/tests/clara.R b/win32/deps/library/cluster/tests/clara.R
new file mode 100644
index 0000000..c6c87e0
--- /dev/null
+++ b/win32/deps/library/cluster/tests/clara.R
@@ -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
diff --git a/win32/deps/library/cluster/tests/clara.Rout.save b/win32/deps/library/cluster/tests/clara.Rout.save
new file mode 100644
index 0000000..786c0ef
--- /dev/null
+++ b/win32/deps/library/cluster/tests/clara.Rout.save
@@ -0,0 +1,1491 @@
+
+R version 2.13.0 Patched (2011-04-16 r55459)
+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)
+> 
+> ## 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]
+calling .C(cl_clara, ..., DUP = FALSE):
+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.83 0 2.82 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
+> 
diff --git a/win32/deps/library/cluster/tests/clusplot-out.R b/win32/deps/library/cluster/tests/clusplot-out.R
new file mode 100644
index 0000000..164f221
--- /dev/null
+++ b/win32/deps/library/cluster/tests/clusplot-out.R
@@ -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)
diff --git a/win32/deps/library/cluster/tests/clusplot-out.Rout.save b/win32/deps/library/cluster/tests/clusplot-out.Rout.save
new file mode 100644
index 0000000..ed1cc13
--- /dev/null
+++ b/win32/deps/library/cluster/tests/clusplot-out.Rout.save
@@ -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)
+> 
diff --git a/win32/deps/library/cluster/tests/daisy-ex.R b/win32/deps/library/cluster/tests/daisy-ex.R
new file mode 100644
index 0000000..66338f9
--- /dev/null
+++ b/win32/deps/library/cluster/tests/daisy-ex.R
@@ -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")
diff --git a/win32/deps/library/cluster/tests/daisy-ex.Rout.save b/win32/deps/library/cluster/tests/daisy-ex.Rout.save
new file mode 100644
index 0000000..0ca1ef1
--- /dev/null
+++ b/win32/deps/library/cluster/tests/daisy-ex.Rout.save
@@ -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")
+> 
diff --git a/win32/deps/library/cluster/tests/diana-boots.R b/win32/deps/library/cluster/tests/diana-boots.R
new file mode 100644
index 0000000..2f96742
--- /dev/null
+++ b/win32/deps/library/cluster/tests/diana-boots.R
@@ -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')
diff --git a/win32/deps/library/cluster/tests/diana-ex.R b/win32/deps/library/cluster/tests/diana-ex.R
new file mode 100644
index 0000000..66ac4c7
--- /dev/null
+++ b/win32/deps/library/cluster/tests/diana-ex.R
@@ -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
diff --git a/win32/deps/library/cluster/tests/diana-ex.Rout.save b/win32/deps/library/cluster/tests/diana-ex.Rout.save
new file mode 100644
index 0000000..efb4041
--- /dev/null
+++ b/win32/deps/library/cluster/tests/diana-ex.Rout.save
@@ -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" 
+> 
diff --git a/win32/deps/library/cluster/tests/ellipsoid-ex.R b/win32/deps/library/cluster/tests/ellipsoid-ex.R
new file mode 100644
index 0000000..252fd06
--- /dev/null
+++ b/win32/deps/library/cluster/tests/ellipsoid-ex.R
@@ -0,0 +1,27 @@
+library(cluster)
+
+eh <- ellipsoidhull(cbind(x=1:4, y = 1:4)) #singular
+eh
+
+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
diff --git a/win32/deps/library/cluster/tests/ellipsoid-ex.Rout.save b/win32/deps/library/cluster/tests/ellipsoid-ex.Rout.save
new file mode 100644
index 0000000..a2ab64a
--- /dev/null
+++ b/win32/deps/library/cluster/tests/ellipsoid-ex.Rout.save
@@ -0,0 +1,207 @@
+
+R version 2.13.0 Patched (2011-04-16 r55459)
+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)
+> 
+> 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)) :
+  possibly not converged in 5000 iterations
+> eh
+'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
+> 
diff --git a/win32/deps/library/cluster/tests/fanny-ex.R b/win32/deps/library/cluster/tests/fanny-ex.R
new file mode 100644
index 0000000..81e8416
--- /dev/null
+++ b/win32/deps/library/cluster/tests/fanny-ex.R
@@ -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')
diff --git a/win32/deps/library/cluster/tests/mona.R b/win32/deps/library/cluster/tests/mona.R
new file mode 100644
index 0000000..5231a16
--- /dev/null
+++ b/win32/deps/library/cluster/tests/mona.R
@@ -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))
+}
diff --git a/win32/deps/library/cluster/tests/mona.Rout.save b/win32/deps/library/cluster/tests/mona.Rout.save
new file mode 100644
index 0000000..5c29183
--- /dev/null
+++ b/win32/deps/library/cluster/tests/mona.Rout.save
@@ -0,0 +1,118 @@
+
+R version 2.15.1 Patched (2012-10-12 r60924) -- "Roasted Marshmallows"
+Copyright (C) 2012 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.248   0.020   0.262 
diff --git a/win32/deps/library/cluster/tests/pam.R b/win32/deps/library/cluster/tests/pam.R
new file mode 100644
index 0000000..7a5d6f7
--- /dev/null
+++ b/win32/deps/library/cluster/tests/pam.R
@@ -0,0 +1,165 @@
+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)
+
+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])
+	  )
+
+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
+## 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')
+
diff --git a/win32/deps/library/cluster/tests/pam.Rout.save b/win32/deps/library/cluster/tests/pam.Rout.save
new file mode 100644
index 0000000..3511314
--- /dev/null
+++ b/win32/deps/library/cluster/tests/pam.Rout.save
@@ -0,0 +1,1343 @@
+
+R version 2.14.1 Patched (2012-01-24 r58194)
+Copyright (C) 2012 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)
+> ## 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)
+> 
+> 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])
++ 	  )
+> 
+> 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: [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.24 0.012 1.258 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: [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"      
+> ## 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: [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.516   0.012   1.536 
+>  ## 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: [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.400   0.008   1.413 
+> ## bswapPamOnceDistIndice
+> st2 <- showSys.time(pamxonce2 <- pam(x, 4, pamonce = 2,  trace.lev=2))# 4.101   0.024   4.151
+C pam(): computing 3779876 dissimilarities: [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.064   0.000   1.069 
+> show2Ratios('2:orig' = st2/st0, '1:orig' = st1/st0)
+                2:orig 1:orig
+Time  user.self  0.702  0.923
+Time  elapsed    0.696  0.920
+> 
+> ## 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: [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.432   0.000   2.439 
+> 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: [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.112   0.000   2.118 
+> 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: [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.288   0.000   1.289 
+> show2Ratios('2:orig' = st2/st0, '1:orig' = st1/st0)
+                2:orig 1:orig
+Time  user.self  0.530  0.868
+Time  elapsed    0.528  0.868
+> 
+> ## 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: [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.008   0.000   3.016 
+> 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: [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.441   0.000   2.448 
+> 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: [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.468   0.000   1.470 
+> show2Ratios('2:orig' = st2/st0, '1:orig' = st1/st0)
+                2:orig 1:orig
+Time  user.self  0.488  0.812
+Time  elapsed    0.487  0.812
+> 
+> ## 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: [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   8.140   0.000   8.161 
+> 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: [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.817   0.000   6.833 
+> stopifnot(identical(med0, 1:6))
+> stopifnot(all.equal(pamxst[-icall], pamxst.1 [-icall]))
+> 
+> 
+> ## Last Line:
+> cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+Time elapsed:  33.318 0.032 33.446 0 0 
+> 
+> 
diff --git a/win32/deps/library/cluster/tests/silhouette-default.R b/win32/deps/library/cluster/tests/silhouette-default.R
new file mode 100644
index 0000000..32130c6
--- /dev/null
+++ b/win32/deps/library/cluster/tests/silhouette-default.R
@@ -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')
+
diff --git a/win32/deps/library/cluster/tests/silhouette-default.Rout.save b/win32/deps/library/cluster/tests/silhouette-default.Rout.save
new file mode 100644
index 0000000..10e0f1e
--- /dev/null
+++ b/win32/deps/library/cluster/tests/silhouette-default.Rout.save
@@ -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 
+> 
+> 
diff --git a/win32/deps/library/cluster/tests/sweep-ex.R b/win32/deps/library/cluster/tests/sweep-ex.R
new file mode 100644
index 0000000..2058103
--- /dev/null
+++ b/win32/deps/library/cluster/tests/sweep-ex.R
@@ -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
diff --git a/win32/deps/library/codetools/DESCRIPTION b/win32/deps/library/codetools/DESCRIPTION
index db1aa89..ac052d9 100644
--- a/win32/deps/library/codetools/DESCRIPTION
+++ b/win32/deps/library/codetools/DESCRIPTION
@@ -1,11 +1,13 @@
-Package: codetools
-Version: 0.2-2
-Priority: recommended
-Author: Luke Tierney <luke stat uiowa edu>
-Description: Code analysis tools for R
-Title: Code Analysis Tools for R
-Depends: R (>= 2.1)
-Maintainer: Luke Tierney <luke stat uiowa edu>
-License: GPL
-Packaged: Fri Mar 6 16:54:30 2009; luke
-Built: R 2.9.2; ; 2009-08-24 13:03:30 UTC; windows
+Package: codetools
+Version: 0.2-8
+Priority: recommended
+Author: Luke Tierney <luke stat uiowa edu>
+Description: Code analysis tools for R
+Title: Code Analysis Tools for R
+Depends: R (>= 2.1)
+Maintainer: Luke Tierney <luke stat uiowa edu>
+License: GPL
+Packaged: 2011-02-14 20:49:48 UTC; luke
+Repository: CRAN
+Date/Publication: 2011-02-15 09:52:32
+Built: R 2.15.2; ; 2012-10-27 03:14:53 UTC; windows
diff --git a/win32/deps/library/codetools/Meta/Rd.rds b/win32/deps/library/codetools/Meta/Rd.rds
index 92d4203..7b9be01 100644
Binary files a/win32/deps/library/codetools/Meta/Rd.rds and b/win32/deps/library/codetools/Meta/Rd.rds differ
diff --git a/win32/deps/library/codetools/Meta/hsearch.rds b/win32/deps/library/codetools/Meta/hsearch.rds
index 315649d..193978b 100644
Binary files a/win32/deps/library/codetools/Meta/hsearch.rds and b/win32/deps/library/codetools/Meta/hsearch.rds differ
diff --git a/win32/deps/library/codetools/Meta/links.rds b/win32/deps/library/codetools/Meta/links.rds
new file mode 100644
index 0000000..6acabbd
Binary files /dev/null and b/win32/deps/library/codetools/Meta/links.rds differ
diff --git a/win32/deps/library/codetools/Meta/nsInfo.rds b/win32/deps/library/codetools/Meta/nsInfo.rds
index 6010fb9..39c4b80 100644
Binary files a/win32/deps/library/codetools/Meta/nsInfo.rds and b/win32/deps/library/codetools/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/codetools/Meta/package.rds b/win32/deps/library/codetools/Meta/package.rds
index 9c1a5ee..95f810e 100644
Binary files a/win32/deps/library/codetools/Meta/package.rds and b/win32/deps/library/codetools/Meta/package.rds differ
diff --git a/win32/deps/library/codetools/R/codetools b/win32/deps/library/codetools/R/codetools
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/codetools/R/codetools
+++ b/win32/deps/library/codetools/R/codetools
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/codetools/R/codetools.rdb b/win32/deps/library/codetools/R/codetools.rdb
index 7589773..277849f 100644
Binary files a/win32/deps/library/codetools/R/codetools.rdb and b/win32/deps/library/codetools/R/codetools.rdb differ
diff --git a/win32/deps/library/codetools/R/codetools.rdx b/win32/deps/library/codetools/R/codetools.rdx
index 703b800..475e49a 100644
Binary files a/win32/deps/library/codetools/R/codetools.rdx and b/win32/deps/library/codetools/R/codetools.rdx differ
diff --git a/win32/deps/library/codetools/help/aliases.rds b/win32/deps/library/codetools/help/aliases.rds
new file mode 100644
index 0000000..f39355c
Binary files /dev/null and b/win32/deps/library/codetools/help/aliases.rds differ
diff --git a/win32/deps/library/codetools/help/codetools.rdb b/win32/deps/library/codetools/help/codetools.rdb
new file mode 100644
index 0000000..93503e4
Binary files /dev/null and b/win32/deps/library/codetools/help/codetools.rdb differ
diff --git a/win32/deps/library/codetools/help/codetools.rdx b/win32/deps/library/codetools/help/codetools.rdx
new file mode 100644
index 0000000..8678b4d
Binary files /dev/null and b/win32/deps/library/codetools/help/codetools.rdx differ
diff --git a/win32/deps/library/codetools/help/paths.rds b/win32/deps/library/codetools/help/paths.rds
new file mode 100644
index 0000000..e9a4c27
Binary files /dev/null and b/win32/deps/library/codetools/help/paths.rds differ
diff --git a/win32/deps/library/codetools/html/00Index.html b/win32/deps/library/codetools/html/00Index.html
new file mode 100644
index 0000000..cf493a5
--- /dev/null
+++ b/win32/deps/library/codetools/html/00Index.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Code Analysis Tools 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> Code Analysis Tools for R
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;codetools&rsquo; version 0.2-8</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td width="25%"><a href="checkUsage.html">checkUsage</a></td>
+<td>Check R Code for Possible Problems</td></tr>
+<tr><td width="25%"><a href="checkUsage.html">checkUsageEnv</a></td>
+<td>Check R Code for Possible Problems</td></tr>
+<tr><td width="25%"><a href="checkUsage.html">checkUsagePackage</a></td>
+<td>Check R Code for Possible Problems</td></tr>
+<tr><td width="25%"><a href="codetools.html">codetools</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="codetools.html">collectLocals</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="codetools.html">collectUsage</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="codetools.html">constantFold</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="codetools.html">findFuncLocals</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="findGlobals.html">findGlobals</a></td>
+<td>Find Global Functions and Variables Used by a Closure</td></tr>
+<tr><td width="25%"><a href="codetools.html">findLocals</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="codetools.html">findLocalsList</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="codetools.html">flattenAssignment</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="codetools.html">getAssignedVar</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="codetools.html">isConstantValue</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="codetools.html">makeCodeWalker</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="codetools.html">makeConstantFolder</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="codetools.html">makeLocalsCollector</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="codetools.html">makeUsageCollector</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+<tr><td width="25%"><a href="showTree.html">showTree</a></td>
+<td>Print Lisp-Style Representation of R Expression</td></tr>
+<tr><td width="25%"><a href="codetools.html">walkCode</a></td>
+<td>Low Level Code Analysis Tools for R</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/codetools/html/R.css b/win32/deps/library/codetools/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/codetools/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/codetools/tests/tests.R b/win32/deps/library/codetools/tests/tests.R
new file mode 100644
index 0000000..1206c3c
--- /dev/null
+++ b/win32/deps/library/codetools/tests/tests.R
@@ -0,0 +1,90 @@
+library(codetools)
+assert <- function(e)
+    if (! e) stop(paste("assertion failed:", deparse(substitute(e))))
+local({
+    st <- function(e) {
+        v <- NULL
+        write <- function(x)
+            v <<- paste(v, as.character(x), sep = "")
+        showTree(e, write = write)
+        v
+    }
+    assert(identical(st(quote(f(x))), "(f x)\n"))
+    assert(identical(st(quote((x+y)*z)), "(* (\"(\" (+ x y)) z)\n"))
+    assert(identical(st(quote(-3)), "(- 3)\n"))
+})
+assert(identical(constantFold(quote(3)), 3))
+assert(identical(constantFold(quote(1+2)), 3))
+assert(identical(constantFold(quote(1+2+x)), NULL))
+assert(identical(constantFold(quote(pi)), pi))
+assert(identical(constantFold(quote(pi), "pi"), NULL))
+assert(identical(constantFold(quote(pi), "pi", FALSE), FALSE))
+assert(identical(getAssignedVar(quote("v"<-x)), "v"))
+assert(identical(getAssignedVar(quote(v<-x)), "v"))
+assert(identical(getAssignedVar(quote(f(v)<-x)), "v"))
+assert(identical(getAssignedVar(quote(f(g(v,2),1)<-x)), "v"))
+assert(identical(findLocals(quote(x<-1)), "x"))
+assert(identical(findLocals(quote(f(x)<-1)), "x"))
+assert(identical(findLocals(quote(f(g(x,2),1)<-1)), "x"))
+assert(identical(findLocals(quote(x<-y<-1)), c("x","y")))
+assert(identical(findLocals(quote(local(x<-1,e))), "x"))
+assert(identical(findLocals(quote(local(x<-1))), character(0)))
+assert(identical(findLocals(quote({local<-1;local(x<-1)})), c("local", "x")))
+assert(identical(findLocals(quote(local(x<-1,e)), "local"), "x"))
+local({
+    f <- function (f, x, y) {
+        local <- f
+        local(x <- y)
+        x
+    }
+    assert(identical(findLocals(body(f)), c("local","x")))
+})
+local({
+    env <- new.env()
+    assign("local", 1, env)
+    assert(identical(findLocals(quote(local(x<-1,e)), env), "x"))
+})
+assert(identical(findLocals(quote(assign(x, 3))), character(0)))
+assert(identical(findLocals(quote(assign("x", 3))), "x"))
+assert(identical(findLocals(quote(assign("x", 3, 4))), character(0)))
+local({
+    f<-function() { x <- 1; y <- 2}
+    assert(identical(sort(findFuncLocals(formals(f),body(f))), c("x","y")))
+    f<-function(u = x <- 1) y <- 2
+    assert(identical(sort(findFuncLocals(formals(f),body(f))), c("x","y")))
+})
+assert(identical(flattenAssignment(quote(x)), list(NULL, NULL)))
+assert(identical(flattenAssignment(quote(f(x, 1))),
+                 list(list(quote(x)),
+                      list(quote("f<-"(x, 1, value = `*tmpv*`))))))
+assert(identical(flattenAssignment(quote(f(g(x, 2), 1))),
+                 list(list(quote(x), quote(g(`*tmp*`, 2))),
+                     list(quote("f<-"(`*tmp*`, 1, value = `*tmpv*`)),
+                          quote("g<-"(x, 2, value = `*tmpv*`))))))
+assert(identical(flattenAssignment(quote(f(g(h(x, 3), 2), 1))),
+                 list(list(quote(x),
+                           quote(h(`*tmp*`, 3)),
+                           quote(g(`*tmp*`, 2))),
+                     list(quote("f<-"(`*tmp*`, 1, value = `*tmpv*`)),
+                          quote("g<-"(`*tmp*`, 2, value = `*tmpv*`)),
+                          quote("h<-"(x, 3, value = `*tmpv*`))))))
+assert(identical(flattenAssignment(quote(f(g(h(k(x, 4), 3), 2), 1))),
+                 list(list(quote(x),
+                           quote(k(`*tmp*`, 4)),
+                           quote(h(`*tmp*`, 3)),
+                           quote(g(`*tmp*`, 2))),
+                     list(quote("f<-"(`*tmp*`, 1, value = `*tmpv*`)),
+                          quote("g<-"(`*tmp*`, 2, value = `*tmpv*`)),
+                          quote("h<-"(`*tmp*`, 3, value = `*tmpv*`)),
+                          quote("k<-"(x, 4, value = `*tmpv*`))))))
+if (getRversion() >= "2.13.0")
+    assert(identical(flattenAssignment(quote(base::diag(x))),
+                     list(list(quote(x)),
+                          list(quote(base::`diag<-`(x, value = `*tmpv*`))))))
+assert(! "y" %in% findGlobals(function() if (is.R()) x else y))
+assert(identical(findGlobals(function() if (FALSE) x), "if"))
+# **** need more test cases here
+assert(identical(sort(findGlobals(function(x) { z <- 1; x + y + z})),
+                 sort(c("<-", "{",  "+",  "y"))))
+
+assert(identical(findGlobals(function() Quote(x)), "Quote"))
diff --git a/win32/deps/library/compiler/DESCRIPTION b/win32/deps/library/compiler/DESCRIPTION
new file mode 100644
index 0000000..6cd5286
--- /dev/null
+++ b/win32/deps/library/compiler/DESCRIPTION
@@ -0,0 +1,9 @@
+Package: compiler
+Version: 2.15.2
+Priority: base
+Title: The R Compiler Package
+Author: Luke Tierney <luke-tierney uiowa edu>
+Maintainer: R Core Team <R-core r-project org>
+Description: Byte code compiler for R
+License: Part of R 2.15.2
+Built: R 2.15.2; ; 2012-10-27 03:04:39 UTC; windows
diff --git a/win32/deps/library/compiler/INDEX b/win32/deps/library/compiler/INDEX
new file mode 100644
index 0000000..3ddbb04
--- /dev/null
+++ b/win32/deps/library/compiler/INDEX
@@ -0,0 +1 @@
+compile                 Byte Code Compiler
diff --git a/win32/deps/library/compiler/Meta/Rd.rds b/win32/deps/library/compiler/Meta/Rd.rds
new file mode 100644
index 0000000..bb7465e
Binary files /dev/null and b/win32/deps/library/compiler/Meta/Rd.rds differ
diff --git a/win32/deps/library/compiler/Meta/hsearch.rds b/win32/deps/library/compiler/Meta/hsearch.rds
new file mode 100644
index 0000000..0fc8dd1
Binary files /dev/null and b/win32/deps/library/compiler/Meta/hsearch.rds differ
diff --git a/win32/deps/library/compiler/Meta/links.rds b/win32/deps/library/compiler/Meta/links.rds
new file mode 100644
index 0000000..26a7d1d
Binary files /dev/null and b/win32/deps/library/compiler/Meta/links.rds differ
diff --git a/win32/deps/library/compiler/Meta/nsInfo.rds b/win32/deps/library/compiler/Meta/nsInfo.rds
new file mode 100644
index 0000000..cd61040
Binary files /dev/null and b/win32/deps/library/compiler/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/compiler/Meta/package.rds b/win32/deps/library/compiler/Meta/package.rds
new file mode 100644
index 0000000..4c055e8
Binary files /dev/null and b/win32/deps/library/compiler/Meta/package.rds differ
diff --git a/win32/deps/library/compiler/NAMESPACE b/win32/deps/library/compiler/NAMESPACE
new file mode 100644
index 0000000..79fe63f
--- /dev/null
+++ b/win32/deps/library/compiler/NAMESPACE
@@ -0,0 +1,4 @@
+export(cmpfun,cmpfile,loadcmp,compile,disassemble)
+export(enableJIT,compilePKGS)
+export(getCompilerOption,setCompilerOptions)
+
diff --git a/win32/deps/library/compiler/R/compiler b/win32/deps/library/compiler/R/compiler
new file mode 100644
index 0000000..ac8cebe
--- /dev/null
+++ b/win32/deps/library/compiler/R/compiler
@@ -0,0 +1,9 @@
+local({
+    info <- loadingNamespaceInfo()
+    ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
+    if (is.null(ns))
+        stop("cannot find namespace environment");
+    barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
+    dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
diff --git a/win32/deps/library/compiler/R/compiler.rdb b/win32/deps/library/compiler/R/compiler.rdb
new file mode 100644
index 0000000..436da35
Binary files /dev/null and b/win32/deps/library/compiler/R/compiler.rdb differ
diff --git a/win32/deps/library/compiler/R/compiler.rdx b/win32/deps/library/compiler/R/compiler.rdx
new file mode 100644
index 0000000..e5b22e5
Binary files /dev/null and b/win32/deps/library/compiler/R/compiler.rdx differ
diff --git a/win32/deps/library/compiler/help/AnIndex b/win32/deps/library/compiler/help/AnIndex
new file mode 100644
index 0000000..3c096a9
--- /dev/null
+++ b/win32/deps/library/compiler/help/AnIndex
@@ -0,0 +1,9 @@
+cmpfile	compile
+cmpfun	compile
+compile	compile
+compilePKGS	compile
+disassemble	compile
+enableJIT	compile
+getCompilerOption	compile
+loadcmp	compile
+setCompilerOptions	compile
diff --git a/win32/deps/library/compiler/help/aliases.rds b/win32/deps/library/compiler/help/aliases.rds
new file mode 100644
index 0000000..0f3c605
Binary files /dev/null and b/win32/deps/library/compiler/help/aliases.rds differ
diff --git a/win32/deps/library/compiler/help/compiler.rdb b/win32/deps/library/compiler/help/compiler.rdb
new file mode 100644
index 0000000..c44ad67
Binary files /dev/null and b/win32/deps/library/compiler/help/compiler.rdb differ
diff --git a/win32/deps/library/compiler/help/compiler.rdx b/win32/deps/library/compiler/help/compiler.rdx
new file mode 100644
index 0000000..3fcc542
Binary files /dev/null and b/win32/deps/library/compiler/help/compiler.rdx differ
diff --git a/win32/deps/library/compiler/help/paths.rds b/win32/deps/library/compiler/help/paths.rds
new file mode 100644
index 0000000..d716a13
Binary files /dev/null and b/win32/deps/library/compiler/help/paths.rds differ
diff --git a/win32/deps/library/compiler/html/00Index.html b/win32/deps/library/compiler/html/00Index.html
new file mode 100644
index 0000000..30834d3
--- /dev/null
+++ b/win32/deps/library/compiler/html/00Index.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: The R Compiler Package</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> The R Compiler Package
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;compiler&rsquo; version 2.15.2</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td width="25%"><a href="compile.html">cmpfile</a></td>
+<td>Byte Code Compiler</td></tr>
+<tr><td width="25%"><a href="compile.html">cmpfun</a></td>
+<td>Byte Code Compiler</td></tr>
+<tr><td width="25%"><a href="compile.html">compile</a></td>
+<td>Byte Code Compiler</td></tr>
+<tr><td width="25%"><a href="compile.html">compilePKGS</a></td>
+<td>Byte Code Compiler</td></tr>
+<tr><td width="25%"><a href="compile.html">disassemble</a></td>
+<td>Byte Code Compiler</td></tr>
+<tr><td width="25%"><a href="compile.html">enableJIT</a></td>
+<td>Byte Code Compiler</td></tr>
+<tr><td width="25%"><a href="compile.html">getCompilerOption</a></td>
+<td>Byte Code Compiler</td></tr>
+<tr><td width="25%"><a href="compile.html">loadcmp</a></td>
+<td>Byte Code Compiler</td></tr>
+<tr><td width="25%"><a href="compile.html">setCompilerOptions</a></td>
+<td>Byte Code Compiler</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/compiler/html/R.css b/win32/deps/library/compiler/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/compiler/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/compiler/po/da/LC_MESSAGES/R-compiler.mo b/win32/deps/library/compiler/po/da/LC_MESSAGES/R-compiler.mo
new file mode 100644
index 0000000..7c99038
Binary files /dev/null and b/win32/deps/library/compiler/po/da/LC_MESSAGES/R-compiler.mo differ
diff --git a/win32/deps/library/compiler/po/de/LC_MESSAGES/R-compiler.mo b/win32/deps/library/compiler/po/de/LC_MESSAGES/R-compiler.mo
new file mode 100644
index 0000000..49c011b
Binary files /dev/null and b/win32/deps/library/compiler/po/de/LC_MESSAGES/R-compiler.mo differ
diff --git a/win32/deps/library/compiler/po/en quot/LC_MESSAGES/R-compiler.mo b/win32/deps/library/compiler/po/en quot/LC_MESSAGES/R-compiler.mo
new file mode 100644
index 0000000..5339190
Binary files /dev/null and b/win32/deps/library/compiler/po/en quot/LC_MESSAGES/R-compiler.mo differ
diff --git a/win32/deps/library/compiler/po/fr/LC_MESSAGES/R-compiler.mo b/win32/deps/library/compiler/po/fr/LC_MESSAGES/R-compiler.mo
new file mode 100644
index 0000000..a9421cb
Binary files /dev/null and b/win32/deps/library/compiler/po/fr/LC_MESSAGES/R-compiler.mo differ
diff --git a/win32/deps/library/compiler/po/ja/LC_MESSAGES/R-compiler.mo b/win32/deps/library/compiler/po/ja/LC_MESSAGES/R-compiler.mo
new file mode 100644
index 0000000..a814f81
Binary files /dev/null and b/win32/deps/library/compiler/po/ja/LC_MESSAGES/R-compiler.mo differ
diff --git a/win32/deps/library/compiler/po/ko/LC_MESSAGES/R-compiler.mo b/win32/deps/library/compiler/po/ko/LC_MESSAGES/R-compiler.mo
new file mode 100644
index 0000000..727fcf8
Binary files /dev/null and b/win32/deps/library/compiler/po/ko/LC_MESSAGES/R-compiler.mo differ
diff --git a/win32/deps/library/compiler/po/pl/LC_MESSAGES/R-compiler.mo b/win32/deps/library/compiler/po/pl/LC_MESSAGES/R-compiler.mo
new file mode 100644
index 0000000..f4b7909
Binary files /dev/null and b/win32/deps/library/compiler/po/pl/LC_MESSAGES/R-compiler.mo differ
diff --git a/win32/deps/library/compiler/po/pt_BR/LC_MESSAGES/R-compiler.mo b/win32/deps/library/compiler/po/pt_BR/LC_MESSAGES/R-compiler.mo
new file mode 100644
index 0000000..785c05d
Binary files /dev/null and b/win32/deps/library/compiler/po/pt_BR/LC_MESSAGES/R-compiler.mo differ
diff --git a/win32/deps/library/compiler/po/ru/LC_MESSAGES/R-compiler.mo b/win32/deps/library/compiler/po/ru/LC_MESSAGES/R-compiler.mo
new file mode 100644
index 0000000..e5823d8
Binary files /dev/null and b/win32/deps/library/compiler/po/ru/LC_MESSAGES/R-compiler.mo differ
diff --git a/win32/deps/library/compiler/po/zh_CN/LC_MESSAGES/R-compiler.mo b/win32/deps/library/compiler/po/zh_CN/LC_MESSAGES/R-compiler.mo
new file mode 100644
index 0000000..71843d4
Binary files /dev/null and b/win32/deps/library/compiler/po/zh_CN/LC_MESSAGES/R-compiler.mo differ
diff --git a/win32/deps/library/compiler/tests/assign.R b/win32/deps/library/compiler/tests/assign.R
new file mode 100644
index 0000000..96291b0
--- /dev/null
+++ b/win32/deps/library/compiler/tests/assign.R
@@ -0,0 +1,148 @@
+##
+## Assignment tests
+##
+
+library(compiler)
+
+## Local assignment
+
+### symbol
+x <- 1
+eval(compile(quote(x <- 2)))
+stopifnot(x == 2)
+
+### closure
+`f<-` <- function(x, i, value) { x[i] <- value; x }
+x <- 1
+eval(compile(quote(f(x, 1) <- 2)))
+stopifnot(x == 2)
+
+### SPECIAL
+`f<-` <- `[<-`
+x <- 1
+eval(compile(quote(f(x, 1) <- 2)))
+stopifnot(x == 2)
+
+### BUILTIN
+`f<-` <- `names<-`
+x <- 1
+eval(compile(quote(f(x) <- "foo")))
+stopifnot(identical(x, structure(1, names = "foo")))
+
+## Super assignment
+
+### symbol
+x <- 1
+eval(compile(quote((function() x <<- 2)())))
+stopifnot(x == 2)
+
+### closure
+`f<-` <- function(x, i, value) { x[i] <- value; x }
+x <- 1
+eval(compile(quote((function() f(x, 1) <<- 2)())))
+stopifnot(x == 2)
+
+### SPECIAL
+`f<-` <- `[<-`
+x <- 1
+eval(compile(quote((function() f(x, 1) <<- 2)())))
+stopifnot(x == 2)
+
+### BUILTIN
+`f<-` <- `names<-`
+x <- 1
+eval(compile(quote((function() f(x) <<- "foo")())))
+stopifnot(identical(x, structure(1, names = "foo")))
+
+## Dollargets
+
+### Default
+x <- list(a = 1)
+eval(compile(quote(x$a <- 2)))
+stopifnot(identical(x, list(a = 2)))
+
+### Dispatch
+x <- structure(list(a = 1), class = "foo")
+y <- NULL
+`$<-.foo` <- function(x, tag, value) { y <<- list(tag, value); x }
+eval(compile(quote(x$a <- 2)))
+stopifnot(identical(y, list("a", 2)))
+
+## Subassign
+
+### Default
+x <- 1
+eval(compile(quote(x[1] <- 2)))
+stopifnot(identical(x, 2))
+
+### Dispatching
+x <- structure(list(NULL), class = "foo")
+y <- NULL
+`[<-.foo` <- function(x, k, value) { y <<- rep(value, k); x }
+eval(compile(quote(x[2] <- 3)))
+stopifnot(identical(y, rep(3, 2)))
+
+#### Missing args
+x <- c(1, 2, 3)
+eval(compile(quote(x[] <- c(4, 5, 6))))
+stopifnot(identical(x, c(4, 5, 6)))
+
+### Named args
+x <- structure(list(NULL), class = "foo")
+y <- NULL
+`[<-.foo` <- function(x, k, value) { y <<- names(sys.call()[-1]); x }
+eval(compile(quote(x[k = 2] <- 3)))
+stopifnot(identical(y, c("", "k", "value")))
+
+## Subassign2
+
+### Default
+x <- list(NULL)
+eval(compile(quote(x[[1]] <- list(1))))
+stopifnot(identical(x, list(list(1))))
+
+### Dispatching
+x <- structure(list(), class = "foo")
+y <- 1
+`[[<-.foo` <- function(x, i, value) { y[i] <<- value; x }
+eval(compile(quote(x[[1]] <- 3)))
+stopifnot(identical(y, 3))
+
+## Nested assignments
+x <- list(a = list(b = 1))
+eval(compile(quote(x$a$b <- 2)))
+stopifnot(identical(x, list(a = list(b = 2))))
+
+x <- list(1, list(2))
+eval(compile(quote(x[[1]][] <- 2)))
+eval(compile(quote(x[[2]][[1]] <- 3)))
+stopifnot(identical(x, list(2, list(3))))
+
+
+## checkAssign
+checkAssign <- compiler:::checkAssign
+cenv <- compiler:::makeCenv(.GlobalEnv)
+cntxt <- compiler:::make.toplevelContext(cenv, list(suppressAll = TRUE))
+stopifnot(identical(checkAssign(quote(x <- 1), cntxt), TRUE))
+stopifnot(identical(checkAssign(quote("x" <- 1), cntxt), TRUE))
+stopifnot(identical(checkAssign(quote(3 <- 1), cntxt), FALSE))
+stopifnot(identical(checkAssign(quote(f(x) <- 1), cntxt), TRUE))
+stopifnot(identical(checkAssign(quote((f())(x) <- 1), cntxt), FALSE))
+stopifnot(identical(checkAssign(quote(f(g(x)) <- 1), cntxt), TRUE))
+stopifnot(identical(checkAssign(quote(f(g("x")) <- 1), cntxt), FALSE))
+
+
+## flattenPlace
+flattenPlace <- compiler:::flattenPlace
+stopifnot(identical(flattenPlace(quote(f(g(h(x, k), j), i))),
+                    list(quote(f(`*tmp*`, i)),
+                         quote(g(`*tmp*`, j)),
+                         quote(h(`*tmp*`, k)))))
+
+## getAssignFun
+getAssignFun <- compiler:::getAssignFun
+stopifnot(identical(getAssignFun(quote(f)), quote(`f<-`)))
+stopifnot(identical(getAssignFun("f"), NULL))
+stopifnot(identical(getAssignFun(quote(f(x))), NULL))
+stopifnot(identical(getAssignFun(quote(base::diag)), quote(base::`diag<-`)))
+stopifnot(identical(getAssignFun(quote(base:::diag)), quote(base:::`diag<-`)))
diff --git a/win32/deps/library/compiler/tests/basics.R b/win32/deps/library/compiler/tests/basics.R
new file mode 100644
index 0000000..fc158a4
--- /dev/null
+++ b/win32/deps/library/compiler/tests/basics.R
@@ -0,0 +1,101 @@
+library(compiler)
+
+## very minimal
+x <- 2
+stopifnot(eval(compile(quote(x + 1))) == 3)
+
+## simple code generation
+checkCode <- function(expr, code, optimize = 2) {
+    v <- compile(expr, options = list(optimize = optimize))
+    d <- .Internal(disassemble(v))[[2]][-1]
+    dd <- as.integer(eval(substitute(code), getNamespace("compiler")))
+    identical(d, dd)
+}
+x <- 2
+stopifnot(checkCode(quote(x + 1),
+                    c(GETVAR.OP, 1L,
+                      LDCONST.OP, 2L,
+                      ADD.OP, 0L,
+                      RETURN.OP)))
+f <- function(x) x
+checkCode(quote({f(1); f(2)}),
+          c(GETFUN.OP, 1L,
+            PUSHCONSTARG.OP, 2L,
+            CALL.OP, 3L,
+            POP.OP,
+            GETFUN.OP, 1L,
+            PUSHCONSTARG.OP, 4L,
+            CALL.OP, 5L,
+            RETURN.OP))
+
+
+## names and ... args
+f <- function(...) list(...)
+stopifnot(identical(f(1, 2), cmpfun(f)(1, 2)))
+
+f <- function(...) list(x = ...)
+stopifnot(identical(f(1, 2), cmpfun(f)(1, 2)))
+
+
+## substitute and argument constant folding
+f <- function(x) substitute(x)
+g <- function() f(1 + 2)
+v1 <- g()
+f <- cmpfun(f)
+g <- cmpfun(g)
+v2 <- g()
+stopifnot(identical(v1, v2))
+
+
+## simple loops
+sr <- function(x) {
+    n <- length(x)
+    i <- 1
+    s <- 0
+    repeat {
+        if (i > n) break
+        s <- s + x[i]
+        i <- i + 1
+    }
+    s
+}
+sw <- function(x) {
+    n <- length(x)
+    i <- 1
+    s <- 0
+    while (i <= n) {
+        s <- s + x[i]
+        i <- i + 1
+    }
+    s
+}
+sf <- function(x) {
+    s <- 0
+    for (y in x)
+        s <- s + y
+    s
+}
+src <- cmpfun(sr)
+swc <- cmpfun(sw)
+sfc <- cmpfun(sf)
+x <- 1 : 5
+stopifnot(src(x) == sr(x))
+stopifnot(swc(x) == sw(x))
+stopifnot(sfc(x) == sf(x))
+
+
+## Check that the handlers have been associated with the correct package
+h <- ls(compiler:::inlineHandlers, all = TRUE)
+p <- sub("package:", "", sapply(h, find))
+pp <- sapply(h, function(n) get(n, compiler:::inlineHandlers)$package)
+stopifnot(identical(p, pp))
+
+
+## Check assumption about simple .Internals
+stopifnot(all(sapply(compiler:::safeStatsInternals,
+                     function(f)
+                     compiler:::is.simpleInternal(get(f, "package:stats")))))
+
+stopifnot(all(sapply(compiler:::safeBaseInternals,
+                     function(f)
+                     compiler:::is.simpleInternal(get(f, "package:base")))))
diff --git a/win32/deps/library/compiler/tests/const.R b/win32/deps/library/compiler/tests/const.R
new file mode 100644
index 0000000..cfa8cbd
--- /dev/null
+++ b/win32/deps/library/compiler/tests/const.R
@@ -0,0 +1,65 @@
+
+library(compiler)
+
+##
+## Test code for constant folding
+##
+
+makeCenv <- compiler:::makeCenv
+checkConst <- compiler:::checkConst
+constantFoldSym <- compiler:::constantFoldSym
+constantFold <- compiler:::constantFold
+
+## using a global environment
+ce <- makeCenv(.GlobalEnv)
+stopifnot(identical(constantFoldSym(quote(pi), list(env = ce, optimize = 3)),
+                    checkConst(base::pi)))
+stopifnot(identical(constantFoldSym(quote(pi), list(env = ce, optimize = 2)),
+                    NULL))
+stopifnot(identical(constantFoldSym(quote(pi), list(env = ce, optimize = 1)),
+                    NULL))
+stopifnot(identical(constantFoldSym(quote(pi), list(env = ce, optimize = 0)),
+                    NULL))
+stopifnot(identical(constantFold(quote(1 + 2), list(optimize = 3, env = ce)),
+                    checkConst(1 + 2)))
+stopifnot(identical(constantFold(quote(1 + 2), list(optimize = 2, env = ce)),
+                    checkConst(1 + 2)))
+stopifnot(identical(constantFold(quote(1 + 2), list(optimize = 1, env = ce)),
+                    NULL))
+stopifnot(identical(constantFold(quote(1 + 2), list(optimize = 0, env = ce)),
+                    NULL))
+stopifnot(identical(constantFold(quote(sqrt(2)), list(optimize = 3, env = ce)),
+                    checkConst(sqrt(2))))
+stopifnot(identical(constantFold(quote(sqrt(2)), list(optimize = 2, env = ce)),
+                    NULL))
+stopifnot(identical(constantFold(quote(sqrt(2)), list(optimize = 1, env = ce)),
+                    NULL))
+stopifnot(identical(constantFold(quote(sqrt(2)), list(optimize = 0, env = ce)),
+                    NULL))
+
+## using a namespace environment
+ce <- makeCenv(getNamespace("stats"))
+stopifnot(identical(constantFoldSym(quote(pi), list(env = ce, optimize = 3)),
+                    list(value = base::pi)))
+stopifnot(identical(constantFoldSym(quote(pi), list(env = ce, optimize = 2)),
+                    list(value = base::pi)))
+stopifnot(identical(constantFoldSym(quote(pi), list(env = ce, optimize = 1)),
+                    checkConst(base::pi)))
+stopifnot(identical(constantFoldSym(quote(pi), list(env = ce, optimize = 0)),
+                    NULL))
+stopifnot(identical(constantFold(quote(1 + 2), list(optimize = 3, env = ce)),
+                    checkConst(1 + 2)))
+stopifnot(identical(constantFold(quote(1 + 2), list(optimize = 2, env = ce)),
+                    checkConst(1 + 2)))
+stopifnot(identical(constantFold(quote(1 + 2), list(optimize = 1, env = ce)),
+                    checkConst(1 + 2)))
+stopifnot(identical(constantFold(quote(1 + 2), list(optimize = 0, env = ce)),
+                    NULL))
+stopifnot(identical(constantFold(quote(sqrt(2)), list(optimize = 3, env = ce)),
+                    checkConst(sqrt(2))))
+stopifnot(identical(constantFold(quote(sqrt(2)), list(optimize = 2, env = ce)),
+                    checkConst(sqrt(2))))
+stopifnot(identical(constantFold(quote(sqrt(2)), list(optimize = 1, env = ce)),
+                    checkConst(sqrt(2))))
+stopifnot(identical(constantFold(quote(sqrt(2)), list(optimize = 0, env = ce)),
+                    NULL))
diff --git a/win32/deps/library/compiler/tests/envir.R b/win32/deps/library/compiler/tests/envir.R
new file mode 100644
index 0000000..ffe5d63
--- /dev/null
+++ b/win32/deps/library/compiler/tests/envir.R
@@ -0,0 +1,90 @@
+
+library(compiler)
+
+##
+## Tests for findHomeNS()
+##
+
+findHomeNS <- compiler:::findHomeNS
+
+## return value for an undefinded variable should be NULL
+stopifnot(is.null(findHomeNS("foo", getNamespace("stats"))))
+stopifnot(is.null(findHomeNS("foo", parent.env(getNamespace("stats")))))
+stopifnot(is.null(findHomeNS("foo", getNamespace("base"))))
+
+## + is found in .BaseNamespaceEnv for stats or base
+stopifnot(identical(findHomeNS("+", getNamespace("stats")),
+                    .BaseNamespaceEnv))
+stopifnot(identical(findHomeNS("+", parent.env(getNamespace("stats"))),
+                    .BaseNamespaceEnv))
+stopifnot(identical(findHomeNS("+", getNamespace("base")),
+                    .BaseNamespaceEnv))
+
+## dnorm is defined in stats
+stopifnot(identical(findHomeNS("dnorm", getNamespace("stats")),
+                    getNamespace("stats")))
+stopifnot(identical(findHomeNS("dnorm", parent.env(getNamespace("stats"))),
+                    getNamespace("stats")))
+stopifnot(is.null(findHomeNS("dnorm", getNamespace("base"))))
+
+## plot is available via the stats namespace since stats imports graphics
+stopifnot(identical(findHomeNS("plot", getNamespace("stats")),
+                    getNamespace("graphics")))
+stopifnot(identical(findHomeNS("plot", parent.env(getNamespace("stats"))),
+                    getNamespace("graphics")))
+stopifnot(is.null(findHomeNS("plot", getNamespace("base"))))
+
+## palette is one of a small set of selective imports from grDevices
+stopifnot(identical(findHomeNS("palette", getNamespace("stats")),
+                    getNamespace("grDevices")))
+stopifnot(identical(findHomeNS("palette", parent.env(getNamespace("stats"))),
+                    getNamespace("grDevices")))
+stopifnot(is.null(findHomeNS("palette", getNamespace("base"))))
+
+
+##
+## Tests for getAssignedVar
+##
+
+getAssignedVar <- compiler:::getAssignedVar
+stopifnot(identical(getAssignedVar(quote("v"<-x)), "v"))
+stopifnot(identical(getAssignedVar(quote(v<-x)), "v"))
+stopifnot(identical(getAssignedVar(quote(f(v)<-x)), "v"))
+stopifnot(identical(getAssignedVar(quote(f(g(v,2),1)<-x)), "v"))
+
+
+##
+## Tests for findLocals
+##
+
+findLocals <- compiler:::findLocals
+cenv <- compiler:::makeCenv(.GlobalEnv)
+cntxt <- compiler:::make.toplevelContext(cenv, NULL)
+
+stopifnot(identical(findLocals(quote(x<-1), cntxt), "x"))
+stopifnot(identical(findLocals(quote(f(x)<-1), cntxt), "x"))
+stopifnot(identical(findLocals(quote(f(g(x,2),1)<-1), cntxt), "x"))
+stopifnot(identical(findLocals(quote(x<-y<-1), cntxt), c("x","y")))
+stopifnot(identical(findLocals(quote(local(x<-1,e)), cntxt), "x"))
+stopifnot(identical(findLocals(quote(local(x<-1)), cntxt), character(0)))
+stopifnot(identical(findLocals(quote({local<-1;local(x<-1)}), cntxt),
+                    c("local", "x")))
+
+local({
+    f <- function (f, x, y) {
+        local <- f
+        local(x <- y)
+        x
+    }
+    stopifnot(identical(findLocals(body(f), cntxt), c("local","x")))
+})
+
+local({
+    cenv <- compiler:::addCenvVars(cenv, "local")
+    cntxt <- compiler:::make.toplevelContext(cenv, NULL)
+    stopifnot(identical(findLocals(quote(local(x<-1,e)), cntxt), "x"))
+})
+
+stopifnot(identical(findLocals(quote(assign(x, 3)), cntxt), character(0)))
+stopifnot(identical(findLocals(quote(assign("x", 3)), cntxt), "x"))
+stopifnot(identical(findLocals(quote(assign("x", 3, 4)), cntxt), character(0)))
diff --git a/win32/deps/library/compiler/tests/jit.R b/win32/deps/library/compiler/tests/jit.R
new file mode 100644
index 0000000..0b6262e
--- /dev/null
+++ b/win32/deps/library/compiler/tests/jit.R
@@ -0,0 +1,16 @@
+library(compiler)
+
+oldJIT <- enableJIT(3)
+
+## need a test of level 1 to make sure functions are compiled
+
+## need more tests here
+
+repeat { break }
+
+while(TRUE) break
+
+for (i in 1:10) i
+
+enableJIT(oldJIT)
+
diff --git a/win32/deps/library/compiler/tests/loop.R b/win32/deps/library/compiler/tests/loop.R
new file mode 100644
index 0000000..583b10b
--- /dev/null
+++ b/win32/deps/library/compiler/tests/loop.R
@@ -0,0 +1,26 @@
+library(compiler)
+
+f <- function(x) x
+
+g <- function(x) repeat if (x) f(return(1)) else return(2)
+gc <- cmpfun(g)
+stopifnot(identical(g(TRUE), gc(TRUE)))
+stopifnot(identical(g(FALSE), gc(FALSE)))
+
+h <- function(x) { repeat if (x) f(return(1)) else break; 2 }
+hc <- cmpfun(h)
+stopifnot(identical(h(TRUE), hc(TRUE)))
+stopifnot(identical(h(FALSE), hc(FALSE)))
+
+k <- function(x) { repeat if (x) return(1) else f(break); 2 }
+kc <- cmpfun(k)
+stopifnot(identical(k(TRUE), kc(TRUE)))
+stopifnot(identical(k(FALSE), kc(FALSE)))
+
+## **** need more variations on this.
+
+## this would give an error prior to fixing a binding cache bug
+f <- function(x) { for (y in x) { z <- y; g(break) } ; z }
+g <- function(x) x
+cmpfun(f)(c(1,2,3))
+
diff --git a/win32/deps/library/compiler/tests/switch.R b/win32/deps/library/compiler/tests/switch.R
new file mode 100644
index 0000000..42c846e
--- /dev/null
+++ b/win32/deps/library/compiler/tests/switch.R
@@ -0,0 +1,86 @@
+library(compiler)
+
+ev <- function(expr)
+    tryCatch(withVisible(eval(expr, parent.frame(), baseenv())),
+             error = function(e) conditionMessage(e))
+
+f <- function(x) switch(x, x = 1, y = , z = 3, , w =, 6, v = )
+fc <- cmpfun(f)
+
+stopifnot(identical(ev(quote(fc("x"))), ev(quote(f("x")))))
+stopifnot(identical(ev(quote(fc("A"))), ev(quote(f("A")))))
+
+stopifnot(identical(ev(quote(fc(0))), ev(quote(f(0)))))
+stopifnot(identical(ev(quote(fc(1))), ev(quote(f(1)))))
+stopifnot(identical(ev(quote(fc(2))), ev(quote(f(2)))))
+stopifnot(identical(ev(quote(fc(3))), ev(quote(f(3)))))
+stopifnot(identical(ev(quote(fc(4))), ev(quote(f(4)))))
+stopifnot(identical(ev(quote(fc(5))), ev(quote(f(5)))))
+stopifnot(identical(ev(quote(fc(6))), ev(quote(f(6)))))
+stopifnot(identical(ev(quote(fc(7))), ev(quote(f(7)))))
+stopifnot(identical(ev(quote(fc(8))), ev(quote(f(8)))))
+
+
+g <- function(x) switch(x, x = 1, y = , z = 3, w =, 5, v = )
+gc <- cmpfun(g)
+
+stopifnot(identical(ev(quote(gc("x"))), ev(quote(g("x")))))
+stopifnot(identical(ev(quote(gc("y"))), ev(quote(g("y")))))
+stopifnot(identical(ev(quote(gc("z"))), ev(quote(g("z")))))
+stopifnot(identical(ev(quote(gc("w"))), ev(quote(g("w")))))
+stopifnot(identical(ev(quote(gc("v"))), ev(quote(g("v")))))
+stopifnot(identical(ev(quote(gc("A"))), ev(quote(g("A")))))
+
+stopifnot(identical(ev(quote(gc(0))), ev(quote(g(0)))))
+stopifnot(identical(ev(quote(gc(1))), ev(quote(g(1)))))
+stopifnot(identical(ev(quote(gc(2))), ev(quote(g(2)))))
+stopifnot(identical(ev(quote(gc(3))), ev(quote(g(3)))))
+stopifnot(identical(ev(quote(gc(4))), ev(quote(g(4)))))
+stopifnot(identical(ev(quote(gc(5))), ev(quote(g(5)))))
+stopifnot(identical(ev(quote(gc(6))), ev(quote(g(6)))))
+stopifnot(identical(ev(quote(gc(7))), ev(quote(g(7)))))
+
+
+h <- function(x) switch(x, x = 1, y = , z = 3)
+hc <- cmpfun(h)
+
+stopifnot(identical(ev(quote(hc("x"))), ev(quote(h("x")))))
+stopifnot(identical(ev(quote(hc("y"))), ev(quote(h("y")))))
+stopifnot(identical(ev(quote(hc("z"))), ev(quote(h("z")))))
+stopifnot(identical(ev(quote(hc("A"))), ev(quote(h("A")))))
+
+stopifnot(identical(ev(quote(hc(0))), ev(quote(h(0)))))
+stopifnot(identical(ev(quote(hc(1))), ev(quote(h(1)))))
+stopifnot(identical(ev(quote(hc(2))), ev(quote(h(2)))))
+stopifnot(identical(ev(quote(hc(3))), ev(quote(h(3)))))
+stopifnot(identical(ev(quote(hc(4))), ev(quote(h(4)))))
+
+
+k <- function(x) switch(x, x = 1, y = 2, z = 3)
+kc <- cmpfun(k)
+
+stopifnot(identical(ev(quote(kc("x"))), ev(quote(k("x")))))
+stopifnot(identical(ev(quote(kc("y"))), ev(quote(k("y")))))
+stopifnot(identical(ev(quote(kc("z"))), ev(quote(k("z")))))
+stopifnot(identical(ev(quote(kc("A"))), ev(quote(k("A")))))
+
+stopifnot(identical(ev(quote(kc(0))), ev(quote(k(0)))))
+stopifnot(identical(ev(quote(kc(1))), ev(quote(k(1)))))
+stopifnot(identical(ev(quote(kc(2))), ev(quote(k(2)))))
+stopifnot(identical(ev(quote(kc(3))), ev(quote(k(3)))))
+stopifnot(identical(ev(quote(kc(4))), ev(quote(k(4)))))
+
+
+l <- function(x) switch(x, "a", "b", "c")
+lc <- cmpfun(l)
+
+ce <- function(expr) tryCatch(expr, error = function(e) "Error")
+
+## both of these should raise errors but the messages will differ
+stopifnot(identical(ce(lc("A")), ce(l("A"))))
+
+stopifnot(identical(ev(quote(lc(0))), ev(quote(l(0)))))
+stopifnot(identical(ev(quote(lc(1))), ev(quote(l(1)))))
+stopifnot(identical(ev(quote(lc(2))), ev(quote(l(2)))))
+stopifnot(identical(ev(quote(lc(3))), ev(quote(l(3)))))
+stopifnot(identical(ev(quote(lc(4))), ev(quote(l(4)))))
diff --git a/win32/deps/library/datasets/DESCRIPTION b/win32/deps/library/datasets/DESCRIPTION
index 15a42e1..03afe20 100644
--- a/win32/deps/library/datasets/DESCRIPTION
+++ b/win32/deps/library/datasets/DESCRIPTION
@@ -1,9 +1,9 @@
 Package: datasets
-Version: 2.9.2
+Version: 2.15.2
 Priority: base
 Title: The R Datasets Package
-Author: R Development Core Team and contributors worldwide
+Author: R Core Team and contributors worldwide
 Maintainer: R Core Team <R-core r-project org>
 Description: Base R datasets
-License: Part of R 2.9.2
-Built: R 2.9.2; ; 2009-08-24 12:45:11 UTC; windows
+License: Part of R 2.15.2
+Built: R 2.15.2; ; 2012-10-27 03:07:02 UTC; windows
diff --git a/win32/deps/library/datasets/INDEX b/win32/deps/library/datasets/INDEX
index e795575..e9a37cc 100644
--- a/win32/deps/library/datasets/INDEX
+++ b/win32/deps/library/datasets/INDEX
@@ -1,7 +1,7 @@
 AirPassengers           Monthly Airline Passenger Numbers 1949-1960
 BJsales                 Sales Data with Leading Indicator
 BOD                     Biochemical Oxygen Demand
-CO2                     Carbon Dioxide uptake in grass plants
+CO2                     Carbon Dioxide Uptake in Grass Plants
 ChickWeight             Weight versus age of chicks on different diets
 DNase                   Elisa assay of DNase
 EuStockMarkets          Daily Closing Prices of Major European Stock
@@ -10,7 +10,7 @@ Formaldehyde            Determination of Formaldehyde
 HairEyeColor            Hair and Eye Color of Statistics Students
 Harman23.cor            Harman Example 2.3
 Harman74.cor            Harman Example 7.4
-Indometh                Pharmacokinetics of Indomethicin
+Indometh                Pharmacokinetics of Indomethacin
 InsectSprays            Effectiveness of Insect Sprays
 JohnsonJohnson          Quarterly Earnings per Johnson & Johnson Share
 LakeHuron               Level of Lake Huron 1875-1972
@@ -20,8 +20,8 @@ Nile                    Flow of the River Nile
 Orange                  Growth of Orange Trees
 OrchardSprays           Potency of Orchard Sprays
 PlantGrowth             Results from an Experiment on Plant Growth
-Puromycin               Reaction velocity of an enzymatic reaction
-Theoph                  Pharmacokinetics of theophylline
+Puromycin               Reaction Velocity of an Enzymatic Reaction
+Theoph                  Pharmacokinetics of Theophylline
 Titanic                 Survival of passengers on the Titanic
 ToothGrowth             The Effect of Vitamin C on Tooth Growth in
                         Guinea Pigs
@@ -41,7 +41,7 @@ ability.cov             Ability and Intelligence Tests
 airmiles                Passenger Miles on Commercial US Airlines,
                         1937-1960
 airquality              New York Air Quality Measurements
-anscombe                Anscombe's Quartet of "Identical" Simple Linear
+anscombe                Anscombe's Quartet of 'Identical' Simple Linear
                         Regressions
 attenu                  The Joyner-Boore Attenuation Data
 attitude                The Chatterjee-Price Attitude Data
@@ -66,7 +66,7 @@ islands                 Areas of the World's Major Landmasses
 lh                      Luteinizing Hormone in Blood Samples
 longley                 Longley's Economic Regression Data
 lynx                    Annual Canadian Lynx trappings 1821-1934
-morley                  Michaelson-Morley Speed of Light Data
+morley                  Michelson Speed of Light Data
 mtcars                  Motor Trend Car Road Tests
 nhtemp                  Average Yearly Temperatures in New Haven
 nottem                  Average Monthly Temperatures at Nottingham,
diff --git a/win32/deps/library/datasets/Meta/Rd.rds b/win32/deps/library/datasets/Meta/Rd.rds
index 6f896bb..4e28191 100644
Binary files a/win32/deps/library/datasets/Meta/Rd.rds and b/win32/deps/library/datasets/Meta/Rd.rds differ
diff --git a/win32/deps/library/datasets/Meta/data.rds b/win32/deps/library/datasets/Meta/data.rds
index 3c0510a..e89c28f 100644
Binary files a/win32/deps/library/datasets/Meta/data.rds and b/win32/deps/library/datasets/Meta/data.rds differ
diff --git a/win32/deps/library/datasets/Meta/hsearch.rds b/win32/deps/library/datasets/Meta/hsearch.rds
index e47e79e..36d475f 100644
Binary files a/win32/deps/library/datasets/Meta/hsearch.rds and b/win32/deps/library/datasets/Meta/hsearch.rds differ
diff --git a/win32/deps/library/datasets/Meta/links.rds b/win32/deps/library/datasets/Meta/links.rds
new file mode 100644
index 0000000..a6e5e04
Binary files /dev/null and b/win32/deps/library/datasets/Meta/links.rds differ
diff --git a/win32/deps/library/datasets/Meta/nsInfo.rds b/win32/deps/library/datasets/Meta/nsInfo.rds
new file mode 100644
index 0000000..b825b2a
Binary files /dev/null and b/win32/deps/library/datasets/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/datasets/Meta/package.rds b/win32/deps/library/datasets/Meta/package.rds
index 3efed75..53dd299 100644
Binary files a/win32/deps/library/datasets/Meta/package.rds and b/win32/deps/library/datasets/Meta/package.rds differ
diff --git a/win32/deps/library/datasets/NAMESPACE b/win32/deps/library/datasets/NAMESPACE
new file mode 100644
index 0000000..5d0f475
--- /dev/null
+++ b/win32/deps/library/datasets/NAMESPACE
@@ -0,0 +1,2 @@
+# This package exports nothing (it uses lazydata)
+# exportPattern(".")
diff --git a/win32/deps/library/datasets/data/Rdata.rdb b/win32/deps/library/datasets/data/Rdata.rdb
index 2cfcc31..8a37907 100644
Binary files a/win32/deps/library/datasets/data/Rdata.rdb and b/win32/deps/library/datasets/data/Rdata.rdb differ
diff --git a/win32/deps/library/datasets/data/Rdata.rds b/win32/deps/library/datasets/data/Rdata.rds
index baa235e..9119841 100644
Binary files a/win32/deps/library/datasets/data/Rdata.rds and b/win32/deps/library/datasets/data/Rdata.rds differ
diff --git a/win32/deps/library/datasets/data/Rdata.rdx b/win32/deps/library/datasets/data/Rdata.rdx
index ea14f07..b94434b 100644
Binary files a/win32/deps/library/datasets/data/Rdata.rdx and b/win32/deps/library/datasets/data/Rdata.rdx differ
diff --git a/win32/deps/library/datasets/help/aliases.rds b/win32/deps/library/datasets/help/aliases.rds
new file mode 100644
index 0000000..1e1f980
Binary files /dev/null and b/win32/deps/library/datasets/help/aliases.rds differ
diff --git a/win32/deps/library/datasets/help/datasets.rdb b/win32/deps/library/datasets/help/datasets.rdb
new file mode 100644
index 0000000..82f6008
Binary files /dev/null and b/win32/deps/library/datasets/help/datasets.rdb differ
diff --git a/win32/deps/library/datasets/help/datasets.rdx b/win32/deps/library/datasets/help/datasets.rdx
new file mode 100644
index 0000000..1ede2a0
Binary files /dev/null and b/win32/deps/library/datasets/help/datasets.rdx differ
diff --git a/win32/deps/library/datasets/help/paths.rds b/win32/deps/library/datasets/help/paths.rds
new file mode 100644
index 0000000..9e914ab
Binary files /dev/null and b/win32/deps/library/datasets/help/paths.rds differ
diff --git a/win32/deps/library/datasets/html/00Index.html b/win32/deps/library/datasets/html/00Index.html
new file mode 100644
index 0000000..0bab6ab
--- /dev/null
+++ b/win32/deps/library/datasets/html/00Index.html
@@ -0,0 +1,367 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: The R Datasets Package</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> The R Datasets Package
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;datasets&rsquo; version 2.15.2</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p 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="#H">H</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="#W">W</a>
+</p>
+
+<table width="100%">
+<tr><td width="25%"><a href="datasets-package.html">datasets-package</a></td>
+<td>The R Datasets Package</td></tr>
+</table>
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="ability.cov.html">ability.cov</a></td>
+<td>Ability and Intelligence Tests</td></tr>
+<tr><td width="25%"><a href="airmiles.html">airmiles</a></td>
+<td>Passenger Miles on Commercial US Airlines, 1937-1960</td></tr>
+<tr><td width="25%"><a href="AirPassengers.html">AirPassengers</a></td>
+<td>Monthly Airline Passenger Numbers 1949-1960</td></tr>
+<tr><td width="25%"><a href="airquality.html">airquality</a></td>
+<td>New York Air Quality Measurements</td></tr>
+<tr><td width="25%"><a href="anscombe.html">anscombe</a></td>
+<td>Anscombe's Quartet of 'Identical' Simple Linear Regressions</td></tr>
+<tr><td width="25%"><a href="attenu.html">attenu</a></td>
+<td>The Joyner-Boore Attenuation Data</td></tr>
+<tr><td width="25%"><a href="attitude.html">attitude</a></td>
+<td>The Chatterjee-Price Attitude Data</td></tr>
+<tr><td width="25%"><a href="austres.html">austres</a></td>
+<td>Quarterly Time Series of the Number of Australian Residents</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="beavers.html">beaver1</a></td>
+<td>Body Temperature Series of Two Beavers</td></tr>
+<tr><td width="25%"><a href="beavers.html">beaver2</a></td>
+<td>Body Temperature Series of Two Beavers</td></tr>
+<tr><td width="25%"><a href="beavers.html">beavers</a></td>
+<td>Body Temperature Series of Two Beavers</td></tr>
+<tr><td width="25%"><a href="BJsales.html">BJsales</a></td>
+<td>Sales Data with Leading Indicator</td></tr>
+<tr><td width="25%"><a href="BJsales.html">BJsales.lead</a></td>
+<td>Sales Data with Leading Indicator</td></tr>
+<tr><td width="25%"><a href="BOD.html">BOD</a></td>
+<td>Biochemical Oxygen Demand</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="cars.html">cars</a></td>
+<td>Speed and Stopping Distances of Cars</td></tr>
+<tr><td width="25%"><a href="ChickWeight.html">ChickWeight</a></td>
+<td>Weight versus age of chicks on different diets</td></tr>
+<tr><td width="25%"><a href="chickwts.html">chickwts</a></td>
+<td>Chicken Weights by Feed Type</td></tr>
+<tr><td width="25%"><a href="zCO2.html">CO2</a></td>
+<td>Carbon Dioxide Uptake in Grass Plants</td></tr>
+<tr><td width="25%"><a href="co2.html">co2</a></td>
+<td>Mauna Loa Atmospheric CO2 Concentration</td></tr>
+<tr><td width="25%"><a href="crimtab.html">crimtab</a></td>
+<td>Student's 3000 Criminals Data</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="datasets-package.html">datasets</a></td>
+<td>The R Datasets Package</td></tr>
+<tr><td width="25%"><a href="discoveries.html">discoveries</a></td>
+<td>Yearly Numbers of Important Discoveries</td></tr>
+<tr><td width="25%"><a href="DNase.html">DNase</a></td>
+<td>Elisa assay of DNase</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="esoph.html">esoph</a></td>
+<td>Smoking, Alcohol and (O)esophageal Cancer</td></tr>
+<tr><td width="25%"><a href="euro.html">euro</a></td>
+<td>Conversion Rates of Euro Currencies</td></tr>
+<tr><td width="25%"><a href="euro.html">euro.cross</a></td>
+<td>Conversion Rates of Euro Currencies</td></tr>
+<tr><td width="25%"><a href="eurodist.html">eurodist</a></td>
+<td>Distances Between European Cities</td></tr>
+<tr><td width="25%"><a href="EuStockMarkets.html">EuStockMarkets</a></td>
+<td>Daily Closing Prices of Major European Stock Indices, 1991-1998</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="faithful.html">faithful</a></td>
+<td>Old Faithful Geyser Data</td></tr>
+<tr><td width="25%"><a href="UKLungDeaths.html">fdeaths</a></td>
+<td>Monthly Deaths from Lung Diseases in the UK</td></tr>
+<tr><td width="25%"><a href="Formaldehyde.html">Formaldehyde</a></td>
+<td>Determination of Formaldehyde</td></tr>
+<tr><td width="25%"><a href="freeny.html">freeny</a></td>
+<td>Freeny's Revenue Data</td></tr>
+<tr><td width="25%"><a href="freeny.html">freeny.x</a></td>
+<td>Freeny's Revenue Data</td></tr>
+<tr><td width="25%"><a href="freeny.html">freeny.y</a></td>
+<td>Freeny's Revenue Data</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="HairEyeColor.html">HairEyeColor</a></td>
+<td>Hair and Eye Color of Statistics Students</td></tr>
+<tr><td width="25%"><a href="Harman23.cor.html">Harman23.cor</a></td>
+<td>Harman Example 2.3</td></tr>
+<tr><td width="25%"><a href="Harman74.cor.html">Harman74.cor</a></td>
+<td>Harman Example 7.4</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Indometh.html">Indometh</a></td>
+<td>Pharmacokinetics of Indomethacin</td></tr>
+<tr><td width="25%"><a href="infert.html">infert</a></td>
+<td>Infertility after Spontaneous and Induced Abortion</td></tr>
+<tr><td width="25%"><a href="InsectSprays.html">InsectSprays</a></td>
+<td>Effectiveness of Insect Sprays</td></tr>
+<tr><td width="25%"><a href="iris.html">iris</a></td>
+<td>Edgar Anderson's Iris Data</td></tr>
+<tr><td width="25%"><a href="iris.html">iris3</a></td>
+<td>Edgar Anderson's Iris Data</td></tr>
+<tr><td width="25%"><a href="islands.html">islands</a></td>
+<td>Areas of the World's Major Landmasses</td></tr>
+</table>
+
+<h2><a name="J">-- J --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="JohnsonJohnson.html">JohnsonJohnson</a></td>
+<td>Quarterly Earnings per Johnson &amp; Johnson Share</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="LakeHuron.html">LakeHuron</a></td>
+<td>Level of Lake Huron 1875-1972</td></tr>
+<tr><td width="25%"><a href="UKLungDeaths.html">ldeaths</a></td>
+<td>Monthly Deaths from Lung Diseases in the UK</td></tr>
+<tr><td width="25%"><a href="lh.html">lh</a></td>
+<td>Luteinizing Hormone in Blood Samples</td></tr>
+<tr><td width="25%"><a href="LifeCycleSavings.html">LifeCycleSavings</a></td>
+<td>Intercountry Life-Cycle Savings Data</td></tr>
+<tr><td width="25%"><a href="Loblolly.html">Loblolly</a></td>
+<td>Growth of Loblolly pine trees</td></tr>
+<tr><td width="25%"><a href="longley.html">longley</a></td>
+<td>Longley's Economic Regression Data</td></tr>
+<tr><td width="25%"><a href="lynx.html">lynx</a></td>
+<td>Annual Canadian Lynx trappings 1821-1934</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="UKLungDeaths.html">mdeaths</a></td>
+<td>Monthly Deaths from Lung Diseases in the UK</td></tr>
+<tr><td width="25%"><a href="morley.html">morley</a></td>
+<td>Michelson Speed of Light Data</td></tr>
+<tr><td width="25%"><a href="mtcars.html">mtcars</a></td>
+<td>Motor Trend Car Road Tests</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="nhtemp.html">nhtemp</a></td>
+<td>Average Yearly Temperatures in New Haven</td></tr>
+<tr><td width="25%"><a href="Nile.html">Nile</a></td>
+<td>Flow of the River Nile</td></tr>
+<tr><td width="25%"><a href="nottem.html">nottem</a></td>
+<td>Average Monthly Temperatures at Nottingham, 1920-1939</td></tr>
+</table>
+
+<h2><a name="O">-- O --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="occupationalStatus.html">occupationalStatus</a></td>
+<td>Occupational Status of Fathers and their Sons</td></tr>
+<tr><td width="25%"><a href="Orange.html">Orange</a></td>
+<td>Growth of Orange Trees</td></tr>
+<tr><td width="25%"><a href="OrchardSprays.html">OrchardSprays</a></td>
+<td>Potency of Orchard Sprays</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="PlantGrowth.html">PlantGrowth</a></td>
+<td>Results from an Experiment on Plant Growth</td></tr>
+<tr><td width="25%"><a href="precip.html">precip</a></td>
+<td>Annual Precipitation in US Cities</td></tr>
+<tr><td width="25%"><a href="presidents.html">presidents</a></td>
+<td>Quarterly Approval Ratings of US Presidents</td></tr>
+<tr><td width="25%"><a href="pressure.html">pressure</a></td>
+<td>Vapor Pressure of Mercury as a Function of Temperature</td></tr>
+<tr><td width="25%"><a href="Puromycin.html">Puromycin</a></td>
+<td>Reaction Velocity of an Enzymatic Reaction</td></tr>
+</table>
+
+<h2><a name="Q">-- Q --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="quakes.html">quakes</a></td>
+<td>Locations of Earthquakes off Fiji</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="randu.html">randu</a></td>
+<td>Random Numbers from Congruential Generator RANDU</td></tr>
+<tr><td width="25%"><a href="rivers.html">rivers</a></td>
+<td>Lengths of Major North American Rivers</td></tr>
+<tr><td width="25%"><a href="rock.html">rock</a></td>
+<td>Measurements on Petroleum Rock Samples</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="UKDriverDeaths.html">Seatbelts</a></td>
+<td>Road Casualties in Great Britain 1969-84</td></tr>
+<tr><td width="25%"><a href="sleep.html">sleep</a></td>
+<td>Student's Sleep Data</td></tr>
+<tr><td width="25%"><a href="stackloss.html">stack.loss</a></td>
+<td>Brownlee's Stack Loss Plant Data</td></tr>
+<tr><td width="25%"><a href="stackloss.html">stack.x</a></td>
+<td>Brownlee's Stack Loss Plant Data</td></tr>
+<tr><td width="25%"><a href="stackloss.html">stackloss</a></td>
+<td>Brownlee's Stack Loss Plant Data</td></tr>
+<tr><td width="25%"><a href="state.html">state</a></td>
+<td>US State Facts and Figures</td></tr>
+<tr><td width="25%"><a href="state.html">state.abb</a></td>
+<td>US State Facts and Figures</td></tr>
+<tr><td width="25%"><a href="state.html">state.area</a></td>
+<td>US State Facts and Figures</td></tr>
+<tr><td width="25%"><a href="state.html">state.center</a></td>
+<td>US State Facts and Figures</td></tr>
+<tr><td width="25%"><a href="state.html">state.division</a></td>
+<td>US State Facts and Figures</td></tr>
+<tr><td width="25%"><a href="state.html">state.name</a></td>
+<td>US State Facts and Figures</td></tr>
+<tr><td width="25%"><a href="state.html">state.region</a></td>
+<td>US State Facts and Figures</td></tr>
+<tr><td width="25%"><a href="state.html">state.x77</a></td>
+<td>US State Facts and Figures</td></tr>
+<tr><td width="25%"><a href="sunspot.month.html">sunspot.month</a></td>
+<td>Monthly Sunspot Data, 1749-1997</td></tr>
+<tr><td width="25%"><a href="sunspot.year.html">sunspot.year</a></td>
+<td>Yearly Sunspot Data, 1700-1988</td></tr>
+<tr><td width="25%"><a href="sunspots.html">sunspots</a></td>
+<td>Monthly Sunspot Numbers, 1749-1983</td></tr>
+<tr><td width="25%"><a href="swiss.html">swiss</a></td>
+<td>Swiss Fertility and Socioeconomic Indicators (1888) Data</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Theoph.html">Theoph</a></td>
+<td>Pharmacokinetics of Theophylline</td></tr>
+<tr><td width="25%"><a href="Titanic.html">Titanic</a></td>
+<td>Survival of passengers on the Titanic</td></tr>
+<tr><td width="25%"><a href="ToothGrowth.html">ToothGrowth</a></td>
+<td>The Effect of Vitamin C on Tooth Growth in Guinea Pigs</td></tr>
+<tr><td width="25%"><a href="treering.html">treering</a></td>
+<td>Yearly Treering Data, -6000-1979</td></tr>
+<tr><td width="25%"><a href="trees.html">trees</a></td>
+<td>Girth, Height and Volume for Black Cherry Trees</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="UCBAdmissions.html">UCBAdmissions</a></td>
+<td>Student Admissions at UC Berkeley</td></tr>
+<tr><td width="25%"><a href="UKDriverDeaths.html">UKDriverDeaths</a></td>
+<td>Road Casualties in Great Britain 1969-84</td></tr>
+<tr><td width="25%"><a href="UKgas.html">UKgas</a></td>
+<td>UK Quarterly Gas Consumption</td></tr>
+<tr><td width="25%"><a href="UKLungDeaths.html">UKLungDeaths</a></td>
+<td>Monthly Deaths from Lung Diseases in the UK</td></tr>
+<tr><td width="25%"><a href="USAccDeaths.html">USAccDeaths</a></td>
+<td>Accidental Deaths in the US 1973-1978</td></tr>
+<tr><td width="25%"><a href="USArrests.html">USArrests</a></td>
+<td>Violent Crime Rates by US State</td></tr>
+<tr><td width="25%"><a href="USJudgeRatings.html">USJudgeRatings</a></td>
+<td>Lawyers' Ratings of State Judges in the US Superior Court</td></tr>
+<tr><td width="25%"><a href="USPersonalExpenditure.html">USPersonalExpenditure</a></td>
+<td>Personal Expenditure Data</td></tr>
+<tr><td width="25%"><a href="uspop.html">uspop</a></td>
+<td>Populations Recorded by the US Census</td></tr>
+</table>
+
+<h2><a name="V">-- V --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="VADeaths.html">VADeaths</a></td>
+<td>Death Rates in Virginia (1940)</td></tr>
+<tr><td width="25%"><a href="volcano.html">volcano</a></td>
+<td>Topographic Information on Auckland's Maunga Whau Volcano</td></tr>
+</table>
+
+<h2><a name="W">-- W --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="warpbreaks.html">warpbreaks</a></td>
+<td>The Number of Breaks in Yarn during Weaving</td></tr>
+<tr><td width="25%"><a href="women.html">women</a></td>
+<td>Average Heights and Weights for American Women</td></tr>
+<tr><td width="25%"><a href="WorldPhones.html">WorldPhones</a></td>
+<td>The World's Telephones</td></tr>
+<tr><td width="25%"><a href="WWWusage.html">WWWusage</a></td>
+<td>Internet Usage per Minute</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/datasets/html/R.css b/win32/deps/library/datasets/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/datasets/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/fields/DESCRIPTION b/win32/deps/library/fields/DESCRIPTION
index a796ae3..9a71d62 100644
--- a/win32/deps/library/fields/DESCRIPTION
+++ b/win32/deps/library/fields/DESCRIPTION
@@ -1,25 +1,33 @@
 Package: fields
-Version: 6.01
-Date: September 4, 2009
+Version: 6.7
+Date: October 13, 2012
 Title: Tools for spatial data
 Author: Reinhard Furrer, Douglas Nychka and Stephen Sain
 Maintainer: Doug Nychka <nychka ucar edu>
 Description: Fields is for curve, surface and function fitting with an
         emphasis on splines, spatial data and spatial statistics. The
         major methods include cubic, robust, and thin plate splines,
-        multivariate Kriging and Kriging for large data sets. A major
-        feature is that any covariance function implemented in R can be
-        used for spatial prediction. There are also many useful
-        functions for plotting and working with spatial data as images.
-        This package also contains an implementation of a sparse matrix
-        methods for large data sets and currently requires the sparse
-        matrix (spam) package for testing (but not for the standard
-        spatial functions.) Use help(fields) to get started and for an
-        overview.
+        and Kriging for large data sets. The splines and Kriging
+        methods are supporting by functions that can determine the
+        smoothing parameter (nugget and sill variance) by cross
+        validation and also by restricted maximum likelihood.  A major
+        feature is that any covariance function implemented in R with
+        the fields interface can be used for spatial prediction. Some
+        tailored optimization functions are supplied for find the MLEs
+        for the Matern family of covariances.  There are also many
+        useful functions for plotting and working with spatial data as
+        images. This package also contains an implementation of a
+        sparse matrix methods for large data sets and currently
+        requires the sparse matrix (spam) package for testing (but not
+        for the standard spatial functions.) Use help(fields) to get
+        started and for an overview.  The fields source code is heavily
+        commented and should provide useful explanation of numerical
+        details in addition to the manual pages.
 License: GPL (>= 2)
 URL: http://www.image.ucar.edu/Software/Fields
-Depends: methods, spam
-Packaged: 2009-09-22 19:37:06 UTC; nychka
+Depends: R (>= 2.13), methods, spam
+Packaged: 2012-10-16 17:40:42 UTC; nychka
 Repository: CRAN
-Date/Publication: 2009-09-22 20:23:49
-Built: R 2.9.2; i386-pc-mingw32; 2010-01-13 23:29:00 UTC; windows
+Date/Publication: 2012-10-16 18:52:38
+Built: R 2.15.2; x86_64-w64-mingw32; 2013-01-24 20:19:29 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/fields/INDEX b/win32/deps/library/fields/INDEX
index 3d561f5..1e4246d 100644
--- a/win32/deps/library/fields/INDEX
+++ b/win32/deps/library/fields/INDEX
@@ -1,125 +1,122 @@
-%d*%-methods            Multiplying diagonal matrices in Package
-                        'fields'
-BD                      Data frame of the effect of buffer compositions
-                        on DNA strand displacement amplification. A 4-d
-                        regression data set with with replication. This
-                        is a useful test data set for exercising
-                        function fitting methods.
-CO2                     Simulated global CO2 observations
-COmonthlyMet            Monthly surface meterology for Colorado
-                        1895-1997
-Exp.cov                 Exponential family, radial basis
-                        functions,cubic spline, compactly supported
-                        Wendland family and stationary covariances.
-Exponential             Covariance functions
-Krig                    Kriging surface estimate
-Krig.Amatrix            Smoother (or "hat") matrix relating predicted
-                        values to the dependent (Y) values.
-Krig.engine.default     Basic linear algebra utilities and other
-                        computations supporting the Krig function.
-Krig.null.function      Default function to create fixed matrix part of
-                        spatial process model.
-RCMexample              3-hour precipitation fields from a regional
-                        climate model
-RMprecip                Monthly total precipitation (mm) for August
-                        1963 in the Rocky Mountain Region and some
-                        gridded 4km elevation data sets.
-Tps                     Thin plate spline regression
-US                      Plot of the US with state boundaries
-US.dat                  Outline of coterminous US and states.
-W.info                  Gives indexing imfomration for a wavelet
-                        decompostion
-Wendland                Wendland family of covariance functions and
-                        supporting numerical functions
-Wimage.cov              Functions for W-transform based covariance
-                        models
-Wimage.info             Finds key indices related to a 2-d
-                        multiresolution
-Wimage.info.plot        Plot to check 2-d multiresolution indexing
-Wtransform              Quadratic W wavelet transform for 1-d vectors
-                        or rectangular or cylindrical images
-add.image               Adds an image to an existing plot.
-arrow.plot              Adds arrows to a plot
-as.image                Creates image from irregular x,y,z
-as.surface              Creates an "surface" object from grid values.
-bplot                   boxplot
-bplot.xy                Boxplots for conditional distribution
-colorbar.plot           Adds color scale strips to an existing plot.
-cover.design            Computes Space-Filling "Coverage" designs using
-                        Swapping Algorithm
-drape.plot              Perspective plot draped with colors in the
-                        facets.
-fields                  fields - tools for spatial data
-fields.diagonalize      Fields supporting functions
-fields.hints            fields - graphics hints
-fields.tests            Testing fields functions
-flame                   Response surface experiment ionizing a reagent
-gcv.Krig                Finds profile likelihood and GCV estimates of
-                        smoothing parameters for splines and Kriging.
-grid list               Some simple functions for working with gridded
-                        data and the grid format (grid.list) used in
-                        fields.
-image.plot              Draws image plot with a legend strip for the
-                        color scale based on either a regular grid or a
-                        grid of quadrilaterals.
-image.smooth            Kernel smoother for irregular 2-d data
-image2lz                Some simple functions for subsetting images
-interp.surface          Fast bilinear interpolator from a grid.
-krig.image              Spatial process estimate for large irregular
-                        2-d dats sets.
-lennon                  Gray image of John Lennon.
-mKrig                   "micro Krig" Spatial process estimate of a
-                        curve or surface, "kriging" with a known
-                        covariance function.
-mKrig.grid              Using MKrig for predicting on a grid.
-minitri                 Mini triathlon results
-ozone                   Data set of ozone measurements at 20 Chicago
-                        monitoring stations.
-ozone2                  Daily 8-hour ozone averages for sites in the
-                        Midwest
-plot.Krig               Diagnostic and summary plots of a Kriging or
-                        spline object
-plot.Wimage             Plots 2-d wavelet coefficents by level and type
-plot.surface            Plots a surface
-poisson.cov             Poisson spherical covariance function
-poly.image              Image plot for cells that are irregular
-                        quadrilaterals.
-predict.Krig            Evaluation of Krig spatial process estimate.
-predict.se              Standard errors of predictions
-predict.se.Krig         Standard errors of predictions for Krig spatial
-                        process estimate
-predict.surface         Evaluates a fitted function or its standard
-                        errors as a surface object
-print.Krig              Print kriging fit results.
-pushpin                 Adds a "push pin" to an existing 3-d plot
-qsreg                   Quantile or Robust spline regression
-quilt.plot              Image plot for irregular spatial data.
-rat.diet                Experiment studying an appetite supressant in
-                        rats.
-rdist                   Euclidean distance matrix
-rdist.earth             Great circle distance matrix
-ribbon.plot             Adds to an existing plot, a ribbon of color,
-                        based on values from a color scale, along a
-                        sequence of line segments.
-set.panel               Specify a panel of plots
-sim.Krig.standard       Conditonal simulation of a spatial process
-sim.rf                  Simulates a random field
-smooth.2d               Kernel smoother for irregular 2-d data
-spind2spam              Conversion of formats for sparse matrices
-splint                  Cubic spline interpolation
-sreg                    Smoothing spline regression
-stationary.image.cov    Exponential, Matern and general covariance
-                        functions for 2-d gridded locations.
-stats                   Calculate summary statistics
-stats.bin               Bins data and finds some summary statistics.
-summary.Krig            Summary for Krig spatial process estimate
-summary.ncdf            Summarizes a netCDF file handle
-surface.Krig            Plots a surface and contours
-tim.colors              Some useful color tables for images.
-transformx              Linear transformation
-vgram                   Finds a traditional or robust variogram for
-                        spatial data.
-vgram.matrix            Computes a variogram from an image
-world                   Plot of the world
-xline                   Draw a vertical line
-yline                   Draw horizontal lines
+BD                      Data frame of the effect of buffer compositions
+                        on DNA strand displacement amplification. A 4-d
+                        regression data set with with replication. This
+                        is a useful test data set for exercising
+                        function fitting methods.
+CO2                     Simulated global CO2 observations
+COmonthlyMet            Monthly surface meterology for Colorado
+                        1895-1997
+Exp.cov                 Exponential family, radial basis
+                        functions,cubic spline, compactly supported
+                        Wendland family and stationary covariances.
+Exponential             Covariance functions
+Krig                    Kriging surface estimate
+Krig.Amatrix            Smoother (or "hat") matrix relating predicted
+                        values to the dependent (Y) values.
+Krig.engine.default     Basic linear algebra utilities and other
+                        computations supporting the Krig function.
+Krig.null.function      Default function to create fixed matrix part of
+                        spatial process model.
+NorthAmericanRainfall   Observed North American summer precipitation
+                        from the historical climate network.
+RCMexample              3-hour precipitation fields from a regional
+                        climate model
+REML.test               Maximum Likelihood estimates for some Matern
+                        covariance parameters.
+RMprecip                Monthly total precipitation (mm) for August
+                        1963 in the Rocky Mountain Region and some
+                        gridded 4km elevation data sets.
+Tps                     Thin plate spline regression
+US                      Plot of the US with state boundaries
+US.dat                  Outline of coterminous US and states.
+Wendland                Wendland family of covariance functions and
+                        supporting numerical functions
+WorldBankCO2            Carbon emissions and demographic covariables by
+                        country for 1999.
+add.image               Adds an image to an existing plot.
+arrow.plot              Adds arrows to a plot
+as.image                Creates image from irregular x,y,z
+as.surface              Creates an "surface" object from grid values.
+bplot                   boxplot
+bplot.xy                Boxplots for conditional distribution
+colorbar.plot           Adds color scale strips to an existing plot.
+cover.design            Computes Space-Filling "Coverage" designs using
+                        Swapping Algorithm
+drape.plot              Perspective plot draped with colors in the
+                        facets.
+fields                  fields - tools for spatial data
+fields.diagonalize2     Fields supporting functions
+fields.hints            fields - graphics hints
+fields.tests            Testing fields functions
+flame                   Response surface experiment ionizing a reagent
+gcv.Krig                Finds profile likelihood and GCV estimates of
+                        smoothing parameters for splines and Kriging.
+grid list               Some simple functions for working with gridded
+                        data and the grid format (grid.list) used in
+                        fields.
+image.plot              Draws image plot with a legend strip for the
+                        color scale based on either a regular grid or a
+                        grid of quadrilaterals.
+image.smooth            Kernel smoother for irregular 2-d data
+image2lz                Some simple functions for subsetting images
+interp.surface          Fast bilinear interpolator from a grid.
+lennon                  Gray image of John Lennon.
+mKrig                   "micro Krig" Spatial process estimate of a
+                        curve or surface, "kriging" with a known
+                        covariance function.
+mKrig.MLE               maximizes likelihood for the process marginal
+                        variance (rho) and nugget standard deviation
+                        (sigma) parameters (e.g. lambda) over a list of
+                        covariance models or a grid of covariance
+                        parameter values.
+mKrig.grid              Using MKrig for predicting on a grid.
+minitri                 Mini triathlon results
+ozone                   Data set of ozone measurements at 20 Chicago
+                        monitoring stations.
+ozone2                  Daily 8-hour ozone averages for sites in the
+                        Midwest
+plot.Krig               Diagnostic and summary plots of a Kriging or
+                        spline object
+plot.surface            Plots a surface
+poly.image              Image plot for cells that are irregular
+                        quadrilaterals.
+predict.Krig            Evaluation of Krig spatial process estimate.
+predict.derivative      Predicted derivatives
+predict.se              Standard errors of predictions
+predict.se.Krig         Standard errors of predictions for Krig spatial
+                        process estimate
+predict.surface         Evaluates a fitted function or its standard
+                        errors as a surface object
+print.Krig              Print kriging fit results.
+pushpin                 Adds a "push pin" to an existing 3-d plot
+quilt.plot              Image plot for irregular spatial data.
+rat.diet                Experiment studying an appetite supressant in
+                        rats.
+rdist                   Euclidean distance matrix
+rdist.earth             Great circle distance matrix
+ribbon.plot             Adds to an existing plot, a ribbon of color,
+                        based on values from a color scale, along a
+                        sequence of line segments.
+set.panel               Specify a panel of plots
+sim.Krig.standard       Conditonal simulation of a spatial process
+sim.rf                  Simulates a random field
+smooth.2d               Kernel smoother for irregular 2-d data
+spind2spam              Conversion of formats for sparse matrices
+splint                  Cubic spline interpolation
+sreg                    Smoothing spline regression
+stationary.image.cov    Exponential, Matern and general covariance
+                        functions for 2-d gridded locations.
+stats                   Calculate summary statistics
+stats.bin               Bins data and finds some summary statistics.
+summary.Krig            Summary for Krig spatial process estimate
+summary.ncdf            Summarizes a netCDF file handle
+surface.Krig            Plots a surface and contours
+tim.colors              Some useful color tables for images and tools
+                        to handle them.
+transformx              Linear transformation
+vgram                   Finds a traditional or robust variogram for
+                        spatial data.
+vgram.matrix            Computes a variogram from an image
+world                   Plot of the world
+xline                   Draw a vertical line
+yline                   Draw horizontal lines
diff --git a/win32/deps/library/fields/LICENSE b/win32/deps/library/fields/LICENSE
new file mode 100644
index 0000000..3a847ba
--- /dev/null
+++ b/win32/deps/library/fields/LICENSE
@@ -0,0 +1,11 @@
+All R code and documentation in this package (fields) is licensed
+under the terms of the GPL license.
+
+NOTE:
+
+The sparse matrix methods used in fields are supported by the package
+spam and there are a subset of fortran routines in spam where some
+licensing issues are unclear. Please refer to the spam license
+information for details. Note that many functions in fields e.g. Tps,
+Krig, all the graphical functions, do not require this package so much
+of fields will be functional under a GPL license.
diff --git a/win32/deps/library/fields/MD5 b/win32/deps/library/fields/MD5
index 6935c71..8a4f8e9 100644
--- a/win32/deps/library/fields/MD5
+++ b/win32/deps/library/fields/MD5
@@ -1,115 +1,37 @@
-0560fb103dec40ad9a3dbb2848cc31d4 *CONTENTS
-7b72cfcf8b0d5e9b74f444e2cafea8dc *DESCRIPTION
-b39f7e1fd93048e25f2382b45e794c6e *INDEX
-1890ec32d42ba4f7a5ba4de7d857979a *Meta/Rd.rds
-a61a5faf8d28a8df20768392d50c5eb3 *Meta/data.rds
-fd133af4457148790b53103dce248d82 *Meta/hsearch.rds
-94a99e4b1e5160e970be0a6958dd6947 *Meta/package.rds
-b4257847c0d1a8c2a1a03dd31b157616 *R-ex/Rex.zip
-6e60a4480e0345d65902fc23b54bffd6 *R/fields
-fe06b9c0d095236767019bd4b16a67ae *R/fields.rdb
-f939626673d754ab205ea2ae29ddbf3c *R/fields.rdx
-9325aad5173d112f712ec09f22ddb2ca *chtml/fields.chm
-115c24a6041c8e2fd17102d18840c609 *data/CO2.rda
-08003b5b82b618cd116a0ad59c7a202a *data/COmonthlyMet.rda
-3adbae86a62efba890a88654302c9e8f *data/PRISMelevation.rda
-8a7b92c0298410aa2b45068d433c83d6 *data/RCMexample.rda
-b3da53380aabfb92f0ad48f849ab98a1 *data/RMelevation.rda
-b7076eebad7d67b764329cead6a75638 *data/US.dat.rda
-b337de3134565d9bd2059ea259c23a22 *data/lennon.rda
-33b21c6698aafd620549adb74df412dc *data/ozone2.r
-0b4cb1b16f80b395c79a93ed6ce59eca *data/ozone2.rda
-d8af8c0335e4729daebcf206dc66043c *data/rat.diet.r
-036b378c0bf71b86b6ce8258540869d6 *data/world.dat.rda
-c11fc552c6162186f195d0e0dbb5310d *help/AnIndex
-2a346fc53c30d80806e076f0b2331e24 *help/Rhelp.zip
-16a5a45b82d87be951f5455e0e237d04 *html/00Index.html
-6cc29c7bd52ecd14fab7f8bf2d5106b0 *html/BD.html
-6bc0b748920eebc10edd415bdebee04e *html/CO.html
-01c5c5155d0b9793a719bfa4e7971604 *html/CO2.html
-c8d1aea99fa6fb06ac1aaf97a9479ea8 *html/Exponential.html
-ff6623b4573f723db156b38dbecc0a8f *html/Krig.Amatrix.html
-ff037ed492d500001b248b2c695ee6fe *html/Krig.engine.default.html
-41fda5f275c9666f038370107a965c49 *html/Krig.html
-51b3854a9296f84313644965051acfe1 *html/Krig.null.function.html
-7edcacc9cc125431bd5b42502a89725e *html/RCMexample.html
-af32b656eec18d6d5e421fd5ddd070e4 *html/RMprecip.html
-4701aa3a35651c3b0d8ae23e0e2108a9 *html/Tps.html
-f92472af31f4de44d27d0740c5b74d30 *html/US.dat.html
-5fac681787961a744e51b293c71bfc4e *html/US.html
-5e9ebab5b915dfe8116b07b3193920f6 *html/W.info.html
-749e570c2aae646b88894ec9b0bcb7df *html/Wendland.html
-835aa091cff060699127bbe1bb519a78 *html/Wimage.cov.html
-51b6af9c0388287cf17387f22d40cfcf *html/Wimage.info.html
-d6a66171cf32adb961407425b65e446a *html/Wimage.info.plot.html
-bf8a347ee4b0bae0b70a65c2509b986c *html/Wtransform.html
-08993413c1104ae891ac2e1f32295348 *html/add.image.html
-a9ac8dce1d01453269532db29a1ca2fd *html/arrow.plot.html
-98509a2b945a0b8659015cd621fb2451 *html/as.image.html
-08c3e9be83875df321b73df7fc88d032 *html/as.surface.html
-8ef8cf28d3a2f653906ac51d34b268fe *html/bplot.html
-a1ccfc31e782f75f38f744fedd708453 *html/bplot.xy.html
-62de599904bb75a404261d39cfded822 *html/colorbar.plot.html
-067ec6b0b07d7bc3848935cbc3ed9413 *html/cover.design.html
-d615b53768d7ad4b1cad24aaa72db8a4 *html/diag_mult.html
-2e57998a47d4e8522b1554341034049c *html/drape.plot.html
-d6b06f6984ecf710a832043444624f7a *html/exp.cov.html
-2847102aae2e3244a621ded421fb4f0f *html/fields-internal.html
-9be6e5d1573e2750f76fba1912e5265f *html/fields-stuff.html
-86bc28b6a8e094b213009f7f78305d6d *html/fields.grid.html
-a56902bb1a8205eb86bd3b18b2455542 *html/fields.hints.html
-0be9f4831e7a978ac988cbfe3633d679 *html/fields.html
-b132b940dbf24b579f4e996cb1047350 *html/fields.tests.html
-3f2171530e6ef39aeaa36c72e763c9a8 *html/flame.html
-a15e30bbc37bd52bc4c97de8c853b70f *html/gcv.Krig.html
-8b63cedc01889b958411747c5977966b *html/grid.list.html
-c0391917968330c72a3d2d4eb7e4fd79 *html/image.cov.html
-86ac2aacef1293a54ae14256e33a012e *html/image.plot.html
-bb9e97d9b9a34b2bebd00c33dac3e588 *html/image.smooth.html
-ba28be53505d1ee7a6406a0663a0c29a *html/image2lz.html
-12386c4de857aed20440db6bdd6a526f *html/interp.surface.html
-8444480ea2fdbf324a6a09f752a488c1 *html/krig.image.html
-1dd50fde3643cdc5302fc3c4947c4c97 *html/lennon.html
-d4a8ba78aed1c5b2630957a5ec9b169d *html/mKrig.html
-ead4242ddad8b35a190a08b11a573ae2 *html/minitri.html
-138b5bafecf5107139b4815c26cc2306 *html/ozone.html
-530430cb5d9ad6f785750ed047e284a1 *html/ozone2.html
-34b09569fbd259596fe830f4b51a2642 *html/plot.Krig.html
-28e664118b48d39f7eb03b365eeaaef9 *html/plot.Wimage.html
-0396814e59f2d26bb8dbac795ea92e3a *html/plot.surface.html
-bf6bba940d5c56d309286c2a74835d3d *html/poisson.cov.html
-6e4a7a8354b0c4dcbe41c1e67f4bce04 *html/poly.image.html
-ba8c1e6ec072d04a78f554b6935ee57d *html/predict.Krig.html
-a09578f280656b244a8b66e81d7a889a *html/predict.se.Krig.html
-f07a22e8c97525ced99dc6095b2e5673 *html/predict.se.html
-36a21aeb9a46d15dd854610f56e9530f *html/predict.surface.html
-d0e1e419b4128e05f65d55d3afd57d6c *html/print.Krig.html
-6d8a859802e48547d8005a7827f3fe10 *html/pushpin.html
-7176a38052c4deb5a72e6cc98eacf7b1 *html/qsreg.html
-577f5ba9c12ad1215c2bcbad70513bd7 *html/quilt.plot.html
-65c590cfd13a91eba4a68a6d3a381163 *html/rat.diet.html
-12597fc5255d6bdd0fa2291056a1df2e *html/rdist.earth.html
-847cc1e7ae9dd858d59fd457169f0add *html/rdist.html
-df47ff5a8015cd19cad1623efe4459d2 *html/ribbon.plot.html
-3218935fc6e4d875613c367328bd67d3 *html/set.panel.html
-57ea206404a28d97491a6546e95d2659 *html/sim.Krig.html
-5de0f619e875c654b115e94c481d4b51 *html/sim.rf.html
-cf477d9d3d0af3f7de7b6141f92695d8 *html/smooth.2d.html
-8133469f9ba26ceb43a723e2c1da4795 *html/spam2lz.html
-c06637ebe0146d9c0a36317ddcee2533 *html/splint.html
-fd1ae7a01ea11b6522038732992abec0 *html/sreg.html
-400f1a3d32f550ed7e6a5b168e8b39cd *html/stats.bin.html
-0602a05b7f0ba1bd9a360a61c0ee2efd *html/stats.html
-d221d465fc2ce97ff569b5bc2a26b55e *html/summary.Krig.html
-ba9c9d4e57152ed901591cb4f493dbf5 *html/summary.ncdf.html
-a6a800ac638770103a4eee30ee190fa0 *html/surface.Krig.html
-cf9dc0a542cbb2cf1bccb3790e198338 *html/tim.colors.html
-c4bf77d60255642e705ab0112623f990 *html/transformx.html
-8ea39e69842673b29d93067773e1b3f8 *html/vgram.html
-ed498e29228de74a00dc85c641389142 *html/vgram.matrix.html
-777cfe3ea410021344f29cc7220e92b8 *html/world.html
-6a8ee8bacaaf06ee03019548640cf873 *html/xline.html
-0641d44d05dc98c01281781ffd88d718 *html/yline.html
-5697232ca82b8873560f29e65a5b8c32 *latex/Rhelp.zip
-97b306efd6b89771023e321be8ea6893 *libs/fields.dll
-0e7d9deae29c5babdd00755eaef91e9b *man/fields.Rd.gz
+0f6cd40458aafe676451ba8ad7498977 *DESCRIPTION
+ad2be08a47ce2d189e1a518366a86832 *INDEX
+9fdcee37301b4808ab63d8f9dbcd9bd9 *LICENSE
+996b82515235ee8add680c4930c74433 *Meta/Rd.rds
+555c38561f2a652e126f66ccfeaaed77 *Meta/data.rds
+1f7371b7e8ab52a51f5d2d9646d4d796 *Meta/hsearch.rds
+c1b1dd957b3551bb42a0bdecf58dc950 *Meta/links.rds
+1c56a07a334ee8ad603a2ffb4db78b5e *Meta/nsInfo.rds
+3b572eb7a14de6f671e6191d0a01f024 *Meta/package.rds
+e5db63a0f2482b78082007ba4ceea935 *NAMESPACE
+240d28d145138a75831809e31a480bad *R/fields
+8a19f0bc2c5a3342da679ee01c63c11d *R/fields.rdb
+6def3359456254864ee60211eda810f9 *R/fields.rdx
+def2e3c5b2487cf369719ecedc0ec009 *data/CO2.rda
+74f28573008f6b64fae8e5b724bd36a3 *data/COmonthlyMet.rda
+652f70fc0c2630a0a698419bb91fc736 *data/NorthAmericanRainfall.rda
+0c0be8a07fa347d68fc36fc6a117c759 *data/PRISMelevation.rda
+d5ae9ea8fb3cff4c92c686e2b8e2a669 *data/RCMexample.rda
+ec8555f8006ae1cbdf3937be5609b37e *data/RMelevation.rda
+5f0f32a5ee0dbc877a28c20bdeb6f64d *data/US.dat.rda
+5baf657b81b2ee2809dc96ecde12794d *data/WorldBankCO2.rda
+66b8754c3221f29585a9b52f84a34e9f *data/datalist
+f560c509a3416dcb22274af12ebf5d07 *data/lennon.rda
+3abfd104c2c387a4ebb62742932ca0a6 *data/ozone2.rda
+43a5afaacf0deb2f95d4288968aa7168 *data/rat.diet.rda
+cafddcfafb1344f9158d8607867d0575 *data/world.dat.rda
+18c69c2318451110b026c793067b83da *help/AnIndex
+383e200004bad37b10e11e1ba0f10d66 *help/aliases.rds
+d87cf4faa1868a10453f26a5aef0b8ef *help/fields.rdb
+96d548f7ab2c7b797dbcc7c29f9cefed *help/fields.rdx
+933ffb5b8362960f5e294ebc9733dd49 *help/paths.rds
+7b8a0d5a1e9e9878731fa6bb280e2ee9 *html/00Index.html
+444535b9cb76ddff1bab1e1865a3fb14 *html/R.css
+3226ccc98c3cfed7f5f63e52706b06c3 *libs/i386/fields.dll
+03024b0e06f4d19cea93b3d3ca292b86 *libs/i386/symbols.rds
+d6f83365e2926ce2f5d09859c4da95e2 *libs/x64/fields.dll
+f6f22ef869a6f42581b8d1d3980529bf *libs/x64/symbols.rds
diff --git a/win32/deps/library/fields/Meta/Rd.rds b/win32/deps/library/fields/Meta/Rd.rds
index 05148cd..a2a0c98 100644
Binary files a/win32/deps/library/fields/Meta/Rd.rds and b/win32/deps/library/fields/Meta/Rd.rds differ
diff --git a/win32/deps/library/fields/Meta/data.rds b/win32/deps/library/fields/Meta/data.rds
index 251b5cf..493df35 100644
Binary files a/win32/deps/library/fields/Meta/data.rds and b/win32/deps/library/fields/Meta/data.rds differ
diff --git a/win32/deps/library/fields/Meta/hsearch.rds b/win32/deps/library/fields/Meta/hsearch.rds
index 1dd5d90..6e1f973 100644
Binary files a/win32/deps/library/fields/Meta/hsearch.rds and b/win32/deps/library/fields/Meta/hsearch.rds differ
diff --git a/win32/deps/library/fields/Meta/links.rds b/win32/deps/library/fields/Meta/links.rds
new file mode 100644
index 0000000..604951a
Binary files /dev/null and b/win32/deps/library/fields/Meta/links.rds differ
diff --git a/win32/deps/library/fields/Meta/nsInfo.rds b/win32/deps/library/fields/Meta/nsInfo.rds
new file mode 100644
index 0000000..fabbe2f
Binary files /dev/null and b/win32/deps/library/fields/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/fields/Meta/package.rds b/win32/deps/library/fields/Meta/package.rds
index 03617f1..5f60b15 100644
Binary files a/win32/deps/library/fields/Meta/package.rds and b/win32/deps/library/fields/Meta/package.rds differ
diff --git a/win32/deps/library/fields/NAMESPACE b/win32/deps/library/fields/NAMESPACE
new file mode 100644
index 0000000..d8d6bdf
--- /dev/null
+++ b/win32/deps/library/fields/NAMESPACE
@@ -0,0 +1,12 @@
+exportPattern("^[^\\.]")
+
+S3method(print, Krig)
+S3method(print, mKrig)
+S3method(summary, Krig)
+S3method(summary, mKrig)
+
+useDynLib(fields,evlpoly, evlpoly2, multeb, dmaket, ddfind, inpoly, igpoly, 
+           rcss, radbas, multrb, css)
+
+import("spam")
+
diff --git a/win32/deps/library/fields/R/fields b/win32/deps/library/fields/R/fields
index be99e29..ac8cebe 100644
--- a/win32/deps/library/fields/R/fields
+++ b/win32/deps/library/fields/R/fields
@@ -1,18 +1,9 @@
-.First.lib <- function(libname, pkgname)
-{
-    fullName <- paste("package", pkgname, sep=":")
-    myEnv <- as.environment(match(fullName, search()))
-    barepackage <- sub("([^-]+)_.*", "\\1", pkgname)
-    dbbase <- file.path(libname, pkgname, "R", barepackage)
-    rm(.First.lib, envir = myEnv)
-    lazyLoad(dbbase, myEnv)
-    if(exists(".First.lib", envir = myEnv, inherits = FALSE)) {
-        f <- get(".First.lib", envir = myEnv, inherits = FALSE)
-        if(is.function(f))
-            f(libname, pkgname)
-        else
-            stop(gettextf("package '%s' has a non-function '.First.lib'",
-                          pkgname),
-                 domain = NA)
-    }
-}
+local({
+    info <- loadingNamespaceInfo()
+    ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
+    if (is.null(ns))
+        stop("cannot find namespace environment");
+    barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
+    dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
diff --git a/win32/deps/library/fields/R/fields.rdb b/win32/deps/library/fields/R/fields.rdb
index 3e11efb..e569313 100644
Binary files a/win32/deps/library/fields/R/fields.rdb and b/win32/deps/library/fields/R/fields.rdb differ
diff --git a/win32/deps/library/fields/R/fields.rdx b/win32/deps/library/fields/R/fields.rdx
index ab4fe1c..73bce55 100644
Binary files a/win32/deps/library/fields/R/fields.rdx and b/win32/deps/library/fields/R/fields.rdx differ
diff --git a/win32/deps/library/fields/data/CO2.rda b/win32/deps/library/fields/data/CO2.rda
index df4e593..949589d 100644
Binary files a/win32/deps/library/fields/data/CO2.rda and b/win32/deps/library/fields/data/CO2.rda differ
diff --git a/win32/deps/library/fields/data/COmonthlyMet.rda b/win32/deps/library/fields/data/COmonthlyMet.rda
index a8255aa..69fa997 100644
Binary files a/win32/deps/library/fields/data/COmonthlyMet.rda and b/win32/deps/library/fields/data/COmonthlyMet.rda differ
diff --git a/win32/deps/library/fields/data/NorthAmericanRainfall.rda b/win32/deps/library/fields/data/NorthAmericanRainfall.rda
new file mode 100644
index 0000000..ed4d528
Binary files /dev/null and b/win32/deps/library/fields/data/NorthAmericanRainfall.rda differ
diff --git a/win32/deps/library/fields/data/PRISMelevation.rda b/win32/deps/library/fields/data/PRISMelevation.rda
index 902d4f0..4005686 100644
Binary files a/win32/deps/library/fields/data/PRISMelevation.rda and b/win32/deps/library/fields/data/PRISMelevation.rda differ
diff --git a/win32/deps/library/fields/data/RCMexample.rda b/win32/deps/library/fields/data/RCMexample.rda
index bf4c2f3..9c45a50 100644
Binary files a/win32/deps/library/fields/data/RCMexample.rda and b/win32/deps/library/fields/data/RCMexample.rda differ
diff --git a/win32/deps/library/fields/data/RMelevation.rda b/win32/deps/library/fields/data/RMelevation.rda
index 4771db9..ad90f87 100644
Binary files a/win32/deps/library/fields/data/RMelevation.rda and b/win32/deps/library/fields/data/RMelevation.rda differ
diff --git a/win32/deps/library/fields/data/US.dat.rda b/win32/deps/library/fields/data/US.dat.rda
index 0268828..48393aa 100644
Binary files a/win32/deps/library/fields/data/US.dat.rda and b/win32/deps/library/fields/data/US.dat.rda differ
diff --git a/win32/deps/library/fields/data/WorldBankCO2.rda b/win32/deps/library/fields/data/WorldBankCO2.rda
new file mode 100644
index 0000000..dc6015f
Binary files /dev/null and b/win32/deps/library/fields/data/WorldBankCO2.rda differ
diff --git a/win32/deps/library/fields/data/datalist b/win32/deps/library/fields/data/datalist
new file mode 100644
index 0000000..5fbcd9e
--- /dev/null
+++ b/win32/deps/library/fields/data/datalist
@@ -0,0 +1,11 @@
+CO2: CO2 CO2.true
+COmonthlyMet: CO.elev CO.id CO.loc CO.names CO.ppt CO.ppt.MAM CO.ppt.MAM.climate CO.tmax CO.tmax.MAM CO.tmax.MAM.climate CO.tmean.MAM.climate CO.tmin CO.tmin.MAM CO.tmin.MAM.climate CO.years
+PRISMelevation
+RCMexample
+RMelevation
+US.dat
+WorldBankCO2
+lennon
+ozone2
+rat.diet
+world.dat
diff --git a/win32/deps/library/fields/data/lennon.rda b/win32/deps/library/fields/data/lennon.rda
index 7a21eb4..11f395c 100644
Binary files a/win32/deps/library/fields/data/lennon.rda and b/win32/deps/library/fields/data/lennon.rda differ
diff --git a/win32/deps/library/fields/data/ozone2.rda b/win32/deps/library/fields/data/ozone2.rda
index bf33a0d..fd08710 100644
Binary files a/win32/deps/library/fields/data/ozone2.rda and b/win32/deps/library/fields/data/ozone2.rda differ
diff --git a/win32/deps/library/fields/data/rat.diet.rda b/win32/deps/library/fields/data/rat.diet.rda
new file mode 100644
index 0000000..d8a31c6
Binary files /dev/null and b/win32/deps/library/fields/data/rat.diet.rda differ
diff --git a/win32/deps/library/fields/data/world.dat.rda b/win32/deps/library/fields/data/world.dat.rda
index 8eefba5..be48ea0 100644
Binary files a/win32/deps/library/fields/data/world.dat.rda and b/win32/deps/library/fields/data/world.dat.rda differ
diff --git a/win32/deps/library/fields/help/AnIndex b/win32/deps/library/fields/help/AnIndex
index 1c20dae..2f6370a 100644
--- a/win32/deps/library/fields/help/AnIndex
+++ b/win32/deps/library/fields/help/AnIndex
@@ -1,9 +1,5 @@
+fields-package	fields
 %d*%	Krig.engine.default
-%d*%,matrix,matrix-method	diag_mult
-%d*%,matrix,numeric-method	diag_mult
-%d*%,numeric,matrix-method	diag_mult
-%d*%,numeric,numeric-method	diag_mult
-%d*%-methods	diag_mult
 add.image	add.image
 arrow.plot	arrow.plot
 as.image	as.image
@@ -12,7 +8,6 @@ average.image	image2lz
 BD	BD
 bisection.search	fields-internal
 bplot	bplot
-bplot.obj	fields-internal
 bplot.xy	bplot.xy
 cat.matrix	fields-internal
 cat.to.list	fields-internal
@@ -33,26 +28,29 @@ CO.tmin.MAM	CO
 CO.tmin.MAM.climate	CO
 CO.years	CO
 CO2	CO2
+CO2.true	CO2
 coef.Krig	Krig
+color.scale	tim.colors
 colorbar.plot	colorbar.plot
 COmonthlyMet	CO
-conjugate.gradient	fields-internal
 COR	fields-internal
 cover.design	cover.design
 crop.image	image2lz
+css	FORTRAN.internal
 cubic.cov	exp.cov
 D4transform.image	fields-internal
+ddfind	FORTRAN.internal
 describe	fields-internal
-describe.bplot	fields-internal
 designer.colors	tim.colors
 discretize.image	grid.list
+dmaket	FORTRAN.internal
 double.exp	fields-internal
 drape.color	drape.plot
 drape.plot	drape.plot
-draw.bplot	fields-internal
-draw.bplot.obj	fields-internal
 dyadic.2check	fields-internal
 dyadic.check	fields-internal
+evlpoly	FORTRAN.internal
+evlpoly2	FORTRAN.internal
 Exp.cov	exp.cov
 Exp.earth.cov	fields-internal
 Exp.image.cov	image.cov
@@ -66,6 +64,7 @@ fields.convert.grid	grid.list
 fields.D	Wendland
 fields.derivative.poly	fields-stuff
 fields.diagonalize	fields-stuff
+fields.diagonalize2	fields-stuff
 fields.duplicated.matrix	fields-stuff
 fields.evlpoly	fields-stuff
 fields.evlpoly2	fields-stuff
@@ -85,17 +84,19 @@ gcv.Krig	gcv.Krig
 gcv.sreg	gcv.Krig
 get.rectangle	image2lz
 golden.section.search	fields-internal
-grey.level	fields-internal
 grid list	grid.list
 grid.list	grid.list
 half.image	image2lz
+igpoly	FORTRAN.internal
 image.plot	image.plot
 image.plot.info	fields-internal
 image.plot.plt	fields-internal
 image.smooth	image.smooth
 image2lz	image2lz
+in.land.grid	world
 in.poly	image2lz
 in.poly.grid	image2lz
+inpoly	FORTRAN.internal
 interp.surface	interp.surface
 interp.surface.grid	interp.surface
 Krig	Krig
@@ -116,7 +117,6 @@ Krig.find.REML	fields-internal
 Krig.flplike	fields-internal
 Krig.fs2hat	fields-internal
 Krig.ftrace	fields-internal
-krig.image	krig.image
 krig.image.parameters	fields-internal
 Krig.make.u	Krig.engine.default
 Krig.make.W	Krig.engine.default
@@ -129,53 +129,58 @@ Krig.updateY	fields-internal
 Krig.which.lambda	fields-internal
 Krig.ynew	fields-internal
 lennon	lennon
-lonlat2xy	fields-internal
 make.surface.grid	grid.list
 Matern	Exponential
 Matern.cor.to.range	Exponential
 matern.image.cov	image.cov
+MaternGLS.test	REML.test
+MaternGLSProfile.test	REML.test
+MaternQR.test	REML.test
+MaternQRProfile.test	REML.test
 minimax.crit	fields-internal
 minitri	minitri
 mKrig	mKrig
 mKrig.coef	mKrig
 mKrig.grid	fields.grid
+mKrig.MLE	mKrig.MLE
 mKrig.trace	mKrig
+MLE.Matern	REML.test
+MLE.Matern.fast	REML.test
+MLE.objective.fn	REML.test
+multeb	FORTRAN.internal
+multrb	FORTRAN.internal
+NorthAmericanRainfall	NorthAmericanRainfall
 ozone	ozone
 ozone2	ozone2
 parse.grid.list	grid.list
-periodic.cov.1d	fields-internal
-periodic.cov.cyl	fields-internal
-periodic.plane.3d	fields-internal
 plot.Krig	plot.Krig
 plot.krig.image	fields-internal
-plot.qsreg	fields-internal
 plot.sim.krig.image	fields-internal
 plot.spatial.design	fields-internal
 plot.sreg	plot.Krig
 plot.surface	plot.surface
 plot.vgram.matrix	vgram.matrix
-plot.Wimage	plot.Wimage
-poisson.cov	poisson.cov
 poly.image	poly.image
 poly.image.regrid	poly.image
+predict.derivative	predict.derivative
+predict.derivative.default	predict.derivative
 predict.derivative.Krig	predict.Krig
 predict.interp.surface	fields-internal
 predict.Krig	predict.Krig
 predict.krig.image	fields-internal
 predict.mKrig	mKrig
-predict.qsreg	fields-internal
 predict.se	predict.se
 predict.se.Krig	predict.se.Krig
 predict.se.KrigA	predict.se.Krig
 predict.se.mKrig	predict.se.Krig
 predict.sreg	fields-internal
 predict.surface	predict.surface
+predict.surface.derivative	predict.surface
 predict.surface.se	predict.surface
 predict.Tps	fields-internal
 print.Krig	print.Krig
 print.krig.image	fields-internal
 print.mKrig	mKrig
-print.qsreg	fields-internal
 print.spatial.design	fields-internal
 print.sreg	fields-internal
 print.summary.Krig	fields-internal
@@ -186,22 +191,19 @@ PRISMelevation	RMprecip
 pushpin	pushpin
 qr.q2ty	fields-internal
 qr.yq2	fields-internal
-qsreg	qsreg
-qsreg.fit	fields-internal
-qsreg.psi	fields-internal
-qsreg.rho	fields-internal
-qsreg.trace	fields-internal
 quilt.plot	quilt.plot
 Rad.cov	exp.cov
 Rad.image.cov	image.cov
 Rad.simple.cov	exp.cov
+radbas	FORTRAN.internal
 radbas.constant	fields-internal
 RadialBasis	Exponential
 rat.diet	rat.diet
 RCMexample	RCMexample
+rcss	FORTRAN.internal
 rdist	rdist
 rdist.earth	rdist.earth
-replace.args.function	fields-internal
+REML.test	REML.test
 resid.Krig	Krig
 ribbon.plot	ribbon.plot
 RMelevation	RMprecip
@@ -232,14 +234,13 @@ stationary.image.cov	image.cov
 stationary.taper.cov	exp.cov
 stats	stats
 stats.bin	stats.bin
-stats.bplot	fields-internal
 stats.sim.krig.image	fields-internal
 summary.gcv.Krig	fields-internal
 summary.gcv.sreg	fields-internal
 summary.Krig	summary.Krig
 summary.krig.image	fields-internal
+summary.mKrig	mKrig
 summary.ncdf	summary.ncdf
-summary.qsreg	fields-internal
 summary.spatial.design	fields-internal
 summary.sreg	fields-internal
 surface	fields-internal
@@ -258,46 +259,16 @@ US	US
 US.dat	US.dat
 vgram	vgram
 vgram.matrix	vgram.matrix
-W.i2s	W.info
-W.info	W.info
-W.s2i	W.info
-WD4	fields-internal
-WD42d	fields-internal
-WD42di	fields-internal
-WD4i	fields-internal
 Wendland	Wendland
 Wendland.beta	Wendland
 wendland.cov	exp.cov
 wendland.eval	Wendland
 Wendland2.2	Wendland
-Wimage.cov	Wimage.cov
-Wimage.i2s	Wimage.info
-Wimage.info	Wimage.info
-Wimage.info.plot	Wimage.info.plot
-Wimage.s2i	Wimage.info
-Wimage.sim	Wimage.cov
 world	world
 world.color	world
 world.dat	fields-internal
-WQS	fields-internal
-WQS.basis	fields-internal
-WQS.periodic	fields-internal
-WQS.periodic.basis	fields-internal
-WQS.periodic.T	fields-internal
-WQS.T	fields-internal
-WQS2d	fields-internal
-WQS2d.cylinder	fields-internal
-WQS2di	fields-internal
-WQS2di.cylinder	fields-internal
-WQSdi	fields-internal
-WQSi	fields-internal
-WQSi.periodic	fields-internal
-WQSi.periodic.T	fields-internal
-WQSi.T	fields-internal
-Wtransform	Wtransform
-Wtransform.cylinder.image	Wtransform
-Wtransform.image	Wtransform
-Wtransform.image.cov	Wimage.cov
+world.land	world
+WorldBankCO2	WorldBank
 xline	xline
 yline	yline
 [.spatial.design	fields-internal
diff --git a/win32/deps/library/fields/help/aliases.rds b/win32/deps/library/fields/help/aliases.rds
new file mode 100644
index 0000000..4c73950
Binary files /dev/null and b/win32/deps/library/fields/help/aliases.rds differ
diff --git a/win32/deps/library/fields/help/fields.rdb b/win32/deps/library/fields/help/fields.rdb
new file mode 100644
index 0000000..6f5f566
Binary files /dev/null and b/win32/deps/library/fields/help/fields.rdb differ
diff --git a/win32/deps/library/fields/help/fields.rdx b/win32/deps/library/fields/help/fields.rdx
new file mode 100644
index 0000000..b6bf6b5
Binary files /dev/null and b/win32/deps/library/fields/help/fields.rdx differ
diff --git a/win32/deps/library/fields/help/paths.rds b/win32/deps/library/fields/help/paths.rds
new file mode 100644
index 0000000..3853a95
Binary files /dev/null and b/win32/deps/library/fields/help/paths.rds differ
diff --git a/win32/deps/library/fields/html/00Index.html b/win32/deps/library/fields/html/00Index.html
index 747967c..fba3d26 100644
--- a/win32/deps/library/fields/html/00Index.html
+++ b/win32/deps/library/fields/html/00Index.html
@@ -1,25 +1,25 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><title>R: Tools for spatial data</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="../../R.css">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
 </head><body>
-<h1>Tools for spatial data <img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]"></h1>
-
+<h1> Tools for spatial data
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
 <hr>
-
 <div align="center">
-<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg"
-alt="[Package List]" width="30" height="30" border="0"></a>
-<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg"
-alt="[Top]" width="30" height="30" border="0"></a>
-</div>
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;fields&rsquo; version 6.7</h2>
 
-<h2>Documentation for package &lsquo;fields&rsquo; version 6.01</h2>
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
 
 <h2>Help Pages</h2>
 
 
 <p align="center">
-<a href="#"></a>
+<a href="# "> </a>
 <a href="#A">A</a>
 <a href="#B">B</a>
 <a href="#C">C</a>
@@ -32,6 +32,7 @@ alt="[Top]" width="30" height="30" border="0"></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>
@@ -43,24 +44,12 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <a href="#W">W</a>
 <a href="#X">X</a>
 <a href="#Y">Y</a>
+<a href="#misc">misc</a>
 </p>
 
-
-<h2><a name="">--  --</a></h2>
-
 <table width="100%">
-<tr><td width="25%"><a href="Krig.engine.default.html">%d*%</a></td>
-<td>Basic linear algebra utilities and other computations supporting the Krig function.</td></tr>
-<tr><td width="25%"><a href="diag_mult.html">%d*%,matrix,matrix-method</a></td>
-<td>Multiplying diagonal matrices in Package 'fields'</td></tr>
-<tr><td width="25%"><a href="diag_mult.html">%d*%,matrix,numeric-method</a></td>
-<td>Multiplying diagonal matrices in Package 'fields'</td></tr>
-<tr><td width="25%"><a href="diag_mult.html">%d*%,numeric,matrix-method</a></td>
-<td>Multiplying diagonal matrices in Package 'fields'</td></tr>
-<tr><td width="25%"><a href="diag_mult.html">%d*%,numeric,numeric-method</a></td>
-<td>Multiplying diagonal matrices in Package 'fields'</td></tr>
-<tr><td width="25%"><a href="diag_mult.html">%d*%-methods</a></td>
-<td>Multiplying diagonal matrices in Package 'fields'</td></tr>
+<tr><td width="25%"><a href="fields.html">fields-package</a></td>
+<td>fields - tools for spatial data</td></tr>
 </table>
 
 <h2><a name="A">-- A --</a></h2>
@@ -124,8 +113,12 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Monthly surface meterology for Colorado 1895-1997</td></tr>
 <tr><td width="25%"><a href="CO2.html">CO2</a></td>
 <td>Simulated global CO2 observations</td></tr>
+<tr><td width="25%"><a href="CO2.html">CO2.true</a></td>
+<td>Simulated global CO2 observations</td></tr>
 <tr><td width="25%"><a href="Krig.html">coef.Krig</a></td>
 <td>Kriging surface estimate</td></tr>
+<tr><td width="25%"><a href="tim.colors.html">color.scale</a></td>
+<td>Some useful color tables for images and tools to handle them.</td></tr>
 <tr><td width="25%"><a href="colorbar.plot.html">colorbar.plot</a></td>
 <td>Adds color scale strips to an existing plot.</td></tr>
 <tr><td width="25%"><a href="CO.html">COmonthlyMet</a></td>
@@ -142,7 +135,7 @@ alt="[Top]" width="30" height="30" border="0"></a>
 
 <table width="100%">
 <tr><td width="25%"><a href="tim.colors.html">designer.colors</a></td>
-<td>Some useful color tables for images.</td></tr>
+<td>Some useful color tables for images and tools to handle them.</td></tr>
 <tr><td width="25%"><a href="grid.list.html">discretize.image</a></td>
 <td>Some simple functions for working with gridded data and the grid format (grid.list) used in fields.</td></tr>
 <tr><td width="25%"><a href="drape.plot.html">drape.color</a></td>
@@ -181,6 +174,8 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Fields supporting functions</td></tr>
 <tr><td width="25%"><a href="fields-stuff.html">fields.diagonalize</a></td>
 <td>Fields supporting functions</td></tr>
+<tr><td width="25%"><a href="fields-stuff.html">fields.diagonalize2</a></td>
+<td>Fields supporting functions</td></tr>
 <tr><td width="25%"><a href="fields-stuff.html">fields.duplicated.matrix</a></td>
 <td>Fields supporting functions</td></tr>
 <tr><td width="25%"><a href="fields-stuff.html">fields.evlpoly</a></td>
@@ -240,6 +235,8 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Kernel smoother for irregular 2-d data</td></tr>
 <tr><td width="25%"><a href="image2lz.html">image2lz</a></td>
 <td>Some simple functions for subsetting images</td></tr>
+<tr><td width="25%"><a href="world.html">in.land.grid</a></td>
+<td>Plot of the world</td></tr>
 <tr><td width="25%"><a href="image2lz.html">in.poly</a></td>
 <td>Some simple functions for subsetting images</td></tr>
 <tr><td width="25%"><a href="image2lz.html">in.poly.grid</a></td>
@@ -269,8 +266,6 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Basic linear algebra utilities and other computations supporting the Krig function.</td></tr>
 <tr><td width="25%"><a href="Krig.engine.default.html">Krig.engine.knots</a></td>
 <td>Basic linear algebra utilities and other computations supporting the Krig function.</td></tr>
-<tr><td width="25%"><a href="krig.image.html">krig.image</a></td>
-<td>Spatial process estimate for large irregular 2-d dats sets.</td></tr>
 <tr><td width="25%"><a href="Krig.engine.default.html">Krig.make.u</a></td>
 <td>Basic linear algebra utilities and other computations supporting the Krig function.</td></tr>
 <tr><td width="25%"><a href="Krig.engine.default.html">Krig.make.W</a></td>
@@ -301,6 +296,14 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Covariance functions</td></tr>
 <tr><td width="25%"><a href="image.cov.html">matern.image.cov</a></td>
 <td>Exponential, Matern and general covariance functions for 2-d gridded locations.</td></tr>
+<tr><td width="25%"><a href="REML.test.html">MaternGLS.test</a></td>
+<td>Maximum Likelihood estimates for some Matern covariance parameters.</td></tr>
+<tr><td width="25%"><a href="REML.test.html">MaternGLSProfile.test</a></td>
+<td>Maximum Likelihood estimates for some Matern covariance parameters.</td></tr>
+<tr><td width="25%"><a href="REML.test.html">MaternQR.test</a></td>
+<td>Maximum Likelihood estimates for some Matern covariance parameters.</td></tr>
+<tr><td width="25%"><a href="REML.test.html">MaternQRProfile.test</a></td>
+<td>Maximum Likelihood estimates for some Matern covariance parameters.</td></tr>
 <tr><td width="25%"><a href="minitri.html">minitri</a></td>
 <td>Mini triathlon results</td></tr>
 <tr><td width="25%"><a href="mKrig.html">mKrig</a></td>
@@ -309,8 +312,23 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>"micro Krig" Spatial process estimate of a curve or surface, "kriging" with a known covariance function.</td></tr>
 <tr><td width="25%"><a href="fields.grid.html">mKrig.grid</a></td>
 <td>Using MKrig for predicting on a grid.</td></tr>
+<tr><td width="25%"><a href="mKrig.MLE.html">mKrig.MLE</a></td>
+<td>maximizes likelihood for the process marginal variance (rho) and nugget standard deviation (sigma) parameters (e.g. lambda) over a list of covariance models or a grid of covariance parameter values.</td></tr>
 <tr><td width="25%"><a href="mKrig.html">mKrig.trace</a></td>
 <td>"micro Krig" Spatial process estimate of a curve or surface, "kriging" with a known covariance function.</td></tr>
+<tr><td width="25%"><a href="REML.test.html">MLE.Matern</a></td>
+<td>Maximum Likelihood estimates for some Matern covariance parameters.</td></tr>
+<tr><td width="25%"><a href="REML.test.html">MLE.Matern.fast</a></td>
+<td>Maximum Likelihood estimates for some Matern covariance parameters.</td></tr>
+<tr><td width="25%"><a href="REML.test.html">MLE.objective.fn</a></td>
+<td>Maximum Likelihood estimates for some Matern covariance parameters.</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="NorthAmericanRainfall.html">NorthAmericanRainfall</a></td>
+<td>Observed North American summer precipitation from the historical climate network.</td></tr>
 </table>
 
 <h2><a name="O">-- O --</a></h2>
@@ -335,14 +353,14 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Plots a surface</td></tr>
 <tr><td width="25%"><a href="vgram.matrix.html">plot.vgram.matrix</a></td>
 <td>Computes a variogram from an image</td></tr>
-<tr><td width="25%"><a href="plot.Wimage.html">plot.Wimage</a></td>
-<td>Plots 2-d wavelet coefficents by level and type</td></tr>
-<tr><td width="25%"><a href="poisson.cov.html">poisson.cov</a></td>
-<td>Poisson spherical covariance function</td></tr>
 <tr><td width="25%"><a href="poly.image.html">poly.image</a></td>
 <td>Image plot for cells that are irregular quadrilaterals.</td></tr>
 <tr><td width="25%"><a href="poly.image.html">poly.image.regrid</a></td>
 <td>Image plot for cells that are irregular quadrilaterals.</td></tr>
+<tr><td width="25%"><a href="predict.derivative.html">predict.derivative</a></td>
+<td>Predicted derivatives</td></tr>
+<tr><td width="25%"><a href="predict.derivative.html">predict.derivative.default</a></td>
+<td>Predicted derivatives</td></tr>
 <tr><td width="25%"><a href="predict.Krig.html">predict.derivative.Krig</a></td>
 <td>Evaluation of Krig spatial process estimate.</td></tr>
 <tr><td width="25%"><a href="predict.Krig.html">predict.Krig</a></td>
@@ -359,6 +377,8 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Standard errors of predictions for Krig spatial process estimate</td></tr>
 <tr><td width="25%"><a href="predict.surface.html">predict.surface</a></td>
 <td>Evaluates a fitted function or its standard errors as a surface object</td></tr>
+<tr><td width="25%"><a href="predict.surface.html">predict.surface.derivative</a></td>
+<td>Evaluates a fitted function or its standard errors as a surface object</td></tr>
 <tr><td width="25%"><a href="predict.surface.html">predict.surface.se</a></td>
 <td>Evaluates a fitted function or its standard errors as a surface object</td></tr>
 <tr><td width="25%"><a href="print.Krig.html">print.Krig</a></td>
@@ -374,8 +394,6 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <h2><a name="Q">-- Q --</a></h2>
 
 <table width="100%">
-<tr><td width="25%"><a href="qsreg.html">qsreg</a></td>
-<td>Quantile or Robust spline regression</td></tr>
 <tr><td width="25%"><a href="quilt.plot.html">quilt.plot</a></td>
 <td>Image plot for irregular spatial data.</td></tr>
 </table>
@@ -399,6 +417,8 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Euclidean distance matrix</td></tr>
 <tr><td width="25%"><a href="rdist.earth.html">rdist.earth</a></td>
 <td>Great circle distance matrix</td></tr>
+<tr><td width="25%"><a href="REML.test.html">REML.test</a></td>
+<td>Maximum Likelihood estimates for some Matern covariance parameters.</td></tr>
 <tr><td width="25%"><a href="Krig.html">resid.Krig</a></td>
 <td>Kriging surface estimate</td></tr>
 <tr><td width="25%"><a href="ribbon.plot.html">ribbon.plot</a></td>
@@ -448,6 +468,8 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Bins data and finds some summary statistics.</td></tr>
 <tr><td width="25%"><a href="summary.Krig.html">summary.Krig</a></td>
 <td>Summary for Krig spatial process estimate</td></tr>
+<tr><td width="25%"><a href="mKrig.html">summary.mKrig</a></td>
+<td>"micro Krig" Spatial process estimate of a curve or surface, "kriging" with a known covariance function.</td></tr>
 <tr><td width="25%"><a href="summary.ncdf.html">summary.ncdf</a></td>
 <td>Summarizes a netCDF file handle</td></tr>
 <tr><td width="25%"><a href="surface.Krig.html">surface.Krig</a></td>
@@ -462,13 +484,13 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <tr><td width="25%"><a href="fields.tests.html">test.for.zero</a></td>
 <td>Testing fields functions</td></tr>
 <tr><td width="25%"><a href="tim.colors.html">tim.colors</a></td>
-<td>Some useful color tables for images.</td></tr>
+<td>Some useful color tables for images and tools to handle them.</td></tr>
 <tr><td width="25%"><a href="Tps.html">Tps</a></td>
 <td>Thin plate spline regression</td></tr>
 <tr><td width="25%"><a href="transformx.html">transformx</a></td>
 <td>Linear transformation</td></tr>
 <tr><td width="25%"><a href="tim.colors.html">two.colors</a></td>
-<td>Some useful color tables for images.</td></tr>
+<td>Some useful color tables for images and tools to handle them.</td></tr>
 </table>
 
 <h2><a name="U">-- U --</a></h2>
@@ -492,12 +514,6 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <h2><a name="W">-- W --</a></h2>
 
 <table width="100%">
-<tr><td width="25%"><a href="W.info.html">W.i2s</a></td>
-<td>Gives indexing imfomration for a wavelet decompostion</td></tr>
-<tr><td width="25%"><a href="W.info.html">W.info</a></td>
-<td>Gives indexing imfomration for a wavelet decompostion</td></tr>
-<tr><td width="25%"><a href="W.info.html">W.s2i</a></td>
-<td>Gives indexing imfomration for a wavelet decompostion</td></tr>
 <tr><td width="25%"><a href="Wendland.html">Wendland</a></td>
 <td>Wendland family of covariance functions and supporting numerical functions</td></tr>
 <tr><td width="25%"><a href="Wendland.html">Wendland.beta</a></td>
@@ -508,30 +524,14 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Wendland family of covariance functions and supporting numerical functions</td></tr>
 <tr><td width="25%"><a href="Wendland.html">Wendland2.2</a></td>
 <td>Wendland family of covariance functions and supporting numerical functions</td></tr>
-<tr><td width="25%"><a href="Wimage.cov.html">Wimage.cov</a></td>
-<td>Functions for W-transform based covariance models</td></tr>
-<tr><td width="25%"><a href="Wimage.info.html">Wimage.i2s</a></td>
-<td>Finds key indices related to a 2-d multiresolution</td></tr>
-<tr><td width="25%"><a href="Wimage.info.html">Wimage.info</a></td>
-<td>Finds key indices related to a 2-d multiresolution</td></tr>
-<tr><td width="25%"><a href="Wimage.info.plot.html">Wimage.info.plot</a></td>
-<td>Plot to check 2-d multiresolution indexing</td></tr>
-<tr><td width="25%"><a href="Wimage.info.html">Wimage.s2i</a></td>
-<td>Finds key indices related to a 2-d multiresolution</td></tr>
-<tr><td width="25%"><a href="Wimage.cov.html">Wimage.sim</a></td>
-<td>Functions for W-transform based covariance models</td></tr>
 <tr><td width="25%"><a href="world.html">world</a></td>
 <td>Plot of the world</td></tr>
 <tr><td width="25%"><a href="world.html">world.color</a></td>
 <td>Plot of the world</td></tr>
-<tr><td width="25%"><a href="Wtransform.html">Wtransform</a></td>
-<td>Quadratic W wavelet transform for 1-d vectors or rectangular or cylindrical images</td></tr>
-<tr><td width="25%"><a href="Wtransform.html">Wtransform.cylinder.image</a></td>
-<td>Quadratic W wavelet transform for 1-d vectors or rectangular or cylindrical images</td></tr>
-<tr><td width="25%"><a href="Wtransform.html">Wtransform.image</a></td>
-<td>Quadratic W wavelet transform for 1-d vectors or rectangular or cylindrical images</td></tr>
-<tr><td width="25%"><a href="Wimage.cov.html">Wtransform.image.cov</a></td>
-<td>Functions for W-transform based covariance models</td></tr>
+<tr><td width="25%"><a href="world.html">world.land</a></td>
+<td>Plot of the world</td></tr>
+<tr><td width="25%"><a href="WorldBank.html">WorldBankCO2</a></td>
+<td>Carbon emissions and demographic covariables by country for 1999.</td></tr>
 </table>
 
 <h2><a name="X">-- X --</a></h2>
@@ -547,4 +547,11 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <tr><td width="25%"><a href="yline.html">yline</a></td>
 <td>Draw horizontal lines</td></tr>
 </table>
+
+<h2><a name="misc">-- misc --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Krig.engine.default.html">%d*%</a></td>
+<td>Basic linear algebra utilities and other computations supporting the Krig function.</td></tr>
+</table>
 </body></html>
diff --git a/win32/deps/library/fields/html/R.css b/win32/deps/library/fields/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/fields/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/fields/libs/i386/fields.dll b/win32/deps/library/fields/libs/i386/fields.dll
new file mode 100644
index 0000000..cf44910
Binary files /dev/null and b/win32/deps/library/fields/libs/i386/fields.dll differ
diff --git a/win32/deps/library/fields/libs/i386/symbols.rds b/win32/deps/library/fields/libs/i386/symbols.rds
new file mode 100644
index 0000000..91be258
Binary files /dev/null and b/win32/deps/library/fields/libs/i386/symbols.rds differ
diff --git a/win32/deps/library/fields/libs/x64/fields.dll b/win32/deps/library/fields/libs/x64/fields.dll
new file mode 100644
index 0000000..65fbe59
Binary files /dev/null and b/win32/deps/library/fields/libs/x64/fields.dll differ
diff --git a/win32/deps/library/fields/libs/x64/symbols.rds b/win32/deps/library/fields/libs/x64/symbols.rds
new file mode 100644
index 0000000..b6a5e71
Binary files /dev/null and b/win32/deps/library/fields/libs/x64/symbols.rds differ
diff --git a/win32/deps/library/foreign/DESCRIPTION b/win32/deps/library/foreign/DESCRIPTION
index 8fa16ea..e74fbf3 100644
--- a/win32/deps/library/foreign/DESCRIPTION
+++ b/win32/deps/library/foreign/DESCRIPTION
@@ -1,21 +1,46 @@
-Package: foreign
-Priority: recommended
-Version: 0.8-37
-Date: 2009-08-13
-Title: Read Data Stored by Minitab, S, SAS, SPSS, Stata, Systat, dBase,
-        ...
-Depends: R (>= 2.6.0), stats
-Imports: methods, utils
-Maintainer: R-core <R-core r-project org>
-Author: R-core members, Saikat DebRoy <saikat stat wisc edu>, Roger
-        Bivand <Roger Bivand nhh no> and others: see COPYRIGHTS file in
-        the sources.
-Description: Functions for reading and writing data stored by
-        statistical packages such as Minitab, S, SAS, SPSS, Stata,
-        Systat, ..., and for reading and writing .dbf (dBase) files.
-LazyLoad: yes
-License: GPL (>= 2)
-Packaged: 2009-08-13 12:15:02 UTC; ripley
-Repository: CRAN
-Date/Publication: 2009-08-13 12:33:14
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 13:03:41 UTC; windows
+Package: foreign
+Priority: recommended
+Version: 0.8-51
+Date: 2012-10-08
+Title: Read Data Stored by Minitab, S, SAS, SPSS, Stata, Systat, dBase,
+        ...
+Depends: R (>= 2.14.0), stats
+Imports: methods, utils
+Authors R: structure( c(person("R Core Team", email =
+        "R-core R-project org", role = c("aut", "cph", "cre")),
+        person("Roger", "Bivand", role = c("ctb", "cph")),
+        person(c("Vincent", "J."), "Carey", role = c("ctb", "cph")),
+        person("Saikat", "DebRoy", role = c("ctb", "cph")),
+        person("Stephen", "Eglen", role = c("ctb", "cph")),
+        person("Rajarshi", "Guha", role = c("ctb", "cph")),
+        person("Nicholas", "Lewin-Koh", role = c("ctb", "cph")),
+        person("Mark", "Myatt", role = c("ctb", "cph")), person("Ben",
+        "Pfaff", role = "ctb"), person("Frank", "Warmerdam", role =
+        c("ctb", "cph")), person("Stephen", "Weigand", role = c("ctb",
+        "cph")), person("Free Software Foundation, Inc.", role =
+        "cph")), footer = "See the COPYRIGHTS file in the sources for
+        details on contributions and copyrights.")
+Description: Functions for reading and writing data stored by statistical
+        packages such as Minitab, S, SAS, SPSS, Stata, Systat, ...,
+	and for reading and writing dBase files.
+LazyLoad: yes
+License: GPL (>= 2)
+BugReports: http://bugs.r-project.org
+Packaged: 2012-10-11 13:26:23 UTC; ripley
+Author: R Core Team [aut, cph, cre],
+  Roger Bivand [ctb, cph],
+  Vincent J. Carey [ctb, cph],
+  Saikat DebRoy [ctb, cph],
+  Stephen Eglen [ctb, cph],
+  Rajarshi Guha [ctb, cph],
+  Nicholas Lewin-Koh [ctb, cph],
+  Mark Myatt [ctb, cph],
+  Ben Pfaff [ctb],
+  Frank Warmerdam [ctb, cph],
+  Stephen Weigand [ctb, cph],
+  Free Software Foundation, Inc. [cph].
+  See the COPYRIGHTS file in the sources for details on contributions
+  and copyrights.
+Maintainer: R Core Team <R-core R-project org>
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:14:55 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/foreign/LICENCE b/win32/deps/library/foreign/LICENCE
index 1a9ecbd..c86bc17 100644
--- a/win32/deps/library/foreign/LICENCE
+++ b/win32/deps/library/foreign/LICENCE
@@ -2,6 +2,6 @@ This software is distributed 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.
 
-A copy of the GNU General Public License is in file COPYING in the
-sources of this package, and is also available at
+A copy of version 2 of the GNU General Public License is in file GPL-2
+in the sources of this package, and is also available at
 http://www.r-project.org/Licenses/
diff --git a/win32/deps/library/foreign/Meta/Rd.rds b/win32/deps/library/foreign/Meta/Rd.rds
index b262d45..01e9b89 100644
Binary files a/win32/deps/library/foreign/Meta/Rd.rds and b/win32/deps/library/foreign/Meta/Rd.rds differ
diff --git a/win32/deps/library/foreign/Meta/hsearch.rds b/win32/deps/library/foreign/Meta/hsearch.rds
index 346dc67..e293bf7 100644
Binary files a/win32/deps/library/foreign/Meta/hsearch.rds and b/win32/deps/library/foreign/Meta/hsearch.rds differ
diff --git a/win32/deps/library/foreign/Meta/links.rds b/win32/deps/library/foreign/Meta/links.rds
new file mode 100644
index 0000000..061d4d0
Binary files /dev/null and b/win32/deps/library/foreign/Meta/links.rds differ
diff --git a/win32/deps/library/foreign/Meta/nsInfo.rds b/win32/deps/library/foreign/Meta/nsInfo.rds
index bea2288..2ab2dd3 100644
Binary files a/win32/deps/library/foreign/Meta/nsInfo.rds and b/win32/deps/library/foreign/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/foreign/Meta/package.rds b/win32/deps/library/foreign/Meta/package.rds
index 2acce49..a1fb8a5 100644
Binary files a/win32/deps/library/foreign/Meta/package.rds and b/win32/deps/library/foreign/Meta/package.rds differ
diff --git a/win32/deps/library/foreign/R/foreign b/win32/deps/library/foreign/R/foreign
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/foreign/R/foreign
+++ b/win32/deps/library/foreign/R/foreign
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/foreign/R/foreign.rdb b/win32/deps/library/foreign/R/foreign.rdb
index 5d4cc36..a5f326a 100644
Binary files a/win32/deps/library/foreign/R/foreign.rdb and b/win32/deps/library/foreign/R/foreign.rdb differ
diff --git a/win32/deps/library/foreign/R/foreign.rdx b/win32/deps/library/foreign/R/foreign.rdx
index f6fb78b..fb3e8c2 100644
Binary files a/win32/deps/library/foreign/R/foreign.rdx and b/win32/deps/library/foreign/R/foreign.rdx differ
diff --git a/win32/deps/library/foreign/help/aliases.rds b/win32/deps/library/foreign/help/aliases.rds
new file mode 100644
index 0000000..3b211dc
Binary files /dev/null and b/win32/deps/library/foreign/help/aliases.rds differ
diff --git a/win32/deps/library/foreign/help/foreign.rdb b/win32/deps/library/foreign/help/foreign.rdb
new file mode 100644
index 0000000..649c096
Binary files /dev/null and b/win32/deps/library/foreign/help/foreign.rdb differ
diff --git a/win32/deps/library/foreign/help/foreign.rdx b/win32/deps/library/foreign/help/foreign.rdx
new file mode 100644
index 0000000..214cdf7
Binary files /dev/null and b/win32/deps/library/foreign/help/foreign.rdx differ
diff --git a/win32/deps/library/foreign/help/paths.rds b/win32/deps/library/foreign/help/paths.rds
new file mode 100644
index 0000000..8a304a1
Binary files /dev/null and b/win32/deps/library/foreign/help/paths.rds differ
diff --git a/win32/deps/library/foreign/html/00Index.html b/win32/deps/library/foreign/html/00Index.html
new file mode 100644
index 0000000..f8b8264
--- /dev/null
+++ b/win32/deps/library/foreign/html/00Index.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Read Data Stored by Minitab, S, SAS, SPSS, Stata, Systat, dBase,
+...</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Read Data Stored by Minitab, S, SAS, SPSS, Stata, Systat, dBase,
+...
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;foreign&rsquo; version 0.8-51</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td width="25%"><a href="read.S.html">data.restore</a></td>
+<td>Read an S3 Binary or data.dump File</td></tr>
+<tr><td width="25%"><a href="lookup.xport.html">lookup.xport</a></td>
+<td>Lookup Information on a SAS XPORT Format Library</td></tr>
+<tr><td width="25%"><a href="read.arff.html">read.arff</a></td>
+<td>Read Data from ARFF Files</td></tr>
+<tr><td width="25%"><a href="read.dbf.html">read.dbf</a></td>
+<td>Read a DBF File</td></tr>
+<tr><td width="25%"><a href="read.dta.html">read.dta</a></td>
+<td>Read Stata Binary Files</td></tr>
+<tr><td width="25%"><a href="read.epiinfo.html">read.epiinfo</a></td>
+<td>Read Epi Info Data Files</td></tr>
+<tr><td width="25%"><a href="read.mtp.html">read.mtp</a></td>
+<td>Read a Minitab Portable Worksheet</td></tr>
+<tr><td width="25%"><a href="read.octave.html">read.octave</a></td>
+<td>Read Octave Text Data Files</td></tr>
+<tr><td width="25%"><a href="read.S.html">read.S</a></td>
+<td>Read an S3 Binary or data.dump File</td></tr>
+<tr><td width="25%"><a href="read.spss.html">read.spss</a></td>
+<td>Read an SPSS Data File</td></tr>
+<tr><td width="25%"><a href="read.ssd.html">read.ssd</a></td>
+<td>Obtain a Data Frame from a SAS Permanent Dataset, via read.xport</td></tr>
+<tr><td width="25%"><a href="read.systat.html">read.systat</a></td>
+<td>Obtain a Data Frame from a Systat File</td></tr>
+<tr><td width="25%"><a href="read.xport.html">read.xport</a></td>
+<td>Read a SAS XPORT Format Library</td></tr>
+<tr><td width="25%"><a href="write.arff.html">write.arff</a></td>
+<td>Write Data into ARFF Files</td></tr>
+<tr><td width="25%"><a href="write.dbf.html">write.dbf</a></td>
+<td>Write a DBF File</td></tr>
+<tr><td width="25%"><a href="write.dta.html">write.dta</a></td>
+<td>Write Files in Stata Binary Format</td></tr>
+<tr><td width="25%"><a href="write.foreign.html">write.foreign</a></td>
+<td>Write Text Files and Code to Read Them</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/foreign/html/R.css b/win32/deps/library/foreign/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/foreign/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/foreign/libs/i386/foreign.dll b/win32/deps/library/foreign/libs/i386/foreign.dll
new file mode 100644
index 0000000..e45fe5a
Binary files /dev/null and b/win32/deps/library/foreign/libs/i386/foreign.dll differ
diff --git a/win32/deps/library/foreign/po/de/LC_MESSAGES/R-foreign.mo b/win32/deps/library/foreign/po/de/LC_MESSAGES/R-foreign.mo
new file mode 100644
index 0000000..a3c0b56
Binary files /dev/null and b/win32/deps/library/foreign/po/de/LC_MESSAGES/R-foreign.mo differ
diff --git a/win32/deps/library/foreign/po/de/LC_MESSAGES/foreign.mo b/win32/deps/library/foreign/po/de/LC_MESSAGES/foreign.mo
new file mode 100644
index 0000000..4ff9e66
Binary files /dev/null and b/win32/deps/library/foreign/po/de/LC_MESSAGES/foreign.mo differ
diff --git a/win32/deps/library/foreign/po/en quot/LC_MESSAGES/R-foreign.mo b/win32/deps/library/foreign/po/en quot/LC_MESSAGES/R-foreign.mo
new file mode 100644
index 0000000..348cdc6
Binary files /dev/null and b/win32/deps/library/foreign/po/en quot/LC_MESSAGES/R-foreign.mo differ
diff --git a/win32/deps/library/foreign/po/en quot/LC_MESSAGES/foreign.mo b/win32/deps/library/foreign/po/en quot/LC_MESSAGES/foreign.mo
new file mode 100644
index 0000000..0f65587
Binary files /dev/null and b/win32/deps/library/foreign/po/en quot/LC_MESSAGES/foreign.mo differ
diff --git a/win32/deps/library/foreign/po/fr/LC_MESSAGES/R-foreign.mo b/win32/deps/library/foreign/po/fr/LC_MESSAGES/R-foreign.mo
new file mode 100644
index 0000000..3c09d20
Binary files /dev/null and b/win32/deps/library/foreign/po/fr/LC_MESSAGES/R-foreign.mo differ
diff --git a/win32/deps/library/foreign/po/fr/LC_MESSAGES/foreign.mo b/win32/deps/library/foreign/po/fr/LC_MESSAGES/foreign.mo
new file mode 100644
index 0000000..992ca4d
Binary files /dev/null and b/win32/deps/library/foreign/po/fr/LC_MESSAGES/foreign.mo differ
diff --git a/win32/deps/library/foreign/po/pl/LC_MESSAGES/R-foreign.mo b/win32/deps/library/foreign/po/pl/LC_MESSAGES/R-foreign.mo
new file mode 100644
index 0000000..d253d12
Binary files /dev/null and b/win32/deps/library/foreign/po/pl/LC_MESSAGES/R-foreign.mo differ
diff --git a/win32/deps/library/foreign/po/pl/LC_MESSAGES/foreign.mo b/win32/deps/library/foreign/po/pl/LC_MESSAGES/foreign.mo
new file mode 100644
index 0000000..f0e43aa
Binary files /dev/null and b/win32/deps/library/foreign/po/pl/LC_MESSAGES/foreign.mo differ
diff --git a/win32/deps/library/foreign/tests/Alfalfa.xpt b/win32/deps/library/foreign/tests/Alfalfa.xpt
new file mode 100644
index 0000000..319df52
Binary files /dev/null and b/win32/deps/library/foreign/tests/Alfalfa.xpt differ
diff --git a/win32/deps/library/foreign/tests/S3.R b/win32/deps/library/foreign/tests/S3.R
new file mode 100644
index 0000000..1de22f4
--- /dev/null
+++ b/win32/deps/library/foreign/tests/S3.R
@@ -0,0 +1,9 @@
+library(foreign)
+read.S("mySobj")
+data.restore("dumpdata", print = TRUE)
+print(myobj)
+data.restore("tsdumpdata", print = TRUE, verbose = TRUE)
+sunspot
+utils::str(carbon.dioxide)
+carbon.dioxide[1:60]
+q()
diff --git a/win32/deps/library/foreign/tests/S3.Rout.save b/win32/deps/library/foreign/tests/S3.Rout.save
new file mode 100644
index 0000000..1f2f105
--- /dev/null
+++ b/win32/deps/library/foreign/tests/S3.Rout.save
@@ -0,0 +1,59 @@
+
+R : Copyright 2004, The R Foundation for Statistical Computing
+Version 2.1.0 Under development (unstable) (2004-12-02), ISBN 3-900051-07-0
+
+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 a HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(foreign)
+> read.S("mySobj")
+  factor ints floats
+1      a    1    1.1
+2     bc    2    1.2
+3    def    3    1.3
+> data.restore("dumpdata", print = TRUE)
+"myobj": structure
+[1] "dumpdata"
+> print(myobj)
+  factor ints floats  logs
+1      a   NA    1.1  TRUE
+2     bc    2    1.2    NA
+3    def    3    1.3 FALSE
+> data.restore("tsdumpdata", print = TRUE, verbose = TRUE)
+"sunspot": structure
+  sunspot structure 3 
+    .Data numeric 37 
+    .Tsp numeric 3 
+    class character 2 
+"carbon.dioxide": structure
+  carbon.dioxide structure 3 
+    .Data numeric 384 
+    .Tsp numeric 3 
+    class character 2 
+[1] "tsdumpdata"
+> sunspot
+Time Series:
+Start = 1936 
+End = 1972 
+Frequency = 1 
+ [1]  40 115 100  80  60  40  23  10  10  25  75 145 130 130  80  65  20  10   5
+[20]  10  60 190 180 175 120  50  35  20  10  15  30  60 105 105 105  80  65
+> utils::str(carbon.dioxide)
+ Time-Series [1:384] from 1959 to 1991: 315 316 316 318 318 ...
+> carbon.dioxide[1:60]
+ [1] 315.42 316.32 316.49 317.56 318.13 318.00 316.39 314.66 313.68 313.18
+[11] 314.66 315.43 316.27 316.81 317.42 318.87 319.87 319.43 318.01 315.75
+[21] 314.00 313.68 314.84 316.03 316.73 317.54 318.38 319.31 320.42 319.61
+[31] 318.42 316.64 314.83 315.15 315.95 316.85 317.78 318.40 319.53 320.41
+[41] 320.85 320.45 319.44 317.25 316.12 315.27 316.53 317.53 318.58 318.92
+[51] 319.70 321.22 322.08 321.31 319.58 317.61 316.05 315.83 316.91 318.20
+> q()
diff --git a/win32/deps/library/foreign/tests/arff.R b/win32/deps/library/foreign/tests/arff.R
new file mode 100644
index 0000000..3b1e4ef
--- /dev/null
+++ b/win32/deps/library/foreign/tests/arff.R
@@ -0,0 +1,5 @@
+library("foreign")
+df <- read.arff("contact-lenses.arff")
+summary(df)
+str(df)
+q()
diff --git a/win32/deps/library/foreign/tests/arff.Rout.save b/win32/deps/library/foreign/tests/arff.Rout.save
new file mode 100644
index 0000000..4d91355
--- /dev/null
+++ b/win32/deps/library/foreign/tests/arff.Rout.save
@@ -0,0 +1,36 @@
+
+R version 2.5.0 Under development (unstable) (2007-03-25 r40887)
+Copyright (C) 2007 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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("foreign")
+> df <- read.arff("contact-lenses.arff")
+> summary(df)
+             age       spectacle-prescrip astigmatism tear-prod-rate
+ pre-presbyopic:8   hypermetrope:12       no :12      normal :12    
+ presbyopic    :8   myope       :12       yes:12      reduced:12    
+ young         :8                                                   
+ contact-lenses
+ hard: 4       
+ none:15       
+ soft: 5       
+> str(df)
+'data.frame':	24 obs. of  5 variables:
+ $ age               : Factor w/ 3 levels "pre-presbyopic",..: 3 3 3 3 3 3 3 3 1 1 ...
+ $ spectacle-prescrip: Factor w/ 2 levels "hypermetrope",..: 2 2 2 2 1 1 1 1 2 2 ...
+ $ astigmatism       : Factor w/ 2 levels "no","yes": 1 1 2 2 1 1 2 2 1 1 ...
+ $ tear-prod-rate    : Factor w/ 2 levels "normal","reduced": 2 1 2 1 2 1 2 1 2 1 ...
+ $ contact-lenses    : Factor w/ 3 levels "hard","none",..: 2 3 2 1 2 3 2 1 2 3 ...
+> q()
diff --git a/win32/deps/library/foreign/tests/auto8.dta b/win32/deps/library/foreign/tests/auto8.dta
new file mode 100644
index 0000000..48803e6
Binary files /dev/null and b/win32/deps/library/foreign/tests/auto8.dta differ
diff --git a/win32/deps/library/foreign/tests/compressed.dta b/win32/deps/library/foreign/tests/compressed.dta
new file mode 100644
index 0000000..7bd31e5
Binary files /dev/null and b/win32/deps/library/foreign/tests/compressed.dta differ
diff --git a/win32/deps/library/foreign/tests/contact-lenses.arff b/win32/deps/library/foreign/tests/contact-lenses.arff
new file mode 100644
index 0000000..34fe9b0
--- /dev/null
+++ b/win32/deps/library/foreign/tests/contact-lenses.arff
@@ -0,0 +1,85 @@
+% 1. Title: Database for fitting contact lenses
+% 
+% 2. Sources:
+%      (a) Cendrowska, J. "PRISM: An algorithm for inducing modular rules",
+%          International Journal of Man-Machine Studies, 1987, 27, 349-370
+%      (b) Donor: Benoit Julien (Julien ce cmu edu)
+%      (c) Date: 1 August 1990
+% 
+% 3. Past Usage:
+%       1. See above.
+%       2. Witten, I. H. & MacDonald, B. A. (1988). Using concept
+%          learning for knowledge acquisition. International Journal of
+%          Man-Machine Studies, 27, (pp. 349-370).
+% 
+%  Notes:  This database is complete (all possible combinations of
+%          attribute-value pairs are represented).
+% 
+%          Each instance is complete and correct.
+% 
+%          9 rules cover the training set.
+% 
+% 4. Relevant Information Paragraph:
+%     The examples are complete and noise free.
+%     The examples highly simplified the problem. The attributes do not
+%     fully describe all the factors affecting the decision as to which type,
+%     if any, to fit.
+% 
+% 5. Number of Instances: 24
+% 
+% 6. Number of Attributes: 4 (all nominal)
+% 
+% 7. Attribute Information:
+%     -- 3 Classes
+%      1 : the patient should be fitted with hard contact lenses,
+%      2 : the patient should be fitted with soft contact lenses,
+%      1 : the patient should not be fitted with contact lenses.
+% 
+%     1. age of the patient: (1) young, (2) pre-presbyopic, (3) presbyopic
+%     2. spectacle prescription:  (1) myope, (2) hypermetrope
+%     3. astigmatic:     (1) no, (2) yes
+%     4. tear production rate:  (1) reduced, (2) normal
+% 
+% 8. Number of Missing Attribute Values:   0
+% 
+% 9. Class Distribution:
+%    1. hard contact lenses: 4
+%    2. soft contact lenses: 5
+%    3. no contact lenses: 15
+
+ relation contact-lenses
+
+ attribute age 			{young, pre-presbyopic, presbyopic}
+ attribute spectacle-prescrip	{myope, hypermetrope}
+ attribute astigmatism		{no, yes}
+ attribute tear-prod-rate	{reduced, normal}
+ attribute contact-lenses	{soft, hard, none}
+
+ data
+%
+% 24 instances
+%
+young,myope,no,reduced,none
+young,myope,no,normal,soft
+young,myope,yes,reduced,none
+young,myope,yes,normal,hard
+young,hypermetrope,no,reduced,none
+young,hypermetrope,no,normal,soft
+young,hypermetrope,yes,reduced,none
+young,hypermetrope,yes,normal,hard
+pre-presbyopic,myope,no,reduced,none
+pre-presbyopic,myope,no,normal,soft
+pre-presbyopic,myope,yes,reduced,none
+pre-presbyopic,myope,yes,normal,hard
+pre-presbyopic,hypermetrope,no,reduced,none
+pre-presbyopic,hypermetrope,no,normal,soft
+pre-presbyopic,hypermetrope,yes,reduced,none
+pre-presbyopic,hypermetrope,yes,normal,none
+presbyopic,myope,no,reduced,none
+presbyopic,myope,no,normal,none
+presbyopic,myope,yes,reduced,none
+presbyopic,myope,yes,normal,hard
+presbyopic,hypermetrope,no,reduced,none
+presbyopic,hypermetrope,no,normal,soft
+presbyopic,hypermetrope,yes,reduced,none
+presbyopic,hypermetrope,yes,normal,none
diff --git a/win32/deps/library/foreign/tests/create-dumpdata.S b/win32/deps/library/foreign/tests/create-dumpdata.S
new file mode 100644
index 0000000..71c1004
--- /dev/null
+++ b/win32/deps/library/foreign/tests/create-dumpdata.S
@@ -0,0 +1,5 @@
+## file ./dumpdata was created by these (S-PLUS 6.2.1 for Linux):
+myobj <-  data.frame(factor = factor(1:3, labels=c("a", "bc", "def")),
+		     ints = 1:3, floats = 1+(1:3)/10, logs= c(T,NA,F))
+myobj[1,2] <- NA
+data.dump("myobj",file="dumpdata", oldStyle=TRUE)
diff --git a/win32/deps/library/foreign/tests/datefactor.dta b/win32/deps/library/foreign/tests/datefactor.dta
new file mode 100644
index 0000000..e7a465c
Binary files /dev/null and b/win32/deps/library/foreign/tests/datefactor.dta differ
diff --git a/win32/deps/library/foreign/tests/download.R b/win32/deps/library/foreign/tests/download.R
new file mode 100644
index 0000000..bb72592
--- /dev/null
+++ b/win32/deps/library/foreign/tests/download.R
@@ -0,0 +1,9 @@
+library(foreign)
+if(!nzchar(Sys.getenv("R_FOREIGN_FULL_TEST"))) q("no")
+
+read.dta("http://www.principlesofeconometrics.com/stata/airline.dta";)
+
+str(read.spss("http://psyweb.psy.ox.ac.uk/dapweb/teaching/graduate/data/crime.sav";,
+              to.data.frame=TRUE))
+
+q()
diff --git a/win32/deps/library/foreign/tests/dumpdata b/win32/deps/library/foreign/tests/dumpdata
new file mode 100644
index 0000000..af2d127
--- /dev/null
+++ b/win32/deps/library/foreign/tests/dumpdata
@@ -0,0 +1,60 @@
+myobj
+structure
+4
+.Data
+list
+4
+factor
+structure
+3
+.Data
+integer
+3
+1
+2
+3
+.Label
+character
+3
+a
+bc
+def
+class
+character
+1
+factor
+ints
+integer
+3
+N
+2
+3
+floats
+numeric
+3
+1.1
+1.2
+1.3
+logs
+logical
+3
+1
+N
+0
+.Names
+character
+4
+factor
+ints
+floats
+logs
+row.names
+character
+3
+1
+2
+3
+class
+character
+1
+data.frame
diff --git a/win32/deps/library/foreign/tests/electric.por b/win32/deps/library/foreign/tests/electric.por
new file mode 100644
index 0000000..ac42a38
--- /dev/null
+++ b/win32/deps/library/foreign/tests/electric.por
@@ -0,0 +1,123 @@
+ÁÃÉââÖãÉÅ@@@@@@@@@@@@@@@@@@@ASCII SPSS PORT FILE                    
+00000-0000-0000-0000--------------------!3#))0303300/240&),%00000000000000000000
+0200002'220'&)3000#0000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst
+uvwxyz .<(+0&[]!$*);^-/|,%_>?`:#@'="000000~000000000000000000000{}\0000000000000
+00000000000000000000000000000000000000000000000000000000SPSSPORTA8/200201116/171
+348112/SPSS for MS WINDOWS Release 10.0311/                       SPSS/PC+4D/5B/
+70/6/CASEID5/4/0/5/4/0/CQ/CASE IDENTIFICATION NUMBER70/8/FIRSTCHD5/1/0/5/1/0/CF/
+FIRST CHD EVENT70/3/AGE5/2/0/5/2/0/CC/AGE AT ENTRY70/5/DBP585/3/0/5/3/0/C11/AVER
+AGE DIAST BLOOD PRESSURE 5870/5/EDUYR5/2/0/5/2/0/CI/YEARS OF EDUCATION70/6/CHOL5
+85/3/0/5/3/0/C13/SERUM CHOLESTEROL 58 -- MG PER DL70/5/CGT585/2/0/5/2/0/C12/NO O
+F CIGARETTES PER DAY IN 195870/4/HT585/5/1/5/5/1/C16/STATURE, 1958 -- TO NEAREST
+ 0.1 INCH70/4/WT585/3/0/5/3/0/CO/BODY WEIGHT, 1958 -- LBS70/7/DAYOFWK5/1/0/5/1/0
+/89/CC/DAY OF DEATH70/7/VITAL105/1/0/5/1/0/CJ/STATUS AT TEN YEARS71/8/FAMHXCVR1/
+1/0/1/1/0/CL/FAMILY HISTORY OF CHD70/3/CHD5/1/0/5/1/0/C15/INCIDENCE OF CORONARY 
+HEART DISEASED1/8/FIRSTCHD5/1/6/NO CHD2/D/SUDDEN  DEATH3/A/NONFATALMI5/A/FATAL  
+ MI6/B/OTHER   CHDD1/7/DAYOFWK8/1/6/SUNDAY2/6/MONDAY3/7/TUESDAY4/8/WEDNSDAY5/8/T
+HURSDAY6/6/FRIDAY7/8/SATURDAY9/7/MISSINGD1/7/VITAL102/0/5/ALIVE1/4/DEADD1/8/FAMH
+XCVR2/1/N2/NO1/Y3/YESFD/3/1A/2A/G/AL/0/28.O/6A/9/0/1/Y1/10/3/1J/2R/B/86/20/2C.6/
+6O/5/0/1/N1/1N/2/1D/2T/C/8M/0/29/5C/7/1/1/N1/2O/3/1K/3F/8/95/F/22.F/52/4/0/1/Y1/
+2T/2/1D/3K/*.A1/P/28/4S/2/1/1/N1/3C/3/1K/2S/8/8L/10/28/4M/1/1/1/N1/3R/3/1F/2A/*.
+72/0/26.F/6G/9/0/1/N1/4C/3/1H/2J/9/CC/10/27/6D/1/0/1/N1/51/2/1N/3C/C/76/0/27/5M/
+3/1/1/N1/53/2/1J/39/E/8B/A/24.9/5C/5/1/1/Y1/5B/6/1O/33/9/8P/0/25.F/5F/7/1/1/Y1/5
+I/2/1I/2D/B/57/K/2C.O/5B/4/1/1/N1/5S/3/1M/2N/9/8T/F/28.O/4K/4/1/1/Y1/60/5/1D/3S/
+B/BJ/K/27.3/5I/5/1/1/Y1/76/3/1B/32/A/7I/K/27.C/5I/9/0/1/Y1/9L/3/1I/32/C/9T/K/27.
+O/57/9/0/1/N1/AE/3/1N/31/7/9M/0/20.R/4T/9/0/1/N1/AH/3/1K/2S/*.8K/K/27.F/5O/5/1/1
+/N1/BE/2/1M/3H/*.BL/0/28/5A/6/1/1/Y1/BF/2/1E/3F/*.7R/0/26.O/53/6/1/1/Y1/BJ/3/1M/
+2N/E/9M/A/24.C/54/5/0/1/N1/CO/3/1I/2P/E/8G/0/27/67/3/1/1/Y1/D9/3/1H/2K/9/AC/K/2A
+.I/5C/9/0/1/N1/DE/3/1G/36/8/9L/K/29/79/7/0/1/N1/E9/3/1O/30/8/7P/0/2E.R/8E/6/0/1/
+N1/EE/2/1J/41/A/97/0/23.O/64/3/1/1/N1/FA/3/1N/39/*.93/10/27.9/5I/4/0/1/N1/FH/2/1
+O/38/8/75/K/27.C/5L/4/1/1/N1/FK/3/1C/2Q/D/7P/10/26.3/68/9/0/1/N1/G2/2/1O/2R/B/9D
+/M/28.R/61/2/1/1/Y1/G5/2/1K/3K/D/6R/K/2D.O/6Q/1/1/1/Y1/HO/3/1H/3D/E/AR/A/25.O/60
+/1/1/1/N1/IS/3/1E/2A/D/90/K/24.I/4C/7/0/1/N1/J4/3/1L/28/A/9C/0/29.I/67/9/0/1/N1/
+M8/3/1F/3D/8/9O/0/2D.L/70/9/0/1/N1/MD/3/1H/30/A/68/0/2A.C/66/2/0/1/Y1/MH/2/1N/38
+/B/78/0/2C.R/60/2/1/1/N1/NA/3/1H/2I/B/AE/K/27.R/4N/2/0/1/Y1/OG/2/1K/2C/8/6E/O/29
+.C/5A/1/1/1/N1/OR/2/1N/2K/C/CF/K/25.L/59/1/1/1/N1/P0/3/1L/2R/9/BE/C/2A.6/6L/3/0/
+1/Y1/P2/2/1J/45/*.B8/0/27.F/6K/3/1/1/N1/Q7/2/1I/2K/8/9P/0/26.L/56/4/1/1/N1/QF/3/
+1L/2Q/A/8I/10/28/4S/9/0/1/Y1/QP/3/1L/37/9/86/0/2A.3/6K/3/0/1/Y1/R7/5/1G/2K/D/87/
+K/29.O/5I/7/1/1/N1/SG/2/1H/3P/A/C8/6/27.F/60/7/1/1/N1/SK/2/1E/2N/*.9F/K/29.6/5G/
+4/1/1/N1/101/3/1D/32/9/BJ/A/26.F/59/9/0/1/N1/10C/3/1B/37/9/7I/K/29.O/66/3/0/1/N1
+/10D/2/1J/2O/8/3G/0/26.C/66/5/1/1/N1/11G/3/1B/2N/C/E5/K/26.R/61/9/0/1/N1/11I/3/1
+O/2F/8/BM/A/28.L/55/9/0/1/N1/121/2/1L/3F/B/9C/K/2A.F/5L/1/1/1/Y1/12K/3/1L/2D/8/7
+7/K/2A.R/5I/6/0/1/Y1/12Q/3/1F/4D/A/6Q/0/2A.O/6M/9/0/1/N1/13I/3/1M/2T/E/9N/10/2B.
+I/6K/4/1/1/N1/13O/5/1L/2K/B/5Q/10/29/5B/7/1/1/N1/144/3/1J/30/A/82/G/26.F/4M/7/1/
+1/N1/14L/2/1L/38/8/98/0/26.F/54/6/1/1/N1/14Q/2/1L/2P/9/95/K/28.I/51/4/1/1/Y1/156
+/2/1F/36/G/AF/K/27.F/47/1/1/1/N1/15B/3/1B/2R/C/6P/K/2D.6/6B/3/0/1/Y1/160/3/1M/2L
+/E/8D/1A/2A.L/6D/6/0/1/Y1/16B/3/1J/2I/C/8K/0/29.C/5O/9/0/1/N1/17C/3/1L/2K/8/6Q/K
+/23.C/43/1/0/1/N1/18C/3/1O/3D/8/H5/0/24.F/66/2/0/1/Y1/18P/3/1I/2K/A/82/K/2B.6/5E
+/5/0/1/N1/1AH/2/1O/2K/I/9K/1A/2A.I/56/4/1/1/N1/1AI/3/1O/30/D/7I/B/2B.6/59/9/0/1/
+Y1/1BN/2/1F/3A/8/9C/0/28.9/5L/4/1/1/N1/1D9/2/1M/2T/A/7L/K/27.F/5H/6/1/1/N1/1EE/5
+/1O/25/6/7P/K/28.6/51/3/1/1/Y1/1F0/3/1F/37/D/7P/0/27.F/4I/9/0/1/Y1/1F2/3/1K/32/I
+/AM/P/2A.6/7J/2/1/1/N1/1FK/3/1H/2H/*.64/0/2E.F/6F/9/0/1/N1/1GJ/2/1H/2H/*.8O/K/29
+.C/5B/1/1/1/N1/1GL/5/1F/2C/*.AS/K/29.C/5P/5/1/1/N1/1HK/2/1I/2K/C/A8/10/29.L/5I/7
+/1/1/N1/1IM/3/1L/2Q/G/8O/F/2C/5T/5/1/1/N1/1IQ/3/1J/2H/8/91/A/27/52/9/0/1/N1/1IR/
+5/1F/2T/G/82/K/2A.6/6A/1/1/1/N1/1JE/5/1O/38/*.8O/2/28/5I/4/1/1/N1/1L1/3/1B/2M/C/
+98/K/26.F/4S/9/0/1/N1/1L2/3/1M/2J/8/7A/I/2B/62/1/0/1/Y1/1M7/2/1L/2N/G/8G/0/27.O/
+5T/1/1/1/N1/1N0/3/1D/2T/C/5Q/P/28.6/5S/7/0/1/N1/1N8/6/1K/2F/*.9M/A/2A.O/4N/2/1/1
+/Y1/1NA/5/1C/31/C/6P/K/27.L/63/7/1/1/N1/1O4/3/1M/38/C/7A/K/28.I/5F/9/0/1/Y1/1O7/
+3/1B/2K/G/A0/1A/29.I/56/9/0/1/N1/1Q5/3/1N/2R/F/CS/0/29.L/5P/1/0/1/Y1/1Q9/3/1A/2G
+/B/C6/0/26.O/5N/2/0/1/Y1/1RC/3/1M/2P/B/54/0/2B/7N/9/0/1/N1/1RM/3/1M/2K/A/89/0/29
+.6/5D/9/0/1/N1/1S0/3/1M/2I/8/AM/K/26.R/59/9/0/1/N1/1SJ/2/1J/2R/*.7P/0/2B.I/5B/7/
+1/1/N1/1ST/3/1L/2O/8/B0/C/24.3/4J/9/0/1/N1/1TG/3/1J/3N/9/AF/0/27.3/5E/9/0/1/Y1/1
+TK/2/1B/2B/A/82/0/27/67/3/1/1/N1/1TS/3/1B/2A/9/6I/F/26.F/4Q/9/0/1/N1/207/3/1G/3I
+/C/8O/10/26.9/59/9/0/1/N1/20B/2/1I/3R/*.7P/K/2C.C/6F/5/1/1/Y1/21I/3/1L/2P/C/AF/0
+/28.6/56/9/0/1/Y1/21N/5/1L/2N/E/6I/0/27.I/5F/6/1/1/N1/21R/3/1F/3J/9/7A/K/28.R/5L
+/4/1/1/Y1/22J/3/1C/2F/B/B8/K/28/4K/1/0/1/N1/22K/3/1O/2P/A/82/0/2B.C/75/5/1/1/Y1/
+22T/3/1F/39/A/BS/0/24.F/5H/3/0/1/N1/231/3/1H/2L/F/7I/0/25.R/57/7/0/1/N1/247/3/1M
+/40/9/AN/K/29.9/63/4/1/1/N1/24A/2/1I/2T/8/6B/P/2D/6T/6/1/1/Y1/251/2/1L/2F/8/92/0
+/26.9/5L/6/1/1/N1/25M/2/1O/2F/A/92/10/2B/71/1/1/1/N1/26Q/3/1G/3K/B/8G/0/28.3/7C/
+2/0/1/Y1/279/3/1N/3H/E/8G/A/29/55/9/0/1/N1/27J/3/1I/2R/9/82/K/27/5K/5/0/1/Y1/286
+/2/1H/2L/C/7H/K/29.F/54/2/1/1/N1/28A/3/1H/2R/C/AG/K/27.L/6H/7/1/1/N1/29S/6/1A/5A
+/*.63/0/2H/98/3/1/1/N1/1/1/1L/2K/G/90/0/28.6/5Q/9/0/1/N0/3/1/1N/38/H/8A/10/24.6/
+4L/3/0/1/Y0/4/1/1J/2K/G/9K/0/28.O/62/9/0/1/N0/5/1/1D/2K/*.8T/I/29.O/5L/9/0/1/N0/
+6/1/1J/2I/C/AT/0/2A.C/62/9/0/1/N0/7/1/1K/3K/F/93/1A/2G/7C/5/0/1/N0/8/1/1O/2F/G/A
+1/0/27.O/53/9/0/1/N0/9/1/1O/2F/I/6A/0/2E/6A/9/0/1/N0/B/1/1G/2R/G/6P/0/2A/67/4/0/
+1/N0/C/1/1O/*.G/70/F/2C.L/5A/7/0/1/N0/E/1/1L/3J/E/77/0/2A.6/5R/4/0/1/N0/G/1/1J/2
+G/D/7R/0/2B.O/60/9/0/1/N0/I/1/1C/34/E/5P/F/27.I/5L/9/0/1/N0/K/1/1C/2I/G/AT/3/27/
+6B/9/0/1/N0/L/1/1I/3F/E/9A/K/26.F/56/1/0/1/N0/M/1/1E/2Q/G/9Q/9/2D.F/7D/9/0/1/N0/
+N/1/1F/2Q/D/D3/F/25.F/5S/9/0/1/N0/O/1/1O/2Q/D/B0/0/2B.F/7C/9/0/1/Y0/P/1/1O/2O/H/
+CD/0/26.F/5D/9/0/1/N0/Q/1/1H/37/C/A8/K/26.O/5E/9/0/1/N0/R/1/1I/30/H/90/0/2A.C/54
+/9/0/1/N0/S/1/1H/32/G/9C/F/28.R/52/9/0/1/N0/12/1/1N/38/F/7T/0/27.O/5I/9/0/1/N0/1
+3/1/1H/3P/G/91/10/25.F/5M/3/0/1/N0/14/1/1H/33/C/9D/K/29.F/5D/1/0/1/N0/15/1/1A/37
+/A/6J/0/2C.6/75/7/0/1/Y0/17/1/1J/3F/9/76/6/28.F/5M/9/0/1/Y0/18/1/1M/30/E/7N/4/2A
+/4K/9/0/1/N0/19/1/1C/38/C/C3/0/26.F/5H/9/0/1/N0/1A/1/1O/30/A/81/K/25/45/9/0/1/N0
+/1B/1/1C/2F/C/9A/F/28.6/45/9/0/1/N0/1C/1/1H/2H/C/AE/0/2C.6/4L/9/0/1/N0/1D/1/1E/2
+8/*.8A/0/24.F/4K/9/0/1/Y0/1E/1/1C/37/C/91/K/28.F/56/9/0/1/Y0/1F/1/1C/2K/*.6R/K/2
+7.F/5I/9/0/1/Y0/1G/1/1F/25/9/7R/K/2A/50/9/0/1/N0/1H/1/1K/25/E/8G/5/2B/6D/9/0/1/Y
+0/1J/1/1L/30/8/BE/K/2B.C/5L/5/0/1/Y0/1K/1/1F/2O/C/8F/0/2C.O/6A/9/0/1/N0/1L/1/1C/
+2P/C/8C/A/24.F/4F/9/0/1/N0/1M/1/1E/2P/G/7J/0/2B/73/9/0/1/N0/1O/1/1N/2S/C/96/K/2D
+.F/6G/9/0/1/N0/1Q/1/1O/45/A/8O/0/25.F/58/9/0/1/Y0/1R/1/1G/2R/G/AB/0/28.F/50/9/0/
+1/N0/1T/1/1N/31/8/6I/0/27.O/6D/3/0/1/N0/20/1/1J/2K/8/7J/0/2B.C/72/9/0/1/N0/21/1/
+1J/2S/8/7L/K/27.F/4O/9/0/1/Y0/22/1/1G/2P/*.71/A/25.9/4Q/9/0/1/N0/23/1/1E/36/9/8D
+/K/28/6B/3/0/1/N0/25/1/1J/36/9/88/K/24/47/9/0/1/N0/26/1/1I/2I/A/94/0/27.F/5K/9/0
+/1/N0/28/1/1E/2R/B/5R/K/27.F/65/9/0/1/Y0/29/1/1D/31/C/BA/F/26/5M/9/0/1/N0/2A/1/1
+K/2H/*.9T/0/2B.O/7I/9/0/1/N0/2B/1/1E/28/G/7B/K/2B.F/6O/9/0/1/N0/2C/1/1L/3D/A/70/
+20/22.R/50/3/0/1/N0/2D/1/1F/3D/A/AA/0/29/6L/1/0/1/Y0/2E/1/1C/2H/G/64/*.2A.6/5F/9
+/0/1/N0/2F/1/1H/31/C/A8/0/27.F/5P/9/0/1/N0/2G/1/1D/2J/D/99/K/2C/63/9/0/1/N0/2H/1
+/1K/2T/A/AK/0/28.6/5I/9/0/1/N0/2I/1/1J/2M/H/9I/1/27.O/60/9/0/1/N0/2J/1/1F/2L/*.8
+O/K/28/5E/9/0/1/N0/2K/1/1E/3C/C/7P/0/2A.9/62/9/0/1/N0/2L/1/1F/33/E/8G/0/27.F/7H/
+9/0/1/N0/2M/1/1C/2M/D/A6/1A/2D/7C/9/0/1/N0/2N/1/1K/32/A/80/A/29/5S/9/0/1/Y0/2P/1
+/1C/2K/B/AP/0/27.F/4B/9/0/1/N0/2Q/1/1M/3C/8/9C/4/25.O/5J/9/0/1/N0/2R/1/1M/2H/G/A
+K/0/26.6/56/9/0/1/N0/2S/1/1C/2Q/G/9A/1A/29.O/5P/9/0/1/N0/30/1/1M/2S/A/95/10/2D/6
+P/5/0/1/N0/31/1/1B/38/B/7D/0/29.9/7D/9/0/1/Y0/32/1/1D/35/C/7P/0/29/69/9/0/1/N0/3
+4/1/1N/33/D/6M/0/24.9/5R/9/0/1/N0/35/1/1B/2H/C/7H/0/26.F/4I/9/0/1/N0/36/1/1B/32/
+*.8I/0/2A.F/66/9/0/1/N0/37/1/1O/39/E/7H/0/25.F/7E/9/0/1/N0/38/1/1G/2E/A/AK/K/26.
+F/4P/3/0/1/N0/39/1/1H/36/A/82/10/24/60/9/0/1/Y0/3B/1/1I/2K/8/8S/0/27.F/6Q/9/0/1/
+N0/3D/1/1K/2R/A/86/0/29.O/71/6/0/1/N0/3E/1/1K/2J/G/8K/A/29.C/51/4/0/1/N0/3F/1/1G
+/2R/*.93/1A/2E.9/6S/9/0/1/N0/3G/1/1F/2P/C/98/F/27.C/5J/9/0/1/N0/3H/1/1H/3B/B/8G/
+K/2F.9/72/9/0/1/N0/3J/1/1B/2L/G/9E/0/26/5T/9/0/1/N0/3K/1/1I/2H/*.7Q/0/2A/5S/9/0/
+1/N0/3L/1/1D/2H/*.81/0/28/5I/9/0/1/N0/3M/1/1J/3A/B/8L/0/25.F/4T/9/0/1/Y0/3N/1/1F
+/31/D/8O/F/26/4C/9/0/1/Y0/3O/1/1F/2T/8/8P/K/2A/5A/9/0/1/N0/3P/1/1I/2K/A/9O/K/28/
+60/3/0/1/N0/3Q/1/1B/2P/C/86/10/28.9/4J/9/0/1/N0/3T/1/1L/33/A/69/K/27.O/68/6/0/1/
+N0/40/1/1E/2I/A/7G/F/28.9/5A/9/0/1/N0/41/1/1H/3A/A/7O/0/26.9/6A/9/0/1/N0/42/1/1I
+/31/B/8E/0/2C/6K/9/0/1/N0/43/1/1J/35/A/7S/0/24.F/5T/9/0/1/Y0/44/1/1I/2M/C/76/0/2
+6.9/5M/9/0/1/N0/47/1/1O/2N/C/AA/0/25.O/5Q/9/0/1/N0/48/1/1O/3A/8/7R/0/25.6/5C/9/0
+/1/N0/4A/1/1B/32/A/7F/0/26.9/5I/9/0/1/Y0/4B/1/1H/2K/*.6R/A/28/53/9/0/1/N0/4D/1/1
+C/31/C/AA/0/2B.9/6N/9/0/1/N0/4F/1/1F/39/C/8O/K/2C.9/50/9/0/1/N0/4H/1/1B/30/C/BQ/
+0/25/4M/9/0/1/Y0/4J/1/1M/2K/9/B9/0/25/50/9/0/1/Y0/4K/1/1N/2K/F/9C/0/2A.I/5N/9/0/
+1/N0/4M/1/1L/2E/8/8Q/0/27/4H/9/0/1/Y0/4N/1/1O/2T/9/6R/0/25.O/58/9/0/1/N0/4O/1/1D
+/3T/C/86/0/26/5D/9/0/1/N0/4P/1/1F/2B/F/8R/0/2A/5N/9/0/1/N0/4Q/1/1B/2M/C/9I/K/27.
+O/6F/9/0/1/N0/4R/1/1F/3F/E/6K/10/26.F/5L/6/0/1/N0/4S/1/1J/2R/F/5J/K/29/6D/9/0/1/
+N0/4T/1/1O/29/9/6R/K/24.F/4G/9/0/1/N0/50/1/1C/2B/G/5S/0/29.O/5M/9/0/1/N0/54/1/1N
+/2H/I/7F/A/2B.9/5P/9/0/1/N0/55/1/1H/2N/*.6Q/0/26/65/9/0/1/N0/ZZZZZZZZZZZZZZZZZZZ
diff --git a/win32/deps/library/foreign/tests/electric.sav b/win32/deps/library/foreign/tests/electric.sav
new file mode 100644
index 0000000..2fcbb2d
Binary files /dev/null and b/win32/deps/library/foreign/tests/electric.sav differ
diff --git a/win32/deps/library/foreign/tests/ex1-51.mtp b/win32/deps/library/foreign/tests/ex1-51.mtp
new file mode 100644
index 0000000..257b748
--- /dev/null
+++ b/win32/deps/library/foreign/tests/ex1-51.mtp
@@ -0,0 +1,15 @@
+Minitab Portable Worksheet P1.1             1994 522 Release 9.1               .
+%      3      1     26      0 control                                          .
+ 1.202599976E+03 8.300999756E+02 3.723999939E+02 3.454999695E+02 3.211999817E+02
+ 2.442999878E+02 1.629999847E+02 1.477999878E+02 9.499999237E+01 8.699999237E+01
+ 8.119999695E+01 6.849999237E+01 4.729999924E+01 4.109999847E+01 3.659999847E+01
+ 2.899999809E+01 2.859999847E+01 2.629999924E+01 2.609999847E+01 2.439999962E+01
+ 2.169999886E+01 1.729999924E+01 1.149999905E+01 4.899999619E+00 4.899999619E+00
+ 0.999999940E+00                                                               .
+%      3      2     26      0 seeded                                           .
+ 2.745599854E+03 1.697799927E+03 1.655999878E+03 9.779999390E+02 7.033999634E+02
+ 4.890999756E+02 4.299999695E+02 3.340999756E+02 3.027999878E+02 2.746999817E+02
+ 2.746999817E+02 2.549999847E+02 2.424999847E+02 2.006999969E+02 1.985999908E+02
+ 1.295999908E+02 1.189999924E+02 1.182999954E+02 1.152999954E+02 9.239999390E+01
+ 4.059999847E+01 3.269999695E+01 3.139999962E+01 1.749999809E+01 7.699999809E+00
+ 4.099999905E+00                                                               .
diff --git a/win32/deps/library/foreign/tests/minitab.R b/win32/deps/library/foreign/tests/minitab.R
new file mode 100644
index 0000000..9099863
--- /dev/null
+++ b/win32/deps/library/foreign/tests/minitab.R
@@ -0,0 +1,7 @@
+library(foreign)
+ex1.51 <- read.mtp("ex1-51.mtp")
+summary(ex1.51)
+str(ex1.51)
+ex1.51 <- data.frame(ex1.51)
+summary(ex1.51)
+q()
diff --git a/win32/deps/library/foreign/tests/minitab.Rout.save b/win32/deps/library/foreign/tests/minitab.Rout.save
new file mode 100644
index 0000000..e5a963a
--- /dev/null
+++ b/win32/deps/library/foreign/tests/minitab.Rout.save
@@ -0,0 +1,37 @@
+
+R version 2.9.0 Under development (unstable) (2009-01-28 r47758)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(foreign)
+> ex1.51 <- read.mtp("ex1-51.mtp")
+> summary(ex1.51)
+        Length Class  Mode   
+control 26     -none- numeric
+seeded  26     -none- numeric
+> str(ex1.51)
+List of 2
+ $ control: num [1:26] 1203 830 372 346 321 ...
+ $ seeded : num [1:26] 2746 1698 1656 978 703 ...
+> ex1.51 <- data.frame(ex1.51)
+> summary(ex1.51)
+    control            seeded       
+ Min.   :   1.00   Min.   :   4.10  
+ 1st Qu.:  24.82   1st Qu.:  98.12  
+ Median :  44.20   Median : 221.60  
+ Mean   : 164.59   Mean   : 441.98  
+ 3rd Qu.: 159.20   3rd Qu.: 406.02  
+ Max.   :1202.60   Max.   :2745.60  
+> q()
diff --git a/win32/deps/library/foreign/tests/mySobj b/win32/deps/library/foreign/tests/mySobj
new file mode 100644
index 0000000..97e7273
Binary files /dev/null and b/win32/deps/library/foreign/tests/mySobj differ
diff --git a/win32/deps/library/foreign/tests/octave.R b/win32/deps/library/foreign/tests/octave.R
new file mode 100644
index 0000000..6fafe7f
--- /dev/null
+++ b/win32/deps/library/foreign/tests/octave.R
@@ -0,0 +1,5 @@
+library("foreign")
+otd <- read.octave("octave.dat")
+summary(otd)
+str(otd)
+q()
diff --git a/win32/deps/library/foreign/tests/octave.Rout.save b/win32/deps/library/foreign/tests/octave.Rout.save
new file mode 100644
index 0000000..fbd7547
--- /dev/null
+++ b/win32/deps/library/foreign/tests/octave.Rout.save
@@ -0,0 +1,61 @@
+
+R version 2.12.0 Under development (unstable) (2010-03-25 r51410)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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("foreign")
+> otd <- read.octave("octave.dat")
+> summary(otd)
+                    Length Class  Mode     
+a_string            2      -none- character
+a_bool              1      -none- logical  
+a_struct            3      -none- list     
+a_cell              4      -none- list     
+a_complex_scalar    1      -none- complex  
+a_list              3      -none- list     
+a_complex_matrix    4      -none- complex  
+a_range             5      -none- numeric  
+a_scalar            1      -none- numeric  
+a_complex_3_d_array 8      -none- complex  
+a_3_d_array         8      -none- numeric  
+a_matrix            4      -none- numeric  
+a_bool_matrix       4      -none- logical  
+> str(otd)
+List of 13
+ $ a_string           : chr [1:2] "foo" "bar"
+ $ a_bool             : logi FALSE
+ $ a_struct           :List of 3
+  ..$ a: num 1
+  ..$ b: num [1:2, 1:2] 1 3 2 4
+  ..$ c: chr "foo"
+ $ a_cell             :List of 4
+  ..$ : num 1
+  ..$ : chr "foo"
+  ..$ : num [1:2, 1:2] 1 3 2 4
+  ..$ : chr "bar"
+  ..- attr(*, "dim")= int [1:2] 2 2
+ $ a_complex_scalar   : cplx 0+1i
+ $ a_list             :List of 3
+  ..$ : num 1
+  ..$ : num [1:2, 1:2] 1 3 2 4
+  ..$ : chr "foo"
+ $ a_complex_matrix   : cplx [1:2, 1:2] 1+2i 5+0i 3-4i ...
+ $ a_range            : num [1:5] 1 2 3 4 5
+ $ a_scalar           : num 1
+ $ a_complex_3_d_array: cplx [1:2, 1:2, 1:2] 1+1i 3+1i 2+1i ...
+ $ a_3_d_array        : num [1:2, 1:2, 1:2] 1 3 2 4 5 7 6 8
+ $ a_matrix           : num [1:2, 1:2] 1 3 2 4
+ $ a_bool_matrix      : logi [1:2, 1:2] TRUE FALSE FALSE TRUE
+> q()
diff --git a/win32/deps/library/foreign/tests/octave.dat b/win32/deps/library/foreign/tests/octave.dat
new file mode 100644
index 0000000..c5b75b1
--- /dev/null
+++ b/win32/deps/library/foreign/tests/octave.dat
@@ -0,0 +1,122 @@
+# Created by Octave 2.1.60, Mon Dec 27 12:13:21 2004 CET <hornik mithrandir>
+# name: a_string
+# type: string
+# elements: 2
+# length: 3
+foo
+# length: 3
+bar
+# name: a_bool
+# type: bool
+0
+# name: a_struct
+# type: struct
+# length: 3
+# name: a
+# type: scalar
+1
+# name: b
+# type: matrix
+# rows: 2
+# columns: 2
+ 1 2
+ 3 4
+# name: c
+# type: string
+# elements: 1
+# length: 3
+foo
+# name: a_cell
+# type: cell
+# rows: 2
+# columns: 2
+# name: <cell-element>
+# type: scalar
+1
+# name: <cell-element>
+# type: string
+# elements: 1
+# length: 3
+foo
+
+# name: <cell-element>
+# type: matrix
+# rows: 2
+# columns: 2
+ 1 2
+ 3 4
+# name: <cell-element>
+# type: string
+# elements: 1
+# length: 3
+bar
+
+# name: a_complex_scalar
+# type: complex scalar
+(0,1)
+# name: a_list
+# type: list
+# length: 3
+# name: _0
+# type: scalar
+1
+# name: _1
+# type: matrix
+# rows: 2
+# columns: 2
+ 1 2
+ 3 4
+# name: _2
+# type: string
+# elements: 1
+# length: 3
+foo
+# name: a_complex_matrix
+# type: complex matrix
+# rows: 2
+# columns: 2
+ (1,2) (3,-4)
+ (5,0) (-6,0)
+# name: a_range
+# type: range
+# base, limit, increment
+1 5 1
+# name: a_scalar
+# type: scalar
+1
+# name: a_complex_3_d_array
+# type: complex matrix
+# ndims: 3
+ 2 2 2
+ (1,1)
+ (3,1)
+ (2,1)
+ (4,1)
+ (5,-1)
+ (7,-1)
+ (6,-1)
+ (8,-1)
+# name: a_3_d_array
+# type: matrix
+# ndims: 3
+ 2 2 2
+ 1
+ 3
+ 2
+ 4
+ 5
+ 7
+ 6
+ 8
+# name: a_matrix
+# type: matrix
+# rows: 2
+# columns: 2
+ 1 2
+ 3 4
+# name: a_bool_matrix
+# type: bool matrix
+# rows: 2
+# columns: 2
+ 1 0
+ 0 1
diff --git a/win32/deps/library/foreign/tests/octave.m b/win32/deps/library/foreign/tests/octave.m
new file mode 100644
index 0000000..521708f
--- /dev/null
+++ b/win32/deps/library/foreign/tests/octave.m
@@ -0,0 +1,22 @@
+## Run this through (a recent enough version of) Octave to (re)create
+## 'octave.dat', using 'octave < octave.m'.
+
+a_scalar = 1;
+a_complex_scalar = i;
+a_matrix = [1, 2; 3, 4];
+a_complex_matrix = [1+2i, 3-4i; 5, -6];
+a_range = 1 : 5;
+a_string = [ "foo"; "bar" ];
+a_3_d_array = zeros(2, 2, 2);
+a_3_d_array(:,:,1) = a_matrix;
+a_3_d_array(:,:,2) = a_matrix + 4;
+a_complex_3_d_array = a_3_d_array;
+a_complex_3_d_array(:,:,1) = a_complex_3_d_array(:,:,1) + i;
+a_complex_3_d_array(:,:,2) = a_complex_3_d_array(:,:,2) - i;
+a_struct = struct("a", a_scalar, "b", a_matrix, "c", "foo");
+a_list = list(a_scalar, a_matrix, "foo");
+a_cell = { a_scalar, a_matrix; "foo", "bar" };
+a_bool = false;
+a_bool_matrix = [ true, false ; false, true ];
+
+save -ascii "octave.dat" a_*;
diff --git a/win32/deps/library/foreign/tests/pbc.por b/win32/deps/library/foreign/tests/pbc.por
new file mode 100644
index 0000000..81c1af5
--- /dev/null
+++ b/win32/deps/library/foreign/tests/pbc.por
@@ -0,0 +1,340 @@
+ÁÃÉââÖãÉÅ@@@@@@@@@@@@@@@@@@@ASCII SPSS PORT FILE                    
+00000-0000-0000-0000--------------------!3#))0303300/240&),%00000000000000000000
+0200002'220'&)3000#0000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst
+uvwxyz .<(+0&[]!$*);^-/|,%_>?`:#@'="000000~000000000000000000000{}\0000000000000
+00000000000000000000000000000000000000000000000000000000SPSSPORTA8/200012126/130
+234112/SPSS for MS WINDOWS Release 10.04K/5B/70/3/AGE5/7/2/5/7/2/C1/ 70/3/ALB5/4
+/2/5/4/2/C1/ 70/7/ALKPHOS5/7/2/5/7/2/C1/ 70/7/ASCITES5/1/0/5/1/0/C1/ 70/4/BILI5/
+4/2/5/4/2/C1/ 70/4/CHOL5/4/2/5/4/2/C1/ 70/5/EDEMA5/1/0/5/1/0/C1/ 70/5/EDTRT5/3/2
+/5/3/2/C1/ 70/6/HEPMEG5/1/0/5/1/0/C1/ 70/4/TIME5/4/2/5/4/2/C1/ 70/8/PLATELET5/3/
+2/5/3/2/C1/ 70/7/PROTIME5/4/2/5/4/2/C1/ 70/3/SEX5/1/0/5/1/0/C1/ 70/4/SGOT5/6/2/5
+/6/2/C1/ 70/7/SPIDERS5/1/0/5/1/0/C1/ 70/5/STAGE5/1/0/5/1/0/C1/ 70/6/STATUS5/1/0/
+5/1/0/C1/ 70/3/TRT5/1/0/5/1/0/C1/ 70/4/TRIG5/3/2/5/3/2/C1/ 70/6/COPPER5/3/2/5/3/
+2/C1/ F1S.MSKC/2.I/1R8/1/E.F/8L/1/1/1/DA/6A/C.6/1/4H.SF/1/4/1/1/5M/56/1Q.DBK3/4.
+46/86E.O/0/1.3/A2/0/0/1/5+2/7B/A.I/1/3N.FI/1/3/0/1/2S/1O/2A.25A6/3.EC/H6/0/1.C/5
+Q/1/.F/0/13M/51/C/0/36.3/0/4/1/1/1P/70/1O.M6G6/2.G6/6O1.O/0/1.O/84/1/.F/1/245/63
+/A.9/1/20.IR/1/4/1/1/32/24/18.34PO/3.FR/MB/0/3.C/99/0/0/1/1K4/4G/A.R/1/3N.4F/1/3
+/0/2/2C/4N/26.7MOR/3.TC/11E/0/.O/88/0/0/1/2ND/-9/B/1/33/0/3/1/2/23/1K/1P.G146/4.
+2L/RE/0/1/AM/0/0/1/212/6O/9.L/1/20.DF/0/3/0/2/73/1M/1N.1L3I/4/551.6/0/.9/9A/0/0/
+0/2M6/CD/B/1/S.BBTTTTTTTT/0/3/1/2/69/1M/1C.F739/3.2C/2FQ/0/3.6/IM/0/0/0/2K0/8B/B
+/1/4O.4F/1/2/1/1/2S/2J/2A.GNR9/2.M6/10I/1/C.I/6K/1/1/0/1L/A2/B.F/1/4R.7F/1/4/1/2
+/4N/4K/1N.LCF9/4.4O/16O/0/1.C/8J/0/0/1/45C/8I/C/1/2J.1F/1/4/1/2/2J/1G/1T.43P6/3.
+FI/JL/0/3.I/7Q/0/0/0/A4/2B/D.I/1/2M.4F/1/4/1/2/35/34/1F.KKB3/3.PF/19B/0/.L/9B/0/
+0/0/3T7/84/A.I/1/2S.AF/0/3/0/2/4A/1A/1Q.6JII/2.83/O8/1/.O/-9/1/1/1/1AH/56/B/0/2B
+/0/4/1/2/-9/1D/24.JBEL/3.Q3/A09.NTTTTTTT/0/.O/7L/0/0/0/3TE/9P/B/1/47.L9/0/3/1/1/
+36/5N/1A.D94F/3.JO/MP/0/.L/6O/0/0/0/42C/6I/A.O/1/2C.PF/0/3/0/2/1S/S/1M.5F1O/3.4F
+/1L3/0/2.L/94/0/0/1/PJ/7E/A.F/1/3R.O/0/4/1/2/48/59/1N.RR5C/2.O/121/0/B.C/5S/1/1/
+1/4B/9D/C.C/1/9A.GF/1/4/1/1/6K/JI/1J.GOG6/3.GO/22L/0/.L/7P/0/.F/1/4L2/6T/B/1/33/
+0/3/0/1/43/19/1T.SI4F/3.F9/23T/0/5.3/CE/0/0/1/1F6/AM/D/1/42.DF/0/4/1/2/4F/4K/24.
+5K09/3.OR/S3/0/.I/8C/0/0/1/3OP/B6/B.C/0/25.3/1/4/0/2/2N/1B/1Q.88PF/3.IR/1FQ/0/3.
+C/91/0/0/0/MD/5N/B.I/1/40.R/1/4/1/1/1P/FE/1P.T0BL/2.S6/6M4.O/1/H.BTTTTTTTTT/D5/1
+/1/1/8O/74/B.L/1/7H.16/1/4/1/2/6B/II/1E.FI5C/4/6AJ/0/2.3/F6/0/0/1/4FT/2A/9.R/0/7
+B.QC/0/2/1/1/7K/44/1F.25QC/4.3/M1/0/.L/9S/0/0/0/4HH/AO/B.9/1/3G.SF/0/2/0/2/26/1A
+/1M.0M46/3.KC/3HI/0/5.6/17I/0/0/1/1I4/E1/9.R/1/5F.PETTTTTTT/1/3/1/2/5G/1N/1O.D5D
+O/3.99/437.C/1/L.I000000001/5P/1/.F/1/2H/2K/C/1/3B.R9/1/4/1/2/5I/7B/1E.SCH3/3.6R
+/25P/1/H.6/7C/1/1/1/I9/4O/D/1/69.3/1/4/1/2/6F/6T/23.Q93I/3.NC/6ED/0/.L/CA/0/0/0/
+509/D0/A.I/1/2D.FR/0/2/0/2/2Q/O/1B.BGPO/2.G6/82H/0/3.I/8K/0/0/1/AL/44/B/1/41.7O/
+1/4/1/2/58/5M/1B.GH4O/3.D6/B13.60000001/0/4.L/9Q/0/0/1/47T/6F/A.9/1/6Q.C/0/2/1/2
+/3B/3O/1N.TQ99/3.A6/82H/0/1.O/8M/0/0/1/50N/9G/A.I/1/2M.GO/0/4/0/2/58/3B/1L.8ECR/
+3.5L/1N2/0/.O/70/0/0/0/3FK/60/C/1/78.GF/0/3/1/2/3N/2M/1M.1O5C/3.L/21A/0/.O/C4/0/
+0/0/4B3/93/A.F/1/5K.F/0/2/0/1/24/17/1I.IGRI/3.6/DII.O/0/1.6/AE/0/0/0/34R/EB/A.I/
+1/2C.76/0/3/1/2/51/6L/1Q.C9IR/3.BL/II/0/.9/5M/0/0/0/40B/AB/A.I/1/2B.9/0/2/0/2/36
+/I/21.LOP6/3.09/7L1.6/1/7.3/B4/1/1/1/7D/3C/C/1/60.I/0/4/1/1/3S/50/16.IO9/3.FR/1B
+4/0/3.9/CN/0/0/1/3I4/7O/B/1/4H.SF/1/4/1/2/2R/3C/1P.BMTC/3/A26.O/0/.L/9C/0/0/1/2G
+H/IN/A.I/1/2C.76/0/4/1/1/3L/1M/1G.K2DO/3.A6/C86.I0000001/0/1.9/-9/0/0/0/4SR/BS/B
+/1/3E.EL/0/4/0/1/-9/3F/13.J11F/3.7O/1AF/0/6.O/-9/0/0/1/1F0/7G/B.L/1/51.R/0/4/1/1
+/-9/36/13.KP6R/3.G6/9MI/0/2.3/-9/0/0/1/4SD/BE/B/1/1Q.MO/1/4/0/2/-9/42/1I.Q3G6/3.
+J6/610.6/0/1.3/C1/0/0/0/51Q/6N/A.I/1/27.2C/0/2/0/1/2T/16/17.HE7F/3.GF/149/0/3.9/
+9T/1/1/1/3O8/6J/B.L/1/3T.AF/1/3/1/2/1K/4B/1B.NNT3/3.RR/20Q/0/.I/-9/0/0/0/4E5/FO/
+A.R/1/2B.9/0/2/0/2/-9/J/1F.NSRI/2.P6/CP2/0/5.L/G2/0/0/1/2F6/H8/C.L/1/4G.M6/0/3/1
+/1/5F/5B/1H.CP0I/3.JF/1R6/0/.F/AG/0/0/0/2PQ/BQ/9.O/1/67.GF/0/3/0/2/2B/28/1J.42HC
+/3.L/BGG.NTTTTTTT/0/1.R/8J/0/0/0/4RH/74/B/0/68.A6/0/3/0/2/5S/9B/21.4HA6/3.OI/MI/
+0/.O/-9/0/0/1/NI/7N/B/1/37.JF/0/4/1/2/-9/1S/1N.F7M6/3.AO/160/0/1.3/8H/0/0/1/2QI/
+48/A.I/1/3G.SF/0/4/1/1/2D/1D/1M.2IP6/3.I/4OC/0/.O/96/0/0/0/48D/93/A.I/1/39.9R/0/
+2/1/2/4N/1O/1K.G6IR/3.L/5JE.C/0/6/KE/0/0/0/2JG/C2/A.I/0/6Q.C/0/1/1/1/33/58/27.C7
+M6/3.3/756.6/0/2.I/-9/0/0/1/13A/74/B/1/1Q.MO/0/4/1/1/-9/34/19.5S0I/3.C/62R.6/1/1
+.9/9I/1/1/1/1HO/8E/B/1/2D.FR/1/4/1/1/45/8M/25.MQQC/3.S6/B8P/0/1.O/DQ/0/0/0/1FA/7
+3/B/0/2J.TC/0/3/1/1/79/41/13.IG8L/3.O/FC2.C/0/1.3/GI/0/0/1/21H/C5/A.I/1/35.DO/1/
+2/1/2/AJ/2S/1N.H4AF/3.5C/CHA.6/0/2.9/8K/1/.F/1/3JC/76/C.C/1/3F.NC/0/3/1/1/34/7L/
+1E.H2GF/4.2C/6GA/0/.L/82/0/0/0/4SJ/-9/A.I/0/1Q.MO/0/1/0/1/3S/2D/1A.BOQ3/3.F/8E2.
+O/0/.O/AT/0/0/1/2E4/AL/A.I/1/46.CI/1/3/1/1/44/1J/1S.BDL9/3.C/T6/0/.R/K4/0/0/0/4P
+F/7I/A.9/1/2B.9/0/3/0/1/1S/2M/1D.QSOR/3.S6/K1/0/.I/76/0/0/0/4LQ/71/D/0/20.DF/0/1
+/0/2/68/S/20.L5MO/2.MF/1KN/1/1.9/A2/0/0/0/3D0/AT/D.6/1/1D.C/0/4/1/2/3M/1S/1G.IPE
+3/3.3I/5TQ/0/M.F/112/1/1/0/SJ/5F/B.I/1/84.R/1/3/1/2/4D/35/22.R6P6/3.F/13J/0/2.3/
+CD/0/0/1/1JH/5S/B/1/50.AF/0/3/1/2/68/1M/1A.62A6/3.I/O4/0/1.6/8G/0/0/0/4D2/EA/A/1
+/4L.1F/0/1/0/1/3I/2E/1G.DHNL/3.L/23J/0/1.C/E7/0/0/1/4JL/43/B/0/62.R/0/3/1/1/5L/3
+F/1L.8JBC/3.R9/1TH/0/1.3/FG/0/0/0/329/8L/A/1/AS.I00000001/0/3/1/2/65/2O/12.IBT3/
+4.2L/LC/0/.L/5O/0/0/0/4EJ/6N/A.I/1/2B.9/0/3/0/1/1G/1S/1J.A4RI/3.DO/3JM/0/K/LM/0/
+.F/1/190/7H/C.C/1/75.DF/1/3/1/1/64/59/1Q.BTLR/4.J6/M6/0/.I/-9/0/0/0/3P8/8P/A.I/1
+/1O.7F/0/2/0/1/-9/K/1I.PBC/3.H3/2DB/0/1.6/8I/0/0/1/4JQ/DK/B.F/1/40.R/0/4/0/2/2G/
+2J/12.ENFI/3.G6/1BD/0/.F/AK/0/0/0/4JE/7F/A/1/42.DF/0/3/0/2/2K/1L/18.EONC/3.I/E3/
+0/.L/4C/0/0/0/4JK/8P/B/1/1J.I/0/1/0/2/1Q/H/1L.RIG6/3.TL/127/0/8.C/II/0/0/1/20R/9
+8/B/1/2T.R/1/4/1/1/A9/9A/1D.FG8L/2.FR/298/1/H.3000000001/ME/1/.F/1/19L/8S/B.F/1/
+62.R/1/4/1/1/JS/6R/1L.S87F/3.2C/2B2/0/C.6/D4/1/.F/1/2B/5F/B.I/1/55/1/4/1/1/83/3L
+/1J.ONEL/3.C9/20J/0/6.I/84/1/.F/1/AQ/4C/C.3/1/5K.F/1/3/1/2/31/6J/1H.SAKC/3.0I/2C
+G/0/6.9/EG/0/0/1/1QA/7Q/A.I/1/5K.F/0/4/1/1/3E/2F/1G.FEEL/4.76/1OH/0/.O/AF/0/0/1/
+43H/E6/A.R/1/5K.F/0/3/0/1/2A/D/27.CA7O/3.LI/1DD/0/7.6/87/0/0/1/TK/C0/B.6/0/5Q.L/
+0/4/1/2/31/8T/23.7R4F/3.JF/1AI/0/E.C/ES/0/0/1/2OK/CP/B.L/1/20.DF/1/4/1/1/AI/14/2
+7.992L/4.2L/1MK/0/4.F/FM/0/0/0/3T4/DM/B.3/1/3R.O/0/3/1/1/92/54/1Q.0C9R/3.F/17S/0
+/1.9/8A/1/.F/1/4F0/2L/C.R/1/2B.9/0/4/0/1/3A/1I/1P.OR83/3.MO/1EP/0/.C/8N/0/0/0/4E
+C/61/B.6/1/4H.SF/0/3/0/2/2E/T/1H.6F9/3.EC/285/0/2.3/8M/0/0/1/3LS/7F/B.F/1/2T.R/0
+/4/1/2/2O/1S/1M.MMGO/3.69/2SG/0/5/1NA/0/0/1/1P7/61/A.R/1/2M.4F/1/3/1/1/5O/2F/17.
+8AM6/4.C/220/0/1.3/BF/0/0/0/6I/ER/A.L/1/78.GF/0/3/1/1/2C/2F/1B.BO76/4.1O/14C/0/.
+I/9Q/1/.F/0/2LM/EM/C/1/2K.I/0/3/0/2/2N/17/1M.D94F/3.JF/163/0/2/DI/0/0/1/1S1/6K/B
+.C/1/3K.1F/0/2/1/1/38/1K/13.E83R/4.6I/21R/0/1.I/M0/0/0/0/2TJ/B7/B/0/51.R/0/2/1/1
+/55/34/1F.I6BL/3.E3/2M0/0/5/AP/1/.F/1/FA/EA/B.R/1/86.DF/1/4/1/2/1Q/3K/2G.L85L/3.
+3R/1O6/1/1.C/6Q/1/1/0/CS/4P/C.6/1/2Q.O/0/4/1/1/2A/16/16.G0F9/3.K3/27T/0/1.9/BN/0
+/0/0/4AD/CK/B.3/1/7M.F00000001/0/2/0/1/28/2D/1N.REPF/3.39/1AC/0/3.6/6L/0/0/1/P0/
+68/B.O/1/59.JF/1/4/1/1/29/5S/1G.BL2L/2.J6/IJ/1/H.BTTTTTTTTT/-9/1/1/1/4A/DB/B.L/1
+/3T.AF/1/2/1/2/-9/62/1I.PBC/3.L/1BS/0/1/-9/0/0/0/48A/B8/A.C/1/39.6/0/3/0/1/-9/13
+/2B.QNQC/3.7O/3GG/0/2/E0/1/.F/1/KB/BE/B.C/0/2H.F/0/3/1/2/31/22/S.QFQ3/3.N3/22H/0
+/1/7T/0/0/0/47D/AC/A.6/1/37.JF/0/1/0/1/3B/2H/1I.E1BC/3.AF/1J2/0/1.O/FA/0/0/0/47A
+/5M/A.6/0/3I.F/0/2/0/2/3S/4S/1L.E209/3/OQ/0/2.9/5S/0/0/1/IC/3T/C/0/5S.7F/0/4/1/2
+/42/4P/1E.SF/3.I/1Q9/0/.R/DA/0/0/0/3TB/AR/A.C/1/5E.9/0/3/0/2/5G/11/1Q.H2GF/3.T3/
+LG/0/.R/88/0/0/0/3D9/48/A.3/1/22/0/1/0/1/2O/5M/1I.SR9R/3.K3/1CD/1/2.F/68/1/1/1/3
+K/3K/B.3/1/3T.AF/1/4/1/2/3C/1R/1D.0FBL/3.J6/2A8/0/1.3/A3/0/0/0/3CQ/BJ/B.3/1/48.J
+F/0/2/1/1/1N/K/14.15LR/4.6/1OO/0/1.3/FE/0/0/1/3D2/BI/A.9/1/51.R/0/3/0/2/3C/18/28
+.F88C/3.R/167/1/2.3/-9/0/0/1/3HC/4H/A.I/1/3D.PF/0/2/1/1/-9/1K/22.FJD6/4.0R/LI/0/
+.I/72/0/0/0/3MS/AG/H.3000000001/1/2B.9/0/1/0/2/2H/A/1K.ALH3/3.F/15C/0/.C/47/0/0/
+0/2Q3/B4/A.9/1/1J.I/0/2/1/1/2O/E/1E.1QL/3.I9/QO/0/.F/40/0/0/0/2NE/91/A.I/1/3K.1F
+/0/3/0/2/1M/1N/18.R983/3.G6/152/0/1.R/G6/0/0/1/2A5/4L/A.R/1/3I.F/1/3/1/1/3J/2E/1
+B.4HA6/4.5C/2K4/0/5.F/HI/0/0/0/2IA/FH/A.L/1/5M.1F/0/3/0/1/2I/2H/1P.DM39/3.K3/P4/
+0/2/8R/0/0/1/3OP/4G/B.O/1/6G.PF/1/4/1/2/30/2T/1L.701O/3.M6/12J/0/6.L/CE/0/0/1/12
+K/8Q/B.3/1/48.JF/1/4/1/1/3A/3D/1M.OO3I/4.9/14K/0/3.6/8J/0/0/0/3N5/8S/B.L/0/3K.1F
+/0/3/1/2/2I/6S/1C.J5B3/4.5L/1MO/0/.L/A3/0/0/0/3O2/A7/A.9/1/3L.I/1/3/0/2/56/2L/21
+.23DF/3.IR/1MS/0/3/F8/1/.F/0/3L6/EI/9.R/1/3G.SF/1/3/0/1/CM/2E/1J.JKMO/3.39/2J4/0
+/6.F/11K/0/0/1/163/BO/B/1/5K.F/1/4/1/1/4T/3L/1I.PINC/3.9/T8/0/3.F/D0/0/0/1/2G8/6
+R/A.6/1/4H.SF/0/3/1/1/33/27/1O.7KC/3.OR/11E/0/.I/L6/0/0/0/H5/A6/9.F/1/37.JF/1/3/
+1/1/3O/49/15.4G53/3.TC/PG/0/3.F/AP/0/0/0/27N/BE/A.I/0/4A.6/0/3/0/1/70/EO/27.R669
+/3.2C/172/1/1.9/51/1/1/1/6B/73/D.6/0/1G.F/0/4/1/2/1J/2D/1P.D2C/4.3R/P8/0/.I/9S/0
+/0/0/3JR/8G/A.L/1/25.3/0/3/0/1/2P/T/1F.OIIR/3.6R/QA/0/5.3/-9/1/1/1/12B/3E/D/1/5T
+.O/1/4/1/1/-9/I/1M.QKOI/3.R/ML/0/.I/8B/0/0/1/3C9/62/A.O/0/1R.AF/0/4/0/1/3H/P/1H.
+5D7O/3.F9/18M/0/1.9/AG/0/0/1/2M8/7S/A/1/4R.7F/0/4/0/2/4H/2F/1N.HT09/3.3I/1I1/1/1
+.6/8T/0/0/1/RE/5G/B.3/1/5F.PETTTTTTT/1/4/1/1/28/-9/1E.33I/4.2C/194/0/.F/8S/0/0/0
+/3IF/F3/A/1/2Q.O/0/2/0/2/35/9/1B.SEB3/2.QL/20S/0/G.6/-9/0/0/1/14H/43/C.I/1/9T.4E
+TTTTTTT/1/4/1/1/-9/1C/23.ICI/3.Q3/13J/0/.R/E0/0/0/1/3HT/-9/9.L/1/1R.AF/0/3/0/1/7
+M/10/1E.6OEC/3.CR/28P/0/H.BTTTTTTTTT/1T5/0/0/1/1H3/DS/B.F/1/5F.PETTTTTTT/1/3/1/2
+/37/6P/22.017O/3.O/KE/0/2.O/82/0/0/1/SA/41/D.6/1/4G.C/1/4/1/2/3E/2E/1A.GHL/3.OR/
+152/0/1.R/ES/0/0/0/384/61/9.O/1/47.3/0/3/0/1/5P/20/22.JA9I/3.SF/J7/0/1.F/B1/0/0/
+0/336/5F/A.3/0/48.JF/0/4/1/2/39/D/1C.A1PO/3.K3/1F3/0/.L/J8/0/0/0/3ET/E7/A.L/1/47
+.3/0/2/0/2/3F/15/1C.T10I/3.H3/RQ/0/.C/8N/0/0/0/3F0/EP/B/1/2E.C/0/2/0/1/41/43/1P.
+SPFR/3.AF/1OG/0/.O/8N/0/0/0/3D8/6Q/9.O/1/3Q.7F/0/2/0/1/29/R/22.POTL/3.I/3PM/0/1.
+3/D9/0/0/0/39K/BE/A.3/1/55/0/2/0/1/52/2J/1L.7EOI/3.RR/2KO/0/7.9/E6/0/0/1/1D7/8C/
+A.F/0/4P.L/0/3/1/1/78/8M/1G.MQ7F/3.99/1C0/0/1.3/AS/0/0/1/2A6/4M/B.I/1/34.GF/0/4/
+0/2/4E/59/1O.27N3/4.2L/2AK/0/1.3/9K/0/0/1/3BT/AI/A/1/66/0/3/0/1/4Q/18/1H.12K3/3.
+N3/QE/0/.R/BG/0/0/0/3BK/B6/A.I/1/45.GF/0/2/0/1/1Q/1T/1P.LNHC/3.EC/O0/0/1/C4/0/0/
+1/2KJ/9D/9.R/1/4E.PF/0/2/1/2/2S/K/1G.32CR/3.I/1JM/0/2.R/B2/0/0/1/Q6/97/B/1/4E.PF
+/0/4/1/2/3D/2Q/1M.8IMF/3.7O/49Q/0/S/IG/0/.F/1/11D/B5/A/1/6I.C/0/3/1/2/5L/52/1L.6
+0DF/3.P6/SI/0/.L/A9/0/0/0/396/8D/B.C/1/1B.PF/1/3/0/2/3G/36/13.PS1F/3.QL/1CO/0/1.
+6/-9/0/.F/0/2R5/7T/9.C/1/5N.I/0/3/0/2/-9/1S/2F.0AD6/3.B3/QB/0/1.6/9I/1/.F/0/39P/
+73/A.L/1/1R.AF/0/2/0/1/3O/12/10.PRCI/3.7O/47Q/0/7.6/13P/0/0/1/1HH/B0/9.O/1/6I.C/
+0/3/1/2/9A/87/21.O3NC/3.NL/1PE/0/3/8H/1/.F/1/PC/4K/9.R/0/3C.9/1/4/1/1/3M/9K/14.T
+I9/3.IR/1L6/0/1/-9/0/0/0/36B/7N/A/1/4E.PF/1/1/0/2/-9/1R/1P.17II/3.0R/O1/0/.R/FA/
+0/0/0/35K/A1/9.C/1/2P.7F/0/2/0/1/5O/1R/29.S6TL/3.09/2FQ/0/2.9/JG/0/0/1/18C/B9/A.
+R/0/3O.L/0/3/1/1/46/83/1J.I3SO/3.PF/F3/0/.F/77/0/0/0/35D/90/B.3/1/1O.7F/0/1/0/1/
+28/28/29.B9BL/2.GO/156/0/2.C/5I/1/1/0/4K/3I/E.3/0/40.R/1/3/1/1/2F/7F/1D.GKPF/3.A
+F/1O0/0/.I/7A/0/.F/1/2SQ/AB/B.6/1/53.DF/1/4/0/2/2K/1R/1T.C7M6/3.FI/2M8/0/P.F/BS/
+0/0/1/SD/51/B.F/1/6L.F/0/2/1/2/6P/79/1I.MMGO/3.CI/228/0/.I/9G/0/0/0/34F/G7/A/1/2
+H.F/0/2/0/2/6Q/14/16.ENFI/3.B3/1GS/0/3.C/F0/0/0/0/2MF/AD/B.6/1/3Q.7F/0/2/0/1/3S/
+12/1F.MOAO/3.DO/NO/0/2.F/AH/0/0/0/1L6/6R/A.3/0/4A.6/0/3/1/2/4K/77/1R.B4FR/3.II/D
+O/0/.I/77/0/0/0/32C/7E/A.F/1/2F.SF/0/3/0/2/3T/D/1C.M8T3/3.GO/124/0/2.9/GM/0/0/0/
+337/8T/9.I/1/40.R/0/2/0/2/60/4/1S.OFEC/3.5L/R5/0/3.6/8K/0/0/1/66/5A/C/1/47.3/1/4
+/1/2/3B/31/1N.ERP6/4.2C/KM/0/.9/7N/0/0/0/28F/BS/9.R/1/26.JF/0/3/1/1/28/K/1D.CCKL
+/3.A6/1HI/0/8.F/-9/0/.F/1/8O/2S/D.9/1/61.AF/1/4/1/2/-9/5B/1N.95C/3.DF/2N6/0/4/6G
+/0/0/1/15R/72/B.9/0/4D.9/0/4/1/1/4M/2K/1B.AJKC/3.7O/25A/0/5.L/1JA/0/0/1/30L/73/9
+.F/1/F7.7F/0/2/0/2/3I/2O/20.SMBC/3.PO/13P/0/.R/CG/0/0/1/1Q2/7S/A.9/0/2N.L/0/4/1/
+1/54/6K/1H.MI76/3.O/S2/0/.C/8H/0/0/1/30D/-9/9.6/1/37.JF/0/2/0/2/3K/1E/15.ELLI/4.
+6I/1G7/0/1.9/DI/0/0/0/1AC/9P/A.3/1/4M.I/0/3/1/2/4H/27/1I.JQA6/3.I9/1K9/0/1.6/D0/
+0/0/0/2TM/8N/9/1/2S.AF/0/3/0/1/1M/12/1M.K16/4.FI/Q4/0/.F/-9/0/0/0/2PO/C1/A.3/1/2
+E.C/0/3/0/1/-9/11/1J.Q3/3.A6/14B/0/1.9/6P/0/0/0/2GL/77/9.O/1/31.DF/1/3/0/2/46/25
+/10.87KC/3.CI/1GN/0/3/7Q/0/0/1/2SH/GD/9.O/1/2T.R/1/2/0/1/2Q/2G/1P.H0JO/3.PF/M3/0
+/.F/-9/0/0/0/2S4/AB/9.L/1/2J.1F/0/1/0/1/-9/23/1M.4HT3/3.O/NS/0/.O/9D/0/0/0/2RE/B
+A/A.3/1/3I.F/0/3/0/2/5I/52/1B.I8R9/3.GO/1TK/0/3.6/-9/0/0/1/1JM/4T/A.3/1/4J.F/1/4
+/1/1/-9/2H/1P.DH4O/4.09/IJ/0/.R/8I/0/0/0/2QT/97/A.C/1/1D.C/0/2/0/2/4D/1J/2A.03KL
+/4.2C/M5/0/.I/-9/0/0/0/2Q0/AP/A.6/1/2E.C/0/4/0/1/-9/1L/1D.S87F/3.OR/2BI/0/1.O/D6
+/0/0/1/2PN/98/9.R/1/3C.9/0/4/0/2/4D/19/1C.H18L/4.BC/1O9/0/4.L/FS/0/0/0/2PD/5P/A.
+C/1/7R.4F/0/3/0/2/2G/1E/1E.H2GF/3.HC/IE/0/1.C/88/0/0/1/2P6/2J/A.9/1/2F.SF/1/4/0/
+1/3G/23/1Q.SA46/3.KL/ME/0/.I/-9/0/0/1/2P5/HT/9.R/1/Q.AF00000001/0/2/0/1/-9/5B/1A
+.7O2L/3.LR/1EP/0/.F/6L/0/0/0/2EL/EP/A.3/1/1O.7F/0/2/0/2/4P/1E/17.I6BL/3.GF/2KC/0
+/B/ME/0/0/1/12E/FL/9.O/1/5H.C/0/3/1/2/4K/BS/1I.AP7O/3.G6/17M/0/.O/8G/0/0/0/2O7/6
+C/A.F/1/2E.C/0/3/0/1/34/1C/2A.P2MO/3.FR/113/0/2/7F/0/.F/0/1MG/6K/C.L/1/29.MF/1/3
+/1/1/22/1L/15.NML9/3.CR/35K/0/E/QS/0/0/1/OD/8S/B.F/1/53.DF/0/3/1/2/4H/8B/22.IKI9
+/3.EC/LO/0/.L/67/0/0/1/2HM/5E/B/1/40.R/0/4/0/1/38/1B/1K.JCMF/3.IR/20C/0/1.9/C0/0
+/0/1/2LQ/8G/9.R/1/37.JF/0/3/0/2/5E/1M/1O.FO9/3.RR/20S/0/2.9/-9/0/0/0/2NE/AR/A.6/
+1/4D.9/1/2/0/1/-9/O/1M.KNCR/3.AF/44K/1/O.F/16C/0/0/1/76/D9/F.5TTTTTTTTT/1/4R.7F/
+1/4/1/2/EC/7N/1M.LI2L/3.KL/N6/0/.R/A8/0/0/1/2LD/BE/9.O/1/1L.4F/0/4/0/1/3B/27/1Q.
+N4QL/3.5L/2CO/0/A.O/112/0/0/0/QH/CM/A.C/1/5B.6/0/4/1/2/57/8R/1E.BR9/4.9/12F/0/1.
+F/9N/0/0/0/2LJ/B6/9.3/1/45.GF/0/2/0/1/1Q/1K/T.GJHL/3.R/2OO/0/3.L/BH/0/0/1/2HK/49
+/B.F/1/7B.JF/0/4/0/1/30/2G/1R.16AO/3.AO/R0/0/1.C/7G/0/0/1/2IN/3R/B.I/1/2C.PF/1/4
+/0/1/22/D/1E.IO9/3.T3/18O/0/.I/8Q/0/0/0/2IP/6L/A.3/1/3C.9/0/2/0/1/3C/P/15.NRJO/2
+.R/1QC/0/.L/9G/0/0/0/2IH/CL/9.I/1/4L.1F/1/2/0/2/30/18/1A.LFH3/3.CR/1GF/0/2.3/D2/
+0/0/0/1N2/AS/A.6/1/64.DF/0/3/0/1/6E/1M/12.6TCR/3.GF/1GB/0/4.L/7Q/0/0/0/2H8/B2/9.
+R/1/4H.SF/1/3/0/2/3O/3M/1B.2N4O/3.6/1SI/0/.I/7P/0/0/1/2GE/7I/A.O/1/3G.SF/0/4/0/2
+/27/Q/21.J6/3.O/14O/0/.F/7D/0/0/0/2FM/H4/A/1/2K.I/0/2/0/1/2T/F/17.1L3I/4.16/JS/0
+/.F/4T/0/0/1/2E1/5G/9.R/1/1M.L/0/2/0/2/1R/7H/22.HB5L/3.M6/144/0/.L/8F/0/0/0/29K/
+9B/A.6/1/2H.F/0/3/1/2/1S/N/1I.T9JO/3.GF/1KG/1/2.F/CM/0/0/0/29B/46/A.9/1/7S.L/0/3
+/1/1/-9/3I/21.TLAO/4.23/5QK/0/.I/73/0/0/0/2F5/80/B/1/1R.AF/0/1/0/1/28/C/2C.N4QL/
+3.9R/OD/0/.I/-9/1/.F/0/2CB/8J/A.3/1/2P.7F/0/4/0/1/-9/E/21.8PF/3.6/1I0/0/3.R/D6/0
+/0/1/104/56/A/1/53.DF/0/4/1/1/4B/1S/1M.ILNC/4.09/1AA/0/.L/8C/0/0/1/2DQ/A9/9.F/1/
+2C.PF/1/2/0/2/1S/B/1J.MQQC/3.B3/16I/0/.R/BG/0/0/1/2E4/9S/A/0/42.DF/0/2/0/2/30/2L
+/1M.RCSO/3.MO/1CM/0/1.9/-9/0/0/0/2D5/3O/A.9/1/3A.MF/0/3/0/2/-9/R/1H.7R4F/3.TC/15
+O/0/1.6/7M/0/0/0/2CG/7D/9.R/1/3A.MF/0/3/0/2/39/B/1K.63I/3.C/17O/0/.F/DA/0/0/0/2C
+I/BQ/A.6/1/36.3/1/3/0/1/1P/9/29.AC9/3.CR/226/0/.R/DE/0/0/1/1TG/7Q/9.R/1/2J.1F/0/
+3/1/2/7E/14/1B.525L/3.PF/1A4/0/5.R/1CG/0/0/0/160/76/A.L/1/6N.1F/0/3/1/2/57/4L/1T
+.4SF/3.KC/SG/0/.F/-9/0/0/0/2C8/4Q/A.C/1/1P.O/0/3/0/1/-9/K/16.2BDO/3.99/1TK/0/B.C
+/K8/0/0/1/QA/9S/A.O/1/51.R/0/4/1/2/70/25/14.HPSF/3.QL/TR/0/.F/-9/0/0/0/2CA/E3/A.
+3/1/26.JF/0/1/0/1/-9/T/1C.LBQC/4.53/116/0/1.I/75/0/0/0/2BR/5Q/9.I/1/4E.PF/0/3/0/
+2/2P/27/23.IRAO/3.6I/30G/0/3.O/E6/0/0/0/1B5/7I/A.I/1/70.O/1/2/1/1/3N/36/1Q.IQLR/
+3.JF/3G6/0/.R/C0/0/0/1/28A/8T/9.L/1/34.GF/0/4/0/2/54/2C/1G.7RNC/3.BC/2H0/0/4.F/C
+C/0/0/1/JR/80/C.C/1/5H.C/0/3/1/2/4F/7H/21.78L/2.CR/213/1/E.3/ES/1/1/1/B4/70/B/1/
+4E/0/4/1/1/55/43/18.II2L/3.JO/1AE/0/1/A9/0/0/0/24P/A9/9.L/1/58.3/0/3/0/1/3B/27/1
+8.N3IR/3.JO/15F/0/.L/94/0/0/0/27C/8B/A.3/1/2S.AF/0/2/0/1/4F/3I/1Q.KPPO/3.L/TE/0/
+.F/7D/0/0/1/25S/7L/9.I/1/2F.SF/0/3/0/2/3E/19/1S.SG7O/3.AF/1NB/0/2.9/AG/0/0/0/139
+/D4/9.L/0/5T.O/0/2/1/1/23/5M/16.RKCR/3.AF/LF/0/.L/75/0/0/0/25H/5F/9.I/1/33/0/3/0
+/2/2E/1B/22.CD9I/3.1F/140/1/4.F/6B/1/.F/1/BI/4J/B.C/1/5P.4F/0/4/1/1/3S/6K/14.I88
+C/3.C9/AA/0/3.9/A2/0/0/1/25T/35/B.F/1/2N.L/1/4/0/2/1E/1L/1S.A1PO/1.SO/2F0/0/3.C/
+H8/0/0/1/18P/6A/A.L/1/6N.1F/1/4/1/2/30/3P/1K.5DQL/3.0I/13B/0/.C/8R/0/0/1/251/8P/
+A.I/1/4D.9/0/3/0/1/2R/1H/1C.KH6I/3.1O/2RC/0/.R/H4/0/0/1/24C/9E/9.O/1/3F.C/1/4/0/
+1/2R/DM/14.BB8C/3.AF/12G/0/.R/J8/0/0/0/1T6/AM/B.6/1/3Q.7F/0/2/0/2/5R/2I/13.5EFI/
+4.4O/3R0/0/D/1EG/0/0/1/22M/B8/B.R/1/6T.7F/0/3/0/2/3L/2B/18.BDL9/3.NL/13G/0/1.F/8
+D/0/0/1/23I/BB/9.L/1/4J.F/1/3/0/1/3G/27/1T.MPII/2.SF/RA/0/1.I/EM/0/0/1/22M/61/A.
+3/1/2P.7F/0/3/0/1/3I/3F/26.CAO/3.AF/16D/0/.I/9A/0/.F/0/22E/9P/9.O/1/48.JF/0/2/0/
+2/2L/-9/1G.NKR9/2.S6/1TO/0/.O/A0/0/0/1/N4/AJ/B.6/1/4A.6/1/4/1/1/39/7L/1Q.2BDO/3.
+LI/C9/0/.C/7M/0/0/0/211/AQ/A.3/1/1L.4F/0/3/0/1/4J/O/1B.B6SO/3.II/179/0/4.C/AG/0/
+0/1/RR/9C/9.O/1/3O.L/1/4/0/2/AM/A8/24.H4TC/2.T3/1LN/0/1.R/BO/0/0/1/20A/97/9.R/1/
+6G.PF/0/3/0/1/52/2Q/27.EJ6/2.O9/26T/0/8/FI/0/0/1/110/7N/A/1/6I.C/0/4/1/2/4J/4J/1
+E.OQJ6/3.6I/1C8/0/3.R/BK/0/0/0/1QA/90/9.I/1/92.O/1/3/1/1/7L/41/1F.N47O/3.JF/QE/0
+/.I/93/0/0/1/1TK/A5/9.I/1/1M.L/0/3/0/2/74/1I/12.SF/3.N3/1NN/0/2.3/CR/0/0/1/1HP/6
+5/A.3/1/50.AF/0/4/0/1/13/23/1B.6ITL/2.OR/42L/0/6.3/1R2/0/0/1/OC/9R/A/1/58.3/0/3/
+0/1/4J/2T/1P.CF3I/3.F9/1B7/0/.O/AO/0/0/1/1TF/CB/A/1/26.JF/0/3/0/2/4Q/19/1H.TCLI/
+3.6/1LQ/0/1.9/82/0/0/0/1TD/6F/A.I/1/5P.4F/1/4/0/1/2B/15/1A.NM2C/3.AO/329/0/.I/9T
+/0/0/1/1ST/A3/A.R/1/7A.3/0/4/0/2/2P/N/1Q.T76R/3.I9/MG/0/.F/7H/0/0/0/1IH/89/9.R/1
+/2N/0/2/0/1/40/1A/28.DQCR/3.AF/10O/0/1.3/86/0/0/1/1T0/AH/A/1/3N.4F/1/4/0/1/30/3Q
+/2I.D5DO/3.0R/12N/1/7.3/83/0/0/1/1SP/37/B.6/0/58.3/1/4/0/1/54/CK/19.PLP6/3.MF/17
+Q/0/3.3/7H/0/0/1/OH/8O/A/1/3K/1/3/0/1/31/41/15.992L/3.PF/FG/0/.L/6D/0/0/1/1RP/56
+/A.9/1/1N/1/3/0/2/3S/15/11.D9NC/3.M6/RD/0/1.3/B6/0/0/0/1QL/82/9.L/1/2O/0/3/0/1/3
+I/1I/1S.7RNC/4.6R/CH/0/.F/9A/0/0/0/1NO/7H/A.I/1/1Q/0/2/0/1/4Q/16/1L.EJ6/3.D6/13D
+/0/1.3/DO/0/0/0/1QM/91/9.I/1/39/0/1/0/1/1P/2K/1T.T2R9/2.T3/170/0/3.3/97/0/0/1/1N
+P/7B/9.O/1/45/0/3/0/2/46/1C/2E.FLQ3/3.HL/17A/0/5.I/7M/0/0/1/1P6/88/A.R/0/38/0/4/
+0/2/48/68/1M.ARKL/3.46/SH/0/3.6/CF/0/0/1/1PR/CF/9.F/1/2T/1/3/0/2/-9/49/1C.NIBL/3
+.1O/2PC/0/2.O/AM/0/0/1/1PG/7L/9.F/1/31/0/3/0/2/6T/25/14.Q76R/3.H3/1GQ/0/1.3/EC/0
+/.F/1/1DB/88/B.C/1/6A/1/4/0/2/2H/1F/1E.45J6/3.3I/23L/0/3.C/BQ/0/0/1/1LC/AI/B.6/1
+/32/1/3/0/2/4A/68/1G.BDL9/3.6/118/0/3.F/BI/0/0/1/164/9Q/A/1/40/0/4/0/2/4Q/41/1Q.
+98DO/3.9I/KD/0/.F/AI/0/0/0/1NO/99/A.6/1/2A/0/3/0/1/8K/1M/2A.R6P6/2.9R/KK/1/6.I/7
+C/1/1/1/5T/6F/C.3/1/3G/1/4/1/1/31/4I/1P.BPC9/2.MF/RO/1/6.C/BE/0/.F/1/19L/4T/B/1/
+2M/0/4/1/1/5T/G/1F.2FNC/3.F/1HI/0/3.I/CE/0/0/0/1FD/51/A.3/1/68/0/2/0/2/1E/4N/Q.8
+A38TTTTTT/3.M6/17I/0/1/ES/0/0/1/1M8/7I/A.6/1/2B/1/3/0/1/3R/3C/1K.E523/3.F/11P/0/
+1/AL/0/0/1/1M9/9J/9.L/1/3L/0/3/0/2/5R/34/18.BSGO/2.RR/ME/0/.F/7G/0/0/0/1KP/53/9.
+O/1/1S/0/1/0/1/2P/M/1H.CHJ6/3.DO/1PR/0/2.6/AS/0/0/0/1LS/6M/9.I/1/2R/1/3/0/2/3Q/2
+F/1H.TCLI/3.23/26F/0/1.I/-9/0/0/0/1I7/CC/9.I/1/48/0/4/0/1/-9/4G/18.9EHC/3.N3/2O0
+/0/2.6/J2/0/0/0/1ET/A9/9.F/1/32/0/4/0/1/3O/2H/1K.378L/3.PF/LA/0/1/79/0/0/0/1JB/3
+5/A.L/1/4P/0/2/0/1/3I/27/15.2JE3/3.GO/1OG/0/1/AH/0/.F/0/1HO/D4/9.O/1/2O/0/3/0/2/
+3L/1E/12.F3CI/3.L/2B9/0/5.I/B8/0/0/0/1HA/75/9.R/1/65/0/4/0/2/6D/4A/1Q.4HT3/3.N3/
+10B/0/.F/6I/0/0/0/1HN/9A/9.O/1/1R/0/2/0/2/1Q/18/1G.4J6R/3.KL/2Q3/0/1.I/AP/0/0/0/
+1H2/9E/9.I/1/4M/0/3/0/1/4K/29/25.QF76/2.3/NF/1/H.QTTTTTTTTT/5P/1/1/0/1B/22/C.R/1
+/B8/0/4/1/1/7J/7A/13.S9F9/3.FI/1O2/0/1.9/A4/0/0/1/1IF/8F/9.F/1/2B/0/4/0/2/5J/37/
+22.POTL/3.TL/1D3/0/1.3/DM/0/0/0/14A/E2/9.I/1/31/0/4/0/2/3N/3D/1I.GRI/3.D6/162/0/
+1.9/9L/0/0/0/1H8/8B/9.F/1/2P/0/3/0/2/6F/2F/1G.AE5L/3.EC/MS/0/.O/8D/0/0/0/1GL/8C/
+A/1/1R/0/1/0/1/2K/25/18.PHFI/3.AO/1BR/0/2/AA/0/0/1/1GS/4N/9.O/1/42/1/3/0/1/3S/2A
+/1S.JCMF/3.DO/1SS/0/6.C/CD/0/0/0/1B4/8I/A.3/1/40/1/4/0/1/51/55/1I.S2K3/3.QL/L7/0
+/8.L/AA/1/.F/1/15H/9S/9.I/1/3R/0/2/0/2/82/3H/27.H5I9/3.TL/120/0/4/DQ/0/.F/1/QJ/8
+T/9.O/0/2Q/0/2/1/1/82/5R/25.TGC9/3.H3/O2/0/1.C/9O/0/0/0/1FD/9D/9.O/1/33/0/3/0/1/
+29/13/1A.R0LI/3.5C/3L6/0/3.6/B9/0/0/0/101/A4/9.R/1/6P/0/4/0/1/2O/43/1K.7AF/3.LR/
+15K/0/8.I/I6/0/0/1/1E9/9L/B.6/0/47/0/3/0/2/53/2O/1R.5QMO/2.TC/R5/0/8.F/6E/1/1/1/
+1E0/42/C.9/1/5D/1/4/0/2/2I/6G/20.G2S6/3.23/3F0/0/6.I/13A/0/0/1/1DC/9T/A.R/0/6D/0
+/4/0/1/4D/2S/15.AFTL/3.OR/SF/0/2.C/LG/0/0/0/T7/A6/A.9/0/47/0/3/0/1/6E/3C/11.BD2C
+/3.99/16P/0/.O/AS/0/0/0/1E1/9N/A.R/1/4H/0/4/0/2/35/22/1P.THK3/3.CR/182/0/1.6/95/
+0/0/1/HN/77/B.9/0/2F/0/4/0/1/31/3A/1M.LMSF/3.B3/9J/0/1.3/BA/0/0/1/1DA/83/A.6/1/3
+7/0/3/0/2/33/2D/18.2MFR/3.MO/1P3/0/2.C/BC/0/0/0/1D3/73/A.O/1/50/0/3/0/1/47/30/1S
+.53TL/2.6R/K1/0/5.6/-9/0/0/1/6R/6Q/C.9/1/4F/0/4/1/2/-9/7O/1F.692L/3.H3/1DH/0/1/D
+3/0/0/0/1D5/9P/A.F/1/2E/0/4/0/2/3D/1K/17.NSRI/3.SF/LR/0/.L/B5/0/0/0/1CB/8S/A.I/1
+/1M/0/2/0/1/3E/1D/20.JNOI/3.7F/19K/0/1/CC/0/0/1/1BK/88/A.I/1/4K/1/4/0/2/1P/3I/15
+.G146/3.RR/M3/0/.F/79/0/0/0/1B0/86/A.O/1/1F/0/3/0/1/2F/M/1D.1TMO/3.I9/5MO/0/2.R/
+E6/0/0/1/1AG/95/A.I/1/9I/1/3/0/2/4O/2D/1Q.BMAF/3.DF/15M/0/.I/7T/0/0/1/1AG/7H/A.L
+/1/1P/0/2/0/2/24/11/10.H676/3.GO/1CM/0/.O/93/0/0/0/189/BE/A.F/1/4A/0/2/0/2/1T/1M
+/21.5EFI/3.HC/QH/0/.C/86/0/0/1/18D/9I/A.C/1/31/0/2/0/1/3N/O/1S.8TOI/2.MF/18Q/0/.
+C/8K/0/0/0/134/7L/A.O/1/2A/0/2/0/2/2M/1B/22.9TA6/3.AF/1R3/0/1.L/EE/0/0/0/119/7O/
+A.6/1/5L/0/2/0/1/3A/19/17.TSM6/3.4O/150/0/2/87/0/0/0/RT/B5/A.F/1/3R/0/2/0/1/2S/2
+9/13.4HA6/3.NL/2AF/0/6.C/J6/0/0/0/Q8/6K/A.O/1/4G/1/2/0/2/4T/66/20/3.JF/-9/-9/.L/
+-9/0/0/-9/4FC/CI/B/-9/-9/-9/-9/0/-9/-9/-9/25/3.16/-9/-9/1.C/-9/1/.F/-9/3SL/B1/C.
+3/-9/-9/-9/-9/1/-9/-9/-9/1O/4.0R/-9/-9/.L/-9/0/0/-9/34O/7G/9.O/-9/-9/-9/-9/0/-9/
+-9/-9/2F/3.SO/-9/-9/.L/-9/0/.F/-9/291/-9/B.9/-9/-9/-9/-9/1/-9/-9/-9/22/2.EC/-9/-
+9/.O/-9/0/0/-9/3B0/93/A/-9/-9/-9/-9/0/-9/-9/-9/1D/3.KC/-9/-9/.L/-9/0/0/-9/1Q0/A6
+/9.F/-9/-9/-9/-9/0/-9/-9/-9/1G/2.RR/-9/-9/5/-9/1/0/-9/1B/8K/A.C/-9/-9/-9/-9/1/-9
+/-9/-9/1E/3.O9/-9/-9/.C/-9/0/.F/-9/2K3/7G/A.F/-9/-9/-9/-9/0/-9/-9/-9/21/3.C9/-9/
+-9/1.9/-9/1/.F/-9/190/8J/A.R/-9/-9/-9/-9/0/-9/-9/-9/24/3.KL/-9/-9/1.3/-9/0/0/-9/
+271/4J/A.F/-9/-9/-9/-9/1/-9/-9/-9/1A/4.16/-9/-9/.I/-9/0/0/-9/3RD/4A/B.6/-9/-9/-9
+/-9/0/-9/-9/-9/23/3.S6/-9/-9/.I/-9/0/0/-9/3PI/7O/B.F/-9/-9/-9/-9/0/-9/-9/-9/14/3
+.76/-9/-9/1.O/-9/0/0/-9/59P/-9/I/-9/-9/-9/-9/0/-9/-9/-9/1M/3.CI/-9/-9/1.F/-9/0/0
+/-9/1B6/86/A.9/-9/-9/-9/-9/0/-9/-9/-9/1J/3.TL/-9/-9/1.6/-9/0/0/-9/4KE/-9/B.6/-9/
+-9/-9/-9/0/-9/-9/-9/1O/3.I/-9/-9/1/-9/0/0/-9/2AB/-9/C.3/-9/-9/-9/-9/1/-9/-9/-9/2
+3/3.C/-9/-9/.L/-9/0/0/-9/1IM/CB/A.3/-9/-9/-9/-9/1/-9/-9/-9/1O/3.IR/-9/-9/3.F/-9/
+0/0/-9/1S6/AP/A.9/-9/-9/-9/-9/1/-9/-9/-9/1G/3.GO/-9/-9/3.3/-9/0/.F/-9/34/4M/D.I/
+-9/-9/-9/-9/1/-9/-9/-9/1N/2.Q3/-9/-9/C.I/-9/1/0/-9/Q5/3O/B.O/-9/-9/-9/-9/1/-9/-9
+/-9/1Q/3.RI/-9/-9/2.O/-9/0/0/-9/1KI/-9/A.I/-9/-9/-9/-9/1/-9/-9/-9/1Q/3.F9/-9/-9/
+7.3/-9/0/0/-9/FG/O1/B.O/-9/-9/-9/-9/1/-9/-9/-9/1P/4.4F/-9/-9/.I/-9/0/0/-9/3RH/9A
+/A.3/-9/-9/-9/-9/0/-9/-9/-9/25/3.A6/-9/-9/2.3/-9/0/0/-9/2RP/55/A.3/-9/-9/-9/-9/0
+/-9/-9/-9/1Q/3.J6/-9/-9/1.O/-9/0/0/-9/2G6/4L/A/-9/-9/-9/-9/1/-9/-9/-9/1H/3.CI/-9
+/-9/G/-9/0/0/-9/QB/FP/D.O/-9/-9/-9/-9/1/-9/-9/-9/20/4.BC/-9/-9/.I/-9/0/0/-9/3QC/
+8T/A.I/-9/-9/-9/-9/0/-9/-9/-9/1N/4.5L/-9/-9/5.C/-9/0/0/-9/3QF/4L/B.6/-9/-9/-9/-9
+/0/-9/-9/-9/1O/3.8L/-9/-9/9/-9/1/0/-9/3L/9G/D.3/-9/-9/-9/-9/1/-9/-9/-9/1K/4.09/-
+9/-9/.R/-9/0/0/-9/3HL/84/A.F/-9/-9/-9/-9/0/-9/-9/-9/1I/2.P6/-9/-9/B.3/-9/0/0/-9/
+KP/-9/C.6/-9/-9/-9/-9/1/-9/-9/-9/16/3.MO/-9/-9/8.R/-9/0/0/-9/3F7/6T/A.I/-9/-9/-9
+/-9/0/-9/-9/-9/1I/3.MO/-9/-9/.F/-9/0/0/-9/3AL/CS/A.3/-9/-9/-9/-9/0/-9/-9/-9/2A/3
+.O9/-9/-9/.I/-9/1/.F/-9/IJ/5A/B/-9/-9/-9/-9/1/-9/-9/-9/1L/3.RI/-9/-9/3.C/-9/0/0/
+-9/33M/-9/9.9/-9/-9/-9/-9/1/-9/-9/-9/1M/3.46/-9/-9/.R/-9/0/0/-9/34E/6B/C.9/-9/-9
+/-9/-9/0/-9/-9/-9/1O/3.OI/-9/-9/1.C/-9/0/0/-9/355/89/A.9/-9/-9/-9/-9/0/-9/-9/-9/
+1I/4.3/-9/-9/2.3/-9/0/0/-9/M2/6K/9/-9/-9/-9/-9/1/-9/-9/-9/26/3.C/-9/-9/F/-9/0/0/
+-9/O7/50/B.3/-9/-9/-9/-9/1/-9/-9/-9/1N/4.5L/-9/-9/.I/-9/0/0/-9/30G/B0/9.R/-9/-9/
+-9/-9/0/-9/-9/-9/22/3.C/-9/-9/1.9/-9/0/0/-9/2TS/5H/A.I/-9/-9/-9/-9/0/-9/-9/-9/1T
+/3.3I/-9/-9/1.9/-9/0/0/-9/130/45/9.I/-9/-9/-9/-9/1/-9/-9/-9/19/3.MF/-9/-9/1.I/-9
+/0/0/-9/2HS/4P/A.C/-9/-9/-9/-9/0/-9/-9/-9/27/3.7O/-9/-9/2.6/-9/1/.F/-9/1NQ/5L/B.
+3/-9/-9/-9/-9/1/-9/-9/-9/1S/3.DO/-9/-9/3/-9/0/0/-9/2PD/3J/A.C/-9/-9/-9/-9/0/-9/-
+9/-9/24/3.EL/-9/-9/.O/-9/0/0/-9/2OH/AE/A.9/-9/-9/-9/-9/0/-9/-9/-9/1G/2.QL/-9/-9/
+.O/-9/0/0/-9/2OE/DT/A.GF/-9/-9/-9/-9/0/-9/-9/-9/24/3.4F/-9/-9/1.O/-9/0/0/-9/PS/6
+3/A.C/-9/-9/-9/-9/1/-9/-9/-9/1B/2.99/-9/-9/5.F/-9/0/0/-9/KH/H7/A.C/-9/-9/-9/-9/0
+/-9/-9/-9/1J/3.16/-9/-9/I/-9/0/0/-9/2FH/EC/9.L/-9/-9/-9/-9/0/-9/-9/-9/1E/3.F/-9/
+-9/.I/-9/0/0/-9/2ET/50/9.R/-9/-9/-9/-9/0/-9/-9/-9/1T/3.AF/-9/-9/2.L/-9/0/0/-9/BT
+/4M/B.F/-9/-9/-9/-9/1/-9/-9/-9/23/3.HC/-9/-9/.R/-9/0/0/-9/245/7E/A/-9/-9/-9/-9/0
+/-9/-9/-9/21/3.09/-9/-9/1.9/-9/0/0/-9/89/7D/A.L/-9/-9/-9/-9/1/-9/-9/-9/24/3.EL/-
+9/-9/1.3/-9/0/0/-9/2DC/5G/9.O/-9/-9/-9/-9/0/-9/-9/-9/1J/2.N3/-9/-9/D.O/-9/1/0/-9
+/1D/CS/B.3I/-9/-9/-9/-9/1/-9/-9/-9/1C/4.FI/-9/-9/4.C/-9/0/0/-9/19R/3C/A.O/-9/-9/
+-9/-9/1/-9/-9/-9/1K/3.AO/-9/-9/G/-9/0/0/-9/16F/CO/A/-9/-9/-9/-9/1/-9/-9/-9/1L/3.
+FI/-9/-9/7.9/-9/1/.F/-9/G9/8P/B.3/-9/-9/-9/-9/1/-9/-9/-9/17/3.GF/-9/-9/.I/-9/0/0
+/-9/2BJ/88/A.9/-9/-9/-9/-9/0/-9/-9/-9/22/3.8L/-9/-9/.L/-9/0/0/-9/2A3/6A/9.O/-9/-
+9/-9/-9/0/-9/-9/-9/1L/3.3/-9/-9/.L/-9/0/0/-9/260/94/A.I/-9/-9/-9/-9/0/-9/-9/-9/1
+M/3.76/-9/-9/1.L/-9/0/0/-9/1ER/7L/A.F/-9/-9/-9/-9/0/-9/-9/-9/1E/3.IR/-9/-9/9.F/-
+9/0/0/-9/1J8/9M/A.6/-9/-9/-9/-9/1/-9/-9/-9/13/3.MO/-9/-9/2.6/-9/0/0/-9/267/8D/9.
+R/-9/-9/-9/-9/0/-9/-9/-9/20/3.II/-9/-9/1.O/-9/0/.F/-9/18S/7F/9.R/-9/-9/-9/-9/1/-
+9/-9/-9/23/2.LR/-9/-9/3.9/-9/1/.F/-9/JR/7E/B.3/-9/-9/-9/-9/1/-9/-9/-9/13/4.2C/-9
+/-9/2.R/-9/0/0/-9/1RF/DS/A.F/-9/-9/-9/-9/0/-9/-9/-9/1B/3.JO/-9/-9/1.L/-9/0/0/-9/
+239/32/B/-9/-9/-9/-9/0/-9/-9/-9/1L/2.HC/-9/-9/E/-9/0/0/-9/7B/6A/B.I/-9/-9/-9/-9/
+1/-9/-9/-9/17/3/-9/-9/.O/-9/0/.F/-9/142/2G/A.O/-9/-9/-9/-9/0/-9/-9/-9/1T/3.C/-9/
+-9/1.9/-9/0/0/-9/1OJ/83/9.L/-9/-9/-9/-9/0/-9/-9/-9/1P/2.RR/-9/-9/.L/-9/0/0/-9/1O
+F/6T/A.I/-9/-9/-9/-9/0/-9/-9/-9/1O/2.BC/-9/-9/1.L/-9/0/0/-9/1P4/5G/9.O/-9/-9/-9/
+-9/0/-9/-9/-9/1J/3/-9/-9/D.I/-9/0/.F/-9/1P3/7N/9.R/-9/-9/-9/-9/0/-9/-9/-9/1A/3.F
+/-9/-9/.R/-9/0/0/-9/1M0/3R/A.R/-9/-9/-9/-9/0/-9/-9/-9/27/3.1O/-9/-9/.L/-9/1/0/-9
+/1ML/5F/A/-9/-9/-9/-9/0/-9/-9/-9/28/3.4F/-9/-9/3/-9/0/0/-9/1H9/4J/A/-9/-9/-9/-9/
+0/-9/-9/-9/1B/2.O/-9/-9/1.6/-9/0/0/-9/1I3/40/B/-9/-9/-9/-9/0/-9/-9/-9/29/3.0R/-9
+/-9/.C/-9/0/0/-9/1FI/5N/A.R/-9/-9/-9/-9/0/-9/-9/-9/1M/2.SO/-9/-9/.L/-9/1/.F/-9/6
+D/AJ/9.R/-9/-9/-9/-9/1/-9/-9/-9/1R/3.23/-9/-9/2/-9/1/.F/-9/1FH/2K/C.3/-9/-9/-9/-
+9/0/-9/-9/-9/16/3.TC/-9/-9/1.C/-9/0/0/-9/1E9/DC/B/-9/-9/-9/-9/0/-9/-9/-9/1K/3.EC
+/-9/-9/1.I/-9/0/0/-9/1EN/97/A.6/-9/-9/-9/-9/0/-9/-9/-9/24/3.JF/-9/-9/.F/-9/0/0/-
+9/1E8/E5/A.6/-9/-9/-9/-9/0/-9/-9/-9/22/3.EL/-9/-9/7.9/-9/0/0/-9/1FP/69/A.R/-9/-9
+/-9/-9/0/-9/-9/-9/1C/2.OI/-9/-9/8.3/-9/0/0/-9/1C0/6D/A.C/-9/-9/-9/-9/0/-9/-9/-9/
+1E/3.A6/-9/-9/.F/-9/0/0/-9/1AN/8I/A.I/-9/-9/-9/-9/0/-9/-9/-9/29/3.5L/-9/-9/4.6/-
+9/0/0/-9/115/40/B.3/-9/-9/-9/-9/1/-9/-9/-9/1M/3.09/-9/-9/.O/-9/0/0/-9/11D/8G/A.I
+/-9/-9/-9/-9/0/-9/-9/-9/26/3.9R/-9/-9/2.F/-9/0/0/-9/181/8G/A.O/-9/-9/-9/-9/0/-9/
+-9/-9/1A/3.I/-9/-9/4.I/-9/0/0/-9/16C/B7/A.C/-9/-9/-9/-9/0/-9/-9/-9/1M/3.J6/-9/-9
+/1/-9/0/0/-9/18A/BA/A.I/-9/-9/-9/-9/0/-9/-9/-9/1G/2.KC/-9/-9/4.F/-9/0/0/-9/ND/79
+/B.F/-9/-9/-9/-9/1/-9/-9/-9/1O/3.KL/-9/-9/1.3/-9/0/0/-9/17J/7A/A.O/-9/-9/-9/-9/0
+/-9/-9/-9/1L/3.53/-9/-9/1.R/-9/0/.F/-9/166/5C/A.L/-9/-9/-9/-9/0/-9/-9/-9/1D/3.LR
+/-9/-9/.L/-9/0/0/-9/15H/74/A.O/-9/-9/-9/-9/0/-9/-9/-9/19/3.O9/-9/-9/1.F/-9/0/0/-
+9/15M/8F/A.O/-9/-9/-9/-9/0/-9/-9/-9/1L/3.H3/-9/-9/.I/-9/0/0/-9/179/9G/A.I/-9/-9/
+-9/-9/0/-9/-9/-9/27/3.HC/-9/-9/1/-9/0/0/-9/16H/84/A.O/-9/-9/-9/-9/0/-9/-9/-9/15/
+3.6R/-9/-9/.L/-9/0/0/-9/12T/AC/A.O/-9/-9/-9/-9/0/-9/-9/-9/27/2.SO/-9/-9/1.6/-9/0
+/0/-9/ML/5O/A.R/-9/-9/-9/-9/1/-9/-9/-9/19/3.OR/-9/-9/.R/-9/0/0/-9/16N/60/B.6/-9/
+-9/-9/-9/0/-9/-9/-9/1R/3.CI/-9/-9/1.I/-9/0/0/-9/155/4N/9.R/-9/-9/-9/-9/0/-9/-9/-
+9/1S/3.MF/-9/-9/.O/-9/0/0/-9/N1/8T/A.C/-9/-9/-9/-9/0/-9/-9/-9/1N/3.8L/-9/-9/.L/-
+9/0/0/-9/12G/BK/A.I/-9/-9/-9/-9/0/-9/-9/-9/ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
diff --git a/win32/deps/library/foreign/tests/pbc.sav b/win32/deps/library/foreign/tests/pbc.sav
new file mode 100644
index 0000000..3eb0747
Binary files /dev/null and b/win32/deps/library/foreign/tests/pbc.sav differ
diff --git a/win32/deps/library/foreign/tests/pbc.sys b/win32/deps/library/foreign/tests/pbc.sys
new file mode 100644
index 0000000..8ee17e4
Binary files /dev/null and b/win32/deps/library/foreign/tests/pbc.sys differ
diff --git a/win32/deps/library/foreign/tests/pbcold.sav b/win32/deps/library/foreign/tests/pbcold.sav
new file mode 100644
index 0000000..6cdd469
Binary files /dev/null and b/win32/deps/library/foreign/tests/pbcold.sav differ
diff --git a/win32/deps/library/foreign/tests/pc5.dta b/win32/deps/library/foreign/tests/pc5.dta
new file mode 100644
index 0000000..dd9fe9c
Binary files /dev/null and b/win32/deps/library/foreign/tests/pc5.dta differ
diff --git a/win32/deps/library/foreign/tests/sample100.por b/win32/deps/library/foreign/tests/sample100.por
new file mode 100644
index 0000000..691463c
--- /dev/null
+++ b/win32/deps/library/foreign/tests/sample100.por
@@ -0,0 +1,106 @@
+ÁÃÉââÖãÉÅ@@@@@@@@@@@@@@@@@@@ASCII SPSS PORT FILE                    
+00000-0000-0000-0000--------------------!3#))0303300/240&),%00000000000000000000
+0200002'220'&)3000#0000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst
+uvwxyz .<(+0&[]!$*);^-/|,%_>?`:#@'="000000~000000000000000000000{}\0000000000000
+00000000000000000000000000000000000000000000000000000000SPSSPORTA8/200012126/151
+333112/SPSS for MS WINDOWS Release 10.04B/5B/70/4/YEAR5/4/0/5/4/0/CM/YEAR OF ADM
+INISTRATION70/8/DISTRICT5/6/0/5/6/0/CM/COUNTY DISTRICT NUMBER70/6/CAMPUS5/9/0/5/
+9/0/CT/COUNTY DISTRICT CAMPUS NUMBER7F/5/DNAME1/F/0/1/F/0/CD/DISTRICT NAME7F/5/C
+NAME1/F/0/1/F/0/CB/CAMPUS NAME71/3/SEX1/1/0/1/1/0/CE/SEX OF STUDENT73/7/DISADVG1
+/3/0/1/3/0/CQ/ECONOMICALLY DISADVANTAGED78/8/ETHNICTY1/8/0/1/8/0/C9/ETHNICITY79/
+5/STUID1/9/0/1/9/0/CK/SCRAMBLED STUDENT ID70/6/TLIMTH5/F/0/5/F/0/C10/TEXAS LEARN
+ING INDEX  - MATHEM70/5/GRADE5/1/0/5/1/0/CH/GRADE DESIGNATIONF39/24AE/2BESS5/C/M
+ESQUITE ISDE/A C NEW MIDDLE1/F2/NO5/WHITE9/00614371S30/8/34/24AE/2BET06/C/MESQUI
+TE ISDC/MCWHORTER EL1/F2/NO5/WHITE9/00614372S2Q/3/34/24AE/2BET0A/C/MESQUITE ISDD
+/RUTHERFORD EL1/ 1/ 1/ 9/00614373S27/3/35/24AE/2BET0N/C/MESQUITE ISDE/JOEY M PIR
+RUNG1/F2/NO8/HISPANIC9/00614373S2H/4/36/24AE/2BET0H/C/MESQUITE ISD9/PORTER EL1/ 
+1/ 1/ 9/00614373S2H/5/37/24AE/2BET0H/C/MESQUITE ISD9/PORTER EL1/ 1/ 1/ 9/0061437
+3S2J/6/38/24AE/2BESS6/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO8/HISPANIC9/00614373
+S2Q/7/39/24AE/2BESS6/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO8/HISPANIC9/00614373S
+2R/8/34/24AE/2BET04/C/MESQUITE ISDD/JOHN HANBY EL1/F2/NO5/WHITE9/00614375S2T/3/3
+5/24AE/2BET0B/C/MESQUITE ISD9/SHANDS EL1/F2/NO5/WHITE9/00614375S2P/4/34/24AE/2BE
+T0N/C/MESQUITE ISDE/JOEY M PIRRUNG1/M2/NO5/WHITE9/00614378S2Q/3/35/24AE/2BET0N/C
+/MESQUITE ISDE/JOEY M PIRRUNG1/M2/NO5/WHITE9/00614378S2N/4/36/24AE/2BET0R/C/MESQ
+UITE ISDB/THOMPSON EL1/M2/NO5/WHITE9/00614378S2R/5/37/24AE/2BET0R/C/MESQUITE ISD
+B/THOMPSON EL1/M2/NO5/WHITE9/00614378S2R/6/38/24AE/2BESS7/C/MESQUITE ISDC/BERRY 
+MIDDLE1/M2/NO5/WHITE9/00614378S2Q/7/39/24AE/2BESS7/C/MESQUITE ISDC/BERRY MIDDLE1
+/M2/NO5/WHITE9/00614378S2N/8/35/24AE/2BET0N/C/MESQUITE ISDE/JOEY M PIRRUNG1/M2/N
+O5/WHITE9/00614379S2A/3/36/24AE/2BET0R/C/MESQUITE ISDB/THOMPSON EL1/M2/NO5/WHITE
+9/00614379S2S/4/37/24AE/2BET0R/C/MESQUITE ISDB/THOMPSON EL1/M2/NO5/WHITE9/006143
+79S2Q/5/38/24AE/2BET0R/C/MESQUITE ISDB/THOMPSON EL1/M2/NO5/WHITE9/00614379S2P/6/
+39/24AE/2BESS7/C/MESQUITE ISDC/BERRY MIDDLE1/M2/NO5/WHITE9/00614379S2P/7/26K/24A
+E/2BESS7/C/MESQUITE ISDC/BERRY MIDDLE1/M2/NO5/WHITE9/00614379S32/8/34/24AE/2BET0
+5/C/MESQUITE ISD9/HODGES EL1/M2/NO5/WHITE9/00614382S28/4/35/24AE/2BET05/C/MESQUI
+TE ISD9/HODGES EL1/M2/NO5/WHITE9/00614382S1R/5/36/24AE/2BESS5/C/MESQUITE ISDE/A 
+C NEW MIDDLE1/M2/NO5/WHITE9/00614382S2A/6/34/24AE/2BET0K/C/MESQUITE ISDF/VERNON 
+PRICE EL1/F2/NO5/WHITE9/00614384S2O/4/35/24AE/2BET0K/C/MESQUITE ISDF/VERNON PRIC
+E EL1/F2/NO5/WHITE9/00614384S2G/5/36/24AE/2BET0K/C/MESQUITE ISDF/VERNON PRICE EL
+1/F2/NO5/WHITE9/00614384S2P/6/37/24AE/2BESS2/C/MESQUITE ISDE/VANSTON MIDDLE1/F2/
+NO5/WHITE9/00614384S2J/7/38/24AE/2BESS2/C/MESQUITE ISDE/VANSTON MIDDLE1/F2/NO5/W
+HITE9/00614384S2E/8/34/24AE/2BET04/C/MESQUITE ISDD/JOHN HANBY EL1/F3/YES5/WHITE9
+/00614389S2K/3/35/24AE/2BET04/C/MESQUITE ISDD/JOHN HANBY EL1/F3/YES5/WHITE9/0061
+4389S2N/4/36/24AE/2BET04/C/MESQUITE ISDD/JOHN HANBY EL1/F3/YES5/WHITE9/00614389S
+2B/5/37/24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/F3/YES5/WHITE9/00614389S2G/
+6/38/24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/F2/NO5/WHITE9/00614389S2J/7/39
+/24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/F2/NO5/WHITE9/00614389S2O/8/34/24A
+5/2BEJ0Q/A/DALLAS ISDA/CENTRAL EL1/F3/YES5/WHITE9/00614390S2T/4/34/24AE/2BET0B/C
+/MESQUITE ISD9/SHANDS EL1/F2/NO5/WHITE9/00614391S22/5/37/24AE/2BET0I/C/MESQUITE 
+ISDB/MCKENZIE EL1/ 1/ 1/ 9/00614392S2C/6/38/24AE/2BESS4/C/MESQUITE ISDF/MCDONALD
+ MIDDLE1/M2/NO5/OTHER9/00614392S2E/7/39/24AE/2BESS4/C/MESQUITE ISDF/MCDONALD MID
+DLE1/M2/NO5/OTHER9/00614392S2B/8/35/24AE/2BET0K/C/MESQUITE ISDF/VERNON PRICE EL1
+/F2/NO5/WHITE9/00614393S1R/3/36/24AE/2BET0K/C/MESQUITE ISDF/VERNON PRICE EL1/F2/
+NO5/WHITE9/00614393S2P/4/37/24AE/2BET0K/C/MESQUITE ISDF/VERNON PRICE EL1/F2/NO5/
+WHITE9/00614393S2B/5/38/24AE/2BET0K/C/MESQUITE ISDF/VERNON PRICE EL1/F2/NO5/WHIT
+E9/00614393S2L/6/39/24AE/2BESS2/C/MESQUITE ISDE/VANSTON MIDDLE1/F2/NO5/WHITE9/00
+614393S2K/7/34/24AE/2BET0B/C/MESQUITE ISD9/SHANDS EL1/F2/NO5/WHITE9/00614396S25/
+3/35/24AE/2BET0B/C/MESQUITE ISD9/SHANDS EL1/F2/NO5/WHITE9/00614396S24/4/34/24AE/
+2BET0M/C/MESQUITE ISDF/GEORGIA W KIMBA1/F2/NO5/WHITE9/00614397S2O/3/35/24AE/2BET
+0M/C/MESQUITE ISDF/GEORGIA W KIMBA1/F2/NO5/WHITE9/00614397S2T/4/36/24AE/2BET0M/C
+/MESQUITE ISDF/GEORGIA W KIMBA1/F2/NO5/WHITE9/00614397S2S/5/37/24AE/2BET0M/C/MES
+QUITE ISDF/GEORGIA W KIMBA1/F2/NO5/WHITE9/00614397S2S/6/38/24AE/2BESS6/C/MESQUIT
+E ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614397S2T/7/39/24AE/2BESS6/C/MESQUITE IS
+DF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614397S31/8/35/8GGP/9F216L/B/HARMONY ISDE/JA
+MES POOLE EL1/M2/NO5/WHITE9/00614402S2J/4/34/24AE/2BET0P/C/MESQUITE ISDD/J C AUS
+TIN EL1/F2/NO5/WHITE9/00614403S2M/3/35/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL
+1/F2/NO5/WHITE9/00614403S2P/4/36/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/N
+O5/WHITE9/00614403S2Q/5/37/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHI
+TE9/00614403S2Q/6/38/24AE/2BESS6/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/
+00614403S30/7/39/24AE/2BESS6/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/0061
+4403S2Q/8/34/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614406S1
+O/3/35/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614406S2F/4/36
+/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614406S27/5/37/24AE/
+2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614406S2C/6/38/24AE/2BESS6
+/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614406S2G/7/39/24AE/2BESS6/C/M
+ESQUITE ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614406S2P/8/34/24AE/2BET0C/C/MESQU
+ITE ISDB/TISINGER EL1/M2/NO5/WHITE9/00614414S2A/3/35/24AE/2BET0C/C/MESQUITE ISDB
+/TISINGER EL1/M2/NO5/WHITE9/00614414S23/4/36/24AE/2BET0C/C/MESQUITE ISDB/TISINGE
+R EL1/M2/NO5/WHITE9/00614414S27/5/37/24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL
+1/M2/NO5/WHITE9/00614414S24/6/38/24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/M2
+/NO5/WHITE9/00614414S2E/7/39/24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/M2/NO5
+/WHITE9/00614414S2H/8/34/24AE/2BET0C/C/MESQUITE ISDB/TISINGER EL1/F2/NO5/WHITE9/
+00614416S23/3/35/24AE/2BET0C/C/MESQUITE ISDB/TISINGER EL1/F2/NO5/WHITE9/00614416
+S26/4/36/24AE/2BET0C/C/MESQUITE ISDB/TISINGER EL1/F2/NO5/WHITE9/00614416S26/5/37
+/24AE/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/F2/NO5/WHITE9/00614416S29/6/38/24A
+E/2BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/F3/YES5/WHITE9/00614416S2N/7/39/24AE/2
+BESS3/C/MESQUITE ISDF/WILKINSON MIDDL1/F2/NO5/WHITE9/00614416S2M/8/34/24AE/2BET0
+P/C/MESQUITE ISDD/J C AUSTIN EL1/M2/NO5/WHITE9/00614417S2Q/3/35/24AE/2BET0P/C/ME
+SQUITE ISDD/J C AUSTIN EL1/M2/NO5/WHITE9/00614417S2T/4/36/24AE/2BET0P/C/MESQUITE
+ ISDD/J C AUSTIN EL1/M2/NO5/WHITE9/00614417S2R/5/37/24AE/2BET0P/C/MESQUITE ISDD/
+J C AUSTIN EL1/M2/NO5/WHITE9/00614417S2S/6/38/24AJ/2BF4GL/D/SUNNYVALE ISDC/SUNNY
+VALE EL1/M2/NO5/WHITE9/00614417S2R/7/39/24AJ/2BF4GL/D/SUNNYVALE ISDC/SUNNYVALE E
+L1/M2/NO5/WHITE9/00614417S2M/8/34/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/
+NO5/WHITE9/00614420S2T/3/35/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/M2/NO5/WH
+ITE9/00614420S2S/4/36/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/0
+0614420S2R/5/37/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/0061442
+0S32/6/38/24AE/2BESS6/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614420S33
+/7/39/24AE/2BESS6/C/MESQUITE ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614420S31/8/3
+4/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614421S2I/3/35/24AE
+/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614421S2T/4/36/24AE/2BET0
+P/C/MESQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614421S2Q/5/37/24AE/2BET0P/C/ME
+SQUITE ISDD/J C AUSTIN EL1/F2/NO5/WHITE9/00614421S2Q/6/38/24AE/2BESS6/C/MESQUITE
+ ISDF/R S KIMBROUGH M1/F2/NO5/WHITE9/00614421S31/7/39/24AE/2BESS6/C/MESQUITE ISD
+F/R S KIMBROUGH M1/F2/NO5/WHITE9/00614421S30/8/34/24AE/2BET0P/C/MESQUITE ISDD/J 
+C AUSTIN EL1/M2/NO5/WHITE9/00614423S2T/3/35/24AE/2BET0P/C/MESQUITE ISDD/J C AUST
+IN EL1/M2/NO5/WHITE9/00614423S2S/4/36/24AE/2BET0P/C/MESQUITE ISDD/J C AUSTIN EL1
+/M2/NO5/WHITE9/00614423S2Q/5/ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
diff --git a/win32/deps/library/foreign/tests/sample100.sav b/win32/deps/library/foreign/tests/sample100.sav
new file mode 100644
index 0000000..4821574
Binary files /dev/null and b/win32/deps/library/foreign/tests/sample100.sav differ
diff --git a/win32/deps/library/foreign/tests/sas.R b/win32/deps/library/foreign/tests/sas.R
new file mode 100644
index 0000000..2281737
--- /dev/null
+++ b/win32/deps/library/foreign/tests/sas.R
@@ -0,0 +1,11 @@
+if(!nzchar(Sys.getenv("R_FOREIGN_FULL_TEST"))) q("no")
+library("foreign")
+setwd(tempdir())
+tfile <- "int1982ag.zip"
+download.file("ftp://cusk.nmfs.noaa.gov/mrfss/intercept/ag/int1982ag.zip";,
+              tfile, quiet=TRUE, mode="wb")
+zip.file.extract("int1982ag.xpt", tfile)
+dfs <- read.xport("int1982ag.xpt")
+foo <- dfs$I3_19822
+nrow(foo)
+stopifnot(nrow(foo) == 3650)
diff --git a/win32/deps/library/foreign/tests/spss.R b/win32/deps/library/foreign/tests/spss.R
new file mode 100644
index 0000000..cdb5878
--- /dev/null
+++ b/win32/deps/library/foreign/tests/spss.R
@@ -0,0 +1,52 @@
+library(foreign)
+
+sample100 <- read.spss("sample100.sav",FALSE)
+summary(sample100)
+str(sample100)
+d.sample100 <- data.frame(sample100)
+summary(d.sample100)
+s100 <- sample100
+sample100 <- read.spss("sample100.por",FALSE)
+stopifnot(identical(s100, sample100)) # no need for further summary() etc
+
+pbc <- read.spss("pbc.sav",FALSE)
+summary(pbc)
+str(pbc)
+d.pbc <- data.frame(pbc)
+summary(d.pbc)
+pbco <- read.spss("pbcold.sav",FALSE)
+stopifnot(identical(pbc, pbco))
+## summary(pbco)
+## str(pbco)
+## d.pbco <- data.frame(pbco)
+## summary(d.pbco)
+pbc. <- read.spss("pbc.por",FALSE)
+summary(pbc.)
+str(pbc.) # has variable.labels
+stopifnot(all.equal(d.pbc, data.frame(pbc.), tol=1e-15))
+
+electric.s  <- read.spss("electric.sav",TRUE,TRUE)
+electric.p  <- read.spss("electric.por",TRUE,TRUE)
+electric.s4 <- read.spss("electric.sav",TRUE,TRUE,max.value.labels = 4)
+summary(electric.s)
+ii <- c(2,10)
+vl <- list(FIRSTCHD = c("OTHER   CHD"= 6, "FATAL   MI"= 5, "NONFATALMI"= 3,
+			"SUDDEN  DEATH" = 2, "NO CHD" = 1),
+	   DAYOFWK = c(SATURDAY=7, FRIDAY=6, THURSDAY=5,
+		       WEDNSDAY=4, TUESDAY=3, MONDAY=2, SUNDAY=1))
+stopifnot(identical(electric.s,	     electric.p),
+	  identical(electric.s[-ii], electric.s4[-ii]),
+	  identical(vl, lapply(electric.s4[ii], attr, "value.labels")),
+	  identical(lapply(vl, names),
+		    lapply(electric.s[ii], function(.) rev(levels(.)))))
+
+
+## after "long label patch":
+
+invisible(Sys.setlocale (locale="C")) ## to resolve locale problem
+ldat <- read.spss("spss_long.sav", to.data.frame=TRUE)
+ldat
+nnms <- nms <- names(ldat)
+names(nnms) <- nms
+stopifnot(identical(nms,  c("variable1", "variable2")),
+	  identical(nnms, attr(ldat, "variable.labels")))
diff --git a/win32/deps/library/foreign/tests/spss.Rout.save b/win32/deps/library/foreign/tests/spss.Rout.save
new file mode 100644
index 0000000..3f5065b
--- /dev/null
+++ b/win32/deps/library/foreign/tests/spss.Rout.save
@@ -0,0 +1,327 @@
+
+R Under development (unstable) (2012-02-09 r58309)
+Copyright (C) 2012 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+Platform: i386-apple-darwin9.8.0/i386 (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(foreign)
+> 
+> sample100 <- read.spss("sample100.sav",FALSE)
+> summary(sample100)
+         Length Class  Mode     
+YEAR     100    -none- numeric  
+DISTRICT 100    -none- numeric  
+CAMPUS   100    -none- numeric  
+DNAME    100    -none- character
+CNAME    100    -none- character
+SEX      100    -none- character
+DISADVG  100    -none- character
+ETHNICTY 100    -none- character
+STUID    100    -none- character
+TLIMTH   100    -none- numeric  
+GRADE    100    -none- numeric  
+> str(sample100)
+List of 11
+ $ YEAR    : num [1:100] 99 94 94 95 96 97 98 99 94 95 ...
+ $ DISTRICT: num [1:100] 57914 57914 57914 57914 57914 ...
+ $ CAMPUS  : num [1:100] 57914045 57914106 57914110 57914123 57914117 ...
+ $ DNAME   : chr [1:100] "MESQUITE ISD   " "MESQUITE ISD   " "MESQUITE ISD   " "MESQUITE ISD   " ...
+ $ CNAME   : chr [1:100] "A C NEW MIDDLE " "MCWHORTER EL   " "RUTHERFORD EL  " "JOEY M PIRRUNG " ...
+ $ SEX     : chr [1:100] "F" "F" " " "F" ...
+ $ DISADVG : chr [1:100] "NO " "NO " "   " "NO " ...
+ $ ETHNICTY: chr [1:100] "WHITE   " "WHITE   " "        " "HISPANIC" ...
+ $ STUID   : chr [1:100] "00614371S" "00614372S" "00614373S" "00614373S" ...
+ $ TLIMTH  : num [1:100] 90 86 67 77 77 79 86 87 89 85 ...
+ $ GRADE   : num [1:100] 8 3 3 4 5 6 7 8 3 4 ...
+ - attr(*, "label.table")=List of 11
+  ..$ YEAR    : NULL
+  ..$ DISTRICT: NULL
+  ..$ CAMPUS  : NULL
+  ..$ DNAME   : NULL
+  ..$ CNAME   : NULL
+  ..$ SEX     : NULL
+  ..$ DISADVG : NULL
+  ..$ ETHNICTY: NULL
+  ..$ STUID   : NULL
+  ..$ TLIMTH  : NULL
+  ..$ GRADE   : NULL
+ - attr(*, "variable.labels")= Named chr [1:11] "YEAR OF ADMINISTRATION" "COUNTY DISTRICT NUMBER" "COUNTY DISTRICT CAMPUS NUMBER" "DISTRICT NAME" ...
+  ..- attr(*, "names")= chr [1:11] "YEAR" "DISTRICT" "CAMPUS" "DNAME" ...
+> d.sample100 <- data.frame(sample100)
+> summary(d.sample100)
+      YEAR           DISTRICT          CAMPUS                      DNAME   
+ Min.   :  94.0   Min.   : 57905   Min.   : 57905126   DALLAS ISD     : 1  
+ 1st Qu.:  95.0   1st Qu.: 57914   1st Qu.: 57914046   HARMONY ISD    : 1  
+ Median :  96.0   Median : 57914   Median : 57914112   MESQUITE ISD   :96  
+ Mean   : 115.4   Mean   : 59644   Mean   : 59644015   SUNNYVALE ISD  : 2  
+ 3rd Qu.:  98.0   3rd Qu.: 57914   3rd Qu.: 57914125                       
+ Max.   :2000.0   Max.   :230905   Max.   :230905101                       
+                                                                           
+             CNAME    SEX    DISADVG      ETHNICTY        STUID   
+ J C AUSTIN EL  :23    : 4      : 4           : 4   00614373S: 6  
+ R S KIMBROUGH M:12   F:62   NO :90   HISPANIC: 3   00614378S: 6  
+ WILKINSON MIDDL: 9   M:34   YES: 6   OTHER   : 2   00614379S: 6  
+ VERNON PRICE EL: 7                   WHITE   :91   00614389S: 6  
+ TISINGER EL    : 6                                 00614397S: 6  
+ THOMPSON EL    : 5                                 00614403S: 6  
+ (Other)        :38                                 (Other)  :64  
+     TLIMTH          GRADE     
+ Min.   :54.00   Min.   :3.00  
+ 1st Qu.:74.00   1st Qu.:4.00  
+ Median :84.00   Median :5.00  
+ Mean   :80.16   Mean   :5.37  
+ 3rd Qu.:87.00   3rd Qu.:7.00  
+ Max.   :93.00   Max.   :8.00  
+                               
+> s100 <- sample100
+> sample100 <- read.spss("sample100.por",FALSE)
+> stopifnot(identical(s100, sample100)) # no need for further summary() etc
+> 
+> pbc <- read.spss("pbc.sav",FALSE)
+> summary(pbc)
+         Length Class  Mode   
+AGE      418    -none- numeric
+ALB      418    -none- numeric
+ALKPHOS  418    -none- numeric
+ASCITES  418    -none- numeric
+BILI     418    -none- numeric
+CHOL     418    -none- numeric
+EDEMA    418    -none- numeric
+EDTRT    418    -none- numeric
+HEPMEG   418    -none- numeric
+TIME     418    -none- numeric
+PLATELET 418    -none- numeric
+PROTIME  418    -none- numeric
+SEX      418    -none- numeric
+SGOT     418    -none- numeric
+SPIDERS  418    -none- numeric
+STAGE    418    -none- numeric
+STATUS   418    -none- numeric
+TRT      418    -none- numeric
+TRIG     418    -none- numeric
+COPPER   418    -none- numeric
+> str(pbc)
+List of 20
+ $ AGE     : num [1:418] 58.8 56.4 70.1 54.7 38.1 ...
+ $ ALB     : num [1:418] 2.6 4.14 3.48 2.54 3.53 3.98 4.09 4 3.08 2.74 ...
+ $ ALKPHOS : num [1:418] 1718 7395 516 6122 671 ...
+ $ ASCITES : num [1:418] 1 0 0 0 0 0 0 0 0 1 ...
+ $ BILI    : num [1:418] 14.5 1.1 1.4 1.8 3.4 0.8 1 0.3 3.2 12.6 ...
+ $ CHOL    : num [1:418] 261 302 176 244 279 248 322 280 562 200 ...
+ $ EDEMA   : num [1:418] 1 0 1 1 0 0 0 0 0 1 ...
+ $ EDTRT   : num [1:418] 1 0 0.5 0.5 0 0 0 0 0 1 ...
+ $ HEPMEG  : num [1:418] 1 1 0 1 1 1 1 0 0 0 ...
+ $ TIME    : num [1:418] 400 4500 1012 1925 1504 ...
+ $ PLATELET: num [1:418] 190 221 151 183 136 -9 204 373 251 302 ...
+ $ PROTIME : num [1:418] 12.2 10.6 12 10.3 10.9 11 9.7 11 11 11.5 ...
+ $ SEX     : num [1:418] 1 1 0 1 1 1 1 1 1 1 ...
+ $ SGOT    : num [1:418] 137.9 113.5 96.1 60.6 113.2 ...
+ $ SPIDERS : num [1:418] 1 1 0 1 1 0 0 0 1 1 ...
+ $ STAGE   : num [1:418] 4 3 4 4 3 3 3 3 2 4 ...
+ $ STATUS  : num [1:418] 1 0 1 1 0 1 0 1 1 1 ...
+ $ TRT     : num [1:418] 1 1 1 1 2 2 2 2 1 2 ...
+ $ TRIG    : num [1:418] 172 88 55 92 72 63 213 189 88 143 ...
+ $ COPPER  : num [1:418] 156 54 210 64 143 50 52 52 79 140 ...
+ - attr(*, "label.table")=List of 20
+  ..$ AGE     : NULL
+  ..$ ALB     : NULL
+  ..$ ALKPHOS : NULL
+  ..$ ASCITES : NULL
+  ..$ BILI    : NULL
+  ..$ CHOL    : NULL
+  ..$ EDEMA   : NULL
+  ..$ EDTRT   : NULL
+  ..$ HEPMEG  : NULL
+  ..$ TIME    : NULL
+  ..$ PLATELET: NULL
+  ..$ PROTIME : NULL
+  ..$ SEX     : NULL
+  ..$ SGOT    : NULL
+  ..$ SPIDERS : NULL
+  ..$ STAGE   : NULL
+  ..$ STATUS  : NULL
+  ..$ TRT     : NULL
+  ..$ TRIG    : NULL
+  ..$ COPPER  : NULL
+> d.pbc <- data.frame(pbc)
+> summary(d.pbc)
+      AGE             ALB           ALKPHOS         ASCITES      
+ Min.   :26.28   Min.   :1.960   Min.   :   -9   Min.   :-9.000  
+ 1st Qu.:42.83   1st Qu.:3.243   1st Qu.:   -9   1st Qu.:-9.000  
+ Median :51.00   Median :3.530   Median : 1009   Median : 0.000  
+ Mean   :50.74   Mean   :3.497   Mean   : 1478   Mean   :-2.225  
+ 3rd Qu.:58.24   3rd Qu.:3.770   3rd Qu.: 1708   3rd Qu.: 0.000  
+ Max.   :78.44   Max.   :4.640   Max.   :13862   Max.   : 1.000  
+      BILI             CHOL            EDEMA            EDTRT       
+ Min.   : 0.300   Min.   :  -9.0   Min.   :0.0000   Min.   :0.0000  
+ 1st Qu.: 0.800   1st Qu.:  -9.0   1st Qu.:0.0000   1st Qu.:0.0000  
+ Median : 1.400   Median : 252.5   Median :0.0000   Median :0.0000  
+ Mean   : 3.221   Mean   : 248.2   Mean   :0.1196   Mean   :0.1005  
+ 3rd Qu.: 3.400   3rd Qu.: 347.8   3rd Qu.:0.0000   3rd Qu.:0.0000  
+ Max.   :28.000   Max.   :1775.0   Max.   :1.0000   Max.   :1.0000  
+     HEPMEG          TIME         PLATELET        PROTIME           SEX        
+ Min.   :-9.0   Min.   :  41   Min.   : -9.0   Min.   : 9.00   Min.   :-9.000  
+ 1st Qu.:-9.0   1st Qu.:1093   1st Qu.:181.0   1st Qu.:10.00   1st Qu.:-9.000  
+ Median : 0.0   Median :1730   Median :248.0   Median :10.60   Median : 1.000  
+ Mean   :-1.9   Mean   :1918   Mean   :250.0   Mean   :10.73   Mean   :-1.622  
+ 3rd Qu.: 1.0   3rd Qu.:2614   3rd Qu.:315.5   3rd Qu.:11.10   3rd Qu.: 1.000  
+ Max.   : 1.0   Max.   :4795   Max.   :721.0   Max.   :18.00   Max.   : 1.000  
+      SGOT           SPIDERS           STAGE              STATUS      
+ Min.   : -9.00   Min.   :-9.000   Min.   :-9.00000   Min.   :0.0000  
+ 1st Qu.: -9.00   1st Qu.:-9.000   1st Qu.:-9.00000   1st Qu.:0.0000  
+ Median : 90.45   Median : 0.000   Median : 3.00000   Median :0.0000  
+ Mean   : 89.20   Mean   :-2.067   Mean   :-0.01914   Mean   :0.3852  
+ 3rd Qu.:135.75   3rd Qu.: 0.000   3rd Qu.: 4.00000   3rd Qu.:1.0000  
+ Max.   :457.25   Max.   : 1.000   Max.   : 4.00000   Max.   :1.0000  
+      TRT              TRIG           COPPER      
+ Min.   :-9.000   Min.   : -9.0   Min.   : -9.00  
+ 1st Qu.:-9.000   1st Qu.: -9.0   1st Qu.: -9.00  
+ Median : 1.000   Median : 85.0   Median : 50.50  
+ Mean   :-1.167   Mean   : 81.2   Mean   : 70.09  
+ 3rd Qu.: 2.000   3rd Qu.:127.8   3rd Qu.:100.75  
+ Max.   : 2.000   Max.   :598.0   Max.   :588.00  
+> pbco <- read.spss("pbcold.sav",FALSE)
+> stopifnot(identical(pbc, pbco))
+> ## summary(pbco)
+> ## str(pbco)
+> ## d.pbco <- data.frame(pbco)
+> ## summary(d.pbco)
+> pbc. <- read.spss("pbc.por",FALSE)
+> summary(pbc.)
+         Length Class  Mode   
+AGE      418    -none- numeric
+ALB      418    -none- numeric
+ALKPHOS  418    -none- numeric
+ASCITES  418    -none- numeric
+BILI     418    -none- numeric
+CHOL     418    -none- numeric
+EDEMA    418    -none- numeric
+EDTRT    418    -none- numeric
+HEPMEG   418    -none- numeric
+TIME     418    -none- numeric
+PLATELET 418    -none- numeric
+PROTIME  418    -none- numeric
+SEX      418    -none- numeric
+SGOT     418    -none- numeric
+SPIDERS  418    -none- numeric
+STAGE    418    -none- numeric
+STATUS   418    -none- numeric
+TRT      418    -none- numeric
+TRIG     418    -none- numeric
+COPPER   418    -none- numeric
+> str(pbc.) # has variable.labels
+List of 20
+ $ AGE     : num [1:418] 58.8 56.4 70.1 54.7 38.1 ...
+ $ ALB     : num [1:418] 2.6 4.14 3.48 2.54 3.53 3.98 4.09 4 3.08 2.74 ...
+ $ ALKPHOS : num [1:418] 1718 7395 516 6122 671 ...
+ $ ASCITES : num [1:418] 1 0 0 0 0 0 0 0 0 1 ...
+ $ BILI    : num [1:418] 14.5 1.1 1.4 1.8 3.4 0.8 1 0.3 3.2 12.6 ...
+ $ CHOL    : num [1:418] 261 302 176 244 279 248 322 280 562 200 ...
+ $ EDEMA   : num [1:418] 1 0 1 1 0 0 0 0 0 1 ...
+ $ EDTRT   : num [1:418] 1 0 0.5 0.5 0 0 0 0 0 1 ...
+ $ HEPMEG  : num [1:418] 1 1 0 1 1 1 1 0 0 0 ...
+ $ TIME    : num [1:418] 400 4500 1012 1925 1504 ...
+ $ PLATELET: num [1:418] 190 221 151 183 136 -9 204 373 251 302 ...
+ $ PROTIME : num [1:418] 12.2 10.6 12 10.3 10.9 11 9.7 11 11 11.5 ...
+ $ SEX     : num [1:418] 1 1 0 1 1 1 1 1 1 1 ...
+ $ SGOT    : num [1:418] 137.9 113.5 96.1 60.6 113.2 ...
+ $ SPIDERS : num [1:418] 1 1 0 1 1 0 0 0 1 1 ...
+ $ STAGE   : num [1:418] 4 3 4 4 3 3 3 3 2 4 ...
+ $ STATUS  : num [1:418] 1 0 1 1 0 1 0 1 1 1 ...
+ $ TRT     : num [1:418] 1 1 1 1 2 2 2 2 1 2 ...
+ $ TRIG    : num [1:418] 172 88 55 92 72 63 213 189 88 143 ...
+ $ COPPER  : num [1:418] 156 54 210 64 143 50 52 52 79 140 ...
+ - attr(*, "label.table")=List of 20
+  ..$ AGE     : NULL
+  ..$ ALB     : NULL
+  ..$ ALKPHOS : NULL
+  ..$ ASCITES : NULL
+  ..$ BILI    : NULL
+  ..$ CHOL    : NULL
+  ..$ EDEMA   : NULL
+  ..$ EDTRT   : NULL
+  ..$ HEPMEG  : NULL
+  ..$ TIME    : NULL
+  ..$ PLATELET: NULL
+  ..$ PROTIME : NULL
+  ..$ SEX     : NULL
+  ..$ SGOT    : NULL
+  ..$ SPIDERS : NULL
+  ..$ STAGE   : NULL
+  ..$ STATUS  : NULL
+  ..$ TRT     : NULL
+  ..$ TRIG    : NULL
+  ..$ COPPER  : NULL
+ - attr(*, "variable.labels")= Named chr [1:20] " " " " " " " " ...
+  ..- attr(*, "names")= chr [1:20] "AGE" "ALB" "ALKPHOS" "ASCITES" ...
+> stopifnot(all.equal(d.pbc, data.frame(pbc.), tol=1e-15))
+> 
+> electric.s  <- read.spss("electric.sav",TRUE,TRUE)
+> electric.p  <- read.spss("electric.por",TRUE,TRUE)
+> electric.s4 <- read.spss("electric.sav",TRUE,TRUE,max.value.labels = 4)
+> summary(electric.s)
+     CASEID                 FIRSTCHD        AGE           DBP58       
+ Min.   :   1.00   NO CHD       :120   Min.   :40.0   Min.   : 65.00  
+ 1st Qu.:  73.75   SUDDEN  DEATH: 36   1st Qu.:45.0   1st Qu.: 80.00  
+ Median : 144.50   NONFATALMI   : 72   Median :48.0   Median : 87.00  
+ Mean   : 572.94   FATAL   MI   :  9   Mean   :47.8   Mean   : 88.79  
+ 3rd Qu.:1042.25   OTHER   CHD  :  3   3rd Qu.:51.0   3rd Qu.: 96.50  
+ Max.   :2098.00                       Max.   :54.0   Max.   :160.00  
+                                                      NA's   :1       
+     EDUYR           CHOL58          CGT58            HT58      
+ Min.   : 6.00   Min.   :106.0   Min.   : 0.00   Min.   :60.90  
+ 1st Qu.: 9.75   1st Qu.:228.8   1st Qu.: 0.00   1st Qu.:66.50  
+ Median :12.00   Median :261.0   Median :10.00   Median :68.15  
+ Mean   :11.66   Mean   :264.1   Mean   :11.58   Mean   :68.51  
+ 3rd Qu.:14.00   3rd Qu.:293.2   3rd Qu.:20.00   3rd Qu.:70.20  
+ Max.   :18.00   Max.   :515.0   Max.   :60.00   Max.   :77.00  
+ NA's   :28                      NA's   :1                      
+      WT58           DAYOFWK     VITAL10    FAMHXCVR       CHD     
+ Min.   :123.0   SUNDAY  : 19   ALIVE:179   NO :178   Min.   :0.0  
+ 1st Qu.:156.0   TUESDAY : 19   DEAD : 61   YES: 62   1st Qu.:0.0  
+ Median :171.0   WEDNSDAY: 17                         Median :0.5  
+ Mean   :173.4   SATURDAY: 16                         Mean   :0.5  
+ 3rd Qu.:187.0   THURSDAY: 15                         3rd Qu.:1.0  
+ Max.   :278.0   (Other) : 24                         Max.   :1.0  
+                 NA's    :130                                      
+> ii <- c(2,10)
+> vl <- list(FIRSTCHD = c("OTHER   CHD"= 6, "FATAL   MI"= 5, "NONFATALMI"= 3,
++ 			"SUDDEN  DEATH" = 2, "NO CHD" = 1),
++ 	   DAYOFWK = c(SATURDAY=7, FRIDAY=6, THURSDAY=5,
++ 		       WEDNSDAY=4, TUESDAY=3, MONDAY=2, SUNDAY=1))
+> stopifnot(identical(electric.s,	     electric.p),
++ 	  identical(electric.s[-ii], electric.s4[-ii]),
++ 	  identical(vl, lapply(electric.s4[ii], attr, "value.labels")),
++ 	  identical(lapply(vl, names),
++ 		    lapply(electric.s[ii], function(.) rev(levels(.)))))
+> 
+> 
+> ## after "long label patch":
+> 
+> invisible(Sys.setlocale (locale="C")) ## to resolve locale problem
+> ldat <- read.spss("spss_long.sav", to.data.frame=TRUE)
+> ldat
+  variable1 variable2
+1         1         1
+2         2         1
+3         2         3
+> nnms <- nms <- names(ldat)
+> names(nnms) <- nms
+> stopifnot(identical(nms,  c("variable1", "variable2")),
++ 	  identical(nnms, attr(ldat, "variable.labels")))
+> 
+> proc.time()
+   user  system elapsed 
+  0.732   0.076   0.785 
diff --git a/win32/deps/library/foreign/tests/spss_long.sav b/win32/deps/library/foreign/tests/spss_long.sav
new file mode 100644
index 0000000..b87faaa
Binary files /dev/null and b/win32/deps/library/foreign/tests/spss_long.sav differ
diff --git a/win32/deps/library/foreign/tests/stata.R b/win32/deps/library/foreign/tests/stata.R
new file mode 100644
index 0000000..082f443
--- /dev/null
+++ b/win32/deps/library/foreign/tests/stata.R
@@ -0,0 +1,33 @@
+library(foreign)
+pc5 <- read.dta("pc5.dta")
+summary(pc5)
+str(pc5)
+compressed<-read.dta("compressed.dta")
+summary(compressed)
+all.equal(summary(pc5), summary(compressed))
+sun6 <- read.dta("sun6.dta")
+summary(sun6)
+str(sun6)
+all.equal(summary(sun6),summary(pc5))
+df<-read.dta("datefactor.dta")
+summary(df)
+data(esoph)
+write.dta(esoph,esophile<-tempfile())
+esoph2<-read.dta(esophile)
+all.equal(ordered(esoph2$alcgp),esoph$alcgp)
+write.dta(esoph,esophile,convert.factors="string")
+esoph2<-read.dta(esophile)
+all.equal(as.character(esoph$alcgp),esoph2$alcgp)
+write.dta(esoph,esophile,convert.factors="code")
+esoph2<-read.dta(esophile)
+all.equal(as.numeric(esoph$alcgp),as.numeric(esoph2$alcgp))
+
+se<-read.dta("stata7se.dta")
+print(se)
+v8<-read.dta("stata8mac.dta")
+print(v8)
+
+stata8<-read.dta("auto8.dta",missing.type=TRUE,convert.underscore=FALSE)
+str(stata8)
+
+q()
diff --git a/win32/deps/library/foreign/tests/stata.Rout.save b/win32/deps/library/foreign/tests/stata.Rout.save
new file mode 100644
index 0000000..d471fbe
--- /dev/null
+++ b/win32/deps/library/foreign/tests/stata.Rout.save
@@ -0,0 +1,308 @@
+
+R version 2.13.0 Under development (unstable) (2011-03-05 r54672)
+Copyright (C) 2011 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(foreign)
+> pc5 <- read.dta("pc5.dta")
+Warning message:
+In read.dta("pc5.dta") : cannot read factor labels from Stata 5 files
+> summary(pc5)
+      age             alb           alkphos         ascites      
+ Min.   :26.28   Min.   :1.960   Min.   :   -9   Min.   :-9.000  
+ 1st Qu.:42.71   1st Qu.:3.330   1st Qu.:  423   1st Qu.: 0.000  
+ Median :50.47   Median :3.570   Median : 1009   Median : 0.000  
+ Mean   :50.45   Mean   :3.543   Mean   : 1525   Mean   :-2.074  
+ 3rd Qu.:56.99   3rd Qu.:3.820   3rd Qu.: 1677   3rd Qu.: 0.000  
+ Max.   :78.44   Max.   :4.640   Max.   :13862   Max.   : 1.000  
+      bili             chol            edema            edemarx       
+ Min.   : 0.300   Min.   :  -9.0   Min.   :0.00000   Min.   :0.00000  
+ 1st Qu.: 0.700   1st Qu.:  -9.0   1st Qu.:0.00000   1st Qu.:0.00000  
+ Median : 1.200   Median : 256.0   Median :0.00000   Median :0.00000  
+ Mean   : 2.688   Mean   : 245.8   Mean   :0.09256   Mean   :0.07815  
+ 3rd Qu.: 3.000   3rd Qu.: 346.0   3rd Qu.:0.00000   3rd Qu.:0.00000  
+ Max.   :28.000   Max.   :1775.0   Max.   :1.00000   Max.   :1.00000  
+     hepmeg           time          plate        protime           sex        
+ Min.   :-9.00   Min.   :  41   Min.   : -9   Min.   : 9.00   Min.   :-9.000  
+ 1st Qu.: 0.00   1st Qu.:1434   1st Qu.:181   1st Qu.:10.00   1st Qu.: 0.000  
+ Median : 0.00   Median :1487   Median :249   Median :10.60   Median : 1.000  
+ Mean   :-1.75   Mean   :1760   Mean   :252   Mean   :10.67   Mean   :-1.434  
+ 3rd Qu.: 1.00   3rd Qu.:2153   3rd Qu.:321   3rd Qu.:11.00   3rd Qu.: 1.000  
+ Max.   : 1.00   Max.   :4795   Max.   :721   Max.   :18.00   Max.   : 1.000  
+      sgot           spiders           stage              cens       
+ Min.   : -9.00   Min.   :-9.000   Min.   :-9.0000   Min.   :0.0000  
+ 1st Qu.: 44.20   1st Qu.: 0.000   1st Qu.: 1.0000   1st Qu.:0.0000  
+ Median : 88.35   Median : 0.000   Median : 3.0000   Median :0.0000  
+ Mean   : 88.22   Mean   :-1.914   Mean   : 0.1351   Mean   :0.2443  
+ 3rd Qu.:130.20   3rd Qu.: 0.000   3rd Qu.: 3.0000   3rd Qu.:0.0000  
+ Max.   :457.25   Max.   : 1.000   Max.   : 4.0000   Max.   :1.0000  
+       rx               trig            copper             id       
+ Min.   :-9.0000   Min.   : -9.00   Min.   : -9.00   Min.   :  1.0  
+ 1st Qu.: 1.0000   1st Qu.: -9.00   1st Qu.: 10.00   1st Qu.: 99.5  
+ Median : 1.0000   Median : 85.00   Median : 48.00   Median :195.0  
+ Mean   :-0.9788   Mean   : 81.44   Mean   : 65.26   Mean   :199.6  
+ 3rd Qu.: 2.0000   3rd Qu.:126.00   3rd Qu.: 88.00   3rd Qu.:302.5  
+ Max.   : 2.0000   Max.   :598.00   Max.   :588.00   Max.   :418.0  
+     first             late              t0        
+ Min.   :0.0000   Min.   :0.0000   Min.   :   0.0  
+ 1st Qu.:0.0000   1st Qu.:0.0000   1st Qu.:   0.0  
+ Median :0.0000   Median :0.0000   Median :   0.0  
+ Mean   :0.3657   Mean   :0.3657   Mean   : 543.8  
+ 3rd Qu.:1.0000   3rd Qu.:1.0000   3rd Qu.:1487.0  
+ Max.   :1.0000   Max.   :1.0000   Max.   :1487.0  
+> str(pc5)
+'data.frame':	659 obs. of  24 variables:
+ $ age    : num  58.8 56.4 56.4 70.1 54.7 ...
+ $ alb    : num  2.6 4.14 4.14 3.48 2.54 ...
+ $ alkphos: num  1718 7395 7395 516 6122 ...
+ $ ascites: num  1 0 0 0 0 0 0 0 0 0 ...
+ $ bili   : num  14.5 1.1 1.1 1.4 1.8 ...
+ $ chol   : num  261 302 302 176 244 244 279 279 248 248 ...
+ $ edema  : num  1 0 0 1 1 1 0 0 0 0 ...
+ $ edemarx: num  1 0 0 0.5 0.5 0.5 0 0 0 0 ...
+ $ hepmeg : num  1 1 1 0 1 1 1 1 1 1 ...
+ $ time   : num  400 1487 4500 1012 1487 ...
+ $ plate  : num  190 221 221 151 183 183 136 136 -9 -9 ...
+ $ protime: num  12.2 10.6 10.6 12 10.3 ...
+ $ sex    : num  1 1 1 0 1 1 1 1 1 1 ...
+ $ sgot   : num  137.9 113.5 113.5 96.1 60.6 ...
+ $ spiders: num  1 1 1 0 1 1 1 1 0 0 ...
+ $ stage  : num  4 3 3 4 4 4 3 3 3 3 ...
+ $ cens   : num  1 0 0 1 0 1 0 0 0 1 ...
+ $ rx     : num  1 1 1 1 1 1 2 2 2 2 ...
+ $ trig   : num  172 88 88 55 92 92 72 72 63 63 ...
+ $ copper : num  156 54 54 210 64 64 143 143 50 50 ...
+ $ id     : num  1 2 2 3 4 4 5 5 6 6 ...
+ $ first  : num  0 1 0 0 1 0 1 0 1 0 ...
+ $ late   : num  0 0 1 0 0 1 0 1 0 1 ...
+ $ t0     : num  0 0 1487 0 0 ...
+ - attr(*, "datalabel")= chr ""
+ - attr(*, "time.stamp")= chr "14 Feb 1997 14:22"
+ - attr(*, "formats")= chr  "%9.0g" "%9.0g" "%9.0g" "%9.0g" ...
+ - attr(*, "types")= int  102 102 102 102 102 102 102 102 102 102 ...
+ - attr(*, "val.labels")= chr  "" "" "" "" ...
+ - attr(*, "var.labels")= chr  "" "" "" "" ...
+ - attr(*, "version")= int 5
+> compressed<-read.dta("compressed.dta")
+> summary(compressed)
+      age             alb           alkphos         ascites      
+ Min.   :26.28   Min.   :1.960   Min.   :   -9   Min.   :-9.000  
+ 1st Qu.:42.71   1st Qu.:3.330   1st Qu.:  423   1st Qu.: 0.000  
+ Median :50.47   Median :3.570   Median : 1009   Median : 0.000  
+ Mean   :50.45   Mean   :3.543   Mean   : 1525   Mean   :-2.074  
+ 3rd Qu.:56.99   3rd Qu.:3.820   3rd Qu.: 1677   3rd Qu.: 0.000  
+ Max.   :78.44   Max.   :4.640   Max.   :13862   Max.   : 1.000  
+      bili             chol            edema            edemarx       
+ Min.   : 0.300   Min.   :  -9.0   Min.   :0.00000   Min.   :0.00000  
+ 1st Qu.: 0.700   1st Qu.:  -9.0   1st Qu.:0.00000   1st Qu.:0.00000  
+ Median : 1.200   Median : 256.0   Median :0.00000   Median :0.00000  
+ Mean   : 2.688   Mean   : 245.8   Mean   :0.09256   Mean   :0.07815  
+ 3rd Qu.: 3.000   3rd Qu.: 346.0   3rd Qu.:0.00000   3rd Qu.:0.00000  
+ Max.   :28.000   Max.   :1775.0   Max.   :1.00000   Max.   :1.00000  
+     hepmeg           time          plate        protime           sex        
+ Min.   :-9.00   Min.   :  41   Min.   : -9   Min.   : 9.00   Min.   :-9.000  
+ 1st Qu.: 0.00   1st Qu.:1434   1st Qu.:181   1st Qu.:10.00   1st Qu.: 0.000  
+ Median : 0.00   Median :1487   Median :249   Median :10.60   Median : 1.000  
+ Mean   :-1.75   Mean   :1760   Mean   :252   Mean   :10.67   Mean   :-1.434  
+ 3rd Qu.: 1.00   3rd Qu.:2153   3rd Qu.:321   3rd Qu.:11.00   3rd Qu.: 1.000  
+ Max.   : 1.00   Max.   :4795   Max.   :721   Max.   :18.00   Max.   : 1.000  
+      sgot           spiders           stage              cens       
+ Min.   : -9.00   Min.   :-9.000   Min.   :-9.0000   Min.   :0.0000  
+ 1st Qu.: 44.20   1st Qu.: 0.000   1st Qu.: 1.0000   1st Qu.:0.0000  
+ Median : 88.35   Median : 0.000   Median : 3.0000   Median :0.0000  
+ Mean   : 88.22   Mean   :-1.914   Mean   : 0.1351   Mean   :0.2443  
+ 3rd Qu.:130.20   3rd Qu.: 0.000   3rd Qu.: 3.0000   3rd Qu.:0.0000  
+ Max.   :457.25   Max.   : 1.000   Max.   : 4.0000   Max.   :1.0000  
+       rx               trig            copper             id       
+ Min.   :-9.0000   Min.   : -9.00   Min.   : -9.00   Min.   :  1.0  
+ 1st Qu.: 1.0000   1st Qu.: -9.00   1st Qu.: 10.00   1st Qu.: 99.5  
+ Median : 1.0000   Median : 85.00   Median : 48.00   Median :195.0  
+ Mean   :-0.9788   Mean   : 81.44   Mean   : 65.26   Mean   :199.6  
+ 3rd Qu.: 2.0000   3rd Qu.:126.00   3rd Qu.: 88.00   3rd Qu.:302.5  
+ Max.   : 2.0000   Max.   :598.00   Max.   :588.00   Max.   :418.0  
+     first             late              t0        
+ Min.   :0.0000   Min.   :0.0000   Min.   :   0.0  
+ 1st Qu.:0.0000   1st Qu.:0.0000   1st Qu.:   0.0  
+ Median :0.0000   Median :0.0000   Median :   0.0  
+ Mean   :0.3657   Mean   :0.3657   Mean   : 543.8  
+ 3rd Qu.:1.0000   3rd Qu.:1.0000   3rd Qu.:1487.0  
+ Max.   :1.0000   Max.   :1.0000   Max.   :1487.0  
+> all.equal(summary(pc5), summary(compressed))
+[1] TRUE
+> sun6 <- read.dta("sun6.dta")
+> summary(sun6)
+      age             alb           alkphos         ascites      
+ Min.   :26.28   Min.   :1.960   Min.   :   -9   Min.   :-9.000  
+ 1st Qu.:42.71   1st Qu.:3.330   1st Qu.:  423   1st Qu.: 0.000  
+ Median :50.47   Median :3.570   Median : 1009   Median : 0.000  
+ Mean   :50.45   Mean   :3.543   Mean   : 1525   Mean   :-2.074  
+ 3rd Qu.:56.99   3rd Qu.:3.820   3rd Qu.: 1677   3rd Qu.: 0.000  
+ Max.   :78.44   Max.   :4.640   Max.   :13862   Max.   : 1.000  
+      bili             chol            edema            edemarx       
+ Min.   : 0.300   Min.   :  -9.0   Min.   :0.00000   Min.   :0.00000  
+ 1st Qu.: 0.700   1st Qu.:  -9.0   1st Qu.:0.00000   1st Qu.:0.00000  
+ Median : 1.200   Median : 256.0   Median :0.00000   Median :0.00000  
+ Mean   : 2.688   Mean   : 245.8   Mean   :0.09256   Mean   :0.07815  
+ 3rd Qu.: 3.000   3rd Qu.: 346.0   3rd Qu.:0.00000   3rd Qu.:0.00000  
+ Max.   :28.000   Max.   :1775.0   Max.   :1.00000   Max.   :1.00000  
+     hepmeg           time          plate        protime           sex        
+ Min.   :-9.00   Min.   :  41   Min.   : -9   Min.   : 9.00   Min.   :-9.000  
+ 1st Qu.: 0.00   1st Qu.:1434   1st Qu.:181   1st Qu.:10.00   1st Qu.: 0.000  
+ Median : 0.00   Median :1487   Median :249   Median :10.60   Median : 1.000  
+ Mean   :-1.75   Mean   :1760   Mean   :252   Mean   :10.67   Mean   :-1.434  
+ 3rd Qu.: 1.00   3rd Qu.:2153   3rd Qu.:321   3rd Qu.:11.00   3rd Qu.: 1.000  
+ Max.   : 1.00   Max.   :4795   Max.   :721   Max.   :18.00   Max.   : 1.000  
+      sgot           spiders           stage              cens       
+ Min.   : -9.00   Min.   :-9.000   Min.   :-9.0000   Min.   :0.0000  
+ 1st Qu.: 44.20   1st Qu.: 0.000   1st Qu.: 1.0000   1st Qu.:0.0000  
+ Median : 88.35   Median : 0.000   Median : 3.0000   Median :0.0000  
+ Mean   : 88.22   Mean   :-1.914   Mean   : 0.1351   Mean   :0.2443  
+ 3rd Qu.:130.20   3rd Qu.: 0.000   3rd Qu.: 3.0000   3rd Qu.:0.0000  
+ Max.   :457.25   Max.   : 1.000   Max.   : 4.0000   Max.   :1.0000  
+       rx               trig            copper             id       
+ Min.   :-9.0000   Min.   : -9.00   Min.   : -9.00   Min.   :  1.0  
+ 1st Qu.: 1.0000   1st Qu.: -9.00   1st Qu.: 10.00   1st Qu.: 99.5  
+ Median : 1.0000   Median : 85.00   Median : 48.00   Median :195.0  
+ Mean   :-0.9788   Mean   : 81.44   Mean   : 65.26   Mean   :199.6  
+ 3rd Qu.: 2.0000   3rd Qu.:126.00   3rd Qu.: 88.00   3rd Qu.:302.5  
+ Max.   : 2.0000   Max.   :598.00   Max.   :588.00   Max.   :418.0  
+     first             late              t0        
+ Min.   :0.0000   Min.   :0.0000   Min.   :   0.0  
+ 1st Qu.:0.0000   1st Qu.:0.0000   1st Qu.:   0.0  
+ Median :0.0000   Median :0.0000   Median :   0.0  
+ Mean   :0.3657   Mean   :0.3657   Mean   : 543.8  
+ 3rd Qu.:1.0000   3rd Qu.:1.0000   3rd Qu.:1487.0  
+ Max.   :1.0000   Max.   :1.0000   Max.   :1487.0  
+> str(sun6)
+'data.frame':	659 obs. of  24 variables:
+ $ age    : num  58.8 56.4 56.4 70.1 54.7 ...
+ $ alb    : num  2.6 4.14 4.14 3.48 2.54 ...
+ $ alkphos: num  1718 7395 7395 516 6122 ...
+ $ ascites: int  1 0 0 0 0 0 0 0 0 0 ...
+ $ bili   : num  14.5 1.1 1.1 1.4 1.8 ...
+ $ chol   : int  261 302 302 176 244 244 279 279 248 248 ...
+ $ edema  : int  1 0 0 1 1 1 0 0 0 0 ...
+ $ edemarx: num  1 0 0 0.5 0.5 0.5 0 0 0 0 ...
+ $ hepmeg : int  1 1 1 0 1 1 1 1 1 1 ...
+ $ time   : int  400 1487 4500 1012 1487 1925 1487 1504 1487 2503 ...
+ $ plate  : int  190 221 221 151 183 183 136 136 -9 -9 ...
+ $ protime: num  12.2 10.6 10.6 12 10.3 ...
+ $ sex    : int  1 1 1 0 1 1 1 1 1 1 ...
+ $ sgot   : num  137.9 113.5 113.5 96.1 60.6 ...
+ $ spiders: int  1 1 1 0 1 1 1 1 0 0 ...
+ $ stage  : int  4 3 3 4 4 4 3 3 3 3 ...
+ $ cens   : int  1 0 0 1 0 1 0 0 0 1 ...
+ $ rx     : int  1 1 1 1 1 1 2 2 2 2 ...
+ $ trig   : int  172 88 88 55 92 92 72 72 63 63 ...
+ $ copper : int  156 54 54 210 64 64 143 143 50 50 ...
+ $ id     : int  1 2 2 3 4 4 5 5 6 6 ...
+ $ first  : int  0 1 0 0 1 0 1 0 1 0 ...
+ $ late   : int  0 0 1 0 0 1 0 1 0 1 ...
+ $ t0     : int  0 0 1487 0 0 1487 0 1487 0 1487 ...
+ - attr(*, "datalabel")= chr ""
+ - attr(*, "time.stamp")= chr "14 Sep 2000 10:40"
+ - attr(*, "formats")= chr  "%9.0g" "%9.0g" "%9.0g" "%9.0g" ...
+ - attr(*, "types")= int  102 102 102 98 102 105 98 102 98 105 ...
+ - attr(*, "val.labels")= chr  "" "" "" "" ...
+ - attr(*, "var.labels")= chr  "" "" "" "" ...
+ - attr(*, "version")= int 6
+> all.equal(summary(sun6),summary(pc5))
+[1] TRUE
+> df<-read.dta("datefactor.dta")
+> summary(df)
+      hlth159         id            adate           
+ EXCELLENT: 0   Min.   : 1.00   Min.   :1960-01-02  
+ VERY GOOD: 6   1st Qu.: 8.25   1st Qu.:1960-01-09  
+ GOOD     : 8   Median :15.50   Median :1960-01-16  
+ FAIR     : 4   Mean   :15.50   Mean   :1960-01-16  
+ POOR     : 1   3rd Qu.:22.75   3rd Qu.:1960-01-23  
+ NA's     :11   Max.   :30.00   Max.   :1960-01-31  
+> data(esoph)
+> write.dta(esoph,esophile<-tempfile())
+> esoph2<-read.dta(esophile)
+> all.equal(ordered(esoph2$alcgp),esoph$alcgp)
+[1] TRUE
+> write.dta(esoph,esophile,convert.factors="string")
+> esoph2<-read.dta(esophile)
+> all.equal(as.character(esoph$alcgp),esoph2$alcgp)
+[1] TRUE
+> write.dta(esoph,esophile,convert.factors="code")
+> esoph2<-read.dta(esophile)
+> all.equal(as.numeric(esoph$alcgp),as.numeric(esoph2$alcgp))
+[1] TRUE
+> 
+> se<-read.dta("stata7se.dta")
+> print(se)
+      race number
+1    white      2
+2    asian      5
+3 hispanic      5
+4    white      4
+5    black      5
+6    white      6
+7    black      7
+> v8<-read.dta("stata8mac.dta")
+> print(v8)
+      race number
+1    white      2
+2    asian      5
+3 hispanic      5
+4    white      4
+5    black      5
+6    white      6
+7    black      7
+> 
+> stata8<-read.dta("auto8.dta",missing.type=TRUE,convert.underscore=FALSE)
+> str(stata8)
+'data.frame':	74 obs. of  13 variables:
+ $ make        : chr  "AMC Concord" "AMC Pacer" "AMC Spirit" "Buick Century" ...
+ $ price       : int  4099 4749 3799 4816 7827 5788 4453 5189 10372 4082 ...
+ $ mpg         : int  22 17 22 20 15 18 26 20 16 19 ...
+ $ rep78       : int  3 3 NA 3 4 3 NA 3 3 3 ...
+ $ headroom    : num  2.5 3 3 4.5 4 4 3 2 3.5 3.5 ...
+ $ trunk       : int  11 11 12 16 20 21 10 16 17 13 ...
+ $ weight      : int  2930 3350 2640 3250 4080 3670 2230 3280 3880 3400 ...
+ $ length      : int  186 173 168 196 222 218 170 200 207 200 ...
+ $ turn        : int  40 40 35 40 43 43 34 42 43 42 ...
+ $ displacement: int  121 258 121 196 350 231 304 196 231 231 ...
+ $ gear_ratio  : num  3.58 2.53 3.08 2.93 2.41 ...
+ $ foreign     : Factor w/ 2 levels "Domestic","Foreign": 1 1 1 1 1 1 1 1 1 1 ...
+ $ testmiss    : num  NA NA NA NA NA NA NA NA NA NA ...
+ - attr(*, "datalabel")= chr "1978 Automobile Data"
+ - attr(*, "time.stamp")= chr "20 May 2003 14:39"
+ - attr(*, "formats")= chr  "%-18s" "%8.0gc" "%8.0g" "%8.0g" ...
+ - attr(*, "types")= int  18 252 252 252 254 252 252 252 252 252 ...
+ - attr(*, "val.labels")= chr  "" "" "" "" ...
+ - attr(*, "var.labels")= chr  "Make and Model" "Price" "Mileage (mpg)" "Repair Record 1978" ...
+ - attr(*, "version")= int 8
+ - attr(*, "label.table")=List of 1
+  ..$ origin: Named num  0 1
+  .. ..- attr(*, "names")= chr  "Domestic" "Foreign"
+ - attr(*, "missing")=List of 13
+  ..$ make        : NULL
+  ..$ price       : num  NA NA NA NA NA NA NA NA NA NA ...
+  ..$ mpg         : num  NA NA NA NA NA NA NA NA NA NA ...
+  ..$ rep78       : num  NA NA 0 NA NA NA 0 NA NA NA ...
+  ..$ headroom    : num  NA NA NA NA NA NA NA NA NA NA ...
+  ..$ trunk       : num  NA NA NA NA NA NA NA NA NA NA ...
+  ..$ weight      : num  NA NA NA NA NA NA NA NA NA NA ...
+  ..$ length      : num  NA NA NA NA NA NA NA NA NA NA ...
+  ..$ turn        : num  NA NA NA NA NA NA NA NA NA NA ...
+  ..$ displacement: num  NA NA NA NA NA NA NA NA NA NA ...
+  ..$ gear_ratio  : num  NA NA NA NA NA NA NA NA NA NA ...
+  ..$ foreign     : num  NA NA NA NA NA NA NA NA NA NA ...
+  ..$ testmiss    : num  18 18 18 18 18 18 18 18 18 18 ...
+> 
+> q()
diff --git a/win32/deps/library/foreign/tests/stata7se.dta b/win32/deps/library/foreign/tests/stata7se.dta
new file mode 100644
index 0000000..239addf
Binary files /dev/null and b/win32/deps/library/foreign/tests/stata7se.dta differ
diff --git a/win32/deps/library/foreign/tests/stata8mac.dta b/win32/deps/library/foreign/tests/stata8mac.dta
new file mode 100644
index 0000000..0203e72
Binary files /dev/null and b/win32/deps/library/foreign/tests/stata8mac.dta differ
diff --git a/win32/deps/library/foreign/tests/sun6.dta b/win32/deps/library/foreign/tests/sun6.dta
new file mode 100644
index 0000000..2745888
Binary files /dev/null and b/win32/deps/library/foreign/tests/sun6.dta differ
diff --git a/win32/deps/library/foreign/tests/test.xpt b/win32/deps/library/foreign/tests/test.xpt
new file mode 100644
index 0000000..2eb345a
Binary files /dev/null and b/win32/deps/library/foreign/tests/test.xpt differ
diff --git a/win32/deps/library/foreign/tests/tsdumpdata b/win32/deps/library/foreign/tests/tsdumpdata
new file mode 100644
index 0000000..2bd65dc
--- /dev/null
+++ b/win32/deps/library/foreign/tests/tsdumpdata
@@ -0,0 +1,455 @@
+sunspot
+structure
+3
+.Data
+numeric
+37
+40
+115
+100
+80
+60
+40
+23
+10
+10
+25
+75
+145
+130
+130
+80
+65
+20
+10
+5
+10
+60
+190
+180
+175
+120
+50
+35
+20
+10
+15
+30
+60
+105
+105
+105
+80
+65
+.Tsp
+numeric
+3
+1936
+1972
+1
+class
+character
+2
+ts
+numeric
+carbon.dioxide
+structure
+3
+.Data
+numeric
+384
+315.42
+316.32
+316.49
+317.56
+318.13
+318
+316.39
+314.66
+313.68
+313.18
+314.66
+315.43
+316.27
+316.81
+317.42
+318.87
+319.87
+319.43
+318.01
+315.75
+314
+313.68
+314.84
+316.03
+316.73
+317.54
+318.38
+319.31
+320.42
+319.61
+318.42
+316.64
+314.83
+315.15
+315.95
+316.85
+317.78
+318.4
+319.53
+320.41
+320.85
+320.45
+319.44
+317.25
+316.12
+315.27
+316.53
+317.53
+318.58
+318.92
+319.7
+321.22
+322.08
+321.31
+319.58
+317.61
+316.05
+315.83
+316.91
+318.2
+319.41
+320.07
+320.74
+321.4
+322.06
+321.73
+320.27
+318.54
+316.54
+316.71
+317.53
+318.55
+319.27
+320.28
+320.73
+321.97
+322
+321.71
+321.05
+318.71
+317.65
+317.14
+318.71
+319.25
+320.46
+321.43
+322.22
+323.54
+323.91
+323.59
+322.26
+320.21
+318.48
+317.94
+319.63
+320.87
+322.17
+322.34
+322.88
+324.25
+324.83
+323.93
+322.39
+320.76
+319.1
+319.23
+320.56
+321.8
+322.4
+322.99
+323.73
+324.86
+325.41
+325.19
+323.97
+321.92
+320.1
+319.96
+320.97
+322.48
+323.52
+323.89
+325.04
+326.01
+326.67
+325.96
+325.13
+322.9
+321.61
+321.01
+322.08
+323.37
+324.34
+325.3
+326.29
+327.54
+327.54
+327.21
+325.98
+324.42
+322.91
+322.9
+323.85
+324.96
+326.01
+326.51
+327.01
+327.62
+328.76
+328.4
+327.2
+325.28
+323.2
+323.4
+324.64
+325.85
+326.6
+327.47
+327.58
+329.56
+329.9
+328.92
+327.89
+326.17
+324.68
+325.04
+326.34
+327.39
+328.37
+329.4
+330.14
+331.33
+332.31
+331.9
+330.7
+329.15
+327.34
+327.02
+327.99
+328.48
+329.18
+330.55
+331.32
+332.48
+332.92
+332.08
+331.02
+329.24
+327.28
+327.21
+328.29
+329.41
+330.23
+331.24
+331.87
+333.14
+333.8
+333.42
+331.73
+329.9
+328.4
+328.17
+329.32
+330.59
+331.58
+332.39
+333.33
+334.41
+334.71
+334.17
+332.88
+330.77
+329.14
+328.77
+330.14
+331.52
+332.75
+333.25
+334.53
+335.9
+336.57
+336.1
+334.76
+332.59
+331.41
+330.98
+332.24
+333.68
+334.8
+335.22
+336.47
+337.59
+337.84
+337.72
+336.37
+334.51
+332.6
+332.37
+333.75
+334.79
+336.05
+336.59
+337.79
+338.71
+339.3
+339.12
+337.56
+335.92
+333.74
+333.7
+335.13
+336.56
+337.84
+338.19
+339.9
+340.6
+341.29
+341
+339.39
+337.43
+335.72
+335.84
+336.93
+338.04
+339.06
+340.3
+341.21
+342.33
+342.74
+342.07
+340.32
+338.27
+336.52
+336.68
+338.19
+339.44
+340.57
+341.44
+342.53
+343.39
+343.96
+343.18
+341.88
+339.65
+337.8
+337.69
+339.09
+340.32
+341.2
+342.35
+342.93
+344.77
+345.58
+345.14
+343.81
+342.22
+339.69
+339.82
+340.98
+342.82
+343.52
+344.33
+345.11
+346.88
+347.25
+346.61
+345.22
+343.11
+340.9
+341.17
+342.8
+344.04
+344.79
+345.82
+347.25
+348.17
+348.75
+348.07
+346.38
+344.52
+342.92
+342.63
+344.06
+345.38
+346.12
+346.79
+347.69
+349.38
+350.04
+349.38
+347.78
+345.75
+344.7
+344.01
+345.5
+346.75
+347.86
+348.32
+349.26
+350.84
+351.7
+351.11
+349.37
+347.97
+346.31
+346.22
+347.68
+348.82
+350.29
+351.58
+352.08
+353.45
+354.08
+353.66
+352.25
+350.3
+348.58
+348.74
+349.93
+351.21
+352.62
+352.93
+353.54
+355.27
+355.52
+354.97
+353.74
+351.51
+349.63
+349.82
+351.12
+352.35
+353.47
+354.51
+355.18
+355.98
+356.94
+355.99
+354.58
+352.68
+350.72
+350.92
+352.55
+353.91
+.Tsp
+numeric
+3
+1959
+1990.9166666666667
+12
+class
+character
+2
+ts
+numeric
diff --git a/win32/deps/library/foreign/tests/xport.R b/win32/deps/library/foreign/tests/xport.R
new file mode 100644
index 0000000..7585c6e
--- /dev/null
+++ b/win32/deps/library/foreign/tests/xport.R
@@ -0,0 +1,9 @@
+library(foreign)
+lookup.xport("Alfalfa.xpt")
+Alfalfa <- read.xport("Alfalfa.xpt")
+summary(Alfalfa)
+## test data provided by FRohde birchdavis com
+lookup.xport("test.xpt")
+testdata <- read.xport("test.xpt")
+summary(testdata)
+q()
diff --git a/win32/deps/library/foreign/tests/xport.Rout.save b/win32/deps/library/foreign/tests/xport.Rout.save
new file mode 100644
index 0000000..e920982
--- /dev/null
+++ b/win32/deps/library/foreign/tests/xport.Rout.save
@@ -0,0 +1,115 @@
+
+R : Copyright 2003, The R Development Core Team
+Version 1.7.0 Patched (2003-04-24)
+
+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.
+
+Type `demo()' for some demos, `help()' for on-line help, or
+`help.start()' for a HTML browser interface to help.
+Type `q()' to quit R.
+
+> library(foreign)
+> lookup.xport("Alfalfa.xpt")
+$SPEC
+$SPEC$headpad
+[1] 1360
+
+$SPEC$type
+[1] "character" "numeric"   "numeric"   "numeric"   "numeric"   "numeric"  
+
+$SPEC$width
+[1] 8 8 8 8 8 8
+
+$SPEC$index
+[1] 1 2 3 4 5 6
+
+$SPEC$position
+[1]  0  8 16 24 32 40
+
+$SPEC$name
+[1] "POP"    "SAMPLE" "REP"    "SEEDWT" "HARV1"  "HARV2" 
+
+$SPEC$label
+[1] "" "" "" "" "" ""
+
+$SPEC$format
+[1] "" "" "" "" "" ""
+
+$SPEC$sexptype
+[1] 16 14 14 14 14 14
+
+$SPEC$tailpad
+[1] 0
+
+$SPEC$length
+[1] 40
+
+
+> Alfalfa <- read.xport("Alfalfa.xpt")
+> summary(Alfalfa)
+  POP         SAMPLE         REP           SEEDWT          HARV1      
+ MAX:20   Min.   :0.0   Min.   :1.00   Min.   :35.00   Min.   :120.6  
+ min:20   1st Qu.:2.0   1st Qu.:1.75   1st Qu.:47.75   1st Qu.:148.3  
+          Median :4.5   Median :2.50   Median :59.00   Median :165.8  
+          Mean   :4.5   Mean   :2.50   Mean   :56.08   Mean   :163.0  
+          3rd Qu.:7.0   3rd Qu.:3.25   3rd Qu.:62.25   3rd Qu.:176.4  
+          Max.   :9.0   Max.   :4.00   Max.   :75.00   Max.   :193.4  
+     HARV2      
+ Min.   :129.1  
+ 1st Qu.:150.6  
+ Median :163.2  
+ Mean   :167.1  
+ 3rd Qu.:179.6  
+ Max.   :235.3  
+> ## test data provided by FRohde birchdavis com
+> lookup.xport("test.xpt")
+$TEST
+$TEST$headpad
+[1] 800
+
+$TEST$type
+[1] "numeric" "numeric"
+
+$TEST$width
+[1] 8 8
+
+$TEST$index
+[1] 1 2
+
+$TEST$position
+[1] 0 8
+
+$TEST$name
+[1] "I" "K"
+
+$TEST$label
+[1] "" ""
+
+$TEST$format
+[1] "" ""
+
+$TEST$sexptype
+[1] 14 14
+
+$TEST$tailpad
+[1] 48
+
+$TEST$length
+[1] 12
+
+
+> testdata <- read.xport("test.xpt")
+> summary(testdata)
+       I              K    
+ Min.   :1.00   Min.   :1  
+ 1st Qu.:1.75   1st Qu.:1  
+ Median :2.50   Median :2  
+ Mean   :2.50   Mean   :2  
+ 3rd Qu.:3.25   3rd Qu.:3  
+ Max.   :4.00   Max.   :3  
+> q()
diff --git a/win32/deps/library/grDevices/DESCRIPTION b/win32/deps/library/grDevices/DESCRIPTION
index 0aaf8d1..ee7afcb 100644
--- a/win32/deps/library/grDevices/DESCRIPTION
+++ b/win32/deps/library/grDevices/DESCRIPTION
@@ -1,9 +1,9 @@
 Package: grDevices
-Version: 2.9.2
+Version: 2.15.2
 Priority: base
 Title: The R Graphics Devices and Support for Colours and Fonts
-Author: R Development Core Team and contributors worldwide
+Author: R Core Team and contributors worldwide
 Maintainer: R Core Team <R-core r-project org>
 Description: Graphics devices and support for base and grid graphics
-License: Part of R 2.9.2
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 12:43:40 UTC; windows
+License: Part of R 2.15.2
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:05:46 UTC; windows
diff --git a/win32/deps/library/grDevices/INDEX b/win32/deps/library/grDevices/INDEX
index 1eaeefa..bcc610d 100644
--- a/win32/deps/library/grDevices/INDEX
+++ b/win32/deps/library/grDevices/INDEX
@@ -2,7 +2,11 @@ Devices                 List of Graphical Devices
 Hershey                 Hershey Vector Fonts in R
 Japanese                Japanese characters in R
 Type1Font               Type 1 and CID Fonts
+adjustcolor             Adjust Colors in One or More Directions
+                        Conveniently.
 as.graphicsAnnot        Coerce an Object for Graphics Annotation
+as.raster               Create a Raster Object
+axisTicks               Compute Pretty Axis Tick Scales
 boxplot.stats           Box Plot Statistics
 bringToTop              Assign Focus to a Window
 check.options           Set Options with Consistency Checks
@@ -12,14 +16,19 @@ col2rgb                 Color to RGB Conversion
 colorRamp               Color interpolation
 colors                  Color Names
 contourLines            Calculate Contour Lines
-convertColor            Convert between colour spaces
+convertColor            Convert between Colour Spaces
 densCols                Colors for Smooth Density Plots
+dev.capabilities        Query Capabilities of the Current Graphics
+                        Device
+dev.capture             Capture device output as a raster image
 dev.copy                Copy Graphics Between Multiple Devices
 dev.cur                 Control Multiple Devices
-dev.interactive         Is the Current Graphics Device Interactive ?
+dev.flush               Hold or Flush Output on an On-Screen Graphics
+                        Device.
+dev.interactive         Is the Current Graphics Device Interactive?
 dev.size                Find Size of Device Surface
 dev2bitmap              Graphics Device for Bitmap Files via
-                        GhostScript
+                        Ghostscript
 devAskNewPage           Prompt before New Page
 embedFonts              Embed Fonts in PostScript and PDF
 extendrange             Extend a Numerical Range by a Small Percentage
@@ -44,16 +53,19 @@ plotmath                Mathematical Annotation in R
 png                     BMP, JPEG, PNG and TIFF graphics devices
 postscript              PostScript Graphics
 postscriptFonts         PostScript and PDF Font Families
+pretty.Date             Pretty Breakpoints for Date-Time Classes
 ps.options              Auxiliary Function to Set/View Defaults for
                         Arguments of postscript
 rainbow                 Color Palettes
-recordGraphics          Record graphics operations
+recordGraphics          Record Graphics Operations
 recordPlot              Record and Replay Plots
 rgb                     RGB Color Specification
 rgb2hsv                 RGB to HSV Conversion
 savePlot                Save Windows Plot to a File
+svg                     Cairo-based SVG, PDF and PostScript Graphics
+                        Devices
 trans3d                 3D to 2D Transformation for Perspective Plots
-windows                 Windows graphics devices
+windows                 Windows Graphics Devices
 windows.options         Auxiliary Function to Set/View Defaults for
                         Arguments of windows()
 windowsFonts            Windows Fonts
diff --git a/win32/deps/library/grDevices/Meta/Rd.rds b/win32/deps/library/grDevices/Meta/Rd.rds
index 3f128e5..96579d4 100644
Binary files a/win32/deps/library/grDevices/Meta/Rd.rds and b/win32/deps/library/grDevices/Meta/Rd.rds differ
diff --git a/win32/deps/library/grDevices/Meta/hsearch.rds b/win32/deps/library/grDevices/Meta/hsearch.rds
index e2f423c..357442d 100644
Binary files a/win32/deps/library/grDevices/Meta/hsearch.rds and b/win32/deps/library/grDevices/Meta/hsearch.rds differ
diff --git a/win32/deps/library/grDevices/Meta/links.rds b/win32/deps/library/grDevices/Meta/links.rds
new file mode 100644
index 0000000..8033b9f
Binary files /dev/null and b/win32/deps/library/grDevices/Meta/links.rds differ
diff --git a/win32/deps/library/grDevices/Meta/nsInfo.rds b/win32/deps/library/grDevices/Meta/nsInfo.rds
index a8d218f..cb66138 100644
Binary files a/win32/deps/library/grDevices/Meta/nsInfo.rds and b/win32/deps/library/grDevices/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/grDevices/Meta/package.rds b/win32/deps/library/grDevices/Meta/package.rds
index c5e334f..b8bf427 100644
Binary files a/win32/deps/library/grDevices/Meta/package.rds and b/win32/deps/library/grDevices/Meta/package.rds differ
diff --git a/win32/deps/library/grDevices/NAMESPACE b/win32/deps/library/grDevices/NAMESPACE
index 314dd2f..cfc1de6 100644
--- a/win32/deps/library/grDevices/NAMESPACE
+++ b/win32/deps/library/grDevices/NAMESPACE
@@ -3,31 +3,35 @@
 ## conflict with functions on Windows, i.e. savePlot.
 
 if(tools:::.OStype() == "windows") {
-    useDynLib(grDevices, R_chull,
+    useDynLib(grDevices, R_chull, R_CreateAtVector, R_GAxisPars,
               PicTeX, PostScript, XFig, PDF,
-              Cdevga=devga, CsavePlot=savePlot,
+              Cdevga=devga, CsavePlot=savePlot, devCairo,
               Type1FontInUse, CIDFontInUse, R_GD_nullDevice)
 } else {
-    useDynLib(grDevices, R_chull,
-              PicTeX, PostScript, XFig, PDF, CQuartz = Quartz,
-              Type1FontInUse, CIDFontInUse, R_GD_nullDevice)
+    useDynLib(grDevices, R_chull, R_CreateAtVector, R_GAxisPars,
+              PicTeX, PostScript, XFig, PDF, CQuartz = Quartz, devCairo,
+              Type1FontInUse, CIDFontInUse, R_GD_nullDevice,
+              cairoProps, makeQuartzDefault)
 }
 
-export(Hershey, as.graphicsAnnot, blues9, boxplot.stats, check.options, chull,
-       CIDFont, col2rgb, colors, colours, cm, colorRamp,
-       colorRampPalette, contourLines, convertColor, colorConverter,
-       colorspaces, cm.colors, densCols, devAskNewPage, dev.control,
-       dev.copy, dev.copy2eps, dev.copy2pdf, dev.cur, dev.interactive,
-       dev.list, dev.new, dev.next, dev.off, dev.prev, dev.print,
-       dev.set, dev.size, dev2bitmap, deviceIsInteractive, embedFonts,
-       extendrange, getGraphicsEvent, graphics.off, gray, grey,
-       gray.colors, grey.colors, heat.colors, hsv, hcl, make.rgb,
+export(Hershey, adjustcolor, as.graphicsAnnot, as.raster, axisTicks, blues9,
+       boxplot.stats, check.options, chull, CIDFont, col2rgb, colors,
+       colours, cm, colorRamp, colorRampPalette, contourLines,
+       convertColor, colorConverter, colorspaces, cm.colors, densCols,
+       devAskNewPage, dev.capabilities, dev.capture, dev.control, dev.copy,
+       dev.copy2eps, dev.copy2pdf, dev.cur, dev.hold, dev.flush,
+       dev.interactive, dev.list, dev.new, dev.next, dev.off,
+       dev.prev, dev.print, dev.set, dev.size, dev2bitmap,
+       deviceIsInteractive, embedFonts, extendrange, getGraphicsEvent,
+       getGraphicsEventEnv, graphics.off, gray, grey, gray.colors,
+       grey.colors, heat.colors, hsv, hcl, is.raster, make.rgb,
        n2mfrow, nclass.Sturges, nclass.FD, nclass.scott, palette, pdf,
        pdf.options, pdfFonts, pictex, postscript, postscriptFont,
        postscriptFonts, ps.options, rainbow, recordGraphics,
-       recordPlot, replayPlot, rgb, rgb2hsv, savePlot, setEPS, setPS,
-       terrain.colors, topo.colors, trans3d, Type1Font, xfig, xyTable,
-       xy.coords, xyz.coords)
+       recordPlot, replayPlot, rgb, rgb2hsv, savePlot, setEPS,
+       setGraphicsEventEnv, setGraphicsEventHandlers, setPS,
+       terrain.colors, topo.colors, trans3d, Type1Font, .axisPars,
+       xfig, xyTable, xy.coords, xyz.coords)
 
 ## devices common to all platforms
 export(X11, x11, bitmap, bmp, jpeg, png, tiff)
@@ -42,9 +46,29 @@ S3method("checkFont", "CIDFont")
 S3method("matchEncoding", "Type1Font")
 S3method("matchEncoding", "CIDFont")
 
+S3method("as.raster", "raster")
+S3method("as.raster", "logical")
+S3method("as.raster", "numeric")
+S3method("as.raster", "character")
+S3method("as.raster", "matrix")
+S3method("as.raster", "array")
+
+S3method("as.matrix", "raster")
+S3method("is.na", "raster")
+S3method("[", "raster")
+S3method("[<-", "raster")
+S3method("Ops", "raster")
+
+S3method("print", "raster")
+
+S3method(pretty, Date)
+S3method(pretty, POSIXt)
+
+
 if(tools:::.OStype() == "windows") {
     export(bringToTop, msgWindow, win.graph, win.metafile, win.print,
            windows, windows.options, windowsFont, windowsFonts)
+    export(cairo_pdf, cairo_ps, svg)
 
     S3method("[", SavedPlots)
     S3method(print, SavedPlots)
diff --git a/win32/deps/library/grDevices/R/grDevices b/win32/deps/library/grDevices/R/grDevices
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/grDevices/R/grDevices
+++ b/win32/deps/library/grDevices/R/grDevices
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/grDevices/R/grDevices.rdb b/win32/deps/library/grDevices/R/grDevices.rdb
index 250ec55..0b80c44 100644
Binary files a/win32/deps/library/grDevices/R/grDevices.rdb and b/win32/deps/library/grDevices/R/grDevices.rdb differ
diff --git a/win32/deps/library/grDevices/R/grDevices.rdx b/win32/deps/library/grDevices/R/grDevices.rdx
index fe38ce1..b40faab 100644
Binary files a/win32/deps/library/grDevices/R/grDevices.rdx and b/win32/deps/library/grDevices/R/grDevices.rdx differ
diff --git a/win32/deps/library/grDevices/afm/CM_boldx_10.afm.gz b/win32/deps/library/grDevices/afm/CM_boldx_10.afm.gz
index f5624d6..1647728 100644
Binary files a/win32/deps/library/grDevices/afm/CM_boldx_10.afm.gz and b/win32/deps/library/grDevices/afm/CM_boldx_10.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/CM_boldx_italic_10.afm.gz b/win32/deps/library/grDevices/afm/CM_boldx_italic_10.afm.gz
index 65942e4..4203fac 100644
Binary files a/win32/deps/library/grDevices/afm/CM_boldx_italic_10.afm.gz and b/win32/deps/library/grDevices/afm/CM_boldx_italic_10.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/CM_italic_10.afm.gz b/win32/deps/library/grDevices/afm/CM_italic_10.afm.gz
index c399f87..0acc43c 100644
Binary files a/win32/deps/library/grDevices/afm/CM_italic_10.afm.gz and b/win32/deps/library/grDevices/afm/CM_italic_10.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/CM_regular_10.afm.gz b/win32/deps/library/grDevices/afm/CM_regular_10.afm.gz
index f3f6454..10f12b4 100644
Binary files a/win32/deps/library/grDevices/afm/CM_regular_10.afm.gz and b/win32/deps/library/grDevices/afm/CM_regular_10.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/CM_symbol_10.afm.gz b/win32/deps/library/grDevices/afm/CM_symbol_10.afm.gz
index 15fa17b..4163593 100644
Binary files a/win32/deps/library/grDevices/afm/CM_symbol_10.afm.gz and b/win32/deps/library/grDevices/afm/CM_symbol_10.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/Courier-Bold.afm.gz b/win32/deps/library/grDevices/afm/Courier-Bold.afm.gz
index 7ca82f6..04ecb51 100644
Binary files a/win32/deps/library/grDevices/afm/Courier-Bold.afm.gz and b/win32/deps/library/grDevices/afm/Courier-Bold.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/Courier-BoldOblique.afm.gz b/win32/deps/library/grDevices/afm/Courier-BoldOblique.afm.gz
index 98b8a7a..dad0c9a 100644
Binary files a/win32/deps/library/grDevices/afm/Courier-BoldOblique.afm.gz and b/win32/deps/library/grDevices/afm/Courier-BoldOblique.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/Courier-Oblique.afm.gz b/win32/deps/library/grDevices/afm/Courier-Oblique.afm.gz
index ba17496..119a915 100644
Binary files a/win32/deps/library/grDevices/afm/Courier-Oblique.afm.gz and b/win32/deps/library/grDevices/afm/Courier-Oblique.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/Courier.afm.gz b/win32/deps/library/grDevices/afm/Courier.afm.gz
index 77b79a8..5742c2d 100644
Binary files a/win32/deps/library/grDevices/afm/Courier.afm.gz and b/win32/deps/library/grDevices/afm/Courier.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/Helvetica-Bold.afm.gz b/win32/deps/library/grDevices/afm/Helvetica-Bold.afm.gz
index 0e03a32..f89498d 100644
Binary files a/win32/deps/library/grDevices/afm/Helvetica-Bold.afm.gz and b/win32/deps/library/grDevices/afm/Helvetica-Bold.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/Helvetica-BoldOblique.afm.gz b/win32/deps/library/grDevices/afm/Helvetica-BoldOblique.afm.gz
index 6381af5..25f3e96 100644
Binary files a/win32/deps/library/grDevices/afm/Helvetica-BoldOblique.afm.gz and b/win32/deps/library/grDevices/afm/Helvetica-BoldOblique.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/Helvetica-Oblique.afm.gz b/win32/deps/library/grDevices/afm/Helvetica-Oblique.afm.gz
index 743f724..5762c14 100644
Binary files a/win32/deps/library/grDevices/afm/Helvetica-Oblique.afm.gz and b/win32/deps/library/grDevices/afm/Helvetica-Oblique.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/Helvetica.afm.gz b/win32/deps/library/grDevices/afm/Helvetica.afm.gz
index adda5af..518c3a3 100644
Binary files a/win32/deps/library/grDevices/afm/Helvetica.afm.gz and b/win32/deps/library/grDevices/afm/Helvetica.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/Symbol.afm.gz b/win32/deps/library/grDevices/afm/Symbol.afm.gz
index 0e83f0d..f29339a 100644
Binary files a/win32/deps/library/grDevices/afm/Symbol.afm.gz and b/win32/deps/library/grDevices/afm/Symbol.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/Times-Bold.afm.gz b/win32/deps/library/grDevices/afm/Times-Bold.afm.gz
index 4a03a36..95bece0 100644
Binary files a/win32/deps/library/grDevices/afm/Times-Bold.afm.gz and b/win32/deps/library/grDevices/afm/Times-Bold.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/Times-BoldItalic.afm.gz b/win32/deps/library/grDevices/afm/Times-BoldItalic.afm.gz
index 0dbdfe5..6a48ab9 100644
Binary files a/win32/deps/library/grDevices/afm/Times-BoldItalic.afm.gz and b/win32/deps/library/grDevices/afm/Times-BoldItalic.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/Times-Italic.afm.gz b/win32/deps/library/grDevices/afm/Times-Italic.afm.gz
index 544fa1b..8e235f9 100644
Binary files a/win32/deps/library/grDevices/afm/Times-Italic.afm.gz and b/win32/deps/library/grDevices/afm/Times-Italic.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/Times-Roman.afm.gz b/win32/deps/library/grDevices/afm/Times-Roman.afm.gz
index 0a31549..c26d2c6 100644
Binary files a/win32/deps/library/grDevices/afm/Times-Roman.afm.gz and b/win32/deps/library/grDevices/afm/Times-Roman.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/ZapfDingbats.afm.gz b/win32/deps/library/grDevices/afm/ZapfDingbats.afm.gz
index 791de11..a816165 100644
Binary files a/win32/deps/library/grDevices/afm/ZapfDingbats.afm.gz and b/win32/deps/library/grDevices/afm/ZapfDingbats.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/a010013l.afm.gz b/win32/deps/library/grDevices/afm/a010013l.afm.gz
index 408cce4..7831084 100644
Binary files a/win32/deps/library/grDevices/afm/a010013l.afm.gz and b/win32/deps/library/grDevices/afm/a010013l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/a010015l.afm.gz b/win32/deps/library/grDevices/afm/a010015l.afm.gz
index 5692e4c..c05f961 100644
Binary files a/win32/deps/library/grDevices/afm/a010015l.afm.gz and b/win32/deps/library/grDevices/afm/a010015l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/a010033l.afm.gz b/win32/deps/library/grDevices/afm/a010033l.afm.gz
index a129105..6bcef68 100644
Binary files a/win32/deps/library/grDevices/afm/a010033l.afm.gz and b/win32/deps/library/grDevices/afm/a010033l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/a010035l.afm.gz b/win32/deps/library/grDevices/afm/a010035l.afm.gz
index 4361468..bbecc00 100644
Binary files a/win32/deps/library/grDevices/afm/a010035l.afm.gz and b/win32/deps/library/grDevices/afm/a010035l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/agd_____.afm.gz b/win32/deps/library/grDevices/afm/agd_____.afm.gz
index eab1b4c..0007386 100644
Binary files a/win32/deps/library/grDevices/afm/agd_____.afm.gz and b/win32/deps/library/grDevices/afm/agd_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/agdo____.afm.gz b/win32/deps/library/grDevices/afm/agdo____.afm.gz
index 2ca519f..980f29c 100644
Binary files a/win32/deps/library/grDevices/afm/agdo____.afm.gz and b/win32/deps/library/grDevices/afm/agdo____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/agw_____.afm.gz b/win32/deps/library/grDevices/afm/agw_____.afm.gz
index 0ba18d7..f91b3b5 100644
Binary files a/win32/deps/library/grDevices/afm/agw_____.afm.gz and b/win32/deps/library/grDevices/afm/agw_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/agwo____.afm.gz b/win32/deps/library/grDevices/afm/agwo____.afm.gz
index f867dfd..d763bd5 100644
Binary files a/win32/deps/library/grDevices/afm/agwo____.afm.gz and b/win32/deps/library/grDevices/afm/agwo____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/b018012l.afm.gz b/win32/deps/library/grDevices/afm/b018012l.afm.gz
index 29dbfea..1881d1b 100644
Binary files a/win32/deps/library/grDevices/afm/b018012l.afm.gz and b/win32/deps/library/grDevices/afm/b018012l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/b018015l.afm.gz b/win32/deps/library/grDevices/afm/b018015l.afm.gz
index 53b29fc..4e1d8a7 100644
Binary files a/win32/deps/library/grDevices/afm/b018015l.afm.gz and b/win32/deps/library/grDevices/afm/b018015l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/b018032l.afm.gz b/win32/deps/library/grDevices/afm/b018032l.afm.gz
index 7c9133c..90d5433 100644
Binary files a/win32/deps/library/grDevices/afm/b018032l.afm.gz and b/win32/deps/library/grDevices/afm/b018032l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/b018035l.afm.gz b/win32/deps/library/grDevices/afm/b018035l.afm.gz
index e8653a5..b823526 100644
Binary files a/win32/deps/library/grDevices/afm/b018035l.afm.gz and b/win32/deps/library/grDevices/afm/b018035l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/bkd_____.afm.gz b/win32/deps/library/grDevices/afm/bkd_____.afm.gz
index 0867cd7..feaa926 100644
Binary files a/win32/deps/library/grDevices/afm/bkd_____.afm.gz and b/win32/deps/library/grDevices/afm/bkd_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/bkdi____.afm.gz b/win32/deps/library/grDevices/afm/bkdi____.afm.gz
index b989325..8124426 100644
Binary files a/win32/deps/library/grDevices/afm/bkdi____.afm.gz and b/win32/deps/library/grDevices/afm/bkdi____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/bkl_____.afm.gz b/win32/deps/library/grDevices/afm/bkl_____.afm.gz
index 87911cf..2f3cdb7 100644
Binary files a/win32/deps/library/grDevices/afm/bkl_____.afm.gz and b/win32/deps/library/grDevices/afm/bkl_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/bkli____.afm.gz b/win32/deps/library/grDevices/afm/bkli____.afm.gz
index 06c742e..2420541 100644
Binary files a/win32/deps/library/grDevices/afm/bkli____.afm.gz and b/win32/deps/library/grDevices/afm/bkli____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/c059013l.afm.gz b/win32/deps/library/grDevices/afm/c059013l.afm.gz
index 86f8be5..d78d8ef 100644
Binary files a/win32/deps/library/grDevices/afm/c059013l.afm.gz and b/win32/deps/library/grDevices/afm/c059013l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/c059016l.afm.gz b/win32/deps/library/grDevices/afm/c059016l.afm.gz
index 1c8a07f..bdf90a7 100644
Binary files a/win32/deps/library/grDevices/afm/c059016l.afm.gz and b/win32/deps/library/grDevices/afm/c059016l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/c059033l.afm.gz b/win32/deps/library/grDevices/afm/c059033l.afm.gz
index 450d41d..e7727cb 100644
Binary files a/win32/deps/library/grDevices/afm/c059033l.afm.gz and b/win32/deps/library/grDevices/afm/c059033l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/c059036l.afm.gz b/win32/deps/library/grDevices/afm/c059036l.afm.gz
index bb231cd..253b27f 100644
Binary files a/win32/deps/library/grDevices/afm/c059036l.afm.gz and b/win32/deps/library/grDevices/afm/c059036l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/cmbxti10.afm.gz b/win32/deps/library/grDevices/afm/cmbxti10.afm.gz
index 1dfdb85..1b4243f 100644
Binary files a/win32/deps/library/grDevices/afm/cmbxti10.afm.gz and b/win32/deps/library/grDevices/afm/cmbxti10.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/cmti10.afm.gz b/win32/deps/library/grDevices/afm/cmti10.afm.gz
index 1329d53..bfee45b 100644
Binary files a/win32/deps/library/grDevices/afm/cmti10.afm.gz and b/win32/deps/library/grDevices/afm/cmti10.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/cob_____.afm.gz b/win32/deps/library/grDevices/afm/cob_____.afm.gz
index 8ea620a..42b2661 100644
Binary files a/win32/deps/library/grDevices/afm/cob_____.afm.gz and b/win32/deps/library/grDevices/afm/cob_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/cobo____.afm.gz b/win32/deps/library/grDevices/afm/cobo____.afm.gz
index 8945a92..0c4ea40 100644
Binary files a/win32/deps/library/grDevices/afm/cobo____.afm.gz and b/win32/deps/library/grDevices/afm/cobo____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/com_____.afm.gz b/win32/deps/library/grDevices/afm/com_____.afm.gz
index e7b6612..e498048 100644
Binary files a/win32/deps/library/grDevices/afm/com_____.afm.gz and b/win32/deps/library/grDevices/afm/com_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/coo_____.afm.gz b/win32/deps/library/grDevices/afm/coo_____.afm.gz
index 8e4ba8d..ccf43c6 100644
Binary files a/win32/deps/library/grDevices/afm/coo_____.afm.gz and b/win32/deps/library/grDevices/afm/coo_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/hv______.afm.gz b/win32/deps/library/grDevices/afm/hv______.afm.gz
index 2d0caec..a6722e3 100644
Binary files a/win32/deps/library/grDevices/afm/hv______.afm.gz and b/win32/deps/library/grDevices/afm/hv______.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/hvb_____.afm.gz b/win32/deps/library/grDevices/afm/hvb_____.afm.gz
index f3e317f..37d72be 100644
Binary files a/win32/deps/library/grDevices/afm/hvb_____.afm.gz and b/win32/deps/library/grDevices/afm/hvb_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/hvbo____.afm.gz b/win32/deps/library/grDevices/afm/hvbo____.afm.gz
index d0c8780..e6f911c 100644
Binary files a/win32/deps/library/grDevices/afm/hvbo____.afm.gz and b/win32/deps/library/grDevices/afm/hvbo____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/hvn_____.afm.gz b/win32/deps/library/grDevices/afm/hvn_____.afm.gz
index 76cab6e..6678a75 100644
Binary files a/win32/deps/library/grDevices/afm/hvn_____.afm.gz and b/win32/deps/library/grDevices/afm/hvn_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/hvnb____.afm.gz b/win32/deps/library/grDevices/afm/hvnb____.afm.gz
index b00dd13..eb0835e 100644
Binary files a/win32/deps/library/grDevices/afm/hvnb____.afm.gz and b/win32/deps/library/grDevices/afm/hvnb____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/hvnbo___.afm.gz b/win32/deps/library/grDevices/afm/hvnbo___.afm.gz
index 1aef164..ea6fce9 100644
Binary files a/win32/deps/library/grDevices/afm/hvnbo___.afm.gz and b/win32/deps/library/grDevices/afm/hvnbo___.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/hvno____.afm.gz b/win32/deps/library/grDevices/afm/hvno____.afm.gz
index 72e8601..9620e7e 100644
Binary files a/win32/deps/library/grDevices/afm/hvno____.afm.gz and b/win32/deps/library/grDevices/afm/hvno____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/hvo_____.afm.gz b/win32/deps/library/grDevices/afm/hvo_____.afm.gz
index c89a252..7af2259 100644
Binary files a/win32/deps/library/grDevices/afm/hvo_____.afm.gz and b/win32/deps/library/grDevices/afm/hvo_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n019003l.afm.gz b/win32/deps/library/grDevices/afm/n019003l.afm.gz
index 74d9e2a..0992cf5 100644
Binary files a/win32/deps/library/grDevices/afm/n019003l.afm.gz and b/win32/deps/library/grDevices/afm/n019003l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n019004l.afm.gz b/win32/deps/library/grDevices/afm/n019004l.afm.gz
index 07b9361..59b1180 100644
Binary files a/win32/deps/library/grDevices/afm/n019004l.afm.gz and b/win32/deps/library/grDevices/afm/n019004l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n019023l.afm.gz b/win32/deps/library/grDevices/afm/n019023l.afm.gz
index 449d70d..8217b8f 100644
Binary files a/win32/deps/library/grDevices/afm/n019023l.afm.gz and b/win32/deps/library/grDevices/afm/n019023l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n019024l.afm.gz b/win32/deps/library/grDevices/afm/n019024l.afm.gz
index 59c7a06..bee8d41 100644
Binary files a/win32/deps/library/grDevices/afm/n019024l.afm.gz and b/win32/deps/library/grDevices/afm/n019024l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n019043l.afm.gz b/win32/deps/library/grDevices/afm/n019043l.afm.gz
index 7efb2ff..6910b42 100644
Binary files a/win32/deps/library/grDevices/afm/n019043l.afm.gz and b/win32/deps/library/grDevices/afm/n019043l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n019044l.afm.gz b/win32/deps/library/grDevices/afm/n019044l.afm.gz
index 24b62fe..bee9079 100644
Binary files a/win32/deps/library/grDevices/afm/n019044l.afm.gz and b/win32/deps/library/grDevices/afm/n019044l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n019063l.afm.gz b/win32/deps/library/grDevices/afm/n019063l.afm.gz
index 69682f7..12dd710 100644
Binary files a/win32/deps/library/grDevices/afm/n019063l.afm.gz and b/win32/deps/library/grDevices/afm/n019063l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n019064l.afm.gz b/win32/deps/library/grDevices/afm/n019064l.afm.gz
index 1685796..fc1bdfb 100644
Binary files a/win32/deps/library/grDevices/afm/n019064l.afm.gz and b/win32/deps/library/grDevices/afm/n019064l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n021003l.afm.gz b/win32/deps/library/grDevices/afm/n021003l.afm.gz
index 59cd881..6e2da3e 100644
Binary files a/win32/deps/library/grDevices/afm/n021003l.afm.gz and b/win32/deps/library/grDevices/afm/n021003l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n021004l.afm.gz b/win32/deps/library/grDevices/afm/n021004l.afm.gz
index ed97232..9a2d93f 100644
Binary files a/win32/deps/library/grDevices/afm/n021004l.afm.gz and b/win32/deps/library/grDevices/afm/n021004l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n021023l.afm.gz b/win32/deps/library/grDevices/afm/n021023l.afm.gz
index 2713d4a..a587388 100644
Binary files a/win32/deps/library/grDevices/afm/n021023l.afm.gz and b/win32/deps/library/grDevices/afm/n021023l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n021024l.afm.gz b/win32/deps/library/grDevices/afm/n021024l.afm.gz
index f578be4..aa1b553 100644
Binary files a/win32/deps/library/grDevices/afm/n021024l.afm.gz and b/win32/deps/library/grDevices/afm/n021024l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n022003l.afm.gz b/win32/deps/library/grDevices/afm/n022003l.afm.gz
index cbbc8ef..e7c7370 100644
Binary files a/win32/deps/library/grDevices/afm/n022003l.afm.gz and b/win32/deps/library/grDevices/afm/n022003l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n022004l.afm.gz b/win32/deps/library/grDevices/afm/n022004l.afm.gz
index 1a38514..da8828d 100644
Binary files a/win32/deps/library/grDevices/afm/n022004l.afm.gz and b/win32/deps/library/grDevices/afm/n022004l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n022023l.afm.gz b/win32/deps/library/grDevices/afm/n022023l.afm.gz
index ff6aa93..582afe1 100644
Binary files a/win32/deps/library/grDevices/afm/n022023l.afm.gz and b/win32/deps/library/grDevices/afm/n022023l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/n022024l.afm.gz b/win32/deps/library/grDevices/afm/n022024l.afm.gz
index 37512fe..1ebecaa 100644
Binary files a/win32/deps/library/grDevices/afm/n022024l.afm.gz and b/win32/deps/library/grDevices/afm/n022024l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/ncb_____.afm.gz b/win32/deps/library/grDevices/afm/ncb_____.afm.gz
index 3d2f3d6..18bf0f3 100644
Binary files a/win32/deps/library/grDevices/afm/ncb_____.afm.gz and b/win32/deps/library/grDevices/afm/ncb_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/ncbi____.afm.gz b/win32/deps/library/grDevices/afm/ncbi____.afm.gz
index f988fcc..13934c8 100644
Binary files a/win32/deps/library/grDevices/afm/ncbi____.afm.gz and b/win32/deps/library/grDevices/afm/ncbi____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/nci_____.afm.gz b/win32/deps/library/grDevices/afm/nci_____.afm.gz
index 404fa7e..a80c067 100644
Binary files a/win32/deps/library/grDevices/afm/nci_____.afm.gz and b/win32/deps/library/grDevices/afm/nci_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/ncr_____.afm.gz b/win32/deps/library/grDevices/afm/ncr_____.afm.gz
index 9e451e4..b3a8377 100644
Binary files a/win32/deps/library/grDevices/afm/ncr_____.afm.gz and b/win32/deps/library/grDevices/afm/ncr_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/p052003l.afm.gz b/win32/deps/library/grDevices/afm/p052003l.afm.gz
index 5ff945b..a50f130 100644
Binary files a/win32/deps/library/grDevices/afm/p052003l.afm.gz and b/win32/deps/library/grDevices/afm/p052003l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/p052004l.afm.gz b/win32/deps/library/grDevices/afm/p052004l.afm.gz
index 4354e29..bcc5434 100644
Binary files a/win32/deps/library/grDevices/afm/p052004l.afm.gz and b/win32/deps/library/grDevices/afm/p052004l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/p052023l.afm.gz b/win32/deps/library/grDevices/afm/p052023l.afm.gz
index 3fc2214..7860a00 100644
Binary files a/win32/deps/library/grDevices/afm/p052023l.afm.gz and b/win32/deps/library/grDevices/afm/p052023l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/p052024l.afm.gz b/win32/deps/library/grDevices/afm/p052024l.afm.gz
index f0b3425..097fdfb 100644
Binary files a/win32/deps/library/grDevices/afm/p052024l.afm.gz and b/win32/deps/library/grDevices/afm/p052024l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/pob_____.afm.gz b/win32/deps/library/grDevices/afm/pob_____.afm.gz
index 4993e09..c2c6959 100644
Binary files a/win32/deps/library/grDevices/afm/pob_____.afm.gz and b/win32/deps/library/grDevices/afm/pob_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/pobi____.afm.gz b/win32/deps/library/grDevices/afm/pobi____.afm.gz
index 4065642..237c01e 100644
Binary files a/win32/deps/library/grDevices/afm/pobi____.afm.gz and b/win32/deps/library/grDevices/afm/pobi____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/poi_____.afm.gz b/win32/deps/library/grDevices/afm/poi_____.afm.gz
index 7a5a725..70c69e9 100644
Binary files a/win32/deps/library/grDevices/afm/poi_____.afm.gz and b/win32/deps/library/grDevices/afm/poi_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/por_____.afm.gz b/win32/deps/library/grDevices/afm/por_____.afm.gz
index fac6a51..afe482e 100644
Binary files a/win32/deps/library/grDevices/afm/por_____.afm.gz and b/win32/deps/library/grDevices/afm/por_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/s050000l.afm.gz b/win32/deps/library/grDevices/afm/s050000l.afm.gz
index 896aad4..3c0684d 100644
Binary files a/win32/deps/library/grDevices/afm/s050000l.afm.gz and b/win32/deps/library/grDevices/afm/s050000l.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/sy______.afm.gz b/win32/deps/library/grDevices/afm/sy______.afm.gz
index 526a5b2..96e542c 100644
Binary files a/win32/deps/library/grDevices/afm/sy______.afm.gz and b/win32/deps/library/grDevices/afm/sy______.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/tib_____.afm.gz b/win32/deps/library/grDevices/afm/tib_____.afm.gz
index 278d242..e27c868 100644
Binary files a/win32/deps/library/grDevices/afm/tib_____.afm.gz and b/win32/deps/library/grDevices/afm/tib_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/tibi____.afm.gz b/win32/deps/library/grDevices/afm/tibi____.afm.gz
index 3c50b51..2d22623 100644
Binary files a/win32/deps/library/grDevices/afm/tibi____.afm.gz and b/win32/deps/library/grDevices/afm/tibi____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/tii_____.afm.gz b/win32/deps/library/grDevices/afm/tii_____.afm.gz
index 86fa9c0..0cb428a 100644
Binary files a/win32/deps/library/grDevices/afm/tii_____.afm.gz and b/win32/deps/library/grDevices/afm/tii_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/afm/tir_____.afm.gz b/win32/deps/library/grDevices/afm/tir_____.afm.gz
index 1b600ac..b6b271a 100644
Binary files a/win32/deps/library/grDevices/afm/tir_____.afm.gz and b/win32/deps/library/grDevices/afm/tir_____.afm.gz differ
diff --git a/win32/deps/library/grDevices/help/AnIndex b/win32/deps/library/grDevices/help/AnIndex
index 7a55016..7b98f68 100644
--- a/win32/deps/library/grDevices/help/AnIndex
+++ b/win32/deps/library/grDevices/help/AnIndex
@@ -1,7 +1,16 @@
 grDevices-package	grDevices-package
+.axisPars	axisTicks
 .ps.prolog	postscript
+adjustcolor	adjustcolor
 as.graphicsAnnot	as.graphicsAnnot
+as.raster	as.raster
+as.raster.array	as.raster
+as.raster.character	as.raster
+as.raster.logical	as.raster
+as.raster.matrix	as.raster
+as.raster.numeric	as.raster
 atop	plotmath
+axisTicks	axisTicks
 bar	plotmath
 bgroup	plotmath
 bitmap	dev2bitmap
@@ -11,6 +20,8 @@ bold	plotmath
 bolditalic	plotmath
 boxplot.stats	boxplot.stats
 bringToTop	bringToTop
+cairo_pdf	cairo
+cairo_ps	cairo
 check.options	check.options
 chull	chull
 CIDFont	Type1Font
@@ -26,11 +37,15 @@ colours	colors
 contourLines	contourLines
 convertColor	convertColor
 densCols	densCols
+dev.capabilities	dev.capabilities
+dev.capture	dev.capture
 dev.control	dev2
 dev.copy	dev2
 dev.copy2eps	dev2
 dev.copy2pdf	dev2
 dev.cur	dev
+dev.flush	dev.flush
+dev.hold	dev.flush
 dev.interactive	dev.interactive
 dev.list	dev
 dev.new	dev
@@ -51,6 +66,7 @@ embedFonts	embedFonts
 extendrange	extendrange
 frac	plotmath
 getGraphicsEvent	getGraphicsEvent
+getGraphicsEventEnv	getGraphicsEvent
 graphics.off	dev
 gray	gray
 gray.colors	gray.colors
@@ -65,6 +81,7 @@ Hershey	Hershey
 hsv	hsv
 inf	plotmath
 integral	plotmath
+is.raster	as.raster
 italic	plotmath
 Japanese	Japanese
 jpeg	png
@@ -87,6 +104,8 @@ png	png
 postscript	postscript
 postscriptFont	grDevices-defunct
 postscriptFonts	postscriptFonts
+pretty.Date	pretty.Date
+pretty.POSIXt	pretty.Date
 print.recordedplot	recordplot
 print.SavedPlots	windows
 ps.options	ps.options
@@ -101,9 +120,12 @@ savePlot	savePlot
 scriptscriptstyle	plotmath
 scriptstyle	plotmath
 setEPS	ps.options
+setGraphicsEventEnv	getGraphicsEvent
+setGraphicsEventHandlers	getGraphicsEvent
 setPS	ps.options
 stayOnTop	bringToTop
 sup	plotmath
+svg	cairo
 symbol	plotmath
 terrain.colors	palettes
 textstyle	plotmath
diff --git a/win32/deps/library/grDevices/help/aliases.rds b/win32/deps/library/grDevices/help/aliases.rds
new file mode 100644
index 0000000..c680af4
Binary files /dev/null and b/win32/deps/library/grDevices/help/aliases.rds differ
diff --git a/win32/deps/library/grDevices/help/grDevices.rdb b/win32/deps/library/grDevices/help/grDevices.rdb
new file mode 100644
index 0000000..aa8d8e6
Binary files /dev/null and b/win32/deps/library/grDevices/help/grDevices.rdb differ
diff --git a/win32/deps/library/grDevices/help/grDevices.rdx b/win32/deps/library/grDevices/help/grDevices.rdx
new file mode 100644
index 0000000..d5374ae
Binary files /dev/null and b/win32/deps/library/grDevices/help/grDevices.rdx differ
diff --git a/win32/deps/library/grDevices/help/paths.rds b/win32/deps/library/grDevices/help/paths.rds
new file mode 100644
index 0000000..c5697c5
Binary files /dev/null and b/win32/deps/library/grDevices/help/paths.rds differ
diff --git a/win32/deps/library/grDevices/html/00Index.html b/win32/deps/library/grDevices/html/00Index.html
new file mode 100644
index 0000000..9e810cc
--- /dev/null
+++ b/win32/deps/library/grDevices/html/00Index.html
@@ -0,0 +1,455 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: The R Graphics Devices and Support for Colours and Fonts</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> The R Graphics Devices and Support for Colours and Fonts
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;grDevices&rsquo; version 2.15.2</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p 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="#H">H</a>
+<a href="#I">I</a>
+<a href="#J">J</a>
+<a href="#M">M</a>
+<a href="#N">N</a>
+<a href="#O">O</a>
+<a href="#P">P</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="#misc">misc</a>
+</p>
+
+<table width="100%">
+<tr><td width="25%"><a href="grDevices-package.html">grDevices-package</a></td>
+<td>The R Graphics Devices and Support for Colours and Fonts</td></tr>
+</table>
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="adjustcolor.html">adjustcolor</a></td>
+<td>Adjust Colors in One or More Directions Conveniently.</td></tr>
+<tr><td width="25%"><a href="as.graphicsAnnot.html">as.graphicsAnnot</a></td>
+<td>Coerce an Object for Graphics Annotation</td></tr>
+<tr><td width="25%"><a href="as.raster.html">as.raster</a></td>
+<td>Create a Raster Object</td></tr>
+<tr><td width="25%"><a href="as.raster.html">as.raster.array</a></td>
+<td>Create a Raster Object</td></tr>
+<tr><td width="25%"><a href="as.raster.html">as.raster.character</a></td>
+<td>Create a Raster Object</td></tr>
+<tr><td width="25%"><a href="as.raster.html">as.raster.logical</a></td>
+<td>Create a Raster Object</td></tr>
+<tr><td width="25%"><a href="as.raster.html">as.raster.matrix</a></td>
+<td>Create a Raster Object</td></tr>
+<tr><td width="25%"><a href="as.raster.html">as.raster.numeric</a></td>
+<td>Create a Raster Object</td></tr>
+<tr><td width="25%"><a href="plotmath.html">atop</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="axisTicks.html">axisTicks</a></td>
+<td>Compute Pretty Axis Tick Scales</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="plotmath.html">bar</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="plotmath.html">bgroup</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="dev2bitmap.html">bitmap</a></td>
+<td>Graphics Device for Bitmap Files via Ghostscript</td></tr>
+<tr><td width="25%"><a href="densCols.html">blues9</a></td>
+<td>Colors for Smooth Density Plots</td></tr>
+<tr><td width="25%"><a href="png.html">bmp</a></td>
+<td>BMP, JPEG, PNG and TIFF graphics devices</td></tr>
+<tr><td width="25%"><a href="plotmath.html">bold</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="plotmath.html">bolditalic</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="boxplot.stats.html">boxplot.stats</a></td>
+<td>Box Plot Statistics</td></tr>
+<tr><td width="25%"><a href="bringToTop.html">bringToTop</a></td>
+<td>Assign Focus to a Window</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="cairo.html">cairo_pdf</a></td>
+<td>Cairo-based SVG, PDF and PostScript Graphics Devices</td></tr>
+<tr><td width="25%"><a href="cairo.html">cairo_ps</a></td>
+<td>Cairo-based SVG, PDF and PostScript Graphics Devices</td></tr>
+<tr><td width="25%"><a href="check.options.html">check.options</a></td>
+<td>Set Options with Consistency Checks</td></tr>
+<tr><td width="25%"><a href="chull.html">chull</a></td>
+<td>Compute Convex Hull of a Set of Points</td></tr>
+<tr><td width="25%"><a href="Type1Font.html">CIDFont</a></td>
+<td>Type 1 and CID Fonts</td></tr>
+<tr><td width="25%"><a href="cm.html">cm</a></td>
+<td>Unit Transformation</td></tr>
+<tr><td width="25%"><a href="palettes.html">cm.colors</a></td>
+<td>Color Palettes</td></tr>
+<tr><td width="25%"><a href="col2rgb.html">col2rgb</a></td>
+<td>Color to RGB Conversion</td></tr>
+<tr><td width="25%"><a href="make.rgb.html">colorConverter</a></td>
+<td>Create colour spaces</td></tr>
+<tr><td width="25%"><a href="colorRamp.html">colorRamp</a></td>
+<td>Color interpolation</td></tr>
+<tr><td width="25%"><a href="colorRamp.html">colorRampPalette</a></td>
+<td>Color interpolation</td></tr>
+<tr><td width="25%"><a href="colors.html">colors</a></td>
+<td>Color Names</td></tr>
+<tr><td width="25%"><a href="convertColor.html">colorspaces</a></td>
+<td>Convert between Colour Spaces</td></tr>
+<tr><td width="25%"><a href="colors.html">colours</a></td>
+<td>Color Names</td></tr>
+<tr><td width="25%"><a href="contourLines.html">contourLines</a></td>
+<td>Calculate Contour Lines</td></tr>
+<tr><td width="25%"><a href="convertColor.html">convertColor</a></td>
+<td>Convert between Colour Spaces</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="densCols.html">densCols</a></td>
+<td>Colors for Smooth Density Plots</td></tr>
+<tr><td width="25%"><a href="dev.capabilities.html">dev.capabilities</a></td>
+<td>Query Capabilities of the Current Graphics Device</td></tr>
+<tr><td width="25%"><a href="dev.capture.html">dev.capture</a></td>
+<td>Capture device output as a raster image</td></tr>
+<tr><td width="25%"><a href="dev2.html">dev.control</a></td>
+<td>Copy Graphics Between Multiple Devices</td></tr>
+<tr><td width="25%"><a href="dev2.html">dev.copy</a></td>
+<td>Copy Graphics Between Multiple Devices</td></tr>
+<tr><td width="25%"><a href="dev2.html">dev.copy2eps</a></td>
+<td>Copy Graphics Between Multiple Devices</td></tr>
+<tr><td width="25%"><a href="dev2.html">dev.copy2pdf</a></td>
+<td>Copy Graphics Between Multiple Devices</td></tr>
+<tr><td width="25%"><a href="dev.html">dev.cur</a></td>
+<td>Control Multiple Devices</td></tr>
+<tr><td width="25%"><a href="dev.flush.html">dev.flush</a></td>
+<td>Hold or Flush Output on an On-Screen Graphics Device.</td></tr>
+<tr><td width="25%"><a href="dev.flush.html">dev.hold</a></td>
+<td>Hold or Flush Output on an On-Screen Graphics Device.</td></tr>
+<tr><td width="25%"><a href="dev.interactive.html">dev.interactive</a></td>
+<td>Is the Current Graphics Device Interactive?</td></tr>
+<tr><td width="25%"><a href="dev.html">dev.list</a></td>
+<td>Control Multiple Devices</td></tr>
+<tr><td width="25%"><a href="dev.html">dev.new</a></td>
+<td>Control Multiple Devices</td></tr>
+<tr><td width="25%"><a href="dev.html">dev.next</a></td>
+<td>Control Multiple Devices</td></tr>
+<tr><td width="25%"><a href="dev.html">dev.off</a></td>
+<td>Control Multiple Devices</td></tr>
+<tr><td width="25%"><a href="dev.html">dev.prev</a></td>
+<td>Control Multiple Devices</td></tr>
+<tr><td width="25%"><a href="dev2.html">dev.print</a></td>
+<td>Copy Graphics Between Multiple Devices</td></tr>
+<tr><td width="25%"><a href="dev.html">dev.set</a></td>
+<td>Control Multiple Devices</td></tr>
+<tr><td width="25%"><a href="dev.size.html">dev.size</a></td>
+<td>Find Size of Device Surface</td></tr>
+<tr><td width="25%"><a href="dev2bitmap.html">dev2bitmap</a></td>
+<td>Graphics Device for Bitmap Files via Ghostscript</td></tr>
+<tr><td width="25%"><a href="devAskNewPage.html">devAskNewPage</a></td>
+<td>Prompt before New Page</td></tr>
+<tr><td width="25%"><a href="Devices.html">device</a></td>
+<td>List of Graphical Devices</td></tr>
+<tr><td width="25%"><a href="dev.interactive.html">deviceIsInteractive</a></td>
+<td>Is the Current Graphics Device Interactive?</td></tr>
+<tr><td width="25%"><a href="Devices.html">Devices</a></td>
+<td>List of Graphical Devices</td></tr>
+<tr><td width="25%"><a href="plotmath.html">displaystyle</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="plotmath.html">dot</a></td>
+<td>Mathematical Annotation in R</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="embedFonts.html">embedFonts</a></td>
+<td>Embed Fonts in PostScript and PDF</td></tr>
+<tr><td width="25%"><a href="extendrange.html">extendrange</a></td>
+<td>Extend a Numerical Range by a Small Percentage</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="plotmath.html">frac</a></td>
+<td>Mathematical Annotation in R</td></tr>
+</table>
+
+<h2><a name="G">-- G --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="getGraphicsEvent.html">getGraphicsEvent</a></td>
+<td>Wait for a mouse or keyboard event from a graphics window</td></tr>
+<tr><td width="25%"><a href="getGraphicsEvent.html">getGraphicsEventEnv</a></td>
+<td>Wait for a mouse or keyboard event from a graphics window</td></tr>
+<tr><td width="25%"><a href="dev.html">graphics.off</a></td>
+<td>Control Multiple Devices</td></tr>
+<tr><td width="25%"><a href="gray.html">gray</a></td>
+<td>Gray Level Specification</td></tr>
+<tr><td width="25%"><a href="gray.colors.html">gray.colors</a></td>
+<td>Gray Color Palette</td></tr>
+<tr><td width="25%"><a href="grDevices-package.html">grDevices</a></td>
+<td>The R Graphics Devices and Support for Colours and Fonts</td></tr>
+<tr><td width="25%"><a href="gray.html">grey</a></td>
+<td>Gray Level Specification</td></tr>
+<tr><td width="25%"><a href="gray.colors.html">grey.colors</a></td>
+<td>Gray Color Palette</td></tr>
+<tr><td width="25%"><a href="plotmath.html">group</a></td>
+<td>Mathematical Annotation in R</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="plotmath.html">hat</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="hcl.html">hcl</a></td>
+<td>HCL Color Specification</td></tr>
+<tr><td width="25%"><a href="palettes.html">heat.colors</a></td>
+<td>Color Palettes</td></tr>
+<tr><td width="25%"><a href="Hershey.html">Hershey</a></td>
+<td>Hershey Vector Fonts in R</td></tr>
+<tr><td width="25%"><a href="hsv.html">hsv</a></td>
+<td>HSV Color Specification</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="plotmath.html">inf</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="plotmath.html">integral</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="as.raster.html">is.raster</a></td>
+<td>Create a Raster Object</td></tr>
+<tr><td width="25%"><a href="plotmath.html">italic</a></td>
+<td>Mathematical Annotation in R</td></tr>
+</table>
+
+<h2><a name="J">-- J --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Japanese.html">Japanese</a></td>
+<td>Japanese characters in R</td></tr>
+<tr><td width="25%"><a href="png.html">jpeg</a></td>
+<td>BMP, JPEG, PNG and TIFF graphics devices</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="make.rgb.html">make.rgb</a></td>
+<td>Create colour spaces</td></tr>
+<tr><td width="25%"><a href="msgWindow.html">msgWindow</a></td>
+<td>Manipulate a Window</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="n2mfrow.html">n2mfrow</a></td>
+<td>Compute Default mfrow From Number of Plots</td></tr>
+<tr><td width="25%"><a href="nclass.html">nclass.FD</a></td>
+<td>Compute the Number of Classes for a Histogram</td></tr>
+<tr><td width="25%"><a href="nclass.html">nclass.scott</a></td>
+<td>Compute the Number of Classes for a Histogram</td></tr>
+<tr><td width="25%"><a href="nclass.html">nclass.Sturges</a></td>
+<td>Compute the Number of Classes for a Histogram</td></tr>
+</table>
+
+<h2><a name="O">-- O --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="plotmath.html">over</a></td>
+<td>Mathematical Annotation in R</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="palette.html">palette</a></td>
+<td>Set or View the Graphics Palette</td></tr>
+<tr><td width="25%"><a href="pdf.html">pdf</a></td>
+<td>PDF Graphics Device</td></tr>
+<tr><td width="25%"><a href="pdf.options.html">pdf.options</a></td>
+<td>Auxiliary Function to Set/View Defaults for Arguments of pdf</td></tr>
+<tr><td width="25%"><a href="postscriptFonts.html">pdfFonts</a></td>
+<td>PostScript and PDF Font Families</td></tr>
+<tr><td width="25%"><a href="plotmath.html">phantom</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="pictex.html">pictex</a></td>
+<td>A PicTeX Graphics Driver</td></tr>
+<tr><td width="25%"><a href="plotmath.html">plain</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="plotmath.html">plotmath</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="png.html">png</a></td>
+<td>BMP, JPEG, PNG and TIFF graphics devices</td></tr>
+<tr><td width="25%"><a href="postscript.html">postscript</a></td>
+<td>PostScript Graphics</td></tr>
+<tr><td width="25%"><a href="postscriptFonts.html">postscriptFonts</a></td>
+<td>PostScript and PDF Font Families</td></tr>
+<tr><td width="25%"><a href="pretty.Date.html">pretty.Date</a></td>
+<td>Pretty Breakpoints for Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="pretty.Date.html">pretty.POSIXt</a></td>
+<td>Pretty Breakpoints for Date-Time Classes</td></tr>
+<tr><td width="25%"><a href="recordplot.html">print.recordedplot</a></td>
+<td>Record and Replay Plots</td></tr>
+<tr><td width="25%"><a href="windows.html">print.SavedPlots</a></td>
+<td>Windows Graphics Devices</td></tr>
+<tr><td width="25%"><a href="ps.options.html">ps.options</a></td>
+<td>Auxiliary Function to Set/View Defaults for Arguments of postscript</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="palettes.html">rainbow</a></td>
+<td>Color Palettes</td></tr>
+<tr><td width="25%"><a href="recordGraphics.html">recordGraphics</a></td>
+<td>Record Graphics Operations</td></tr>
+<tr><td width="25%"><a href="recordplot.html">recordPlot</a></td>
+<td>Record and Replay Plots</td></tr>
+<tr><td width="25%"><a href="recordplot.html">replayPlot</a></td>
+<td>Record and Replay Plots</td></tr>
+<tr><td width="25%"><a href="rgb.html">rgb</a></td>
+<td>RGB Color Specification</td></tr>
+<tr><td width="25%"><a href="rgb2hsv.html">rgb2hsv</a></td>
+<td>RGB to HSV Conversion</td></tr>
+<tr><td width="25%"><a href="plotmath.html">ring</a></td>
+<td>Mathematical Annotation in R</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="savePlot.html">savePlot</a></td>
+<td>Save Windows Plot to a File</td></tr>
+<tr><td width="25%"><a href="plotmath.html">scriptscriptstyle</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="plotmath.html">scriptstyle</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="ps.options.html">setEPS</a></td>
+<td>Auxiliary Function to Set/View Defaults for Arguments of postscript</td></tr>
+<tr><td width="25%"><a href="getGraphicsEvent.html">setGraphicsEventEnv</a></td>
+<td>Wait for a mouse or keyboard event from a graphics window</td></tr>
+<tr><td width="25%"><a href="getGraphicsEvent.html">setGraphicsEventHandlers</a></td>
+<td>Wait for a mouse or keyboard event from a graphics window</td></tr>
+<tr><td width="25%"><a href="ps.options.html">setPS</a></td>
+<td>Auxiliary Function to Set/View Defaults for Arguments of postscript</td></tr>
+<tr><td width="25%"><a href="bringToTop.html">stayOnTop</a></td>
+<td>Assign Focus to a Window</td></tr>
+<tr><td width="25%"><a href="plotmath.html">sup</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="cairo.html">svg</a></td>
+<td>Cairo-based SVG, PDF and PostScript Graphics Devices</td></tr>
+<tr><td width="25%"><a href="plotmath.html">symbol</a></td>
+<td>Mathematical Annotation in R</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="palettes.html">terrain.colors</a></td>
+<td>Color Palettes</td></tr>
+<tr><td width="25%"><a href="plotmath.html">textstyle</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="png.html">tiff</a></td>
+<td>BMP, JPEG, PNG and TIFF graphics devices</td></tr>
+<tr><td width="25%"><a href="palettes.html">topo.colors</a></td>
+<td>Color Palettes</td></tr>
+<tr><td width="25%"><a href="trans3d.html">trans3d</a></td>
+<td>3D to 2D Transformation for Perspective Plots</td></tr>
+<tr><td width="25%"><a href="Type1Font.html">Type1Font</a></td>
+<td>Type 1 and CID Fonts</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="plotmath.html">underline</a></td>
+<td>Mathematical Annotation in R</td></tr>
+</table>
+
+<h2><a name="W">-- W --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="plotmath.html">widehat</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="plotmath.html">widetilde</a></td>
+<td>Mathematical Annotation in R</td></tr>
+<tr><td width="25%"><a href="windows.html">win.graph</a></td>
+<td>Windows Graphics Devices</td></tr>
+<tr><td width="25%"><a href="windows.html">win.metafile</a></td>
+<td>Windows Graphics Devices</td></tr>
+<tr><td width="25%"><a href="windows.html">win.print</a></td>
+<td>Windows Graphics Devices</td></tr>
+<tr><td width="25%"><a href="windows.html">windows</a></td>
+<td>Windows Graphics Devices</td></tr>
+<tr><td width="25%"><a href="windows.options.html">windows.options</a></td>
+<td>Auxiliary Function to Set/View Defaults for Arguments of windows()</td></tr>
+<tr><td width="25%"><a href="windowsFonts.html">windowsFont</a></td>
+<td>Windows Fonts</td></tr>
+<tr><td width="25%"><a href="windowsFonts.html">windowsFonts</a></td>
+<td>Windows Fonts</td></tr>
+</table>
+
+<h2><a name="X">-- X --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="windows.html">X11</a></td>
+<td>Windows Graphics Devices</td></tr>
+<tr><td width="25%"><a href="windows.html">x11</a></td>
+<td>Windows Graphics Devices</td></tr>
+<tr><td width="25%"><a href="xfig.html">xfig</a></td>
+<td>XFig Graphics Device</td></tr>
+<tr><td width="25%"><a href="xy.coords.html">xy.coords</a></td>
+<td>Extracting Plotting Structures</td></tr>
+<tr><td width="25%"><a href="xyTable.html">xyTable</a></td>
+<td>Multiplicities of (x,y) Points, e.g., for a Sunflower Plot</td></tr>
+<tr><td width="25%"><a href="xyz.coords.html">xyz.coords</a></td>
+<td>Extracting Plotting Structures</td></tr>
+</table>
+
+<h2><a name="misc">-- misc --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="axisTicks.html">.axisPars</a></td>
+<td>Compute Pretty Axis Tick Scales</td></tr>
+<tr><td width="25%"><a href="postscript.html">.ps.prolog</a></td>
+<td>PostScript Graphics</td></tr>
+<tr><td width="25%"><a href="windows.html">[.SavedPlots</a></td>
+<td>Windows Graphics Devices</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/grDevices/html/R.css b/win32/deps/library/grDevices/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/grDevices/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/grDevices/icc/srgb b/win32/deps/library/grDevices/icc/srgb
new file mode 100644
index 0000000..dddee29
--- /dev/null
+++ b/win32/deps/library/grDevices/icc/srgb
@@ -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
diff --git a/win32/deps/library/grDevices/icc/srgb.flate b/win32/deps/library/grDevices/icc/srgb.flate
new file mode 100644
index 0000000..0cfd3c9
Binary files /dev/null and b/win32/deps/library/grDevices/icc/srgb.flate differ
diff --git a/win32/deps/library/grDevices/libs/i386/Rbitmap.dll b/win32/deps/library/grDevices/libs/i386/Rbitmap.dll
new file mode 100644
index 0000000..81fe79f
Binary files /dev/null and b/win32/deps/library/grDevices/libs/i386/Rbitmap.dll differ
diff --git a/win32/deps/library/grDevices/libs/i386/grDevices.dll b/win32/deps/library/grDevices/libs/i386/grDevices.dll
new file mode 100644
index 0000000..1613427
Binary files /dev/null and b/win32/deps/library/grDevices/libs/i386/grDevices.dll differ
diff --git a/win32/deps/library/grDevices/libs/i386/winCairo.dll b/win32/deps/library/grDevices/libs/i386/winCairo.dll
new file mode 100644
index 0000000..6cc542c
Binary files /dev/null and b/win32/deps/library/grDevices/libs/i386/winCairo.dll differ
diff --git a/win32/deps/library/grDevices/po/da/LC_MESSAGES/R-grDevices.mo b/win32/deps/library/grDevices/po/da/LC_MESSAGES/R-grDevices.mo
new file mode 100644
index 0000000..cf50106
Binary files /dev/null and b/win32/deps/library/grDevices/po/da/LC_MESSAGES/R-grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/da/LC_MESSAGES/grDevices.mo b/win32/deps/library/grDevices/po/da/LC_MESSAGES/grDevices.mo
new file mode 100644
index 0000000..39e67dd
Binary files /dev/null and b/win32/deps/library/grDevices/po/da/LC_MESSAGES/grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/de/LC_MESSAGES/R-grDevices.mo b/win32/deps/library/grDevices/po/de/LC_MESSAGES/R-grDevices.mo
new file mode 100644
index 0000000..a7f9cc8
Binary files /dev/null and b/win32/deps/library/grDevices/po/de/LC_MESSAGES/R-grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/de/LC_MESSAGES/grDevices.mo b/win32/deps/library/grDevices/po/de/LC_MESSAGES/grDevices.mo
new file mode 100644
index 0000000..627f580
Binary files /dev/null and b/win32/deps/library/grDevices/po/de/LC_MESSAGES/grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/en quot/LC_MESSAGES/R-grDevices.mo b/win32/deps/library/grDevices/po/en quot/LC_MESSAGES/R-grDevices.mo
new file mode 100644
index 0000000..7475752
Binary files /dev/null and b/win32/deps/library/grDevices/po/en quot/LC_MESSAGES/R-grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/en quot/LC_MESSAGES/grDevices.mo b/win32/deps/library/grDevices/po/en quot/LC_MESSAGES/grDevices.mo
new file mode 100644
index 0000000..dca1906
Binary files /dev/null and b/win32/deps/library/grDevices/po/en quot/LC_MESSAGES/grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/en_GB/LC_MESSAGES/R-grDevices.mo b/win32/deps/library/grDevices/po/en_GB/LC_MESSAGES/R-grDevices.mo
new file mode 100644
index 0000000..ac99685
Binary files /dev/null and b/win32/deps/library/grDevices/po/en_GB/LC_MESSAGES/R-grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/en_GB/LC_MESSAGES/grDevices.mo b/win32/deps/library/grDevices/po/en_GB/LC_MESSAGES/grDevices.mo
new file mode 100644
index 0000000..ac294e9
Binary files /dev/null and b/win32/deps/library/grDevices/po/en_GB/LC_MESSAGES/grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/fr/LC_MESSAGES/R-grDevices.mo b/win32/deps/library/grDevices/po/fr/LC_MESSAGES/R-grDevices.mo
new file mode 100644
index 0000000..27ae32a
Binary files /dev/null and b/win32/deps/library/grDevices/po/fr/LC_MESSAGES/R-grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/fr/LC_MESSAGES/grDevices.mo b/win32/deps/library/grDevices/po/fr/LC_MESSAGES/grDevices.mo
new file mode 100644
index 0000000..79e4cce
Binary files /dev/null and b/win32/deps/library/grDevices/po/fr/LC_MESSAGES/grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/it/LC_MESSAGES/R-grDevices.mo b/win32/deps/library/grDevices/po/it/LC_MESSAGES/R-grDevices.mo
new file mode 100644
index 0000000..71abe93
Binary files /dev/null and b/win32/deps/library/grDevices/po/it/LC_MESSAGES/R-grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/it/LC_MESSAGES/grDevices.mo b/win32/deps/library/grDevices/po/it/LC_MESSAGES/grDevices.mo
new file mode 100644
index 0000000..f6b9699
Binary files /dev/null and b/win32/deps/library/grDevices/po/it/LC_MESSAGES/grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/ja/LC_MESSAGES/R-grDevices.mo b/win32/deps/library/grDevices/po/ja/LC_MESSAGES/R-grDevices.mo
new file mode 100644
index 0000000..f37a688
Binary files /dev/null and b/win32/deps/library/grDevices/po/ja/LC_MESSAGES/R-grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/ja/LC_MESSAGES/grDevices.mo b/win32/deps/library/grDevices/po/ja/LC_MESSAGES/grDevices.mo
new file mode 100644
index 0000000..05e66ed
Binary files /dev/null and b/win32/deps/library/grDevices/po/ja/LC_MESSAGES/grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/ko/LC_MESSAGES/R-grDevices.mo b/win32/deps/library/grDevices/po/ko/LC_MESSAGES/R-grDevices.mo
new file mode 100644
index 0000000..b0bcd0a
Binary files /dev/null and b/win32/deps/library/grDevices/po/ko/LC_MESSAGES/R-grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/ko/LC_MESSAGES/grDevices.mo b/win32/deps/library/grDevices/po/ko/LC_MESSAGES/grDevices.mo
new file mode 100644
index 0000000..b249aeb
Binary files /dev/null and b/win32/deps/library/grDevices/po/ko/LC_MESSAGES/grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/pl/LC_MESSAGES/R-grDevices.mo b/win32/deps/library/grDevices/po/pl/LC_MESSAGES/R-grDevices.mo
new file mode 100644
index 0000000..3fd22f3
Binary files /dev/null and b/win32/deps/library/grDevices/po/pl/LC_MESSAGES/R-grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/pl/LC_MESSAGES/grDevices.mo b/win32/deps/library/grDevices/po/pl/LC_MESSAGES/grDevices.mo
new file mode 100644
index 0000000..6ee7b8f
Binary files /dev/null and b/win32/deps/library/grDevices/po/pl/LC_MESSAGES/grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/pt_BR/LC_MESSAGES/R-grDevices.mo b/win32/deps/library/grDevices/po/pt_BR/LC_MESSAGES/R-grDevices.mo
new file mode 100644
index 0000000..566480a
Binary files /dev/null and b/win32/deps/library/grDevices/po/pt_BR/LC_MESSAGES/R-grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/pt_BR/LC_MESSAGES/grDevices.mo b/win32/deps/library/grDevices/po/pt_BR/LC_MESSAGES/grDevices.mo
new file mode 100644
index 0000000..edae9c4
Binary files /dev/null and b/win32/deps/library/grDevices/po/pt_BR/LC_MESSAGES/grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/ru/LC_MESSAGES/R-grDevices.mo b/win32/deps/library/grDevices/po/ru/LC_MESSAGES/R-grDevices.mo
new file mode 100644
index 0000000..fbbb214
Binary files /dev/null and b/win32/deps/library/grDevices/po/ru/LC_MESSAGES/R-grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/ru/LC_MESSAGES/grDevices.mo b/win32/deps/library/grDevices/po/ru/LC_MESSAGES/grDevices.mo
new file mode 100644
index 0000000..703e97b
Binary files /dev/null and b/win32/deps/library/grDevices/po/ru/LC_MESSAGES/grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/zh_CN/LC_MESSAGES/R-grDevices.mo b/win32/deps/library/grDevices/po/zh_CN/LC_MESSAGES/R-grDevices.mo
new file mode 100644
index 0000000..b1365b8
Binary files /dev/null and b/win32/deps/library/grDevices/po/zh_CN/LC_MESSAGES/R-grDevices.mo differ
diff --git a/win32/deps/library/grDevices/po/zh_CN/LC_MESSAGES/grDevices.mo b/win32/deps/library/grDevices/po/zh_CN/LC_MESSAGES/grDevices.mo
new file mode 100644
index 0000000..17da4e4
Binary files /dev/null and b/win32/deps/library/grDevices/po/zh_CN/LC_MESSAGES/grDevices.mo differ
diff --git a/win32/deps/library/grDevices/tests/ps-tests.R b/win32/deps/library/grDevices/tests/ps-tests.R
new file mode 100644
index 0000000..e504010
--- /dev/null
+++ b/win32/deps/library/grDevices/tests/ps-tests.R
@@ -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")
diff --git a/win32/deps/library/grDevices/tests/ps-tests.Rout.save b/win32/deps/library/grDevices/tests/ps-tests.Rout.save
new file mode 100644
index 0000000..105f699
--- /dev/null
+++ b/win32/deps/library/grDevices/tests/ps-tests.Rout.save
@@ -0,0 +1,95 @@
+
+R : Copyright 2005, The R Foundation for Statistical Computing
+Version 2.3.0 Under development (unstable) (2005-11-06 r36200)
+ISBN 3-900051-07-0
+
+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 a 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")
+> 
diff --git a/win32/deps/library/grDevices/tests/xfig-tests.R b/win32/deps/library/grDevices/tests/xfig-tests.R
new file mode 100644
index 0000000..798ccad
--- /dev/null
+++ b/win32/deps/library/grDevices/tests/xfig-tests.R
@@ -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")
+
diff --git a/win32/deps/library/grDevices/tests/xfig-tests.Rout.save b/win32/deps/library/grDevices/tests/xfig-tests.Rout.save
new file mode 100644
index 0000000..91af2f6
--- /dev/null
+++ b/win32/deps/library/grDevices/tests/xfig-tests.Rout.save
@@ -0,0 +1,102 @@
+
+R version 2.9.0 Under development (unstable) (2009-01-21 r47661)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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")
+> 
+> 
diff --git a/win32/deps/library/graphics/DESCRIPTION b/win32/deps/library/graphics/DESCRIPTION
index c0f8ce0..19c169a 100644
--- a/win32/deps/library/graphics/DESCRIPTION
+++ b/win32/deps/library/graphics/DESCRIPTION
@@ -1,10 +1,10 @@
 Package: graphics
-Version: 2.9.2
+Version: 2.15.2
 Priority: base
 Title: The R Graphics Package
-Author: R Development Core Team and contributors worldwide
+Author: R Core Team and contributors worldwide
 Maintainer: R Core Team <R-core r-project org>
 Description: R functions for base graphics
 Imports: grDevices
-License: Part of R 2.9.2
-Built: R 2.9.2; ; 2009-08-24 12:44:02 UTC; windows
+License: Part of R 2.15.2
+Built: R 2.15.2; ; 2012-10-27 03:05:59 UTC; windows
diff --git a/win32/deps/library/graphics/INDEX b/win32/deps/library/graphics/INDEX
index bae46f9..bcc52dc 100644
--- a/win32/deps/library/graphics/INDEX
+++ b/win32/deps/library/graphics/INDEX
@@ -1,4 +1,4 @@
-Axis                    Generic function to add an Axis to a Plot
+Axis                    Generic Function to Add an Axis to a Plot
 abline                  Add Straight Lines to a Plot
 arrows                  Add Arrows to a Plot
 assocplot               Association Plots
@@ -16,7 +16,7 @@ clip                    Set Clipping Region
 contour                 Display Contours
 coplot                  Conditioning Plots
 curve                   Draw Function Plots
-dotchart                Cleveland Dot Plots
+dotchart                Cleveland's Dot Plots
 filled.contour          Level (Contour) Plots
 fourfoldplot            Fourfold Plots
 frame                   Create / Start a New Plot Frame
@@ -42,7 +42,7 @@ pie                     Pie Charts
 plot                    Generic X-Y Plotting
 plot.data.frame         Plot Method for Data Frames
 plot.default            The Default Scatterplot Function
-plot.design             Plot Univariate Effects of a 'Design' or Model
+plot.design             Plot Univariate Effects of a Design or Model
 plot.factor             Plotting Factor Variables
 plot.formula            Formula Notation for Scatterplots
 plot.histogram          Plot Histograms
@@ -51,6 +51,8 @@ plot.window             Set up World Coordinates for Graphics Window
 plot.xy                 Basic Internal Plot Function
 points                  Add Points to a Plot
 polygon                 Polygon Drawing
+polypath                Path Drawing
+rasterImage             Draw One or More Raster Images
 rect                    Draw One or More Rectangles
 rug                     Add a Rug to a Plot
 screen                  Creating and Controlling Multiple Screens on a
@@ -66,7 +68,7 @@ strwidth                Plotting Dimensions of Character Strings and
                         Math Expressions
 sunflowerplot           Produce a Sunflower Scatter Plot
 symbols                 Draw Symbols (Circles, Squares, Stars,
-                        Thermometers, Boxplots) on a Plot
+                        Thermometers, Boxplots)
 text                    Add Text to a Plot
 title                   Plot Annotation
 xinch                   Graphical Units
diff --git a/win32/deps/library/graphics/Meta/Rd.rds b/win32/deps/library/graphics/Meta/Rd.rds
index 6997ecd..564f9cc 100644
Binary files a/win32/deps/library/graphics/Meta/Rd.rds and b/win32/deps/library/graphics/Meta/Rd.rds differ
diff --git a/win32/deps/library/graphics/Meta/demo.rds b/win32/deps/library/graphics/Meta/demo.rds
index afe1d71..16c136b 100644
Binary files a/win32/deps/library/graphics/Meta/demo.rds and b/win32/deps/library/graphics/Meta/demo.rds differ
diff --git a/win32/deps/library/graphics/Meta/hsearch.rds b/win32/deps/library/graphics/Meta/hsearch.rds
index 700f64a..0034a0e 100644
Binary files a/win32/deps/library/graphics/Meta/hsearch.rds and b/win32/deps/library/graphics/Meta/hsearch.rds differ
diff --git a/win32/deps/library/graphics/Meta/links.rds b/win32/deps/library/graphics/Meta/links.rds
new file mode 100644
index 0000000..dc8a3a6
Binary files /dev/null and b/win32/deps/library/graphics/Meta/links.rds differ
diff --git a/win32/deps/library/graphics/Meta/nsInfo.rds b/win32/deps/library/graphics/Meta/nsInfo.rds
index 4cf71e5..20fa967 100644
Binary files a/win32/deps/library/graphics/Meta/nsInfo.rds and b/win32/deps/library/graphics/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/graphics/Meta/package.rds b/win32/deps/library/graphics/Meta/package.rds
index d89fbe9..d3f7bc6 100644
Binary files a/win32/deps/library/graphics/Meta/package.rds and b/win32/deps/library/graphics/Meta/package.rds differ
diff --git a/win32/deps/library/graphics/NAMESPACE b/win32/deps/library/graphics/NAMESPACE
index 54f7343..e5b30f1 100644
--- a/win32/deps/library/graphics/NAMESPACE
+++ b/win32/deps/library/graphics/NAMESPACE
@@ -8,10 +8,11 @@ export(abline, arrows, assocplot, axTicks, Axis, axis, axis.Date,
        image, layout, layout.show, lcm, legend, lines, lines.default,
        locator, matlines, matplot, matpoints, mosaicplot, mtext,
        pairs, panel.smooth, par, persp, pie, plot, plot.design,
-       plot.new, plot.window, plot.xy, points, polygon, rect, rug,
-       screen, segments, smoothScatter, spineplot, split.screen, stars, stem,
-       strheight, stripchart, strwidth, sunflowerplot, symbols, text,
-       title, xinch, xspline, xyinch, yinch)
+       plot.function, plot.new, plot.window, plot.xy, points, polygon,
+       polypath, rasterImage, rect, rug, screen, segments,
+       smoothScatter, spineplot, split.screen, stars, stem, strheight,
+       stripchart, strwidth, sunflowerplot, symbols, text, title,
+       xinch, xspline, xyinch, yinch, .filled.contour)
 
 # leave most of the default methods visible as people seem to call them.
 export(barplot.default, boxplot.default, boxplot.matrix,
@@ -23,8 +24,8 @@ export(piechart)
 
 S3method(Axis, default)
 S3method(Axis, Date)
-S3method(Axis, POSIXct)
-S3method(Axis, POSIXlt)
+S3method(Axis, POSIXt)
+S3method(Axis, table)
 S3method(barplot, default)
 S3method(boxplot, default)
 S3method(boxplot, formula)
@@ -39,24 +40,27 @@ S3method(image, default)
 S3method(lines, default)
 S3method(lines, formula)
 S3method(lines, histogram)
+S3method(lines, table)
 S3method(mosaicplot, default)
 S3method(mosaicplot, formula)
 S3method(pairs, default)
 S3method(pairs, formula)
 S3method(persp, default)
 S3method(plot, data.frame)
-S3method(plot, Date)
 S3method(plot, default)
 S3method(plot, factor)
 S3method(plot, formula)
+S3method(plot, "function")
 S3method(plot, histogram)
-S3method(plot, POSIXct)
-S3method(plot, POSIXlt)
 S3method(plot, table)
 S3method(points, default)
 S3method(points, formula)
+S3method(points, table)
 S3method(spineplot, default)
 S3method(spineplot, formula)
 S3method(stripchart, default)
 S3method(stripchart, formula)
+S3method(sunflowerplot, default)
+S3method(sunflowerplot, formula)
 S3method(text, default)
+S3method(text, formula)
diff --git a/win32/deps/library/graphics/R/graphics b/win32/deps/library/graphics/R/graphics
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/graphics/R/graphics
+++ b/win32/deps/library/graphics/R/graphics
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/graphics/R/graphics.rdb b/win32/deps/library/graphics/R/graphics.rdb
index c62aa12..9c68f1c 100644
Binary files a/win32/deps/library/graphics/R/graphics.rdb and b/win32/deps/library/graphics/R/graphics.rdb differ
diff --git a/win32/deps/library/graphics/R/graphics.rdx b/win32/deps/library/graphics/R/graphics.rdx
index 5fdbbe9..f1d415c 100644
Binary files a/win32/deps/library/graphics/R/graphics.rdx and b/win32/deps/library/graphics/R/graphics.rdx differ
diff --git a/win32/deps/library/graphics/demo/Hershey.R b/win32/deps/library/graphics/demo/Hershey.R
index 7abf001..4785069 100644
--- a/win32/deps/library/graphics/demo/Hershey.R
+++ b/win32/deps/library/graphics/demo/Hershey.R
@@ -1,3 +1,5 @@
+#  Copyright (C) 2003-2009 The R Core Team
+
 #### --- Hershey Vector Fonts ---
 
 require(grDevices); require(graphics)
diff --git a/win32/deps/library/graphics/demo/Japanese.R b/win32/deps/library/graphics/demo/Japanese.R
index 9ff591e..8cbfc4c 100644
--- a/win32/deps/library/graphics/demo/Japanese.R
+++ b/win32/deps/library/graphics/demo/Japanese.R
@@ -1,3 +1,5 @@
+#  Copyright (C) 2003-2009 The R Core Team
+
 require(grDevices); require(graphics)
 
 ## --- Japanese characters in the Hershey Vector Fonts
diff --git a/win32/deps/library/graphics/demo/graphics.R b/win32/deps/library/graphics/demo/graphics.R
index 612e173..009a8ac 100644
--- a/win32/deps/library/graphics/demo/graphics.R
+++ b/win32/deps/library/graphics/demo/graphics.R
@@ -1,3 +1,5 @@
+#  Copyright (C) 1997-2009 The R Core Team
+
 require(datasets)
 require(grDevices); require(graphics)
 
diff --git a/win32/deps/library/graphics/demo/image.R b/win32/deps/library/graphics/demo/image.R
index dc1aadd..4b23bd9 100644
--- a/win32/deps/library/graphics/demo/image.R
+++ b/win32/deps/library/graphics/demo/image.R
@@ -1,3 +1,5 @@
+#  Copyright (C) 1997-2009 The R Core Team
+
 require(datasets)
 require(grDevices); require(graphics)
 
diff --git a/win32/deps/library/graphics/demo/persp.R b/win32/deps/library/graphics/demo/persp.R
index 5db28cb..0c7295e 100644
--- a/win32/deps/library/graphics/demo/persp.R
+++ b/win32/deps/library/graphics/demo/persp.R
@@ -7,7 +7,7 @@ require(grDevices); require(graphics)
 ## (1) The Obligatory Mathematical surface.
 ##     Rotated sinc function.
 
-x <- seq(-10, 10, length = 50)
+x <- seq(-10, 10, length.out = 50)
 y <- x
 rotsinc <- function(x,y)
 {
@@ -49,7 +49,7 @@ z <- rbind(z0, cbind(z0, z, z0), z0)
 x <- c(min(x) - 1e-10, x, max(x) + 1e-10)
 y <- c(min(y) - 1e-10, y, max(y) + 1e-10)
 
-fill <- matrix("green3", nr = nrow(z)-1, nc = ncol(z)-1)
+fill <- matrix("green3", nrow = nrow(z)-1, ncol = ncol(z)-1)
 fill[ , i2 <- c(1,ncol(fill))] <- "gray"
 fill[i1 <- c(1,nrow(fill)) , ] <- "gray"
 
@@ -75,7 +75,8 @@ fcol <- fill
 zi <- volcano[ -1,-1] + volcano[ -1,-61] +
            volcano[-87,-1] + volcano[-87,-61]  ## / 4
 fcol[-i1,-i2] <-
-    terrain.colors(20)[cut(zi, stats::quantile(zi, seq(0,1, len = 21)),
+    terrain.colors(20)[cut(zi,
+                           stats::quantile(zi, seq(0,1, length.out = 21)),
                            include.lowest = TRUE)]
 persp(x, y, 2*z, theta = 110, phi = 40, col = fcol, scale = FALSE,
       ltheta = -120, shade = 0.4, border = NA, box = FALSE)
diff --git a/win32/deps/library/graphics/demo/plotmath.R b/win32/deps/library/graphics/demo/plotmath.R
index a758667..b1be384 100644
--- a/win32/deps/library/graphics/demo/plotmath.R
+++ b/win32/deps/library/graphics/demo/plotmath.R
@@ -1,3 +1,5 @@
+#  Copyright (C) 2002-2009 The R Core Team
+
 require(datasets)
 require(grDevices); require(graphics)
 
diff --git a/win32/deps/library/graphics/help/AnIndex b/win32/deps/library/graphics/help/AnIndex
index 2619489..b699f24 100644
--- a/win32/deps/library/graphics/help/AnIndex
+++ b/win32/deps/library/graphics/help/AnIndex
@@ -1,4 +1,5 @@
 graphics-package	graphics-package
+.filled.contour	filled.contour
 .Pars	par
 abline	abline
 arrows	arrows
@@ -33,6 +34,8 @@ erase.screen	screen
 filled.contour	filled.contour
 fourfoldplot	fourfoldplot
 frame	frame
+graphical parameter	par
+graphical parameters	par
 graphics	graphics-package
 graphics-defunct	graphics-defunct
 grconvertX	convertXY
@@ -52,8 +55,9 @@ lcm	layout
 legend	legend
 lines	lines
 lines.default	lines
-lines.formula	plotformula
+lines.formula	plot.formula
 lines.histogram	plothistogram
+lines.table	plot.table
 locator	locator
 matlines	matplot
 matplot	matplot
@@ -74,28 +78,28 @@ pie	pie
 piechart	graphics-defunct
 plot	plot
 plot.data.frame	plot.dataframe
-plot.Date	axis.POSIXct
-plot.default	plotdefault
+plot.default	plot.default
 plot.design	plot.design
-plot.factor	plotfactor
-plot.formula	plotformula
+plot.factor	plot.factor
+plot.formula	plot.formula
 plot.function	curve
 plot.histogram	plothistogram
 plot.new	frame
-plot.POSIXct	axis.POSIXct
-plot.POSIXlt	axis.POSIXct
 plot.table	plot.table
 plot.window	plot.window
 plot.xy	plot.xy
 points	points
 points.default	points
-points.formula	plotformula
+points.formula	plot.formula
+points.table	plot.table
 polygon	polygon
+polypath	polypath
+rasterImage	rasterImage
 rect	rect
 rug	rug
 screen	screen
 segments	segments
-smoothScatter	smoothscatter
+smoothScatter	smoothScatter
 spineplot	spineplot
 spineplot.default	spineplot
 spineplot.formula	spineplot
@@ -109,9 +113,12 @@ stripchart.formula	stripchart
 stripplot	graphics-defunct
 strwidth	strwidth
 sunflowerplot	sunflowerplot
+sunflowerplot.default	sunflowerplot
+sunflowerplot.formula	sunflowerplot
 symbols	symbols
 text	text
 text.default	text
+text.formula	plot.formula
 title	title
 xinch	units
 xlim	plot.window
diff --git a/win32/deps/library/graphics/help/aliases.rds b/win32/deps/library/graphics/help/aliases.rds
new file mode 100644
index 0000000..53baa5f
Binary files /dev/null and b/win32/deps/library/graphics/help/aliases.rds differ
diff --git a/win32/deps/library/graphics/help/figures/mai.pdf b/win32/deps/library/graphics/help/figures/mai.pdf
new file mode 100644
index 0000000..eccb58a
Binary files /dev/null and b/win32/deps/library/graphics/help/figures/mai.pdf differ
diff --git a/win32/deps/library/graphics/help/figures/mai.png b/win32/deps/library/graphics/help/figures/mai.png
new file mode 100644
index 0000000..c0cbb9a
Binary files /dev/null and b/win32/deps/library/graphics/help/figures/mai.png differ
diff --git a/win32/deps/library/graphics/help/figures/oma.pdf b/win32/deps/library/graphics/help/figures/oma.pdf
new file mode 100644
index 0000000..6ad1d18
Binary files /dev/null and b/win32/deps/library/graphics/help/figures/oma.pdf differ
diff --git a/win32/deps/library/graphics/help/figures/oma.png b/win32/deps/library/graphics/help/figures/oma.png
new file mode 100644
index 0000000..f212cec
Binary files /dev/null and b/win32/deps/library/graphics/help/figures/oma.png differ
diff --git a/win32/deps/library/graphics/help/figures/pch.pdf b/win32/deps/library/graphics/help/figures/pch.pdf
new file mode 100644
index 0000000..ccbb92b
Binary files /dev/null and b/win32/deps/library/graphics/help/figures/pch.pdf differ
diff --git a/win32/deps/library/graphics/help/figures/pch.png b/win32/deps/library/graphics/help/figures/pch.png
new file mode 100644
index 0000000..9706e86
Binary files /dev/null and b/win32/deps/library/graphics/help/figures/pch.png differ
diff --git a/win32/deps/library/graphics/help/figures/pch.svg b/win32/deps/library/graphics/help/figures/pch.svg
new file mode 100644
index 0000000..5df8da5
--- /dev/null
+++ b/win32/deps/library/graphics/help/figures/pch.svg
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; width="504pt" height="50pt" viewBox="0 0 504 50" version="1.1">
+<defs>
+<g>
+<symbol overflow="visible" id="glyph0-0">
+<path style="stroke: none;" d="M 0.1875 0 L 0.1875 -4.296875 L 3.609375 -4.296875 L 3.609375 0 L 0.1875 0 Z M 3.078125 -0.546875 L 3.078125 -3.765625 L 0.734375 -3.765625 L 0.734375 -0.546875 L 3.078125 -0.546875 Z M 3.078125 -0.546875 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-1">
+<path style="stroke: none;" d="M 1.625 -4.203125 C 2.164062 -4.203125 2.554688 -3.976562 2.796875 -3.53125 C 2.984375 -3.175781 3.078125 -2.703125 3.078125 -2.109375 C 3.078125 -1.535156 2.992188 -1.0625 2.828125 -0.6875 C 2.578125 -0.15625 2.175781 0.109375 1.625 0.109375 C 1.113281 0.109375 0.738281 -0.109375 0.5 -0.546875 C 0.289062 -0.910156 0.1875 -1.398438 0.1875 -2.015625 C 0.1875 -2.492188 0.25 -2.898438 0.375 -3.234375 C 0.601562 -3.878906 1.019531 -4.203125 1.625 -4.203125 Z M 1.625 -0.359375 C 1.894531 -0.359375 2.109375 -0.476562 2.265625 -0.71875 C 2.429688 -0.96875 2.515625 -1.421875 2.515625 -2.078125 C 2.515625 -2.554688 2.453125 -2.945312 2.328125 -3.25 C 2.210938 -3.5625 1.988281 -3.71875 1.65625 -3.71875 C 1.34375 -3.71875 1.113281 -3.570312 0.96875 -3.28125 C 0.832031 -2.988281 0.765625 -2.5625 0.765625 -2 C 0.765625 -1.5625 0.804688 -1.21875 0.890625 -0.96875 C 1.035156 -0.5625 1.28125 -0.359375 1.625 -0.359375 Z M 1.625 -0.359375 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-2">
+<path style="stroke: none;" d="M 0.578125 -2.96875 L 0.578125 -3.375 C 0.953125 -3.414062 1.210938 -3.476562 1.359375 -3.5625 C 1.515625 -3.644531 1.628906 -3.847656 1.703125 -4.171875 L 2.125 -4.171875 L 2.125 0 L 1.5625 0 L 1.5625 -2.96875 L 0.578125 -2.96875 Z M 0.578125 -2.96875 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-3">
+<path style="stroke: none;" d="M 0.1875 0 C 0.207031 -0.363281 0.28125 -0.675781 0.40625 -0.9375 C 0.539062 -1.207031 0.796875 -1.453125 1.171875 -1.671875 L 1.734375 -2 C 1.984375 -2.144531 2.160156 -2.269531 2.265625 -2.375 C 2.421875 -2.53125 2.5 -2.71875 2.5 -2.9375 C 2.5 -3.175781 2.425781 -3.367188 2.28125 -3.515625 C 2.132812 -3.660156 1.941406 -3.734375 1.703125 -3.734375 C 1.335938 -3.734375 1.085938 -3.59375 0.953125 -3.3125 C 0.878906 -3.164062 0.835938 -2.960938 0.828125 -2.703125 L 0.296875 -2.703125 C 0.296875 -3.066406 0.363281 -3.363281 0.5 -3.59375 C 0.71875 -4 1.117188 -4.203125 1.703125 -4.203125 C 2.179688 -4.203125 2.53125 -4.070312 2.75 -3.8125 C 2.976562 -3.5625 3.09375 -3.273438 3.09375 -2.953125 C 3.09375 -2.617188 2.972656 -2.332031 2.734375 -2.09375 C 2.597656 -1.957031 2.351562 -1.789062 2 -1.59375 L 1.59375 -1.359375 C 1.40625 -1.253906 1.253906 -1.15625 1.140625 -1.0625 C 0.953125 -0.894531 0.832031 -0.707031 0.78125 -0.5 L 3.0625 -0.5 L 3.0625 
 0 L 0.1875 0 Z M 0.1875 0 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-4">
+<path style="stroke: none;" d="M 1.5625 0.109375 C 1.0625 0.109375 0.695312 -0.0234375 0.46875 -0.296875 C 0.25 -0.566406 0.140625 -0.898438 0.140625 -1.296875 L 0.6875 -1.296875 C 0.71875 -1.015625 0.769531 -0.816406 0.84375 -0.703125 C 0.976562 -0.472656 1.226562 -0.359375 1.59375 -0.359375 C 1.863281 -0.359375 2.082031 -0.429688 2.25 -0.578125 C 2.425781 -0.734375 2.515625 -0.925781 2.515625 -1.15625 C 2.515625 -1.445312 2.425781 -1.648438 2.25 -1.765625 C 2.070312 -1.878906 1.820312 -1.9375 1.5 -1.9375 C 1.46875 -1.9375 1.429688 -1.9375 1.390625 -1.9375 C 1.359375 -1.9375 1.328125 -1.9375 1.296875 -1.9375 L 1.296875 -2.40625 C 1.347656 -2.394531 1.390625 -2.390625 1.421875 -2.390625 C 1.460938 -2.390625 1.503906 -2.390625 1.546875 -2.390625 C 1.742188 -2.390625 1.90625 -2.421875 2.03125 -2.484375 C 2.257812 -2.585938 2.375 -2.78125 2.375 -3.0625 C 2.375 -3.269531 2.296875 -3.429688 2.140625 -3.546875 C 1.992188 -3.660156 1.820312 -3.71875 1.625 -3.71875 C 1.269531 -3.718
 75 1.023438 -3.601562 0.890625 -3.375 C 0.816406 -3.238281 0.773438 -3.050781 0.765625 -2.8125 L 0.25 -2.8125 C 0.25 -3.125 0.3125 -3.390625 0.4375 -3.609375 C 0.65625 -4.003906 1.035156 -4.203125 1.578125 -4.203125 C 2.003906 -4.203125 2.332031 -4.101562 2.5625 -3.90625 C 2.800781 -3.71875 2.921875 -3.445312 2.921875 -3.09375 C 2.921875 -2.832031 2.847656 -2.625 2.703125 -2.46875 C 2.617188 -2.363281 2.507812 -2.285156 2.375 -2.234375 C 2.59375 -2.171875 2.765625 -2.050781 2.890625 -1.875 C 3.015625 -1.707031 3.078125 -1.5 3.078125 -1.25 C 3.078125 -0.84375 2.941406 -0.515625 2.671875 -0.265625 C 2.410156 -0.015625 2.039062 0.109375 1.5625 0.109375 Z M 1.5625 0.109375 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-5">
+<path style="stroke: none;" d="M 1.984375 -1.484375 L 1.984375 -3.390625 L 0.640625 -1.484375 L 1.984375 -1.484375 Z M 2 0 L 2 -1.03125 L 0.15625 -1.03125 L 0.15625 -1.546875 L 2.078125 -4.203125 L 2.515625 -4.203125 L 2.515625 -1.484375 L 3.140625 -1.484375 L 3.140625 -1.03125 L 2.515625 -1.03125 L 2.515625 0 L 2 0 Z M 2 0 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-6">
+<path style="stroke: none;" d="M 0.734375 -1.0625 C 0.773438 -0.769531 0.914062 -0.566406 1.15625 -0.453125 C 1.28125 -0.390625 1.425781 -0.359375 1.59375 -0.359375 C 1.90625 -0.359375 2.132812 -0.457031 2.28125 -0.65625 C 2.4375 -0.851562 2.515625 -1.070312 2.515625 -1.3125 C 2.515625 -1.613281 2.425781 -1.84375 2.25 -2 C 2.070312 -2.15625 1.859375 -2.234375 1.609375 -2.234375 C 1.421875 -2.234375 1.257812 -2.195312 1.125 -2.125 C 1 -2.0625 0.890625 -1.96875 0.796875 -1.84375 L 0.34375 -1.859375 L 0.671875 -4.125 L 2.84375 -4.125 L 2.84375 -3.609375 L 1.0625 -3.609375 L 0.875 -2.453125 C 0.976562 -2.523438 1.070312 -2.578125 1.15625 -2.609375 C 1.3125 -2.679688 1.492188 -2.71875 1.703125 -2.71875 C 2.085938 -2.71875 2.410156 -2.59375 2.671875 -2.34375 C 2.941406 -2.09375 3.078125 -1.773438 3.078125 -1.390625 C 3.078125 -0.992188 2.953125 -0.644531 2.703125 -0.34375 C 2.460938 -0.0390625 2.078125 0.109375 1.546875 0.109375 C 1.203125 0.109375 0.894531 0.015625 0.625 -0.17187
 5 C 0.363281 -0.367188 0.21875 -0.664062 0.1875 -1.0625 L 0.734375 -1.0625 Z M 0.734375 -1.0625 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-7">
+<path style="stroke: none;" d="M 1.75 -4.21875 C 2.21875 -4.21875 2.546875 -4.09375 2.734375 -3.84375 C 2.921875 -3.601562 3.015625 -3.351562 3.015625 -3.09375 L 2.484375 -3.09375 C 2.453125 -3.257812 2.40625 -3.390625 2.34375 -3.484375 C 2.21875 -3.660156 2.023438 -3.75 1.765625 -3.75 C 1.472656 -3.75 1.238281 -3.613281 1.0625 -3.34375 C 0.882812 -3.070312 0.785156 -2.679688 0.765625 -2.171875 C 0.890625 -2.347656 1.046875 -2.476562 1.234375 -2.5625 C 1.398438 -2.644531 1.585938 -2.6875 1.796875 -2.6875 C 2.140625 -2.6875 2.441406 -2.570312 2.703125 -2.34375 C 2.972656 -2.125 3.109375 -1.789062 3.109375 -1.34375 C 3.109375 -0.96875 2.984375 -0.628906 2.734375 -0.328125 C 2.484375 -0.0351562 2.128906 0.109375 1.671875 0.109375 C 1.273438 0.109375 0.929688 -0.0351562 0.640625 -0.328125 C 0.359375 -0.628906 0.21875 -1.132812 0.21875 -1.84375 C 0.21875 -2.363281 0.285156 -2.804688 0.421875 -3.171875 C 0.660156 -3.867188 1.101562 -4.21875 1.75 -4.21875 Z M 1.71875 -0.359375 C 2 
 -0.359375 2.207031 -0.453125 2.34375 -0.640625 C 2.476562 -0.828125 2.546875 -1.046875 2.546875 -1.296875 C 2.546875 -1.515625 2.484375 -1.71875 2.359375 -1.90625 C 2.234375 -2.101562 2.007812 -2.203125 1.6875 -2.203125 C 1.457031 -2.203125 1.257812 -2.125 1.09375 -1.96875 C 0.925781 -1.820312 0.84375 -1.597656 0.84375 -1.296875 C 0.84375 -1.035156 0.914062 -0.8125 1.0625 -0.625 C 1.21875 -0.445312 1.4375 -0.359375 1.71875 -0.359375 Z M 1.71875 -0.359375 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-8">
+<path style="stroke: none;" d="M 3.140625 -4.125 L 3.140625 -3.671875 C 3.003906 -3.535156 2.820312 -3.304688 2.59375 -2.984375 C 2.375 -2.660156 2.175781 -2.3125 2 -1.9375 C 1.832031 -1.570312 1.707031 -1.238281 1.625 -0.9375 C 1.5625 -0.738281 1.488281 -0.425781 1.40625 0 L 0.8125 0 C 0.945312 -0.800781 1.242188 -1.597656 1.703125 -2.390625 C 1.960938 -2.859375 2.242188 -3.257812 2.546875 -3.59375 L 0.21875 -3.59375 L 0.21875 -4.125 L 3.140625 -4.125 Z M 3.140625 -4.125 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-9">
+<path style="stroke: none;" d="M 1.625 -2.4375 C 1.863281 -2.4375 2.046875 -2.5 2.171875 -2.625 C 2.304688 -2.757812 2.375 -2.914062 2.375 -3.09375 C 2.375 -3.25 2.3125 -3.390625 2.1875 -3.515625 C 2.0625 -3.648438 1.867188 -3.71875 1.609375 -3.71875 C 1.359375 -3.71875 1.175781 -3.648438 1.0625 -3.515625 C 0.945312 -3.390625 0.890625 -3.238281 0.890625 -3.0625 C 0.890625 -2.863281 0.960938 -2.707031 1.109375 -2.59375 C 1.253906 -2.488281 1.425781 -2.4375 1.625 -2.4375 Z M 1.671875 -0.359375 C 1.910156 -0.359375 2.109375 -0.421875 2.265625 -0.546875 C 2.429688 -0.679688 2.515625 -0.882812 2.515625 -1.15625 C 2.515625 -1.425781 2.429688 -1.628906 2.265625 -1.765625 C 2.097656 -1.910156 1.882812 -1.984375 1.625 -1.984375 C 1.375 -1.984375 1.164062 -1.910156 1 -1.765625 C 0.84375 -1.617188 0.765625 -1.421875 0.765625 -1.171875 C 0.765625 -0.953125 0.835938 -0.757812 0.984375 -0.59375 C 1.128906 -0.4375 1.359375 -0.359375 1.671875 -0.359375 Z M 0.921875 -2.234375 C 0.765625 -2.2
 96875 0.648438 -2.367188 0.578125 -2.453125 C 0.421875 -2.609375 0.34375 -2.8125 0.34375 -3.0625 C 0.34375 -3.375 0.453125 -3.640625 0.671875 -3.859375 C 0.898438 -4.085938 1.222656 -4.203125 1.640625 -4.203125 C 2.046875 -4.203125 2.363281 -4.097656 2.59375 -3.890625 C 2.820312 -3.679688 2.9375 -3.429688 2.9375 -3.140625 C 2.9375 -2.878906 2.867188 -2.671875 2.734375 -2.515625 C 2.660156 -2.421875 2.546875 -2.328125 2.390625 -2.234375 C 2.566406 -2.160156 2.703125 -2.070312 2.796875 -1.96875 C 2.984375 -1.769531 3.078125 -1.515625 3.078125 -1.203125 C 3.078125 -0.835938 2.953125 -0.523438 2.703125 -0.265625 C 2.453125 -0.00390625 2.101562 0.125 1.65625 0.125 C 1.25 0.125 0.898438 0.015625 0.609375 -0.203125 C 0.328125 -0.429688 0.1875 -0.753906 0.1875 -1.171875 C 0.1875 -1.421875 0.25 -1.632812 0.375 -1.8125 C 0.5 -2 0.679688 -2.140625 0.921875 -2.234375 Z M 0.921875 -2.234375 "/>
+</symbol>
+<symbol overflow="visible" id="glyph0-10">
+<path style="stroke: none;" d="M 0.796875 -1.015625 C 0.816406 -0.722656 0.929688 -0.519531 1.140625 -0.40625 C 1.242188 -0.351562 1.363281 -0.328125 1.5 -0.328125 C 1.75 -0.328125 1.960938 -0.429688 2.140625 -0.640625 C 2.316406 -0.847656 2.441406 -1.273438 2.515625 -1.921875 C 2.398438 -1.734375 2.253906 -1.597656 2.078125 -1.515625 C 1.910156 -1.441406 1.726562 -1.40625 1.53125 -1.40625 C 1.125 -1.40625 0.800781 -1.53125 0.5625 -1.78125 C 0.332031 -2.039062 0.21875 -2.367188 0.21875 -2.765625 C 0.21875 -3.140625 0.332031 -3.472656 0.5625 -3.765625 C 0.789062 -4.054688 1.132812 -4.203125 1.59375 -4.203125 C 2.207031 -4.203125 2.628906 -3.925781 2.859375 -3.375 C 2.984375 -3.070312 3.046875 -2.691406 3.046875 -2.234375 C 3.046875 -1.722656 2.96875 -1.269531 2.8125 -0.875 C 2.5625 -0.207031 2.128906 0.125 1.515625 0.125 C 1.109375 0.125 0.796875 0.015625 0.578125 -0.203125 C 0.367188 -0.421875 0.265625 -0.691406 0.265625 -1.015625 L 0.796875 -1.015625 Z M 1.59375 -1.875 C 1.
 800781 -1.875 1.988281 -1.941406 2.15625 -2.078125 C 2.332031 -2.210938 2.421875 -2.453125 2.421875 -2.796875 C 2.421875 -3.109375 2.34375 -3.335938 2.1875 -3.484375 C 2.039062 -3.640625 1.847656 -3.71875 1.609375 -3.71875 C 1.347656 -3.71875 1.140625 -3.628906 0.984375 -3.453125 C 0.835938 -3.285156 0.765625 -3.054688 0.765625 -2.765625 C 0.765625 -2.492188 0.828125 -2.273438 0.953125 -2.109375 C 1.085938 -1.953125 1.300781 -1.875 1.59375 -1.875 Z M 1.59375 -1.875 "/>
+</symbol>
+</g>
+<clipPath id="clip1">
+  <path d="M 0 0 L 505 0 L 505 51 L 0 51 Z M 0 0 "/>
+</clipPath>
+</defs>
+<g id="surface0">
+<rect x="0" y="0" width="504" height="50" style="fill: rgb(100%,100%,100%); fill-opacity: 1; stroke: none;"/>
+<g clip-path="url(#clip1)" clip-rule="nonzero">
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-1" x="34.28125" y="22.417969"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-2" x="51.566406" y="22.457031"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-3" x="68.851562" y="22.472656"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-4" x="86.132812" y="22.417969"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-5" x="103.417969" y="22.472656"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-6" x="120.703125" y="22.378906"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-7" x="137.988281" y="22.425781"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-8" x="155.269531" y="22.433594"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-9" x="172.554688" y="22.410156"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-10" x="189.839844" y="22.410156"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-2" x="205.453125" y="22.417969"/>
+  <use xlink:href="#glyph0-1" x="208.790039" y="22.417969"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-2" x="222.738281" y="22.457031"/>
+  <use xlink:href="#glyph0-2" x="226.075195" y="22.457031"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-2" x="240.023438" y="22.472656"/>
+  <use xlink:href="#glyph0-3" x="243.360352" y="22.472656"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-2" x="257.304688" y="22.417969"/>
+  <use xlink:href="#glyph0-4" x="260.641602" y="22.417969"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-2" x="274.589844" y="22.472656"/>
+  <use xlink:href="#glyph0-5" x="277.926758" y="22.472656"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-2" x="291.875" y="22.402344"/>
+  <use xlink:href="#glyph0-6" x="295.211914" y="22.402344"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-2" x="309.15625" y="22.425781"/>
+  <use xlink:href="#glyph0-7" x="312.493164" y="22.425781"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-2" x="326.441406" y="22.457031"/>
+  <use xlink:href="#glyph0-8" x="329.77832" y="22.457031"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-2" x="343.726562" y="22.410156"/>
+  <use xlink:href="#glyph0-9" x="347.063477" y="22.410156"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-2" x="361.007812" y="22.410156"/>
+  <use xlink:href="#glyph0-10" x="364.344727" y="22.410156"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-3" x="378.292969" y="22.417969"/>
+  <use xlink:href="#glyph0-1" x="381.629883" y="22.417969"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-3" x="395.578125" y="22.472656"/>
+  <use xlink:href="#glyph0-2" x="398.915039" y="22.472656"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-3" x="412.863281" y="22.472656"/>
+  <use xlink:href="#glyph0-3" x="416.200195" y="22.472656"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-3" x="430.144531" y="22.417969"/>
+  <use xlink:href="#glyph0-4" x="433.481445" y="22.417969"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-3" x="447.429688" y="22.472656"/>
+  <use xlink:href="#glyph0-5" x="450.766602" y="22.472656"/>
+</g>
+<g style="fill: rgb(0%,0%,0%); fill-opacity: 1;">
+  <use xlink:href="#glyph0-3" x="464.714844" y="22.417969"/>
+  <use xlink:href="#glyph0-6" x="468.051758" y="22.417969"/>
+</g>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 33.25 36.960938 L 38.648438 36.960938 L 38.648438 31.5625 L 33.25 31.5625 Z M 33.25 36.960938 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 55.933594 34.257812 C 55.933594 37.859375 50.535156 37.859375 50.535156 34.257812 C 50.535156 30.660156 55.933594 30.660156 55.933594 34.257812 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 70.519531 30.058594 L 70.519531 30.058594 L 74.15625 36.359375 L 66.882812 36.359375 L 70.519531 30.058594 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 83.984375 34.257812 L 91.621094 34.257812 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 87.800781 38.078125 L 87.800781 30.441406 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 102.386719 36.960938 L 107.785156 31.558594 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 102.386719 31.558594 L 107.785156 36.960938 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 118.550781 34.257812 L 118.550781 34.257812 L 122.371094 30.441406 L 126.1875 34.257812 L 122.371094 38.078125 L 118.550781 34.257812 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 139.65625 38.457031 L 139.65625 38.457031 L 143.289062 32.160156 L 136.019531 32.160156 L 139.65625 38.457031 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 154.238281 36.960938 L 159.636719 36.960938 L 159.636719 31.5625 L 154.238281 31.5625 Z M 154.238281 36.960938 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 154.238281 36.960938 L 159.636719 31.558594 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 154.238281 31.558594 L 159.636719 36.960938 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 171.523438 36.960938 L 176.921875 31.558594 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 171.523438 31.558594 L 176.921875 36.960938 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 170.402344 34.257812 L 178.039062 34.257812 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 174.222656 38.078125 L 174.222656 30.441406 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 187.6875 34.257812 L 195.324219 34.257812 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 191.507812 38.078125 L 191.507812 30.441406 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 187.6875 34.257812 L 187.6875 34.257812 L 191.507812 30.441406 L 195.324219 34.257812 L 191.507812 38.078125 L 187.6875 34.257812 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 211.488281 34.257812 C 211.488281 37.859375 206.089844 37.859375 206.089844 34.257812 C 206.089844 30.660156 211.488281 30.660156 211.488281 34.257812 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 206.089844 34.257812 L 211.488281 34.257812 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 208.789062 36.960938 L 208.789062 31.558594 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 226.074219 38.457031 L 226.074219 38.457031 L 229.710938 31.109375 L 222.4375 31.109375 L 226.074219 38.457031 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 226.074219 30.058594 L 226.074219 30.058594 L 229.710938 37.410156 L 222.4375 37.410156 L 226.074219 30.058594 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 240.65625 34.257812 L 246.058594 34.257812 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 243.359375 36.960938 L 243.359375 31.558594 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 240.65625 36.960938 L 246.054688 36.960938 L 246.054688 31.5625 L 240.65625 31.5625 Z M 240.65625 36.960938 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 263.34375 34.257812 C 263.34375 37.859375 257.941406 37.859375 257.941406 34.257812 C 257.941406 30.660156 263.34375 30.660156 263.34375 34.257812 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 257.941406 36.960938 L 263.34375 31.558594 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 257.941406 31.558594 L 263.34375 36.960938 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 277.925781 36.960938 L 277.925781 36.960938 L 280.625 31.558594 L 275.226562 31.558594 L 277.925781 36.960938 "/>
+<path style="fill: none; stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 275.226562 31.558594 L 280.625 31.558594 L 280.625 36.957031 L 275.226562 36.957031 Z M 275.226562 31.558594 "/>
+<path style=" stroke:none;fill-rule: nonzero; fill: rgb(0%,0%,0%); fill-opacity: 1;" d="M 292.511719 36.960938 L 292.511719 36.960938 L 297.910156 36.960938 L 297.910156 31.558594 L 292.511719 31.558594 Z M 292.511719 36.960938 "/>
+<path style=" stroke:none;fill-rule: nonzero; fill: rgb(0%,0%,0%); fill-opacity: 1;" d="M 315.195312 34.257812 C 315.195312 37.859375 309.792969 37.859375 309.792969 34.257812 C 309.792969 30.660156 315.195312 30.660156 315.195312 34.257812 "/>
+<path style=" stroke:none;fill-rule: nonzero; fill: rgb(0%,0%,0%); fill-opacity: 1;" d="M 329.777344 30.058594 L 329.777344 30.058594 L 333.414062 36.359375 L 326.140625 36.359375 Z M 329.777344 30.058594 "/>
+<path style=" stroke:none;fill-rule: nonzero; fill: rgb(0%,0%,0%); fill-opacity: 1;" d="M 344.363281 34.257812 L 344.363281 34.257812 L 347.0625 31.558594 L 349.761719 34.257812 L 347.0625 36.960938 Z M 344.363281 34.257812 "/>
+<path style="fill-rule: nonzero; fill: rgb(0%,0%,0%); fill-opacity: 1;stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 367.046875 34.257812 C 367.046875 37.859375 361.644531 37.859375 361.644531 34.257812 C 361.644531 30.660156 367.046875 30.660156 367.046875 34.257812 "/>
+<path style="fill-rule: nonzero; fill: rgb(0%,0%,0%); fill-opacity: 1;stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 383.429688 34.257812 C 383.429688 36.660156 379.828125 36.660156 379.828125 34.257812 C 379.828125 31.859375 383.429688 31.859375 383.429688 34.257812 "/>
+<path style="fill-rule: nonzero; fill: rgb(74.509804%,74.509804%,74.509804%); fill-opacity: 1;stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 401.613281 34.257812 C 401.613281 37.859375 396.214844 37.859375 396.214844 34.257812 C 396.214844 30.660156 401.613281 30.660156 401.613281 34.257812 "/>
+<path style="fill-rule: nonzero; fill: rgb(74.509804%,74.509804%,74.509804%); fill-opacity: 1;stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 413.804688 36.652344 L 418.589844 36.652344 L 418.589844 31.867188 L 413.804688 31.867188 Z M 413.804688 36.652344 "/>
+<path style="fill-rule: nonzero; fill: rgb(74.509804%,74.509804%,74.509804%); fill-opacity: 1;stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 433.480469 37.644531 L 433.480469 37.644531 L 436.867188 34.257812 L 433.480469 30.875 L 430.097656 34.257812 Z M 433.480469 37.644531 "/>
+<path style="fill-rule: nonzero; fill: rgb(74.509804%,74.509804%,74.509804%); fill-opacity: 1;stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 450.765625 30.058594 L 450.765625 30.058594 L 454.402344 36.359375 L 447.128906 36.359375 Z M 450.765625 30.058594 "/>
+<path style="fill-rule: nonzero; fill: rgb(74.509804%,74.509804%,74.509804%); fill-opacity: 1;stroke-width: 0.75; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(0%,0%,0%); stroke-opacity: 1;stroke-miterlimit: 10; " d="M 468.050781 38.457031 L 468.050781 38.457031 L 471.6875 32.160156 L 464.414062 32.160156 Z M 468.050781 38.457031 "/>
+</g>
+</g>
+</svg>
diff --git a/win32/deps/library/graphics/help/graphics.rdb b/win32/deps/library/graphics/help/graphics.rdb
new file mode 100644
index 0000000..aeaf612
Binary files /dev/null and b/win32/deps/library/graphics/help/graphics.rdb differ
diff --git a/win32/deps/library/graphics/help/graphics.rdx b/win32/deps/library/graphics/help/graphics.rdx
new file mode 100644
index 0000000..5bb0b38
Binary files /dev/null and b/win32/deps/library/graphics/help/graphics.rdx differ
diff --git a/win32/deps/library/graphics/help/paths.rds b/win32/deps/library/graphics/help/paths.rds
new file mode 100644
index 0000000..f6a3d19
Binary files /dev/null and b/win32/deps/library/graphics/help/paths.rds differ
diff --git a/win32/deps/library/graphics/html/00Index.html b/win32/deps/library/graphics/html/00Index.html
new file mode 100644
index 0000000..a261178
--- /dev/null
+++ b/win32/deps/library/graphics/html/00Index.html
@@ -0,0 +1,220 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: The R Graphics Package</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> The R Graphics Package
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;graphics&rsquo; version 2.15.2</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>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td width="25%"><a href="graphics-package.html">graphics-package</a></td>
+<td>The R Graphics Package</td></tr>
+<tr><td width="25%"><a href="filled.contour.html">.filled.contour</a></td>
+<td>Level (Contour) Plots</td></tr>
+<tr><td width="25%"><a href="par.html">.Pars</a></td>
+<td>Set or Query Graphical Parameters</td></tr>
+<tr><td width="25%"><a href="abline.html">abline</a></td>
+<td>Add Straight Lines to a Plot</td></tr>
+<tr><td width="25%"><a href="arrows.html">arrows</a></td>
+<td>Add Arrows to a Plot</td></tr>
+<tr><td width="25%"><a href="plot.window.html">asp</a></td>
+<td>Set up World Coordinates for Graphics Window</td></tr>
+<tr><td width="25%"><a href="assocplot.html">assocplot</a></td>
+<td>Association Plots</td></tr>
+<tr><td width="25%"><a href="zAxis.html">Axis</a></td>
+<td>Generic Function to Add an Axis to a Plot</td></tr>
+<tr><td width="25%"><a href="axis.html">axis</a></td>
+<td>Add an Axis to a Plot</td></tr>
+<tr><td width="25%"><a href="axis.POSIXct.html">axis.POSIXct</a></td>
+<td>Date and Date-time Plotting Functions</td></tr>
+<tr><td width="25%"><a href="axTicks.html">axTicks</a></td>
+<td>Compute Axis Tickmark Locations</td></tr>
+<tr><td width="25%"><a href="barplot.html">barplot</a></td>
+<td>Bar Plots</td></tr>
+<tr><td width="25%"><a href="box.html">box</a></td>
+<td>Draw a Box around a Plot</td></tr>
+<tr><td width="25%"><a href="boxplot.html">boxplot</a></td>
+<td>Box Plots</td></tr>
+<tr><td width="25%"><a href="boxplot.matrix.html">boxplot.matrix</a></td>
+<td>Draw a Boxplot for each Column (Row) of a Matrix</td></tr>
+<tr><td width="25%"><a href="bxp.html">bxp</a></td>
+<td>Draw Box Plots from Summaries</td></tr>
+<tr><td width="25%"><a href="cdplot.html">cdplot</a></td>
+<td>Conditional Density Plots</td></tr>
+<tr><td width="25%"><a href="clip.html">clip</a></td>
+<td>Set Clipping Region</td></tr>
+<tr><td width="25%"><a href="screen.html">close.screen</a></td>
+<td>Creating and Controlling Multiple Screens on a Single Device</td></tr>
+<tr><td width="25%"><a href="coplot.html">co.intervals</a></td>
+<td>Conditioning Plots</td></tr>
+<tr><td width="25%"><a href="contour.html">contour</a></td>
+<td>Display Contours</td></tr>
+<tr><td width="25%"><a href="coplot.html">coplot</a></td>
+<td>Conditioning Plots</td></tr>
+<tr><td width="25%"><a href="curve.html">curve</a></td>
+<td>Draw Function Plots</td></tr>
+<tr><td width="25%"><a href="dotchart.html">dotchart</a></td>
+<td>Cleveland's Dot Plots</td></tr>
+<tr><td width="25%"><a href="screen.html">erase.screen</a></td>
+<td>Creating and Controlling Multiple Screens on a Single Device</td></tr>
+<tr><td width="25%"><a href="filled.contour.html">filled.contour</a></td>
+<td>Level (Contour) Plots</td></tr>
+<tr><td width="25%"><a href="fourfoldplot.html">fourfoldplot</a></td>
+<td>Fourfold Plots</td></tr>
+<tr><td width="25%"><a href="frame.html">frame</a></td>
+<td>Create / Start a New Plot Frame</td></tr>
+<tr><td width="25%"><a href="par.html">graphical parameter</a></td>
+<td>Set or Query Graphical Parameters</td></tr>
+<tr><td width="25%"><a href="par.html">graphical parameters</a></td>
+<td>Set or Query Graphical Parameters</td></tr>
+<tr><td width="25%"><a href="graphics-package.html">graphics</a></td>
+<td>The R Graphics Package</td></tr>
+<tr><td width="25%"><a href="convertXY.html">grconvertX</a></td>
+<td>Convert between Graphics Coordinate Systems</td></tr>
+<tr><td width="25%"><a href="convertXY.html">grconvertY</a></td>
+<td>Convert between Graphics Coordinate Systems</td></tr>
+<tr><td width="25%"><a href="grid.html">grid</a></td>
+<td>Add Grid to a Plot</td></tr>
+<tr><td width="25%"><a href="hist.html">hist</a></td>
+<td>Histograms</td></tr>
+<tr><td width="25%"><a href="hist.POSIXt.html">hist.POSIXt</a></td>
+<td>Histogram of a Date or Date-Time Object</td></tr>
+<tr><td width="25%"><a href="identify.html">identify</a></td>
+<td>Identify Points in a Scatter Plot</td></tr>
+<tr><td width="25%"><a href="image.html">image</a></td>
+<td>Display a Color Image</td></tr>
+<tr><td width="25%"><a href="layout.html">layout</a></td>
+<td>Specifying Complex Plot Arrangements</td></tr>
+<tr><td width="25%"><a href="layout.html">lcm</a></td>
+<td>Specifying Complex Plot Arrangements</td></tr>
+<tr><td width="25%"><a href="legend.html">legend</a></td>
+<td>Add Legends to Plots</td></tr>
+<tr><td width="25%"><a href="lines.html">lines</a></td>
+<td>Add Connected Line Segments to a Plot</td></tr>
+<tr><td width="25%"><a href="plot.formula.html">lines.formula</a></td>
+<td>Formula Notation for Scatterplots</td></tr>
+<tr><td width="25%"><a href="plothistogram.html">lines.histogram</a></td>
+<td>Plot Histograms</td></tr>
+<tr><td width="25%"><a href="plot.table.html">lines.table</a></td>
+<td>Plot Methods for 'table' Objects</td></tr>
+<tr><td width="25%"><a href="locator.html">locator</a></td>
+<td>Graphical Input</td></tr>
+<tr><td width="25%"><a href="matplot.html">matlines</a></td>
+<td>Plot Columns of Matrices</td></tr>
+<tr><td width="25%"><a href="matplot.html">matplot</a></td>
+<td>Plot Columns of Matrices</td></tr>
+<tr><td width="25%"><a href="matplot.html">matpoints</a></td>
+<td>Plot Columns of Matrices</td></tr>
+<tr><td width="25%"><a href="mosaicplot.html">mosaicplot</a></td>
+<td>Mosaic Plots</td></tr>
+<tr><td width="25%"><a href="mtext.html">mtext</a></td>
+<td>Write Text into the Margins of a Plot</td></tr>
+<tr><td width="25%"><a href="pairs.html">pairs</a></td>
+<td>Scatterplot Matrices</td></tr>
+<tr><td width="25%"><a href="panel.smooth.html">panel.smooth</a></td>
+<td>Simple Panel Plot</td></tr>
+<tr><td width="25%"><a href="par.html">par</a></td>
+<td>Set or Query Graphical Parameters</td></tr>
+<tr><td width="25%"><a href="points.html">pch</a></td>
+<td>Add Points to a Plot</td></tr>
+<tr><td width="25%"><a href="persp.html">persp</a></td>
+<td>Perspective Plots</td></tr>
+<tr><td width="25%"><a href="pie.html">pie</a></td>
+<td>Pie Charts</td></tr>
+<tr><td width="25%"><a href="plot.html">plot</a></td>
+<td>Generic X-Y Plotting</td></tr>
+<tr><td width="25%"><a href="plot.dataframe.html">plot.data.frame</a></td>
+<td>Plot Method for Data Frames</td></tr>
+<tr><td width="25%"><a href="plot.default.html">plot.default</a></td>
+<td>The Default Scatterplot Function</td></tr>
+<tr><td width="25%"><a href="plot.design.html">plot.design</a></td>
+<td>Plot Univariate Effects of a Design or Model</td></tr>
+<tr><td width="25%"><a href="plot.factor.html">plot.factor</a></td>
+<td>Plotting Factor Variables</td></tr>
+<tr><td width="25%"><a href="plot.formula.html">plot.formula</a></td>
+<td>Formula Notation for Scatterplots</td></tr>
+<tr><td width="25%"><a href="curve.html">plot.function</a></td>
+<td>Draw Function Plots</td></tr>
+<tr><td width="25%"><a href="plothistogram.html">plot.histogram</a></td>
+<td>Plot Histograms</td></tr>
+<tr><td width="25%"><a href="frame.html">plot.new</a></td>
+<td>Create / Start a New Plot Frame</td></tr>
+<tr><td width="25%"><a href="plot.table.html">plot.table</a></td>
+<td>Plot Methods for 'table' Objects</td></tr>
+<tr><td width="25%"><a href="plot.window.html">plot.window</a></td>
+<td>Set up World Coordinates for Graphics Window</td></tr>
+<tr><td width="25%"><a href="plot.xy.html">plot.xy</a></td>
+<td>Basic Internal Plot Function</td></tr>
+<tr><td width="25%"><a href="points.html">points</a></td>
+<td>Add Points to a Plot</td></tr>
+<tr><td width="25%"><a href="plot.formula.html">points.formula</a></td>
+<td>Formula Notation for Scatterplots</td></tr>
+<tr><td width="25%"><a href="plot.table.html">points.table</a></td>
+<td>Plot Methods for 'table' Objects</td></tr>
+<tr><td width="25%"><a href="polygon.html">polygon</a></td>
+<td>Polygon Drawing</td></tr>
+<tr><td width="25%"><a href="polypath.html">polypath</a></td>
+<td>Path Drawing</td></tr>
+<tr><td width="25%"><a href="rasterImage.html">rasterImage</a></td>
+<td>Draw One or More Raster Images</td></tr>
+<tr><td width="25%"><a href="rect.html">rect</a></td>
+<td>Draw One or More Rectangles</td></tr>
+<tr><td width="25%"><a href="rug.html">rug</a></td>
+<td>Add a Rug to a Plot</td></tr>
+<tr><td width="25%"><a href="screen.html">screen</a></td>
+<td>Creating and Controlling Multiple Screens on a Single Device</td></tr>
+<tr><td width="25%"><a href="segments.html">segments</a></td>
+<td>Add Line Segments to a Plot</td></tr>
+<tr><td width="25%"><a href="smoothScatter.html">smoothScatter</a></td>
+<td>Scatterplots with Smoothed Densities Color Representation</td></tr>
+<tr><td width="25%"><a href="spineplot.html">spineplot</a></td>
+<td>Spine Plots and Spinograms</td></tr>
+<tr><td width="25%"><a href="screen.html">split.screen</a></td>
+<td>Creating and Controlling Multiple Screens on a Single Device</td></tr>
+<tr><td width="25%"><a href="stars.html">stars</a></td>
+<td>Star (Spider/Radar) Plots and Segment Diagrams</td></tr>
+<tr><td width="25%"><a href="stem.html">stem</a></td>
+<td>Stem-and-Leaf Plots</td></tr>
+<tr><td width="25%"><a href="strwidth.html">strheight</a></td>
+<td>Plotting Dimensions of Character Strings and Math Expressions</td></tr>
+<tr><td width="25%"><a href="stripchart.html">stripchart</a></td>
+<td>1-D Scatter Plots</td></tr>
+<tr><td width="25%"><a href="strwidth.html">strwidth</a></td>
+<td>Plotting Dimensions of Character Strings and Math Expressions</td></tr>
+<tr><td width="25%"><a href="sunflowerplot.html">sunflowerplot</a></td>
+<td>Produce a Sunflower Scatter Plot</td></tr>
+<tr><td width="25%"><a href="symbols.html">symbols</a></td>
+<td>Draw Symbols (Circles, Squares, Stars, Thermometers, Boxplots)</td></tr>
+<tr><td width="25%"><a href="text.html">text</a></td>
+<td>Add Text to a Plot</td></tr>
+<tr><td width="25%"><a href="plot.formula.html">text.formula</a></td>
+<td>Formula Notation for Scatterplots</td></tr>
+<tr><td width="25%"><a href="title.html">title</a></td>
+<td>Plot Annotation</td></tr>
+<tr><td width="25%"><a href="units.html">xinch</a></td>
+<td>Graphical Units</td></tr>
+<tr><td width="25%"><a href="plot.window.html">xlim</a></td>
+<td>Set up World Coordinates for Graphics Window</td></tr>
+<tr><td width="25%"><a href="xspline.html">xspline</a></td>
+<td>Draw an X-spline</td></tr>
+<tr><td width="25%"><a href="units.html">xyinch</a></td>
+<td>Graphical Units</td></tr>
+<tr><td width="25%"><a href="units.html">yinch</a></td>
+<td>Graphical Units</td></tr>
+<tr><td width="25%"><a href="plot.window.html">ylim</a></td>
+<td>Set up World Coordinates for Graphics Window</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/graphics/html/R.css b/win32/deps/library/graphics/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/graphics/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/graphics/po/da/LC_MESSAGES/R-graphics.mo b/win32/deps/library/graphics/po/da/LC_MESSAGES/R-graphics.mo
new file mode 100644
index 0000000..d105e6b
Binary files /dev/null and b/win32/deps/library/graphics/po/da/LC_MESSAGES/R-graphics.mo differ
diff --git a/win32/deps/library/graphics/po/de/LC_MESSAGES/R-graphics.mo b/win32/deps/library/graphics/po/de/LC_MESSAGES/R-graphics.mo
new file mode 100644
index 0000000..bdd7995
Binary files /dev/null and b/win32/deps/library/graphics/po/de/LC_MESSAGES/R-graphics.mo differ
diff --git a/win32/deps/library/graphics/po/en quot/LC_MESSAGES/R-graphics.mo b/win32/deps/library/graphics/po/en quot/LC_MESSAGES/R-graphics.mo
new file mode 100644
index 0000000..95413d7
Binary files /dev/null and b/win32/deps/library/graphics/po/en quot/LC_MESSAGES/R-graphics.mo differ
diff --git a/win32/deps/library/graphics/po/fr/LC_MESSAGES/R-graphics.mo b/win32/deps/library/graphics/po/fr/LC_MESSAGES/R-graphics.mo
new file mode 100644
index 0000000..acc8294
Binary files /dev/null and b/win32/deps/library/graphics/po/fr/LC_MESSAGES/R-graphics.mo differ
diff --git a/win32/deps/library/graphics/po/it/LC_MESSAGES/R-graphics.mo b/win32/deps/library/graphics/po/it/LC_MESSAGES/R-graphics.mo
new file mode 100644
index 0000000..9b75273
Binary files /dev/null and b/win32/deps/library/graphics/po/it/LC_MESSAGES/R-graphics.mo differ
diff --git a/win32/deps/library/graphics/po/ja/LC_MESSAGES/R-graphics.mo b/win32/deps/library/graphics/po/ja/LC_MESSAGES/R-graphics.mo
new file mode 100644
index 0000000..2688e74
Binary files /dev/null and b/win32/deps/library/graphics/po/ja/LC_MESSAGES/R-graphics.mo differ
diff --git a/win32/deps/library/graphics/po/ko/LC_MESSAGES/R-graphics.mo b/win32/deps/library/graphics/po/ko/LC_MESSAGES/R-graphics.mo
new file mode 100644
index 0000000..261d71f
Binary files /dev/null and b/win32/deps/library/graphics/po/ko/LC_MESSAGES/R-graphics.mo differ
diff --git a/win32/deps/library/graphics/po/pl/LC_MESSAGES/R-graphics.mo b/win32/deps/library/graphics/po/pl/LC_MESSAGES/R-graphics.mo
new file mode 100644
index 0000000..65bfee7
Binary files /dev/null and b/win32/deps/library/graphics/po/pl/LC_MESSAGES/R-graphics.mo differ
diff --git a/win32/deps/library/graphics/po/pt_BR/LC_MESSAGES/R-graphics.mo b/win32/deps/library/graphics/po/pt_BR/LC_MESSAGES/R-graphics.mo
new file mode 100644
index 0000000..d30c05f
Binary files /dev/null and b/win32/deps/library/graphics/po/pt_BR/LC_MESSAGES/R-graphics.mo differ
diff --git a/win32/deps/library/graphics/po/ru/LC_MESSAGES/R-graphics.mo b/win32/deps/library/graphics/po/ru/LC_MESSAGES/R-graphics.mo
new file mode 100644
index 0000000..936d7d5
Binary files /dev/null and b/win32/deps/library/graphics/po/ru/LC_MESSAGES/R-graphics.mo differ
diff --git a/win32/deps/library/graphics/po/zh_CN/LC_MESSAGES/R-graphics.mo b/win32/deps/library/graphics/po/zh_CN/LC_MESSAGES/R-graphics.mo
new file mode 100644
index 0000000..b1f0db2
Binary files /dev/null and b/win32/deps/library/graphics/po/zh_CN/LC_MESSAGES/R-graphics.mo differ
diff --git a/win32/deps/library/grid/DESCRIPTION b/win32/deps/library/grid/DESCRIPTION
index 72f995e..ffd5dbc 100644
--- a/win32/deps/library/grid/DESCRIPTION
+++ b/win32/deps/library/grid/DESCRIPTION
@@ -1,12 +1,12 @@
 Package: grid
-Version: 2.9.2
+Version: 2.15.2
 Priority: base
 Title: The Grid Graphics Package
 Author: Paul Murrell <paul stat auckland ac nz>
 Maintainer: R Core Team <R-core r-project org>
 Description: A rewrite of the graphics layout capabilities, plus some
-        support for interaction
+  support for interaction
 Imports: grDevices
 Suggests: lattice
-License: Part of R 2.9.2
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 12:45:46 UTC; windows
+License: Part of R 2.15.2
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:07:42 UTC; windows
diff --git a/win32/deps/library/grid/INDEX b/win32/deps/library/grid/INDEX
index 892afc7..1bcc664 100644
--- a/win32/deps/library/grid/INDEX
+++ b/win32/deps/library/grid/INDEX
@@ -1,6 +1,7 @@
 Grid                    Grid Graphics
 absolute.size           Absolute Size of a Grob
 arrow                   Describe arrows to add to a line.
+calcStringMetric        Calculate Metric Information for Text
 convertNative           Convert a Unit Object to Native units
 current.viewport        Get the Current Grid Viewport (Tree)
 dataViewport            Create a Viewport with Scales based on Data
@@ -11,8 +12,11 @@ gPath                   Concatenate Grob Names
 getNames                List the names of grobs on the display list
 gpar                    Handling Grid Graphical Parameters
 grid-package            The Grid Graphics Package
+grid.DLapply            Modify the Grid Display List
 grid.add                Add a Grid Graphical Object
 grid.arrows             Draw Arrows
+grid.bezier             Draw a Bezier Curve
+grid.cap                Capture a raster image
 grid.circle             Draw a Circle
 grid.clip               Set the Clipping Region
 grid.collection         Create a Coherent Group of Grid Graphical
@@ -25,6 +29,7 @@ grid.display.list       Control the Grid Display List
 grid.draw               Draw a grid grob
 grid.edit               Edit the Description of a Grid Graphical Object
 grid.frame              Create a Frame for Packing Objects
+grid.function           Draw a curve representing a function
 grid.get                Get a Grid Graphical Object
 grid.grab               Grab the current grid output
 grid.grill              Draw a Grill
@@ -37,12 +42,14 @@ grid.move.to            Move or Draw to a Specified Position
 grid.newpage            Move to a New Page on a Grid Device
 grid.null               Null Graphical Object
 grid.pack               Pack an Object within a Frame
+grid.path               Draw a Path
 grid.place              Place an Object within a Frame
 grid.plot.and.legend    A Simple Plot and Legend Demo
 grid.points             Draw Data Symbols
 grid.polygon            Draw a Polygon
 grid.pretty             Generate a Sensible Set of Breakpoints
 grid.prompt             Prompt before New Page
+grid.raster             Render a raster object
 grid.record             Encapsulate calculations and drawing
 grid.rect               Draw rectangles
 grid.refresh            Refresh the current grid scene
@@ -65,7 +72,10 @@ push.viewport           Push a Viewport onto the Grid Viewport Stack
 pushViewport            Maintaining and Navigating the Grid Viewport
                         Tree
 roundrect               Draw a rectangle with rounded corners
-stringWidth             Create a Unit Describing the Width of a String
+showGrob                Label grid grobs.
+showViewport            Display grid viewports.
+stringWidth             Create a Unit Describing the Width and Height
+                        of a String or Math Expression
 unit                    Function to Create a Unit Object
 unit.c                  Combine Unit Objects
 unit.length             Length of a Unit Object
@@ -77,3 +87,5 @@ viewport                Create a Grid Viewport
 vpPath                  Concatenate Viewport Names
 widthDetails            Width and Height of a grid grob
 xDetails                Boundary of a grid grob
+xsplinePoints           Return the points that would be used to draw an
+                        Xspline (or a Bezier curve).
diff --git a/win32/deps/library/grid/Meta/Rd.rds b/win32/deps/library/grid/Meta/Rd.rds
index bbf9d18..c22fa0f 100644
Binary files a/win32/deps/library/grid/Meta/Rd.rds and b/win32/deps/library/grid/Meta/Rd.rds differ
diff --git a/win32/deps/library/grid/Meta/hsearch.rds b/win32/deps/library/grid/Meta/hsearch.rds
index 9419bd2..c194acf 100644
Binary files a/win32/deps/library/grid/Meta/hsearch.rds and b/win32/deps/library/grid/Meta/hsearch.rds differ
diff --git a/win32/deps/library/grid/Meta/links.rds b/win32/deps/library/grid/Meta/links.rds
new file mode 100644
index 0000000..54eed6d
Binary files /dev/null and b/win32/deps/library/grid/Meta/links.rds differ
diff --git a/win32/deps/library/grid/Meta/nsInfo.rds b/win32/deps/library/grid/Meta/nsInfo.rds
index 60d2249..96b8297 100644
Binary files a/win32/deps/library/grid/Meta/nsInfo.rds and b/win32/deps/library/grid/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/grid/Meta/package.rds b/win32/deps/library/grid/Meta/package.rds
index a13f7c8..8c99f28 100644
Binary files a/win32/deps/library/grid/Meta/package.rds and b/win32/deps/library/grid/Meta/package.rds differ
diff --git a/win32/deps/library/grid/Meta/vignette.rds b/win32/deps/library/grid/Meta/vignette.rds
index 53850ed..4bd332c 100644
Binary files a/win32/deps/library/grid/Meta/vignette.rds and b/win32/deps/library/grid/Meta/vignette.rds differ
diff --git a/win32/deps/library/grid/NAMESPACE b/win32/deps/library/grid/NAMESPACE
index b9740d5..4e3f4cb 100644
--- a/win32/deps/library/grid/NAMESPACE
+++ b/win32/deps/library/grid/NAMESPACE
@@ -7,6 +7,7 @@ export(
        # Conversion of units
        "convertUnit", "convertX", "convertY",
        "convertWidth", "convertHeight",
+       "calcStringMetric",
        # Deprecated conversion functions
        "convertNative",
        "grid.convertWidth", "grid.convertX", "grid.convertY",
@@ -18,7 +19,7 @@ export(
        "gpar", "get.gpar",
        "grid.collection",
        "grid.copy", "grid.display.list", "grid.draw",
-       "grid.record",
+       "grid.record", "grid.DLapply",
        "grid.grill",
        "grid.layout", "grid.locator",
        "grid.newpage",
@@ -31,8 +32,9 @@ export(
        "unit",
        "is.unit",
        "unit.c", "unit.length", "unit.pmax", "unit.pmin", "unit.rep",
-       "stringWidth", "stringHeight",
+       "stringWidth", "stringHeight", "stringAscent", "stringDescent",
        "grobX", "grobY", "grobWidth", "grobHeight",
+       "grobAscent", "grobDescent",
        "absolute.size",
 
        "valid.just",
@@ -42,12 +44,14 @@ export(
        "popViewport", "pushViewport",
        "dataViewport", "plotViewport",
        "downViewport", "upViewport", "seekViewport",
+       "showViewport",
 
        "drawDetails", "preDrawDetails", "postDrawDetails",
        "editDetails",
        "validDetails",
        "heightDetails", "widthDetails",
        "xDetails", "yDetails",
+       "ascentDetails", "descentDetails",
 
 #       "height", "heightDetails",
 #       "width", "widthDetails",
@@ -62,8 +66,10 @@ export(
        "getGrob", "setGrob", "addGrob", "removeGrob", "editGrob",
        "gEdit", "gEditList", "applyEdit", "applyEdits",
        "grid.grab", "grid.grabExpr",
+       "grid.cap",
        "setChildren",
-
+       "showGrob",
+       
        # Listing grobs and viewports
        "grid.ls",
        "nestedListing", "pathListing", "grobPathListing",
@@ -71,16 +77,20 @@ export(
        "getNames", "childNames", 
        
        # Creating and drawing predefined grobs and gTrees
+       "grid.abline",
        "grid.arrows", "grid.circle", "grid.clip", "grid.curve",
+       "grid.function",
        "grid.line.to", "grid.lines", "grid.move.to", "grid.null", 
-       "grid.points", "grid.polygon", "grid.polyline", 
-       "grid.rect", "grid.roundrect",
-       "grid.segments", "grid.text", "grid.xspline",
+       "grid.points", "grid.path", "grid.polygon", "grid.polyline", 
+       "grid.raster", "grid.rect", "grid.roundrect",
+       "grid.segments", "grid.text", "grid.xspline", "grid.bezier",
        "arrowsGrob", "circleGrob", "clipGrob", "curveGrob",
+       "functionGrob",
        "linesGrob", "lineToGrob", "moveToGrob", "nullGrob",
-       "pointsGrob", "polygonGrob", "polylineGrob",
-       "rectGrob", "roundrectGrob",
-       "segmentsGrob", "textGrob", "xsplineGrob",
+       "pointsGrob", "pathGrob", "polygonGrob", "polylineGrob",
+       "rasterGrob", "rectGrob", "roundrectGrob",
+       "segmentsGrob", "textGrob", "xsplineGrob", "bezierGrob",
+       "xsplinePoints", "bezierPoints",
        
        "grid.xaxis", "grid.yaxis",
        "xaxisGrob", "yaxisGrob", 
@@ -114,6 +124,7 @@ S3method("[", "gpar")
 S3method("[", "unit")
 S3method("[", "unit.arithmetic")
 S3method("[", "unit.list")
+S3method("[", "vpPath")
 S3method("Ops", "unit")
 S3method("Summary", "unit")
 S3method("as.character", "grob")
@@ -141,14 +152,17 @@ S3method("downViewport", "vpPath")
 S3method("drawDetails", "arrows")
 S3method("drawDetails", "circle")
 S3method("drawDetails", "curve")
+S3method("drawDetails", "functiongrob")
 S3method("drawDetails", "grob")
 S3method("drawDetails", "line.to")
 S3method("drawDetails", "lines")
 S3method("drawDetails", "move.to")
 S3method("drawDetails", "points")
+S3method("drawDetails", "pathgrob")
 S3method("drawDetails", "polygon")
 S3method("drawDetails", "polyline")
 S3method("drawDetails", "xspline")
+S3method("drawDetails", "beziergrob")
 S3method("drawDetails", "rect")
 S3method("drawDetails", "roundrect")
 S3method("drawDetails", "segments")
@@ -200,9 +214,19 @@ S3method("grobY", "gList")
 S3method("grobY", "gPath")
 S3method("grobY", "default")
 
+S3method("grobAscent", "grob")
+S3method("grobAscent", "gList")
+S3method("grobAscent", "gPath")
+S3method("grobAscent", "default")
+S3method("grobDescent", "grob")
+S3method("grobDescent", "gList")
+S3method("grobDescent", "gPath")
+S3method("grobDescent", "default")
+
 S3method("heightDetails", "arrows")
 S3method("heightDetails", "circle")
 S3method("heightDetails", "curve")
+S3method("heightDetails", "functiongrob")
 S3method("heightDetails", "default")
 S3method("heightDetails", "frame")
 S3method("heightDetails", "lines")
@@ -214,6 +238,7 @@ S3method("heightDetails", "roundrect")
 S3method("heightDetails", "segments")
 S3method("heightDetails", "text")
 S3method("heightDetails", "xspline")
+S3method("heightDetails", "beziergrob")
 #S3method("height.details", "viewport")
 
 S3method("postDraw", "grob")
@@ -235,6 +260,7 @@ S3method("validDetails", "arrows")
 S3method("validDetails", "circle")
 S3method("validDetails", "clip")
 S3method("validDetails", "curve")
+S3method("validDetails", "functiongrob")
 S3method("validDetails", "grob")
 S3method("validDetails", "lines")
 S3method("validDetails", "line.to")
@@ -250,6 +276,7 @@ S3method("validDetails", "text")
 S3method("widthDetails", "arrows")
 S3method("widthDetails", "circle")
 S3method("widthDetails", "curve")
+S3method("widthDetails", "functiongrob")
 S3method("widthDetails", "default")
 S3method("widthDetails", "frame")
 S3method("widthDetails", "lines")
@@ -261,10 +288,12 @@ S3method("widthDetails", "roundrect")
 S3method("widthDetails", "segments")
 S3method("widthDetails", "text")
 S3method("widthDetails", "xspline")
+S3method("widthDetails", "beziergrob")
 #S3method("width.details", "viewport")
 
 S3method("xDetails", "circle")
 S3method("xDetails", "curve")
+S3method("xDetails", "functiongrob")
 S3method("xDetails", "lines")
 S3method("xDetails", "points")
 S3method("xDetails", "polygon")
@@ -274,9 +303,11 @@ S3method("xDetails", "roundrect")
 S3method("xDetails", "segments")
 S3method("xDetails", "text")
 S3method("xDetails", "xspline")
+S3method("xDetails", "beziergrob")
 
 S3method("yDetails", "circle")
 S3method("yDetails", "curve")
+S3method("yDetails", "functiongrob")
 S3method("yDetails", "lines")
 S3method("yDetails", "points")
 S3method("yDetails", "polygon")
@@ -286,6 +317,14 @@ S3method("yDetails", "roundrect")
 S3method("yDetails", "segments")
 S3method("yDetails", "text")
 S3method("yDetails", "xspline")
+S3method("yDetails", "beziergrob")
+
+S3method("ascentDetails", "default")
+S3method("ascentDetails", "grob")
+S3method("ascentDetails", "text")
+
+S3method("descentDetails", "default")
+S3method("descentDetails", "text")
 
 # S3 methods for internal generics that are used in calls to external fns
 S3method("depth", "viewport")
@@ -293,6 +332,16 @@ S3method("depth", "vpList")
 S3method("depth", "vpStack")
 S3method("depth", "vpTree")
 S3method("depth", "path")
+S3method("drawVP", "viewport")
+S3method("drawVP", "vpList")
+S3method("drawVP", "vpStack")
+S3method("drawVP", "vpTree")
+S3method("labelGrob", "grob")
+S3method("labelGrob", "gTree")
+S3method("leafPaths", "viewport")
+S3method("leafPaths", "vpList")
+S3method("leafPaths", "vpStack")
+S3method("leafPaths", "vpTree")
 S3method("pushgrobvp", "viewport")
 S3method("pushgrobvp", "vpPath")
 S3method("popgrobvp", "viewport")
@@ -312,8 +361,6 @@ S3method("dim", "layout")
 
 # S3 method for generic rep (in base)
 S3method("rep", "unit")
-S3method("rep", "unit.arithmetic")
-S3method("rep", "unit.list")
 
 # S3 method for generic length (in base)
 S3method("length", "unit")
diff --git a/win32/deps/library/grid/R/grid b/win32/deps/library/grid/R/grid
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/grid/R/grid
+++ b/win32/deps/library/grid/R/grid
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/grid/R/grid.rdb b/win32/deps/library/grid/R/grid.rdb
index 6a8293d..0297bdc 100644
Binary files a/win32/deps/library/grid/R/grid.rdb and b/win32/deps/library/grid/R/grid.rdb differ
diff --git a/win32/deps/library/grid/R/grid.rdx b/win32/deps/library/grid/R/grid.rdx
index 0149dcf..6e1e3e4 100644
Binary files a/win32/deps/library/grid/R/grid.rdx and b/win32/deps/library/grid/R/grid.rdx differ
diff --git a/win32/deps/library/grid/doc/changes.txt b/win32/deps/library/grid/doc/changes.txt
new file mode 100644
index 0000000..19f3ec4
--- /dev/null
+++ b/win32/deps/library/grid/doc/changes.txt
@@ -0,0 +1,1374 @@
+Changes from grid_2.14.0 to grid_2.15.0:
+--------------------------------------
+
+1.  Added calcStringMetric() function.
+
+2.  Added "strascent" and "strdescent" units, plus 
+    stringAscent() and stringDescent() convenience functions.
+
+3.  Added "grobascent" and "grobdescent" units, plus 
+    grobAscent() and grobDescent() convenience functions.
+
+    The "ascent" of a grob is equivalent to its height by default,
+    but ascentDetails() methods can be written 
+    (e.g., text grobs are different).
+
+    The "descent" of a grob is zero by default,
+    but descentDetails() methods can be written 
+    (e.g., text grobs are different).
+
+4.  Fix for xsplinePoints() so that it copes with xspline grob
+    with non-NULL 'id' AND so that it takes the 'vp' and 'gp'
+    settings into account.
+
+5.  Added grid.bezier() function to draw Bezier curve
+    (using an X-spline approximation).
+
+    Also added bezierPoints() function.
+
+6.  Added grid.DLapply() function.
+
+
+Changes from grid_2.12.0 to grid_2.13.0:
+--------------------------------------
+
+1.  Added grid.function() for drawing lines to represent functions.
+
+2.  Fixed bug in calculation of x, y, width, and height of segments
+    grobs.
+
+3.  Fixed bug in grid.grab(wrap=TRUE) when the scene includes 
+    downViewport()s.
+
+4.  Added showGrob() function.
+
+
+Changes from grid_2.11.0 to grid_2.12.0:
+--------------------------------------
+
+1.  Neither width nor height need to be specified in 
+    grid.raster().  The image aspect ratio will be used
+    to calculate an appropriate image size for the 
+    current viewport.
+
+2.  Added [x|y|width|height]Details() methods for "rastergrob"s
+
+3.  "roundrect" grobs now obey their 'just' setting
+    (bug reported by Beau Benjamin Bruce)
+
+4.  Added grid.path() for rendering paths with holes.
+
+
+Changes from grid_2.10.0 to grid_2.11.0:
+--------------------------------------
+
+1.  Added xsplinePoints() function to return the (x, y) 
+    locations that an Xspline would be drawn through.
+    Useful for, e.g., clipping an Xspline against a
+    boundary.
+
+2.  Added grid.raster() function for rendering raster images.
+
+3.  Added grid.cap() function for capturing output on
+    current graphics device as a raster image.
+
+4.  Fixed PROTECT() bug in grid.rect() PR#14199
+    Thanks to Andrew Runnalls for the bug report.
+
+5.  Fixed multiple problems in rep.unit() and unit subsetting.
+    Motivated by PR#14170.  Thanks to Bert Gunter.
+    
+
+Changes from grid_2.9.0 to grid_2.10.0:
+--------------------------------------
+
+1.  Added showViewport() function for displaying viewport trees
+    graphically.
+
+2.  Fixed bug in unit() indexing;  negative integer indices now work.
+
+3.  Modified behaviour of editGrob() and addGrob() so that they 
+    return the original grob if the specified gPath does not exist,
+    and issue a warning (if new argument 'warn' is TRUE).
+    
+
+Changes from grid_2.8.0 to grid_2.9.0:
+------------------------------------
+
+1.  Copied grid.roundRect() from 'RGraphics' package into 'grid'.
+
+    Renamed to grid.roundrect() and also used roundrectGrob()
+    rather than roundRect(), partly for more consistent naming,
+    partly to avoid namespace collision until original functions
+    get removed from 'RGraphics' package.
+
+2.  Fixed bug in grid.curve() when curve is horizontal or vertical
+    straight line.
+
+3.  Exposed is.grob() and valid.just() via the NAMESPACE.
+
+4.  Fixed bug in downViewport(), which meant that unsuccessful
+    downViewport()s were still being recorded on the graphics
+    engine display list.  This could cause interesting results
+    when a window is resized (i.e., when the display list is 
+    replayed).  
+
+    Bug reported by Felix Andrews.
+
+5.  Added some pseudonyms for come units.  For example, it is now
+    possible to specify just "in" instead of "inches".
+
+
+Changes from grid_2.7.0 to grid_2.8.0:
+------------------------------------
+
+1.  Added grid.null() and nullGrob();  grob that is guaranteed
+    to have zero-width, zero-height, and draw nothing.
+
+    Useful as zero-size placeholder AND as invisible reference
+    point for other grobs to draw relative to.
+
+2.  Fixed bug in listing, via grid.ls(), of frame grobs.  If the frame
+    had a vpPath in its 'vp' component, you got an error from vpStack().
+
+    Problem reported by Hadley Wickham.
+
+3.  Fixed a bug in grid.ls() when attempting to list the display list
+    following the removal of a grob (i.e., so that there were NULLs
+    in the display list).
+
+    Problem reported by Felix Andrews.
+
+
+Changes from grid_2.6.0 to grid_2.7.0:
+------------------------------------
+
+1.  Grid will no longer complain about clipping to a rotated
+    viewport if the rotation is a multiple of 90 degrees.
+
+    Prompted by report from Gustaf Rydevik.
+
+2.  Open Xsplines must have zero shape for first and last
+    control point, but this was not being enforced correctly
+    for the case where there were multiple Xsplines in a
+    single grid.xspline() call (i.e., with use of 'id' or
+    'id.length').  The problem can be seen with this code
+    (most curves do not connect to the first control point
+    [there are also subtle errors in the curve shapes]):
+
+        grid.newpage()
+        pushViewport(viewport(w=.5, h=.5))
+        grid.xspline(x=outer(c(0, .5, 1, .5), 5:1/5),
+                     s=1,
+                     y=outer(c(.5, 1, .5, 0), 5:1/5),
+                     id.lengths=rep(4, 5),
+                     gp=gpar(col=1:5, lwd=3))
+        grid.rect()
+
+3.  Frame grobs have been improved so that all of the viewports
+    that are generated during the drawing of a frame (and its
+    cells) are left on the display list (previously, they were
+    popped).
+
+    This has implications particularly for ggplot[2] because
+    it means that it is now possible to downViewport() to 
+    viewports created during the drawing of a ggplot[2] plot
+    to, for example, add further annotations to the plot.
+
+4.  Small fixes to grid.ls():
+
+    - viewports pushed by cellGrobs within frames are now
+      shown by grid.ls()
+
+    - fixed warning (bug really) when display list contains
+      only one grob (and padPrefix() is called).
+
+
+Changes from grid_2.5.0 to grid_2.6.0:
+------------------------------------
+
+1.  Added grid.gedit() as convenience wrapper for grid.edit()
+    based on usage patterns of Hadley Wickham when working with
+    'ggplot' package.
+
+    Ditto, grid.gget() and grid.gremove().
+
+2.  Improved implementation of 'id' and 'id.lengths' arguments
+    for drawing multiple polygons/polylines/xsplines to gain 
+    order 2 speed improvement.  
+
+    Problem independently reported by Luke Tierney, Deepayan Sarkar and
+    Vilmos Prokaj.
+
+3.  Bug fixes for grid.remove(), especially for grep=TRUE and global=TRUE
+    (i.e., removing all grobs from DL where the name matches a pattern).
+
+    Also some fixes to grid.remove() error messages when no match found.
+
+    Bug reports from Hadley Wickham.
+
+4.  New function grid.ls() for listing grob trees and viewport trees
+    (including both grob trees and viewport trees interlaced).
+
+    Useful for exploring current grob/viewport tree, explaining
+    grob/viewport trees, and programming on or debugging 
+    grob/viewport trees.
+
+
+Changes from grid_2.4.0 to grid_2.5.0:
+------------------------------------
+
+1.  Added 'open' argument to grid.curve().  This allows, for example,
+    filling the segment of a circle.
+
+2.  Fixed bug in arrow() function:  segfault produced if either 
+    'ends' or 'type' argument are given as NULL.  Thanks to
+    Sebastien Luque for the report.
+
+
+Changes from grid_2.3.0 to grid_2.4.0:
+------------------------------------
+
+1.  Bug fix for colour used when drawing a rectangle in a
+    rotated viewport (reported by Olaf Burger).
+
+2.  Removed 'units.per.obs' argument from grid.lines() and 
+    grid.segments() 
+
+    (This is a bug fix;  should have been removed long ago).
+
+3.  Added extra check on 'data' argument of unit(), which means
+    that if you supply a non-NULL value where the 'unit' is
+    not "str[width|height]" or "grob[x|y|width|height]", you
+    get an error.  This may impact on existing code.
+
+4.  Radii in grid.circle() are now silently converted to their
+    absolute value (negative values used to trigger an error).
+
+5.  New function grobName() for generating unique (within-session)
+    grob names (based on class of grob).
+
+    Also, modified default naming of grobs to be based on class
+    of grob.  This should not impact on existing code because
+    noone should be depending on the default names generated by grid.
+
+
+Changes from grid_2.2.0 to grid_2.3.0:
+------------------------------------
+
+1.  Bug fix for stringWidth() and stringHeight() with mathematical 
+    annotation.
+
+    These used to always convert the argument to "character".
+    Now they let language objects (e.g., expressions) pass through.
+
+2.  New grid.xspline() function to draw X-splines (a general curve
+    approximated or interpolated relative to control points).
+
+3.  New 'arrow' argument to grid.line.to(), grid.lines(), and
+    grid.segments().  This provides a new way to specify arrow
+    heads on either end of a line.
+
+    grid.arrows() has been deprecated.
+
+    NOTE: that the new 'arrow' arguments have been added BEFORE
+    the name, gp and vp arguments so existing code that specifies
+    any of these arguments *by position* (not by name) will fail.
+
+4.  Added "[" (subset) methods for "gpar" objects.
+
+5.  New grobX() and grobY() functions for producing units 
+    describing a location on the boundary of a grob.
+
+6.  Units produced by grobX() and grobY() make use of new 
+    xDetails() and yDetails() generic functions to calculate the 
+    boundary of a grob.  Methods for these functions are provided
+    for all grid graphical primitives.
+
+7.  Bug fix for grid.polygon() when 'x' is not just a simple unit
+    (e.g., it is unit arithmetic);  'index' was being calculated
+    incorrectly so not all of polygon would be drawn or, if 
+    'id' or 'id.length' were used, only a single polygon would
+    be drawn (with unexpected shape).
+
+8.  New grid.curve() primitive for drawing a curve between two
+    locations.  
+
+    Together with new grobX() and grobY() provides support for
+    drawing simple node-and-edge graphs and flow diagrams.
+
+9.  New grid.clip() primitive for setting the clipping region
+    (more accurately, the clipping rectangle).  Has effect until
+    the next grid.clip() or when the current viewport is popped.
+
+10. New dim.layout() method for layout objects.  Allows easy
+    access to dimensions of layout via nrow() and ncol().
+
+11. unit.rep() deprecated in favour of unit method(s) for rep() function.
+
+12. unit.length() deprecated in favour of unit method(s) for length() function.
+
+13. New grid.polyline() primitive.  Just like grid.lines() except has
+    'id' and 'id.lengths' arguments.
+
+    These work like the corresponding arguments in grid.polygon() and
+    grid.xspline(), allowing multiple polylines to be drawn from a
+    single grid.polyline() call.
+
+14. Fixed drawing of top-level gList objects so that they 
+    (actually the grobs in the gList) are recorded on the 
+    grid display list.
+
+    Allowed a gList to be component of a gList 
+    (the gList constructor merges sub-gList into resulting gList).
+
+    Added subset method for gList objects 
+    (so that result is still a gList).
+
+15. Bug fix for grid.rect() and grid.circle() with gpar(lty="blank").
+    (problem was actually in the graphics engine).
+    
+    Reported by John Braun (private correspondence).
+
+
+Changes from grid_2.1.0 to grid_2.2.0:
+------------------------------------
+
+1.  current.vpPath() now exported.
+
+2.  Grid now uses the 'fg' and 'bg' settings (if any) for
+    graphics devices to set the initial graphical parameter
+    settings of the top-level viewport (i.e., the 'gp' arg
+    of viewport[ROOT]).
+
+3.  Fixed bug in evaluation of grobWidth(polygonGrob()).
+    The C function L_locnBounds was not exported AND
+    the widthDetails.polygon method was not exposed properly
+    via the NAMESPACE.
+
+    Reported in private correspondence by Deepayan Sarkar.
+
+    Also corrected export of heightDetails, validDetails, and	
+    widthDetails for arrows, circle, polygon, points, rect, and
+    segments primitives.
+
+
+Changes from grid_2.0.1 to grid_2.1.0:
+------------------------------------
+
+1.  preDrawDetails(), drawDetails(), and postDrawDetails() 
+    methods are now recorded on the graphics engine
+    display list.   This means that calculations within these 
+    methods are now run when a device is resized or
+    when output is copied from one device to another.  A simple
+    example (the rectangle remains 1inch wide when resizing the
+    device -- it does not in previous versions) ...
+
+        testgrob <- grob(cl="test")
+	drawDetails.test <- function(x, recording) {
+	  w <- convertWidth(unit(1, "inches"), "npc")
+	  grid.rect(width=w)
+	}
+	grid.draw(testgrob)
+
+2.  Fixed bug in grid.text() when "rot" argument has length 0.
+    (privately reported by Emmanuel Paradis)
+
+3.  New getNames() function to return just the names of all top-level
+    grobs on the display list.
+
+4.  Recording on the grid display list is turned off within 
+    preDrawDetails(), drawDetails(), and postDrawDetails() methods.
+
+    This means that you do not need to worry about specifying
+    recording=FALSE within these methods.
+    
+5.  Grid should recover better from errors or user-interrupts
+    during drawing (i.e., not leave you in a strange viewport
+    or with strange graphical parameter settings).
+
+6.  New function grid.refresh() to redraw the grid display list.
+
+7.  New function grid.record() to capture calculations
+    with grid graphics output.  For example ...
+
+        grid.record({
+                      w <- convertWidth(unit(1, "inches"), "npc")
+	              grid.rect(width=w)
+                    },
+                    list())
+
+8.  grobWidth and grobHeight ("grobwidth" and "grobheight" units)
+    for primitives (text, rects, etc, ...) are now
+    calculated based on a bounding box for the relevant grob.
+
+    These used to be calculated assuming a grob was scalar
+    rather than vector.  For example, the following now behaves
+    much more sensibly ...
+
+        txt <- textGrob(c("This is a repeat", "This is a repeat"),
+	                y=1:2/3, rot=45)
+        grid.draw(txt)
+        grid.rect(width=grobWidth(txt), height=grobHeight(txt))
+
+    NOTE: this has changed the calculation of the size of a scalar
+    rect (or circle or lines) so that, for example, something like ...
+
+        grid.pack(frame, rectGrob())
+
+    ... needs to become ...
+
+        grid.pack(frame, rectGrob(), 
+                  width=unit(1, "null"), height=unit(1, "null"))
+
+    ... if you just want a rectangle that fills the space available.
+
+9.  New arguments "warn" and "wrap" for function grid.grab()
+    
+    If warn>0 will warn if know (or, if warn>1,  if even suspect) 
+    that the grab has not faithfully captured the output.  
+
+    If wrap=TRUE, will capture output by wrapping all non-grobs
+    on the display list in grobs.  Resulting gTree is less 
+    elegant and harder to work with, but should always faithfully
+    capture output.
+
+10. New function grid.grabExpr() which captures the output from
+    an expression (i.e., not from the current scene) without
+    doing any drawing (i.e., no impact on the current scene).
+
+11. upViewport() now (invisibly) returns the path that it goes up
+    (suggested by Ross Ihaka).
+
+    This makes it possible to do things like ...
+
+        upPath <- upViewport(n)
+	...
+	downViewport(upPath)
+
+    ... (i.e., navigate up and then back down to where you came from).
+
+12. The "gamma" gpar has been deprecated (this is a device property
+    not a property of graphical objects;  suggested by Ross Ihaka).
+
+13. New "lex" gpar;  a line width multiplier.
+    The final line width is calculated as ...
+
+        gpar("lex")*gpar("lwd")
+
+    ... and the multiplier is cumulative (like cex) ...
+
+      grid.rect(height=0.5, width=0.5, 
+                gp=gpar(lwd=16))                # lex = 1
+      pushViewport(viewport(gp=gpar(lex=0.5)))
+      grid.rect(height=0.5, width=0.5, 
+                gp=gpar(lwd=16, col="red"))     # lex = 0.5
+      pushViewport(viewport(gp=gpar(lex=0.5)))
+      grid.rect(height=0.5, width=0.5, 
+                gp=gpar(lwd=16, col="green"))   # lex = 0.25!
+
+    This (along with cex) provides support for "zooming" a grid scene.
+
+14. grid.text() now handles any language object as mathematical
+    annotation (instead of just expressions).  For example ...
+
+      grid.text(call("sin", pi))
+ 
+15. plotViewport() has default value for "margins" argument (that match
+    the default value for par(mar)).
+
+16. The "extension" argument to dataViewport() can now be vector, 
+    in which case the first value is used to extend the xscale and
+    the second value is used to extend the y scale.
+    (suggested by Ross Ihaka).
+
+17. All "just" arguments (for viewports, layouts, rectangles, text)
+    can now be numeric values (typically between 0 [left] and 1 [right])
+    as well as character values ("left", "right", ...).
+
+    For rectangles and text, there are additional "hjust" and "vjust"
+    arguments which allow numeric vectors of justification in
+    each direction (e.g., so that several pieces of text can have 
+    different justifications).  If these are specified, they
+    override the "just" argument.
+    (suggested by Ross Ihaka)
+
+18. New "edits" argument for grid.xaxis() and grid.yaxis() to
+    allow specification of on-the-fly edits to axis children
+    (when at == NULL, so children are generated on-the-fly).
+
+19. applyEdit(x, edit) returns x if target of edit (i.e., child
+    specified by a gPath) cannot be found.
+
+20. Fix for calculation of length of max/min/sum unit.  Length is
+    now (correctly) reported as 1 (was reported as length of first arg).
+
+21. Viewport names can now be any string (they used to have to be a
+    valid R symbol).
+
+    The documentation now says that grob names can be any string
+    (they always could be, but the documentation said they had to
+     be a valid R symbol)
+
+22. The "label" argument for grid.xaxis() and grid.yaxis() can now 
+    also be a language object or string vector, in which case it 
+    specifies custom labels for the tick marks.
+
+
+Changes from grid_2.0.0 to grid_2.0.1:
+------------------------------------
+
+1.  Fixed bug in grid.newpage();  it was not starting new page
+    on first grid call if there was already traditional graphics
+    output on the device (i.e., the device was "dirty" but not 
+    "grid dirty").
+
+2.  Fixed bug in grid.grab() when no viewports have been pushed.
+
+
+Changes from grid_1.9.0 to grid_2.0.0:
+------------------------------------
+
+1.  Calculation of number of circles to draw in circleGrob now
+    looks at length of y and r as well as length of x.
+
+2.  Calculation of number of rectangles to draw in rectGrob now
+    looks at length of y, w, and h as well as length of x.
+
+3.  All primitives (rectangles, lines, text, ...) now handle 
+    non-finite values (NA, Inf, -Inf, NaN) for locations and
+    sizes.
+
+    Non-finite values for locations, sizes, and scales of
+    viewports result in error messages.
+
+    There is a new vignette("nonfinite") which describes this
+    new behaviour.
+
+4.  Fixed (unreported) bug in drawing circles.  Now checks that
+    radius is non-negative.
+
+5.  downViewport() now reports the depth it went down to find a 
+    viewport.  Handy for "going back" to where you started, e.g., ...
+
+      depth <- downViewport("vpname")
+      <draw stuff>
+      upViewport(depth)
+
+6.  The "alpha" gpar() is now combined with the alpha channel of
+    colours when creating a gcontext as follows:
+
+      finalAlpha = gpar("alpha")*(R_ALPHA(col)/255)
+
+    This means that gpar(alpha=) settings now affect internal
+    colours so grid alpha transparency settings now are sent to
+    graphics devices.
+
+    The alpha setting is also cumulative.  For example, ...
+      
+      grid.rect(width=0.5, height=0.5, 
+                gp=gpar(fill="blue"))              # alpha = 1
+      pushViewport(viewport(gp=gpar(alpha=0.5)))
+      grid.rect(height=0.25, gp=gpar(fill="red"))  # alpha = 0.5
+      pushViewport(viewport(gp=gpar(alpha=0.5)))
+      grid.rect(width=0.25, gp=gpar(fill="red"))   # alpha = 0.25 !
+
+7.  Editing a gp slot in a grob is now incremental.  For example ...
+
+      grid.lines(name="line")
+      grid.edit("line", gp=gpar(col="red")) # line turns red
+      grid.edit("line", gp=gpar(lwd=3)) # line becomes thick AND STAYS red
+      
+8.  The "cex" gpar is now cumulative.  For example ...
+      
+      grid.rect(height=unit(4, "char")) # cex = 1
+      pushViewport(viewport(gp=gpar(cex=0.5)))
+      grid.rect(height=unit(4, "char")) # cex = 0.5
+      pushViewport(viewport(gp=gpar(cex=0.5)))
+      grid.rect(height=unit(4, "char")) # cex = 0.125 !!!
+
+9.  New childNames() function to list the names of children
+    of a gTree.
+
+10. The "grep" and "global" arguments have been implemented for 
+    grid.[add|edit|get|remove]Grob() functions.
+
+    The "grep" argument has also been implemented for the
+    grid.set() and setGrob().
+
+11. New function grid.grab() which creates a gTree from the 
+    current display list (i.e., the current page of output can
+    be converted into a single gTree object with all grobs
+    on the current page as children of the gTree and all the 
+    viewports used in drawing the current page in the childrenvp
+    slot of the gTree).
+
+12. New "lineend", "linejoin", and "linemitre" gpar()s:
+
+      line end can be "round", "butt", or "square".
+      line join can be "round", "mitre", or "bevel".
+      line mitre can be any number larger than 1
+        (controls when a mitre join gets turned into a bevel join;  
+         proportional to angle between lines at join;
+	 very big number means that conversion only happens for lines
+	 that are almost parallel at join).
+
+13. New grid.prompt() function for controlling whether the user is
+    prompted before starting a new page of output.
+
+    Grid no longer responds to the par(ask) setting in the "graphics"
+    package.
+
+
+Changes from grid_1.9.0 to grid_1.9.1:
+------------------------------------
+
+1.  Fixed (unreported) bug in internal calculation of unitArithmetic
+    object when op = * and numeric operand longer than unit operand
+
+2.  Fixed (unreported) bug in creation of unitArithmetic objects
+    when numeric operand is integer.  All numeric operands are now
+    coerced to real.
+
+
+Changes from grid_1.8.0 to grid_1.9.0:
+------------------------------------
+
+1.  Renamed push/pop.viewport() to push/popViewport().
+
+2.  Added upViewport(), downViewport(), and seekViewport() to 
+    allow creation and navigation of viewport tree 
+    (rather than just viewport stack).
+
+3.  Added id and id.lengths arguments to grid.polygon() to allow
+    multiple polygons within single grid.polygon() call.
+
+4.  Added vpList(), vpStack(), vpTree(), and current.vpTree()
+    to allow creation of viewport "bundles" that may be pushed
+    at once (lists are pushed in parallel, stacks in series).
+
+    current.vpTree() returns the current viewport tree.
+
+5.  Added vpPath() to allow specification of viewport path
+    in downViewport() and seekViewport().
+    
+    See ?viewports for an example of its use.
+
+    NOTE: it is also possible to specify a path directly,
+    e.g., something like "vp1::vp2", but this is only
+    advised for interactive use (in case I decide to change the
+    separator :: in later versions).
+
+6.  Added "just" argument to grid.layout() to allow justification
+    of layout relative to parent viewport *IF* the layout is not
+    the same size as the viewport.  There's an example in
+    help(grid.layout).
+
+7.  Allowed the "vp" slot in a grob to be a viewport name or a
+    vpPath.  The interpretation of these new alternatives is to
+    call downViewport() with the name or vpPath before drawing the
+    grob and upViewport() the appropriate amount after drawing the
+    grob.  Here's an example of the possible usage:
+
+        pushViewport(viewport(w=.5, h=.5, name="A"))
+	grid.rect()
+	pushViewport(viewport(w=.5, h=.5, name="B"))
+	grid.rect(gp=gpar(col="grey"))
+	upViewport(2)
+	grid.rect(vp="A", gp=gpar(fill="red"))
+	grid.rect(vp=vpPath("A", "B"), gp=gpar(fill="blue"))
+
+8.  Added engine.display.list() function.  This allows the user to
+    tell grid NOT to use the graphics engine display list and to handle
+    ALL redraws using its own display list (including redraws after
+    device resizes and copies).
+
+    This provides a way to avoid some of the problems with resizing
+    a device when you have used grid.convert(), or the gridBase package,
+    or even base functions such as legend().
+
+    There is a document discussing the use of display lists in grid
+    on the grid web site 
+    (http://www.stat.auckland.ac.nz/~paul/grid/grid.html)
+
+9.  Changed the implementation of grob objects.  They are no longer 
+    implemented as external references.  They are now regular R objects
+    which copy-by-value.  This means that they can be saved/loaded
+    like normal R objects.  In order to retain some existing grob
+    behaviour, the following changes were necessary:
+
+    - grobs all now have a "name" slot.  The grob name is used to
+      uniquely identify a "drawn" grob (i.e., a grob on the display
+      list).  
+    - grid.edit() and grid.pack() now take a grob name as the first
+      argument instead of a grob.  (Actually, they take a gPath -
+      see below)
+    - the "grobwidth" and "grobheight" units take either a grob
+      OR a grob name (actually a gPath - see below).  Only in the 
+      latter case will the unit be updated if the grob "pointed to"
+      is modified.
+
+    In addition, the following features are now possible with grobs:
+
+    - grobs now save()/load() like any normal R object.
+    - many grid.*() functions now have a *Grob() counterpart.  The
+      grid.*() version is used for its side-effect of drawing 
+      something or modifying something which has been drawn;  the
+      *Grob() version is used for its return value, which is a grob.
+      This makes it more convenient to just work with grob objects without
+      producing any graphical output (by using the *Grob() functions).
+    - there is a gTree object (derived from grob), which is a grob 
+      which can have children.  A gTree also has a "childrenvp" slot
+      which is a viewport which is pushed and then "up"ed before the
+      children are drawn;  this allows the children of a gTree to 
+      place themselves somewhere in the viewports specified in the
+      childrenvp by having a vpPath in their vp slot. 
+    - there is a gPath object, which is essentially a concatenation
+      of grob names.  This is used to specify the child of (a child of ...)
+      a gTree.
+    - there is a new API for creating/accessing/modifying grob objects:
+      grid.add(), grid.remove(), grid.edit(), grid.get() (and their
+      *Grob() counterparts can be used to add, remove, edit, or extract
+      a grob or the child of a gTree.  NOTE: the new grid.edit() API
+      is incompatible with the previous version.
+
+10. Added stringWidth(), stringHeight(), grobWidth(), and grobHeight()
+    convenience functions (they produce "strwidth", "strheight",
+    "grobwidth", and "grobheight" unit objects, respectively).
+
+11. Allowed viewports to turn off clipping altogether.  Possible settings
+    for viewport clip arg are now:
+
+      "on"      = clip to the viewport (was TRUE)
+      "inherit" = clip to whatever parent says (was FALSE)
+      "off"     = turn off clipping 
+
+    Still accept logical values (and NA maps to "off")
+
+
+Changes from grid_1.8.0 to grid_1.8.1:
+------------------------------------
+
+1.  I have effectively disabled the "mystrwidth", "mystrheight",
+    "mychars", and "mylines" units.  These are now identical in
+    behaviour to the equivalent units without the "my".
+
+    Another way to look at it is that I have modified the behaviour
+    of "lines", "chars", "strwidth", and "strheight" so that they
+    ALWAYS obey the latest gpar settings (including any gpar 
+    settings in a grob).  
+
+    Some examples ...
+
+    This text is sized AND positioned in terms of a fontsize of 6:
+
+      grid.text("small text and small lines", y=unit(2, "lines"), 
+                gp=gpar(fontsize=6))
+
+    This text is 6 pt in size, but is positioned in terms of the
+    (default on X11) fontsize 12:
+
+      push.viewport(viewport(y=unit(2, "lines")))
+      grid.text("small test and big lines", gp=gpar(fontsize=6))
+      pop.viewport()
+
+2.  Fixed a bug in the calculation of "grobwidth" and "grobheight"
+    units.  The following code demonstrates the problem (the black
+    rectangle should snugly bound the grey rectangles):
+
+      grid.newpage()
+      # Create a frame with fontsize=6
+      gf <- grid.frame(layout=grid.layout(10, 10,
+                       widths=unit(rep(1, 10), "strwidth",
+                         as.list(rep("o", 10))),
+                       heights=unit(rep(1, 10), "strheight",
+                         as.list(rep("o", 10)))),
+                     gp=gpar(fontsize=6))
+      # Add a rect to the frame
+      for (i in 1:10)
+        grid.place(gf, grid.rect(gp=gpar(col="grey"), draw=FALSE),
+                   col=i, row=i)
+      grid.draw(gf)
+      # Now draw a rect around the frame
+      grid.rect(width=unit(1, "grobwidth", gf),
+                height=unit(1, "grobheight", gf))
+
+3.  Fixed a bug in the implementation of the "cex" gpar.  This is now
+    used correctly in the transformation code in unit.c
+
+    The bug was demonstrated by the following simple example
+    (the second set of points should be twice the radius of the
+    first set of points):
+
+      grid.newpage()
+      push.viewport(viewport())
+      grid.points()
+      grid.points(gp = gpar(cex = 2))
+      
+    Another demonstration from the original bug report from David Hinds:
+
+      xyplot(1:4~1:4, cex=1:4, pch=1)
+
+4.  Fixed a bug in multiplication of scalar by unit object, when the
+    scalar has length > 1.  The following example demonstrates
+    the problem:
+
+      grid.segments(x0=1:3/4, y0=0.1, x1=1:3/4,
+                    y1=1:3/4*unit(1, "npc"))
+
+    This should behave the same as:
+
+      grid.segments(x0=1:3/4, y0=0.1, x1=1:3/4,
+                    y1=unit(1:3/4, "npc"))
+      
+
+Changes from grid_0.7-4 to grid_1.8.0:
+------------------------------------
+
+1.  grid.text() now checks that the rot argument is numeric and finite.
+
+2.  dataViewport() checks for is.null(<arg>) rather than missing(<arg>)
+    and has renamed arguments x and y to xData and yData.
+
+    All to avoid confusion with specifying x= and y= in the ... argument.
+
+    This also fortuitously fixed a bug in dataViewport where the 
+    calculation of the x-range was partially dependent on the y-range(!)
+
+    Thanks to Russell Norvell for spotting and reporting the bug.
+
+3.  unit() checks that units argument is character mode.
+
+    Fix for bug (first reported by Achim Zeileis) produced by, 
+    for example ...
+
+	unit(1, 2)
+
+4.  The function absolute.units() was recursive and now uses a loop.
+
+    Fixes the following problem (from Deepayan Sarkar):
+
+        gf <- grid.frame(layout = grid.layout(nrow=1, ncol=1), draw = FALSE)
+        grob.rect <- grid.rect(x = 1:99/100, y = 1:99/100,
+                               h = rep(.01, 100), w = rep(.05, 100),
+                               gp = gpar(col = terrain.colors(100)),
+                               draw = FALSE)
+        grid.pack(frame = gf, row = 1, col = 1,
+                  grob = grob.rect,
+                  draw = FALSE)
+        grid.draw(gf)  # Fails with stack overflow
+
+5.  There is now a grid.locator() function for interactively selecting
+    locations within the current grid viewport with a mouse.
+
+6.  There is a new grid.convert() function for converting between
+    different coordinate systems.  
+
+    The convertNative() function has been deprecated.
+
+7.  The default "top-level" viewport that is generated by grid
+    now has its "native" coordinate system set to the "native"
+    coordinate system of the device.  For example, "native"
+    units at the top-level correspond to points on a PostScript
+    device, pixels on an X11 device, and so on.
+
+    For example, try the following:
+
+        library(grid)
+	x11()
+	grid.rect(x=10, y=10, width=10, height=10,
+                 default.units="native")
+
+    This may cause consternation if you ever plot grid.points()
+    at the top-level because the default units for grid.points()
+    are "native" ... I consider this an unlikely occurrence.
+
+8.  Added a new gpar called "alpha" for specifying transparency.
+    This is supposed to be a number from 1 (opaque) to 0 (transparent).
+    No R devices will take any notice of this whatsoever as yet.
+
+9.  Modified "xaxis" and "yaxis" grobs so that they extend the 
+    "collection" class.  This means that, when a new generic function
+    is created, it may be possible to write methods just for the 
+    collection class and not also separate xaxis and yaxis methods.
+
+10. Modified unit subsetting so that logical indices work.  
+    For example ...
+
+        unit(1:4, "npc")[1:4 == 3]
+
+11. Fixed detaching/reloading of grid package (was causing an error).
+ 
+12. There is a new grid.arrows() primitive.  
+
+    See the help file for example usage.
+
+13. Grid is now a base package (hence version number leap!)
+
+
+Changes from grid_0.7-3 to grid_0.7-4:
+------------------------------------
+
+1.  Fixed the bug in the bug-fix in item 7. below.
+
+
+Changes from grid_0.7-2 to grid_0.7-3:
+------------------------------------
+
+1.  Properly removed "origin" settings from viewports.
+
+2.  Modified grid.pretty() slightly so that it would respond
+    sensibly/usefully to things like ...
+
+        grid.pretty(c(10, 0))
+
+    A side-effect of this is that the following sort of viewport
+    scale specifications become sensible/useful ...
+
+        push.viewport(viewport(layout=grid.layout(1, 2)))
+        push.viewport(viewport(layout.pos.col=1))
+        push.viewport(viewport(w=.8, h=.8,
+                               xscale=c(10,0)))
+        grid.points(1:10, 1:10/11)
+        grid.xaxis()
+        grid.yaxis()
+        pop.viewport(2)
+        push.viewport(viewport(layout.pos.col=2))
+        push.viewport(viewport(w=.8, h=.8,
+                               yscale=c(10,0)))
+        grid.points(1:10/11, 1:10)
+        grid.xaxis()
+        grid.yaxis()
+        pop.viewport(3)
+
+3.  Fixed the calculation of number of "vertices" in grid.lines so that
+    it is the maximum of length(x) and length(y).
+
+    Used to be calculated solely on length(x).
+
+4.  Grid now throws an error if you try to create a unit of length 0.
+
+    This to fix a bug reported by Bud Gibson, the essence of which was ...
+
+        grid.points(size=unit(numeric(0), "mm"))
+
+5.  The default value of the "at" argument for grid.xaxis() and
+    grid.yaxis() is NULL (was NA;  NA was inconsistent with other
+    default argument settings and basically a dumb idea)
+
+6.  Grid now throws an error if you try to create a gpar object with
+    an element of length 0.
+
+    This is to fix a bug reported by Michael Friendly (and diagnosed by
+    Brian Ripley), the essence of which was ...
+
+         grid.lines(gpar(fontsize=numeric(0)))
+
+7.  grid.text() now converts its label argument to a string.
+
+    This is to fix a bug where "grobwidth" or "grobheight" would 
+    segfault if given a text grob for which the label was not a string.
+    (The fix involved including a check for "mystrwidth" and "mystrheight"
+     units in valid.data).
+
+    The bug could be produced by ...
+    
+        grid.rect(w=unit(1, "grobwidth", data=grid.text(5)))
+    
+
+Changes from grid_0.7-1 to grid_0.7-2:
+-------------------------------------
+
+1.  Fixed some generic/method incompatibilities (pointed out by Kurt).
+
+
+Changes from grid_0.7 to grid_0.7-1:
+------------------------------------
+
+1.  Fixed a bug where layout matrix respect was not being applied to
+    the correct cell.  For example, the following caused the cell
+    1,3 to be respected rather than 1,2 ...
+
+	lt.resp <- matrix(0, 2, 3)
+	lt.resp[1,2] <- 1
+	grid.show.layout(grid.layout(2, 3, respect = lt.resp))
+
+    Reported by Deepayan Sarkar.
+
+
+Changes from grid_0.6 to grid_0.7:
+------------------------------------
+
+1.  The web pages for grid have moved to ...
+   
+	http://www.stat.auckland.ac.nz/~paul/grid/grid.html
+
+2.  Mathematical annotation is now available in grid.
+
+    Wherever grid expects a string, an expression may be used instead.
+    This covers not only producing mathematical annotation output,
+    but also correctly calculating width and height of expressions,
+    and checking for overlapping expressions.
+
+3.  If you try to save/load a grid grob, it will now fail gracefully
+    rather than seg faulting.
+
+4.  If you save a display list containing grid output, then detach
+    grid, then try to run the display list again, it will now fail 
+    gracefully rather than seg faulting.
+
+5.  All gpar() settings can now be vectors.  Well, they could always
+    be vectors, but now values other than the first one will have an
+    effect.  This will not happen in all contexts, for example, 
+    viewports will only take notice of the first value in each setting,
+    but for graphics functions where multiple items can be output,
+    multiple settings may be sensibly given.  Some examples are:
+
+    # multiple points with different colours
+    grid.points(1:10/11, 1:10/11, gp=gpar(col=1:10))
+
+    # multiple segments with different colours
+    grid.segments(1:10/11, 0, 1:10/11, 1, gp=gpar(col=1:10))
+
+    # multiple points with different sizes
+    grid.points(1:10/11, 1:10/11, size=unit(1:10, "mm"))
+
+    # multiple pieces of text with different font sizes
+    grid.text(1:10, x=1:10/11, gp=gpar(fontsize=10:20))
+
+    # multiple rects with different lineheights (and height is in "lines")
+    grid.rect(width=.05, x=1:10/11,
+              height=unit(1, "mylines"),
+              gp=gpar(lineheight=1:10))
+
+6.  (Because of a fix to R/src/main/engine.c ...)
+    Multiple-line text (i.e., text with "\n"s in it) is now correctly
+    spaced vertically (i.e., takes notice of the current value of 
+    "fontsize").
+    
+    NOTE, however, that multiple-line text still takes no notice of the
+    current value of "lineheight".
+
+7.  Fixed a bug in grid.layout().  It was the case that, if you 
+    entered widths or heights which were not unit objects, they
+    were not converted properly to unit objects.
+
+8.  Modified the defaulting of "just" arguments when a single value
+    is provided.  See the new example in grid.text.
+
+9.  Fixed a bug where grid.points(pch=NULL) would cause a crash.
+    This now defaults pch to the value 1.
+
+10. Added "fontfamily" and "fontface" gpar() settings.  The fontfamily
+    setting will mostly be ignored until devices are modified to take
+    notice of the extra information, BUT this can be used NOW to 
+    specify a Hershey Font family (on all devices).  The fontface 
+    setting is designed to take over from the old "face" setting,
+    but the latter is retained for backward compatibility.
+
+
+Changes from grid_0.5-1 to grid_0.6:
+------------------------------------
+
+1.  Some internal changes to speed up creation of unit objects.  
+    This may have a noticeable effect on drawing legends and anything 
+    that relies on grid frames (e.g., "key"s in lattice).
+
+2.  A couple of bug fixes for "grobwidth" and "grobheight" units.
+    Symptoms were legends not being allocated the correct amount of 
+    space.
+
+    Thanks to Deepayan Sarkar and Peter Kleiweg for help diagnosing
+    the bug and testing the fix.
+
+3.  Added plotViewport() and dataViewport() 
+    convenience function for creating a 
+    viewport that has the typical layout of an R plot.
+
+4.  Altered viewport() function so that layout.pos.row and layout.pos.col
+    can be specified as a sequence and only the range() of that 
+    sequence is used.
+
+5.  Removed most documentation from the package to reduce the download
+    size.  The user's guide and changes file are included with the
+    tar ball, but the other documents are only available via 
+    http://www.stat.auckland.ac.nz/PEOPLE/paul/grid/grid.html
+
+    Also changed the format of the user's guide from postscript to pdf.
+
+6.  Fixed bug in unit.length where the length of a unit.arithmetic object
+    was calculated incorrectly if the length() of the scalar multiplier
+    was longer than the unit.length() of the unit object being multiplied.
+
+7.  Allowed character settings for pch in grid.points()
+
+8.  The crash on Windows platforms when plot history is turned on
+    has been fixed in R version 1.5.  
+
+    This fix means that grid_0.6 will only run on R version >= 1.5.0
+
+9.  Added handling of NULL values for gpar elements.  Except for col
+    and fill, this now means the same as specifying no setting at all
+    for the element -- previous behaviour was a segfault.
+
+
+Changes from grid_0.5 to grid_0.5-1:
+------------------------------------
+
+1.  Fix for some grid bugs.
+    
+    The problems were:
+	(i)   grid output could not be saved in metafile format 
+	(ii)  non-grid output could not be saved in metafile format when
+	      grid was loaded
+	(iii) empty page at start of grid postscript output
+	(iv)  empty page at start of non-grid postscript output when
+	      grid was loaded
+	(v)   copying grid output from x11 to postscript (dev.copy)
+	      produced blank pages in postscript
+
+    These problems were due to two things in grid:
+	(i)  grid created a new page whenever a new device was started.
+	(ii) grid created a new page whenever the display list was
+	     replayed (e.g., when a device was resized or the output
+	     was copied from one device to another)
+
+    Grid now only creates a new page the first time grid output is
+    produced on a device AND only creates a new page for replaying
+    the display list IF there has already been grid output on the device.
+
+
+Changes from grid_0.2 to grid_0.5:
+----------------------------------
+
+1.  R has a new device API and a new graphics engine.  Grid uses these.
+
+    This means that this version will NOT work on R versions before 1.4.0
+
+    Another known "bug" is that this version of grid will crash R if
+    used in Windows with plot history recording turned on (although
+    "add"ing individual grid "plots" to the plot history should still
+    work).
+    
+2.  Added "mystrwidth" and "mystrheight" units;  basically these just
+    complete the set of units which depend on font, fontsize, and/or 
+    lineheight and therefore may refer to the current viewport settings
+    of these parameters OR to the current settings of the grob being
+    drawn.
+
+3.  Added unit.rep function (the base rep() function is not generic
+    so I could not simply write a rep.unit method).
+
+4.  Added new gpar, "gamma", for gamma-correction of colours
+    (defaults to 1).  NOTE that only windows devices will currently
+    respond to on-the-fly changes in gamma.
+
+5.  Added "clip" flag to viewports.  If "clip" is TRUE, then output
+    is clipped to the viewport.
+
+    Clipping obeys only the most recent viewport clip setting.
+    For example, if you clip to viewport1, then clip to viewport2,
+    the clipping region is determined wholly by viewport2, the
+    size and shape of viewport1 is irrelevant (until viewport2
+    is popped of course).
+
+    If a viewport is rotated (because of its own "angle" setting
+    or because it is within another viewport which is rotated) then
+    the "clip" flag is ignored.
+  
+6.  The functions grid.start() and grid.stop() have been removed.
+    grid automatically "registers" with devices.
+
+7.  Grid no longer automatically opens a device when it is loaded.
+    Instead, a device is created, if there are none open, when the
+    first drawing occurs or when the first viewport is pushed.
+
+8.  Added new functions unit.pmin() and unit.pmax() which are unit
+    versions of pmax() and pmin()
+
+9.  Added new function grid.place() which provides a simpler 
+    interface to grid.pack() and is useful for using grid "frame"s
+    as just a convenient way of defining a layout and sticking 
+    things in it.
+
+
+Changes from grid_0.1 to grid_0.2:
+----------------------------------
+
+1. Fixed bug in rotating viewports;  this should be more reliable now.
+
+2. Added grid.line.to() and grid.move.to().  These allow drawing BETWEEN
+   different coordinate systems.  See example in inst/doc/demo3.ps.
+
+3. Added some more demonstrations to the doc directory.
+
+4. Added more test code to the tests directory.
+
+5. Added "grobwidth" and "grobheight" units.  See the document
+   grid/inst/doc/advanced/parentchild.ps
+
+6. Added more detailed documentation to grid/inst/doc/advanced.  This
+   stuff is not as friendly for the reader, but may be useful if you're
+   tearing your hair out wondering why some strange effect is occurring.
+
+7. Changed frames and packing to use the new "grobwidth" and "grobheight"
+   units.  This fixes some problems with frames and packing.
+
+8. Fixed a bug where the gpar settings for "fontsize" and "lineheight"
+   _within a grob_ would not affect the location or size of the grob
+   if they were specified in "lines" or "char" units.
+
+   This required adding new "mylines" and "mychar" units (alternative
+   suggestions for names welcome !) so that you can specify whether
+   a grob's a location/size is in terms of the current viewport's
+   fontsize and lineheight ("lines" and "char") or in terms of its own
+   fontsize and lineheight ("mylines" and "mychar").
+
+9. Added grid.polygon() and grid.circle() primitives
+
+10. Added newpage=TRUE argument to grid.start() so that you can restart
+    grid graphics mode without having to move to a new page.
+
+    For example, try ...
+
+	postscript()
+	grid.start()
+	grid.polygon()
+	grid.stop()
+	grid.start() # moves to new page
+	grid.circle()
+	grid.stop()
+	grid.start(newpage=FALSE) # does NOT move to new page
+	grid.rect()
+	grid.stop()
+	dev.off()
+
+11. Changed interface for pop.viewport().  This now just takes a
+    number of viewports to pop, which defaults to 1.  
+    For example ...
+
+        push.viewport(viewport())
+	pop.viewport(current.viewport())
+
+    ... becomes ...
+    
+        push.viewport(viewport())
+	pop.viewport()
+
+    ... and ...
+
+        vp1 <- viewport()
+	vp2 <- viewport()
+	push.viewport(vp1, vp2)
+	pop.viewport(vp2, vp1)
+
+    ... becomes ...
+
+        vp1 <- viewport()
+	vp2 <- viewport()
+	push.viewport(vp1, vp2)
+	pop.viewport(2)
+	
+12. Speed-up of pushing and popping viewports.  This will probably not
+    be noticeable in normal usage, but makes a big difference for 
+    frames and packing.
+
+Changes from lattice_0.2 to grid_0.1:
+-------------------------------------
+
+0. Change of package name from "lattice" to "grid" (!!!!)
+
+   This means that most user functions have changed from l<something>
+   to grid.<something>
+
+1. Slight speed up of grid.push.viewport and grid.pop.viewport.
+
+2. Added sum() method for units.
+
+   For example, try ...
+
+       grid.rect(w=sum(unit(c(.25,.25), "npc")))
+       grid.rect(w=sum(unit(c(.25,.25), "npc"), unit(1, "cm")), border="red")
+
+3. Changed the usage of grid.edit() slightly.  If you want to specify 
+   several new values at once, you must use grid.prop.list() rather
+   than just list().  For example, for a single new value use ...
+
+       grid.edit(<grob>, col="red")
+
+   ... as before, but for multiple new values use ...
+
+       grid.edit(<grob>, grid.prop.list(col="red", lty="dashed"))
+
+   ... rather than ...
+   
+       grid.edit(<grob>, list(col="red", lty="dashed"))
+
+4. Added a new grid.frame() grob.  This acts a bit like a simple 
+   grid.collection() BUT controls the placement of its children.  
+   You add children using the grid.pack() function.
+
+5. All viewports and grobs now have a "gp" slot which contains a
+   "gpar" object.  This is a list of graphical parameters, which 
+   replaces the specification of individual graphical parameters
+   for each different type of grob.  
+
+   For example, instead of the old ...
+   
+       grid.rect(w=.8, h=.8, border="red")
+
+   ... we have the new ...
+
+       grid.rect(w=.8, h=.8, gp=gpar(border="red"))
+
+   This may seem like a loss (because you have to type more stuff),
+   and it is a loss, but the (hopefully greater) win is that (i) you only
+   have one parameter for all graphical settings, for example, ...
+
+       grid.rect(w=.8, h=.8, gp=gpar(border="red", lwd=3))
+
+   ... and (ii) this applies for all grobs, for example, ...
+
+       grid.text("hi", gp=gpar(col="red", fontsize=10))
+
+   ... and (iii) you can add more graphical parameters with minimal fuss,
+   for example, ...
+
+       grid.text("hi", gp=gpar(col="red", fontsize=10, new.par=whatever))
+
+   ... and (iv) its easier to automate things (see below).
+
+   Graphical parameter settings are "permanent" so, for example, if
+   an axis sets the colour to "red" then all of its children are
+   drawn in "red" unless they set colour to something else.
+
+   For example, try ...
+
+       grid.multipanel(vp = grid.viewport(0.5, 0.5, 0.8, 0.8, 
+                                          gp=gpar(fontsize=20)))
+
+   ... and notice that all of the components of the multipanel take
+   notice of the fontsize setting of the parent viewport (except the
+   axis labels because they explicitly set the fontsize to 20 themselves).
+
+   The setting of graphical parameters is automated;  
+   if you have a slot called "gp" in your grob, Lattice will
+   set the graphical parameters in that slot before calling
+   draw.details() and unset the parameters afterwards.
+
+6. The pushing and popping of "local" viewports has been automated.
+   If you have a slot called "vp" in your grob, Lattice will call
+   grid.push.viewport() on that slot before calling draw.details() 
+   and grid.pop.viewport() afterwards.
+
+7. "collection" grobs and "[x|y]axis" grobs no longer pass editing
+   operations down to their children.  
+
+   This was mainly (only ?) for sharing graphical parameter settings
+   and that duty is now performed by the gpar stuff in point 5 above.
+
+   This is a good thing because there are some cases where passing
+   down editing operations could cause serious damage.  For example, 
+   consider what would have happened if you had edited the "vp" slot
+   of a collection grob (!)
+
diff --git a/win32/deps/library/grid/doc/displaylist.R b/win32/deps/library/grid/doc/displaylist.R
new file mode 100644
index 0000000..45ac75a
--- /dev/null
+++ b/win32/deps/library/grid/doc/displaylist.R
@@ -0,0 +1,130 @@
+### R code from vignette source 'displaylist.Rnw'
+
+###################################################
+### code chunk number 1: displaylist.Rnw:25-31
+###################################################
+library(grDevices)
+library(graphics) # for plot()
+library(stats) # for runif()
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+
+
+###################################################
+### code chunk number 2: guts1 (eval = FALSE)
+###################################################
+## plot(1:10)
+## par(new = TRUE)
+## grid.rect(width = 0.5, height = 0.5, gp = gpar(lwd = 3), name = "gr")
+## 
+
+
+###################################################
+### code chunk number 3: ex1
+###################################################
+plot(1:10)
+par(new = TRUE)
+grid.rect(width = 0.5, height = 0.5, gp = gpar(lwd = 3), name = "gr")
+
+grid.rect(width = 0.99, height = 0.99, gp = gpar(lty = "dashed"))
+
+
+###################################################
+### code chunk number 4: ex2
+###################################################
+grid.rect(width = 0.5, height = 0.5, gp = gpar(col = "red", lwd = 3))
+grid.rect(width = 0.99, height = 0.99, gp = gpar(lty = "dashed"))
+
+
+
+###################################################
+### code chunk number 5: displaylist.Rnw:101-102 (eval = FALSE)
+###################################################
+## grid.edit("gr", gp = gpar(col = "red", lwd = 3))
+
+
+###################################################
+### code chunk number 6: displaylist.Rnw:132-133
+###################################################
+grid.rect(width = convertWidth(unit(1, "inches"), "npc"))
+
+
+###################################################
+### code chunk number 7: displaylist.Rnw:141-146
+###################################################
+drawDetails.myrect <- function(x, recording) {
+    gr <- rectGrob(width = convertWidth(unit(1, "inches"), "npc"))
+    grid.draw(gr)
+}
+grid.draw(grob(cl = "myrect"))
+
+
+###################################################
+### code chunk number 8: displaylist.Rnw:160-176
+###################################################
+x <- c(0.88, 1.00, 0.67, 0.34)
+y <- c(0.87, 0.43, 0.04, 0.94)
+z <- matrix(runif(4*2), ncol = 2)
+
+maxpiesize <- unit(1, "inches")
+totals <- apply(z, 1, sum)
+sizemult <- totals/max(totals)
+
+gs <- segmentsGrob(x0 = unit(c(rep(0, 4), x),
+                             rep(c("npc", "native"), each = 4)),
+                   x1 = unit(c(x, x), rep("native", 8)),
+                   y0 = unit(c(y, rep(0, 4)),
+                             rep(c("native", "npc"), each = 4)),
+                   y1 = unit(c(y, y), rep("native", 8)),
+                   gp = gpar(lty = "dashed", col = "grey"))
+gr <- rectGrob(gp = gpar(col = "grey", fill = "white", lty = "dashed"))
+
+
+###################################################
+### code chunk number 9: displaylist.Rnw:183-201
+###################################################
+drawDetails.pieplot <- function(x, recording) {
+    plot(x$x, x$y, xlim = c(-0.2, 1.2), ylim = c(-0.2, 1.2), type = "n")
+    vps <- baseViewports()
+    pushViewport(vps$inner, vps$figure, vps$plot, recording = FALSE)
+    grid.draw(x$gs, recording = FALSE)
+    for (i in 1:4) {
+        pushViewport(viewport(x = unit(x$x[i], "native"),
+                              y = unit(x$y[i], "native"),
+                              width = x$sizemult[i]*x$maxpiesize,
+                              height = x$sizemult[i]*x$maxpiesize),
+                     recording = FALSE)
+        grid.draw(x$gr, recording = FALSE)
+        par(plt = gridPLT(), new = TRUE)
+        pie(x$z[i, ], radius = 1, labels = rep("", 2))
+        popViewport(recording = FALSE)
+    }
+    popViewport(3, recording = FALSE)
+}
+
+
+###################################################
+### code chunk number 10: displaylist.Rnw:210-215
+###################################################
+if (suppressWarnings(require("gridBase", quietly = TRUE))) {
+grid.draw(grob(x = x, y = y, z = z,
+               maxpiesize = maxpiesize, sizemult = sizemult,
+               gs = gs, gr = gr, cl = "pieplot"))
+}
+
+
+###################################################
+### code chunk number 11: displaylist.Rnw:231-240
+###################################################
+drawDetails.mylegend <- function(x, recording) {
+    x <- 0:64/64
+    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")
+}
+grid.draw(grob(cl = "mylegend"))
+
+
diff --git a/win32/deps/library/grid/doc/displaylist.Rnw b/win32/deps/library/grid/doc/displaylist.Rnw
new file mode 100644
index 0000000..c9ff658
--- /dev/null
+++ b/win32/deps/library/grid/doc/displaylist.Rnw
@@ -0,0 +1,243 @@
+\documentclass[a4paper]{article}
+
+\usepackage{Rd}
+
+% \VignetteIndexEntry{Display Lists in grid}
+% \VignettePackage{grid}
+% \VignetteDepends{graphics}
+% \VignetteDepends{gridBase}
+
+\newcommand{\grid}{\pkg{grid}}
+\newcommand{\gridBase}{\CRANpkg{gridBase}}
+\newcommand{\lattice}{\CRANpkg{lattice}}
+
+\setlength{\parindent}{0in}
+\setlength{\parskip}{.1in}
+\setlength{\textwidth}{140mm}
+\setlength{\oddsidemargin}{10mm}
+
+\title{Display Lists in \grid{}}
+\author{Paul Murrell}
+
+\begin{document}
+\maketitle
+
+<<echo=FALSE, results=hide>>=
+library(grDevices)
+library(graphics) # for plot()
+library(stats) # for runif()
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+@
+A display list is a record of drawing operations.  It is used
+to redraw graphics output when a graphics window is resized,
+when graphics output is copied from one device to another, and
+when graphics output is edited (via \code{grid.edit}).
+
+There are two display lists that can be used when working with
+\grid{}.  \R{}'s graphics engine maintains a display list and
+\grid{} maintains its own display list.  The former is maintained at
+the C code level and records both base graphics output and
+\grid{} graphics output.  The latter is maintained at the
+R code level and only records \grid{} output.
+
+In standard usage,
+the graphics engine's display list is used to redraw when a window
+is resized and when copying between devices.  \grid{}'s display list
+is used for redrawing when editing \grid{} output.
+
+There are two main problems with this standard usage:
+\begin{enumerate}
+\item The graphics engine display list only records graphics output;
+none of the calculations leading up to producing the output are
+recorded.  This particularly impacts on plots which perform calculations
+based on the physical dimensions of the device -- an example is
+the legend function which performs calculations in order to
+arrange the elements of the legend.  The effect can be seen from
+any example which uses the legend function.  Try running
+\code{example(legend)} then resize the device (make it quite
+tall and thin or quite wide and fat);  the legend will start
+to look pretty sick.
+
+{\bf NOTE:} that this is a problem with the graphics engine display
+list -- it is not specific to \grid{}.  In fact, much of \grid{}'s
+behaviour is protected from this problem because things like \grid{}
+units are ``declarative'' and will be re-evaluated on each redraw.
+However, there are situations where \grid{} output can be afflicted,
+in particular, whenever the \code{convertUnit()} function (or one of
+its variants) is used (the help file for \code{convertUnit()} gives an
+example).
+
+A situation where this problem becomes very relevant for
+\grid{} output is when the \gridBase{} package is used.
+This is a situation where lots of calculations are performed
+in order to align base and grid output, but these calculations
+are not recorded on the graphics engine display list, so
+if the device is resized the output will become very yukky.
+
+\item \grid{}'s display list does not record base graphics
+output\footnote{This is not quite true;  it is possible
+to include base graphics output on the \grid{} display list
+as we will see later.} so if both base and \grid{} output appear
+on the same device then the result of editing will not redraw the
+base output.  The following code provides a simple example:
+
+<<guts1, eval=FALSE>>=
+plot(1:10)
+par(new = TRUE)
+grid.rect(width = 0.5, height = 0.5, gp = gpar(lwd = 3), name = "gr")
+
+<<ex1, echo=FALSE, fig=TRUE, width=4, height=3, include=FALSE>>=
+<<guts1>>
+grid.rect(width = 0.99, height = 0.99, gp = gpar(lty = "dashed"))
+@
+\includegraphics[width=4in, height=3in]{displaylist-ex1}
+
+<<ex2, echo=FALSE, fig=TRUE, width=4, height=3, include=FALSE>>=
+grid.rect(width = 0.5, height = 0.5, gp = gpar(col = "red", lwd = 3))
+grid.rect(width = 0.99, height = 0.99, gp = gpar(lty = "dashed"))
+
+<<eval=FALSE>>=
+grid.edit("gr", gp = gpar(col = "red", lwd = 3))
+@
+\includegraphics[width=4in, height=3in]{displaylist-ex2}
+
+After the \code{grid.edit}, the rectangle has been redrawn, but the
+base plot has not.
+\end{enumerate}
+
+\section*{Saving calculations on the graphics engine display list\\
+and saving base graphics on the \grid{} display list}
+
+Both of the problems described in the previous section can be
+avoided by using a \code{drawDetails()} method in \grid{}.
+When a \grid{} grob is drawn, the \code{drawDetails} method
+for that grob is called;  if calculations are put within
+a \code{drawDetails} method, then the calculations will be
+performed every time the grob is drawn.
+
+This means that it is possible, for example, to use \code{convertUnit()}
+and have the result consistent across device resizes or
+copies\footnote{In
+each of the examples that follow, you should execute the example
+code, resize the device to see any inconsistency, then close the
+device before trying the next example.}.
+This next piece of code is an example where the output becomes
+inconsistent when the device is resized.  We specify a width for
+the rectangle in inches, but convert it (gratuitously) to
+NPC coordinates -- when the device is resized, the NPC coordinates
+will no longer correspond to 1''.
+
+<<results=hide>>=
+grid.rect(width = convertWidth(unit(1, "inches"), "npc"))
+@
+
+The next piece of code demonstrates that, if we
+place the calculations within a \code{drawDetails} method, then
+the output remains consistent across device resizes and
+copies.
+
+<<results=hide>>=
+drawDetails.myrect <- function(x, recording) {
+    gr <- rectGrob(width = convertWidth(unit(1, "inches"), "npc"))
+    grid.draw(gr)
+}
+grid.draw(grob(cl = "myrect"))
+@
+
+The next example shows that a \code{drawDetails()} method can also be
+used to save base graphics output on the \grid{} display list.  This
+example uses \gridBase{} to combine base and \grid{} graphics output.
+Here I replicate the last example from the \gridBase{} vignette -- a
+set of base pie charts within \grid{} viewports within a base plot.
+In this case, I can produce all of the grobs required in the normal
+manner -- their locations and sizes are not based on special
+calculations\footnote{The example is wrapped inside a check for
+  whether the \CRANpkg{gridBase} package is installed so that the code
+  will still ``run'' on systems without \CRANpkg{gridBase}.}.
+
+<<results=hide>>=
+x <- c(0.88, 1.00, 0.67, 0.34)
+y <- c(0.87, 0.43, 0.04, 0.94)
+z <- matrix(runif(4*2), ncol = 2)
+
+maxpiesize <- unit(1, "inches")
+totals <- apply(z, 1, sum)
+sizemult <- totals/max(totals)
+
+gs <- segmentsGrob(x0 = unit(c(rep(0, 4), x),
+                             rep(c("npc", "native"), each = 4)),
+                   x1 = unit(c(x, x), rep("native", 8)),
+                   y0 = unit(c(y, rep(0, 4)),
+                             rep(c("native", "npc"), each = 4)),
+                   y1 = unit(c(y, y), rep("native", 8)),
+                   gp = gpar(lty = "dashed", col = "grey"))
+gr <- rectGrob(gp = gpar(col = "grey", fill = "white", lty = "dashed"))
+@
+What is important is that I place the calls to the \gridBase{} functions
+within the  \code{drawDetails} method so that they are performed
+every time the grob is drawn {\em and} the calls to the base graphics
+functions are in here too so that they are called for every redraw.
+
+<<results=hide>>=
+drawDetails.pieplot <- function(x, recording) {
+    plot(x$x, x$y, xlim = c(-0.2, 1.2), ylim = c(-0.2, 1.2), type = "n")
+    vps <- baseViewports()
+    pushViewport(vps$inner, vps$figure, vps$plot, recording = FALSE)
+    grid.draw(x$gs, recording = FALSE)
+    for (i in 1:4) {
+        pushViewport(viewport(x = unit(x$x[i], "native"),
+                              y = unit(x$y[i], "native"),
+                              width = x$sizemult[i]*x$maxpiesize,
+                              height = x$sizemult[i]*x$maxpiesize),
+                     recording = FALSE)
+        grid.draw(x$gr, recording = FALSE)
+        par(plt = gridPLT(), new = TRUE)
+        pie(x$z[i, ], radius = 1, labels = rep("", 2))
+        popViewport(recording = FALSE)
+    }
+    popViewport(3, recording = FALSE)
+}
+@
+The ``pieplot'' is created by assembling the component grobs
+into a collective grob of the appropriate class; the \code{drawDetails}
+method takes care of actually producing the output.
+
+% produce figure, but don't include
+% (to avoid par setting contamination between code segments)
+
+<<results=hide, fig=TRUE, width=6, height=6, include=FALSE>>=
+if (suppressWarnings(require("gridBase", quietly = TRUE))) {
+grid.draw(grob(x = x, y = y, z = z,
+               maxpiesize = maxpiesize, sizemult = sizemult,
+               gs = gs, gr = gr, cl = "pieplot"))
+}
+@
+
+The output from this example can be resized safely; \grid{} handles
+all of the redrawing, and performs all of the actions within the
+\code{drawDetails} method for each redraw, including redrawing the
+base graphics output!
+
+As a final example, we will harness the \grid{} display list purely to
+achieve consistency in base graphics output.  The following reproduces
+the last example from the \code{legend()} help page, but produces
+output which can be resized without the legend going crazy.
+
+% produce figure, but don't include
+% (to avoid par setting contamination between code segments)
+
+<<results=hide, fig=TRUE, include=FALSE>>=
+drawDetails.mylegend <- function(x, recording) {
+    x <- 0:64/64
+    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")
+}
+grid.draw(grob(cl = "mylegend"))
+@
+\end{document}
+
diff --git a/win32/deps/library/grid/doc/displaylist.pdf b/win32/deps/library/grid/doc/displaylist.pdf
new file mode 100644
index 0000000..ede2d8f
Binary files /dev/null and b/win32/deps/library/grid/doc/displaylist.pdf differ
diff --git a/win32/deps/library/grid/doc/frame.R b/win32/deps/library/grid/doc/frame.R
new file mode 100644
index 0000000..4895325
--- /dev/null
+++ b/win32/deps/library/grid/doc/frame.R
@@ -0,0 +1,148 @@
+### R code from vignette source 'frame.Rnw'
+
+###################################################
+### code chunk number 1: frame.Rnw:19-24
+###################################################
+library(grDevices)
+library(stats) # for runif
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+
+
+###################################################
+### code chunk number 2: frame.Rnw:50-51
+###################################################
+gf <- frameGrob()
+
+
+###################################################
+### code chunk number 3: frame.Rnw:96-97
+###################################################
+gf <- packGrob(gf, textGrob("Hello frame!"))
+
+
+###################################################
+### code chunk number 4: frame1
+###################################################
+st <- grid.text("some text")
+grid.rect(width = unit(1, "grobwidth", st),
+          height = unit(1, "grobheight", st))
+
+
+###################################################
+### code chunk number 5: frame1
+###################################################
+grid.text("some text", name = "st")
+grid.rect(width = unit(1, "grobwidth", "st"),
+          height = unit(1, "grobheight", "st"))
+
+
+###################################################
+### code chunk number 6: frame.Rnw:136-138 (eval = FALSE)
+###################################################
+## grid.edit("st", gp = gpar(fontsize = 20))
+## 
+
+
+###################################################
+### code chunk number 7: frame2
+###################################################
+my.text <- textGrob("some text")
+my.text <- editGrob(my.text, gp = gpar(fontsize = 20))
+my.rect <- rectGrob(width = unit(1, "grobwidth", my.text),
+                    height = unit(1, "grobheight", my.text))
+grid.draw(my.text)
+grid.draw(my.rect)
+
+
+###################################################
+### code chunk number 8: frame.Rnw:153-155 (eval = FALSE)
+###################################################
+## grid.edit("st", label="some different text")
+## 
+
+
+###################################################
+### code chunk number 9: frame3
+###################################################
+my.text <- textGrob("some text")
+my.text <- editGrob(my.text, gp = gpar(fontsize = 20))
+my.text <- editGrob(my.text, label = "some different text")
+my.rect <- rectGrob(width = unit(1, "grobwidth", my.text),
+                    height = unit(1, "grobheight", my.text))
+grid.draw(my.text)
+grid.draw(my.rect)
+
+
+###################################################
+### code chunk number 10: frame.Rnw:247-281
+###################################################
+legendGrob <- function(pch, labels, frame = TRUE,
+                        hgap = unit(1, "lines"), vgap = unit(1, "lines"),
+                        default.units = "lines",
+                        vp = NULL) {
+  nkeys <- length(labels)
+  gf <- frameGrob(vp = vp)
+  for (i in 1:nkeys) {
+    if (i == 1) {
+        symbol.border <- unit.c(vgap, hgap, vgap, hgap)
+        text.border <- unit.c(vgap, unit(0, "npc"), vgap,
+            hgap)
+    } else {
+        symbol.border <- unit.c(vgap, hgap, unit(0, "npc"), hgap)
+        text.border <- unit.c(vgap, unit(0, "npc"), unit(0, "npc"), hgap)
+    }
+    gf <- packGrob(gf, pointsGrob(0.5, 0.5, pch = pch[i]),
+                   col = 1, row = i, border = symbol.border,
+                   width = unit(1, "lines"),
+                   height = unit(1, "lines"), force.width = TRUE)
+    gf <- packGrob(gf, textGrob(labels[i], x = 0, y = 0.5,
+                                just = c("left", "centre")),
+                   col = 2, row = i, border = text.border)
+  }
+  gf
+}
+
+grid.legend <- function(pch, labels, frame = TRUE,
+                        hgap = unit(1, "lines"), vgap = unit(1, "lines"),
+                        default.units = "lines", draw = TRUE,
+                        vp = NULL) {
+  gf <- legendGrob(pch, labels, frame, hgap, vgap, default.units, vp)
+  if (draw) grid.draw(gf)
+  gf
+}
+
+
+###################################################
+### code chunk number 11: legend
+###################################################
+grid.legend(1:3, c("one line", "two\nlines", "three\nlines\nof text"))
+
+
+
+###################################################
+### code chunk number 12: plot
+###################################################
+top.vp <- viewport(width = 0.8, height = 0.8)
+pushViewport(top.vp)
+x <- runif(10)
+y1 <- runif(10)
+y2 <- runif(10)
+pch <- 1:3
+labels <- c("Girls", "Boys", "Other")
+gf <- frameGrob()
+plt <- gTree(children = gList(rectGrob(),
+                              pointsGrob(x, y1, pch = 1),
+                              pointsGrob(x, y2, pch = 2),
+                              xaxisGrob(),
+                              yaxisGrob()))
+gf <- packGrob(gf, plt)
+gf <- packGrob(gf, legendGrob(pch, labels),
+               height = unit(1, "null"), side = "right")
+grid.rect(gp = gpar(col = "grey"))
+grid.draw(gf)
+popViewport()
+grid.rect(gp = gpar(lty = "dashed"), width = .99, height = .99)
+
+
diff --git a/win32/deps/library/grid/doc/frame.Rnw b/win32/deps/library/grid/doc/frame.Rnw
new file mode 100644
index 0000000..3c44b10
--- /dev/null
+++ b/win32/deps/library/grid/doc/frame.Rnw
@@ -0,0 +1,384 @@
+\documentclass[a4paper]{article}
+%\VignetteIndexEntry{Frames and packing grobs}
+%\VignettePackage{grid}
+\newcommand{\code}[1]{\texttt{#1}}
+\newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}
+\newcommand{\grid}{\pkg{grid}}
+\newcommand{\R}{{\sffamily R}}
+\setlength{\parindent}{0in}
+\setlength{\parskip}{.1in}
+\setlength{\textwidth}{140mm}
+\setlength{\oddsidemargin}{10mm}
+
+\title{A GUI-Builder Approach to \grid{} Graphics}
+\author{Paul Murrell}
+
+\begin{document}
+\maketitle
+
+<<echo=FALSE, results=hide>>=
+library(grDevices)
+library(stats) # for runif
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+@
+Grid contains a lot of support for locating, sizing, and arranging
+graphical components on a device and with respect to each other.
+However, most of this support relies on \emph{either} the parent
+object dictating both location and size (layouts) \emph{or} the child
+dictating both location and size.
+
+Some sorts of arrangements are more conveniently handled by having the
+parent dictate the location, but letting the child dictate the size.
+This is the situation for GUI-builders (software which forms
+arrangements of GUI components or widgets).  The approach taken by
+(many ?) GUI-builders is to allow the user to create a parent
+\emph{frame} and then \emph{pack} widgets into this frame.  The frame
+locates and arranges the children with the help of hints such as
+``place this widget at the bottom of the frame'', and the children
+dictate what size they would like to be.
+
+This document describes a first attempt at such an interface for
+arranging Grid graphical objects.
+
+\section*{The \code{"frame"} grob}
+You can create a \code{"frame"} graphical object using the function
+\code{frameGrob()}.  You must assign the result to a variable in order
+to pack grobs into it.
+
+<<results=hide>>=
+gf <- frameGrob()
+@
+\section*{The \code{packGrob()} function}
+Having created a frame, you can then pack other graphical objects into
+it using the \code{packGrob()} function.  This function has a complex
+interface which allows for a variety of methods of packing graphical
+objects.  The required arguments are:
+\begin{description}
+\item[\code{frame}] is a \code{"frame"} object created by \code{grid.frame}.
+\item[\code{grob}] is the grob to pack into the frame.
+\end{description}
+The remaining arguments specify where the grob is located in the frame
+and possibly how much space the grob should occupy.  The frame is effectively
+just a layout;  you can add grobs to existing rows and columns
+or you can append the grob in a new row and/or column.  If the
+grob is added to an existing row then the height of
+that row  becomes the maximum of the new height and
+the previous height.  If the row  is new then it just
+gets the specified height.  Similar rules apply for column widths.
+\begin{description}
+\item[\code{col}] is the column to put the grob in.  This can be 1 greater than
+the existing number of columns (in which case a new column is added).
+\item[\code{row}]  is like \code{col} but for rows.
+\item[\code{col.after}] specifies that the grob should be put in a
+new column inserted between \code{col.after} and \code{col.after + 1}.
+\item[\code{col.before}] specifies that the grob should be put in a
+new column inserted between \code{col.before} and \code{col.before + 1}.
+\item[\code{row.after} and \code{row.before}] do what you would expect.
+\item[\code{side}]  specifies which side to append the new grob to.
+The valid values are \code{"left"}, \code{"right"}, \code{"bottom"},
+and \code{"top"}.
+\item[\code{width}]  is the width of the row that the grob is being packed
+into.  If this is not given then the grob supplies the width.
+\item[\code{height}] is like \code{width} but for rows.
+\end{description}
+It is possible to modify this default behaviour.  For example, it is possible
+to add a grob to a row and force that row to have the specified height
+by setting \code{force.height=TRUE} (and similarly for column widths).
+It is also possible to pack a graphical object into several rows or
+columns at once (although you cannot simultaneously affect the heights or
+widths of those rows and columns).
+
+The result of this function is the modified frame, so you must
+assign the result to a variable.
+
+<<results=hide>>=
+gf <- packGrob(gf, textGrob("Hello frame!"))
+@
+\section*{\code{"grobwidth"} and \code{"grobheight"} units}
+
+A \code{"frame"} object allows a grob to specify its size by making
+use of \code{"grobwidth"} and \code{"grobheight"} units.
+These units may, of course, be used outside of frames too so
+their use is described here.
+
+Consider a simple example where I want to draw a rectangle around
+a piece of text.  I can get the size of the piece of text from the
+\code{"text"} grob as follows:
+
+<<frame1, include=FALSE, width=4, height=2, fig=TRUE, results=hide>>=
+st <- grid.text("some text")
+grid.rect(width = unit(1, "grobwidth", st),
+          height = unit(1, "grobheight", st))
+@
+\begin{center}
+\includegraphics[height=1in, width=2in]{frame-frame1}
+\end{center}
+@
+You could do the same thing with simple \code{"strwidth"}
+and \code{"strheight"} units, but \code{"grobwidth"} and \code{"grobheight"}
+give you a lot more power.  The biggest gain is that you
+can get the size of other objects besides pieces of text (more on that
+soon).  Another thing you can do is provide a ``reference'' to a grob
+rather than the grob itself; you do this by giving the name of a grob.
+What this does is make the unit ``dynamic'' so that changes in the
+grob affect the unit.  The following is a dynamic version of the
+previous example.
+
+<<frame1, include=FALSE, width=4, height=2, fig=TRUE, results=hide>>=
+grid.text("some text", name = "st")
+grid.rect(width = unit(1, "grobwidth", "st"),
+          height = unit(1, "grobheight", "st"))
+@
+Now watch what happens if I modify the text grob named \code{"st"}:
+
+<<results=hide, eval=FALSE>>=
+grid.edit("st", gp = gpar(fontsize = 20))
+
+<<frame2, echo=FALSE, include=FALSE, width=4, height=2, fig=TRUE, results=hide>>=
+my.text <- textGrob("some text")
+my.text <- editGrob(my.text, gp = gpar(fontsize = 20))
+my.rect <- rectGrob(width = unit(1, "grobwidth", my.text),
+                    height = unit(1, "grobheight", my.text))
+grid.draw(my.text)
+grid.draw(my.rect)
+@
+\begin{center}
+\includegraphics[height=1in, width=2in]{frame-frame2}
+\end{center}
+@
+Similarly, I can change the text itself:
+
+<<results=hide, eval=FALSE>>=
+grid.edit("st", label="some different text")
+
+<<frame3, echo=FALSE, include=FALSE, width=4, height=2, fig=TRUE, results=hide>>=
+my.text <- textGrob("some text")
+my.text <- editGrob(my.text, gp = gpar(fontsize = 20))
+my.text <- editGrob(my.text, label = "some different text")
+my.rect <- rectGrob(width = unit(1, "grobwidth", my.text),
+                    height = unit(1, "grobheight", my.text))
+grid.draw(my.text)
+grid.draw(my.rect)
+@
+\begin{center}
+\includegraphics[height=1in, width=2in]{frame-frame3}
+\end{center}
+@
+\section*{The \code{widthDetails} and \code{heightDetails} generic functions}
+
+The calculation of \code{"grobwidth"} and \code{"grobheight"} units
+is a bit complicated, but fortunately most of it is automated.
+The simple part is that a grob provides a normal \code{"unit"} object
+to express its width or height.  The complication comes because that
+\code{"unit"} object has to be evaluated in the correct context;  in
+particular, if the grob has a non-\code{NULL} \code{vp} argument then
+those viewports have to be pushed so that the size of the grob is
+the size it would be when it is drawn.  This is achieved by calling the
+\code{preDrawDetails()} function for the grob and in most cases what
+happens by default will be correct.  The thing to avoid is having
+any viewport operations in a \code{drawDetails()} method for your
+grob;  they should go in a  \code{preDrawDetails()} method.
+
+All that needs to be written (usually) are the functions that
+provide the \code{"unit"} objects.  These functions need to be
+\code{widthDetails} and \code{heightDetails} methods.
+
+The default methods return \code{unit(1, "null")}
+so your grob will be of this size unless you write your own methods.
+
+The classic example methods are those for \code{"text"} grobs;  these
+return \code{unit(1, "mystrwidth", <text grob label>)} and
+\code{unit(1, "mystrheight", <text grob label>)} respectively.
+
+The other very important examples of these methods are those for
+\code{"frame"} grobs.  These return the \code{sum} of the
+widths (heights) of the columns (rows) of the layout that has been
+built up by packing grobs into the frame.  This means that
+when a \code{"frame"} grob is packed within another \code{"frame"} grob
+the parent automatically leaves enough room for the child.
+
+Another useful pair of examples are those for \code{"rect"} grobs.
+These methods make use of the \code{absolute.size} function.
+When a grob is asked to specify its size, it makes sense to respond
+with the grob's width and height if the grob has an ``absolute'' size
+(e.g., \code{"inches"}, \code{"cm"}, \code{"lines"}, etc;
+ i.e., the grob knows exactly how big itself is).
+On the other hand, it does not make sense to respond with the grob's
+width and height if the grob has a ``relative'' size (e.g., \code{"npc"} or
+\code{"native"};  i.e.,
+the grob needs to know about it's parent's size before it can figure
+out its own).  The \code{absolute.size} function leaves absolute
+units alone, but converts relative units to \code{"null"} units
+(i.e., the child says to the parent, ``you decide how big I should be''), so
+you can return something like \code{absolute.size(width(<grob>))} in order
+to always give a sensible answer.
+
+@
+\section*{Examples}
+The original motivating example for this GUI-builder approach was
+to be able to produce a quite general-purpose legend grob.
+
+A legend consists of data symbols and associated textual descriptions.
+In order to be quite general, it would be nice to allow, for example,
+multiple lines of text per data symbol.  Rather than having to look at
+the text supplied for the legend in order to determine the arrangement
+of the legend, it would be nice to be able to simply specify the
+composition of the legend and let it figure out the arrangement for
+us.  The code below defines just such a legend grob, using the new
+\code{"frame"} grob and \code{packGrob()} function.  Some points to
+note are:
+
+\begin{itemize}
+\item The use of \code{border}s to create space around the legend
+components.
+\item The size of the data symbol component is specified, but the
+size of the text components are taken from the \code{"text"} grobs.
+
+\item The heights of the rows in the legend will be the maximum of
+$\code{vgap} + \code{unit(1, "lines")}$ and $\code{vgap} +
+\code{unit(1, "grobheight", <text grob>)}$.
+
+\item We have two functions, one for generating a grob and one
+for producing output.
+\end{itemize}
+
+<<>>=
+legendGrob <- function(pch, labels, frame = TRUE,
+                        hgap = unit(1, "lines"), vgap = unit(1, "lines"),
+                        default.units = "lines",
+                        vp = NULL) {
+  nkeys <- length(labels)
+  gf <- frameGrob(vp = vp)
+  for (i in 1:nkeys) {
+    if (i == 1) {
+        symbol.border <- unit.c(vgap, hgap, vgap, hgap)
+        text.border <- unit.c(vgap, unit(0, "npc"), vgap,
+            hgap)
+    } else {
+        symbol.border <- unit.c(vgap, hgap, unit(0, "npc"), hgap)
+        text.border <- unit.c(vgap, unit(0, "npc"), unit(0, "npc"), hgap)
+    }
+    gf <- packGrob(gf, pointsGrob(0.5, 0.5, pch = pch[i]),
+                   col = 1, row = i, border = symbol.border,
+                   width = unit(1, "lines"),
+                   height = unit(1, "lines"), force.width = TRUE)
+    gf <- packGrob(gf, textGrob(labels[i], x = 0, y = 0.5,
+                                just = c("left", "centre")),
+                   col = 2, row = i, border = text.border)
+  }
+  gf
+}
+
+grid.legend <- function(pch, labels, frame = TRUE,
+                        hgap = unit(1, "lines"), vgap = unit(1, "lines"),
+                        default.units = "lines", draw = TRUE,
+                        vp = NULL) {
+  gf <- legendGrob(pch, labels, frame, hgap, vgap, default.units, vp)
+  if (draw) grid.draw(gf)
+  gf
+}
+@
+The next piece of code shows the \code{grid.legend()} function being
+used procedurally;  the output is shown below the code.
+
+<<legend, include=FALSE, width=4, height=2, fig=TRUE, results=hide>>=
+grid.legend(1:3, c("one line", "two\nlines", "three\nlines\nof text"))
+
+@
+\begin{center}
+\includegraphics[height=2in, width=4in]{frame-legend}
+\end{center}
+
+@
+The legend example might not seem too difficult to do by hand rather
+than using frames and packing, but the next example shows how
+useful it can be.
+
+Suppose you want to arrange a legend next to a plot.  This requires
+leaving enough space for the legend and then filling the remaining
+space with the plot.  This requires figuring out how much space the
+legend needs, and that is a task that is neither trivial nor
+easy to cater for in the general case.  Ideally, we want to know
+as little as possible about the legend.
+
+With the GUI-builder
+approach this becomes extremely simple.  The code below
+shows how the construction of such a scene might be performed; the
+output from the code is again shown below.
+
+The following points are noteworthy:
+
+\begin{itemize}
+\item We don't need to know anything about how the legend was
+constructed;  it could be any sort of grob.
+\item We specify the height of the legend to be \code{unit(1, "null")}
+so that it will occupy the full height of the plot.  If we
+did not do this then the plot would be forced to be the height of
+the legend (because of the way that \code{"null"} units interact
+with other units).
+\item The width of the legend is calculated from the contents of the
+legend because the legend is a \code{"frame"} grob.
+\item The dimensions of the ``plot'' default to \code{unit(1, "null")}
+because \code{"collection"} grobs have no width or height methods, which
+means that the plot fills up whatever space remains once the
+legend has been accommodated.
+\end{itemize}
+
+<<plot, echo=FALSE, include=FALSE, fig=TRUE, results=hide>>=
+top.vp <- viewport(width = 0.8, height = 0.8)
+pushViewport(top.vp)
+x <- runif(10)
+y1 <- runif(10)
+y2 <- runif(10)
+pch <- 1:3
+labels <- c("Girls", "Boys", "Other")
+gf <- frameGrob()
+plt <- gTree(children = gList(rectGrob(),
+                              pointsGrob(x, y1, pch = 1),
+                              pointsGrob(x, y2, pch = 2),
+                              xaxisGrob(),
+                              yaxisGrob()))
+gf <- packGrob(gf, plt)
+gf <- packGrob(gf, legendGrob(pch, labels),
+               height = unit(1, "null"), side = "right")
+grid.rect(gp = gpar(col = "grey"))
+grid.draw(gf)
+popViewport()
+grid.rect(gp = gpar(lty = "dashed"), width = .99, height = .99)
+@
+\begin{center}
+\includegraphics{frame-plot}
+\end{center}
+@
+\section*{Notes}
+\begin{enumerate}
+\item There are \code{grid.frame()} and \code{grid.pack()} equivalents
+for these functions, but these are really only useful to see the
+changes in the frame as each packing operation takes place.
+
+\item This frame-and-packing stuff is easier to use, \emph{but}
+(in almost all cases) it is less efficient than specifying the
+arrangement by hand.  There is consequently a penalty to pay in
+terms of memory (inconsequential I think) and in terms of speed
+(noticeably slower).
+
+Perhaps one sensible use of these functions is to
+build an image interactively using the simple arguments,
+which will be slow, then attempt to speed up the drawing
+by exploring some of the more advanced arguments.
+
+One way to speed things up a bit is to specify the layout when
+the frame is initially created and then use the \code{placeGrob()} function
+to put grobs into existing rows and columns.
+
+The speed penalty in the cases I have seen are mostly due to the time
+taken to generate the (sometimes very) complicated unit objects that
+express the heights and widths of the rows and columns of the frame
+layout.  Future effort will be put into speeding up the creation of
+unit objects.
+\end{enumerate}
+\end{document}
+
+
diff --git a/win32/deps/library/grid/doc/frame.pdf b/win32/deps/library/grid/doc/frame.pdf
new file mode 100644
index 0000000..9558a6e
Binary files /dev/null and b/win32/deps/library/grid/doc/frame.pdf differ
diff --git a/win32/deps/library/grid/doc/grid.R b/win32/deps/library/grid/doc/grid.R
new file mode 100644
index 0000000..97a1da9
--- /dev/null
+++ b/win32/deps/library/grid/doc/grid.R
@@ -0,0 +1,329 @@
+### R code from vignette source 'grid.Rnw'
+
+###################################################
+### code chunk number 1: grid.Rnw:27-33
+###################################################
+library(grDevices)
+library(graphics) # for par
+library(stats) # for rnorm
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+
+
+###################################################
+### code chunk number 2: grid.Rnw:75-76 (eval = FALSE)
+###################################################
+## viewport(x = 0.5, y = 0.5, width = 0.5, height = 0.25, angle=45)
+
+
+###################################################
+### code chunk number 3: viewport
+###################################################
+grid.show.viewport(viewport(x = 0.5, y = 0.5, width = 0.5, height = 0.25,
+                            angle = 45))
+
+
+###################################################
+### code chunk number 4: pushviewports
+###################################################
+grid.rect(gp = gpar(lty = "dashed"))
+vp1 <- viewport(x = 0, y = 0.5, w = 0.5, h = 0.5,
+                just = c("left", "bottom"), name = "vp1")
+vp2 <- viewport(x = 0.5, y = 0, w = 0.5, h = 0.5,
+                just = c("left", "bottom"))
+pushViewport(vp1)
+grid.rect(gp = gpar(col = "grey"))
+grid.text("Some drawing in graphics region 1", y = 0.8)
+upViewport()
+pushViewport(vp2)
+grid.rect(gp = gpar(col = "grey"))
+grid.text("Some drawing in graphics region 2", y = 0.8)
+upViewport()
+downViewport("vp1")
+grid.text("MORE drawing in graphics region 1", y = 0.2)
+popViewport()
+
+
+###################################################
+### code chunk number 5: vpstack
+###################################################
+grid.rect(gp = gpar(lty = "dashed"))
+vp <- viewport(width = 0.5, height = 0.5)
+pushViewport(vp)
+grid.rect(gp = gpar(col = "grey"))
+grid.text("quarter of the page", y = 0.85)
+pushViewport(vp)
+grid.rect()
+grid.text("quarter of the\nprevious viewport")
+popViewport(2)
+
+
+###################################################
+### code chunk number 6: units
+###################################################
+unit(1, "npc")
+unit(1:3/4, "npc")
+unit(1:3/4, "npc")[2]
+unit(1:3/4, "npc") + unit(1, "inches")
+min(unit(0.5, "npc"), unit(1, "inches"))
+unit.c(unit(0.5, "npc"), unit(2, "inches") + unit(1:3/4, "npc"),
+       unit(1, "strwidth", "hi there"))
+
+
+###################################################
+### code chunk number 7: vpcoords
+###################################################
+pushViewport(viewport(y = unit(3, "lines"), width = 0.9, height = 0.8,
+                      just = "bottom", xscale = c(0, 100)))
+grid.rect(gp = gpar(col = "grey"))
+grid.xaxis()
+pushViewport(viewport(x = unit(60, "native"), y = unit(0.5, "npc"),
+                      width = unit(1, "strwidth", "coordinates for everyone"),
+                      height = unit(3, "inches")))
+grid.rect()
+grid.text("coordinates for everyone")
+popViewport(2)
+
+
+###################################################
+### code chunk number 8: vplayout
+###################################################
+pushViewport(viewport(layout = grid.layout(4, 5)))
+grid.rect(gp = gpar(col = "grey"))
+grid.segments(c(1:4/5, rep(0, 3)), c(rep(0, 4), 1:3/4),
+              c(1:4/5, rep(1, 3)), c(rep(1, 4), 1:3/4),
+              gp = gpar(col = "grey"))
+pushViewport(viewport(layout.pos.col = 2:3, layout.pos.row = 3))
+grid.rect(gp = gpar(lwd = 3))
+popViewport(2)
+
+
+###################################################
+### code chunk number 9: layoutcomplex
+###################################################
+grid.show.layout(grid.layout(4, 4, widths = unit(c(3, 1, 1, 1),
+                             c("lines", "null", "null", "cm")),
+                             heights = c(1, 1, 2, 3),
+                             c("cm", "null", "null", "lines")))
+
+
+###################################################
+### code chunk number 10: gpar
+###################################################
+pushViewport(viewport(gp = gpar(fill = "grey", fontface = "italic")))
+grid.rect()
+grid.rect(width = 0.8, height = 0.6, gp = gpar(fill = "white"))
+grid.text(paste("This text and the inner rectangle",
+                "have specified their own gpar settings", sep = "\n"),
+          y = 0.75, gp = gpar(fontface = "plain"))
+grid.text(paste("This text and the outer rectangle",
+                "accept the gpar settings of the viewport", sep = "\n"),
+          y = 0.25)
+popViewport()
+
+
+###################################################
+### code chunk number 11: simpleplot
+###################################################
+grid.rect(gp = gpar(lty = "dashed"))
+x <- y <- 1:10
+pushViewport(plotViewport(c(5.1, 4.1, 4.1, 2.1)))
+pushViewport(dataViewport(x, y))
+grid.rect()
+grid.xaxis()
+grid.yaxis()
+grid.points(x, y)
+grid.text("1:10", x = unit(-3, "lines"), rot = 90)
+popViewport(2)
+
+
+###################################################
+### code chunk number 12: bpdata
+###################################################
+barData <- matrix(sample(1:4, 16, replace = TRUE), ncol = 4)
+
+
+###################################################
+### code chunk number 13: barconstraint
+###################################################
+boxColours <- 1:4
+
+
+###################################################
+### code chunk number 14: bpfun
+###################################################
+bp <- function(barData) {
+    nbars <- dim(barData)[2]
+    nmeasures <- dim(barData)[1]
+    barTotals <- rbind(rep(0, nbars), apply(barData, 2, cumsum))
+    barYscale <- c(0, max(barTotals)*1.05)
+    pushViewport(plotViewport(c(5, 4, 4, 1),
+                              yscale = barYscale,
+                              layout = grid.layout(1, nbars)))
+    grid.rect()
+    grid.yaxis()
+    for (i in 1:nbars) {
+        pushViewport(viewport(layout.pos.col = i, yscale = barYscale))
+        grid.rect(x = rep(0.5, nmeasures),
+                  y = unit(barTotals[1:nmeasures, i], "native"),
+                  height = unit(diff(barTotals[,i]), "native"),
+                  width = 0.8, just = "bottom", gp = gpar(fill = boxColours))
+        popViewport()
+    }
+    popViewport()
+}
+
+
+###################################################
+### code chunk number 15: legendlabels
+###################################################
+legLabels <- c("Group A", "Group B", "Group C", "Something Longer")
+boxSize <- unit(0.5, "inches")
+
+
+###################################################
+### code chunk number 16: legfun
+###################################################
+leg <- function(legLabels) {
+    nlabels <- length(legLabels)
+    pushViewport(viewport(layout = grid.layout(nlabels, 1)))
+    for (i in 1:nlabels) {
+        pushViewport(viewport(layout.pos.row = i))
+        grid.rect(width = boxSize, height = boxSize, just = "bottom",
+                  gp = gpar(fill = boxColours[i]))
+        grid.text(legLabels[i], y = unit(0.5, "npc") - unit(1, "lines"))
+        popViewport()
+    }
+    popViewport()
+}
+
+
+###################################################
+### code chunk number 17: barplot
+###################################################
+grid.rect(gp = gpar(lty = "dashed"))
+legend.width <- max(unit(rep(1, length(legLabels)),
+                         "strwidth", as.list(legLabels)) +
+                    unit(2, "lines"),
+                    unit(0.5, "inches") + unit(2, "lines"))
+pushViewport(viewport(layout = grid.layout(1, 2,
+                      widths = unit.c(unit(1,"null"), legend.width))))
+pushViewport(viewport(layout.pos.col = 1))
+bp(barData)
+popViewport()
+pushViewport(viewport(layout.pos.col = 2))
+pushViewport(plotViewport(c(5, 0, 4, 0)))
+leg(legLabels)
+popViewport(3)
+
+
+###################################################
+### code chunk number 18: grid.Rnw:649-650
+###################################################
+library(lattice)
+
+
+###################################################
+### code chunk number 19: trellisdata (eval = FALSE)
+###################################################
+## x <- rnorm(100)
+## y <- rnorm(100)
+## g <- sample(1:8, 100, replace = TRUE)
+
+
+###################################################
+### code chunk number 20: trellispanelplot (eval = FALSE)
+###################################################
+## xyplot(y ~ x | g, panel = function(x, y) {
+##     panel.xyplot(x, y);
+##     grid.lines(unit(c(0, 1), "npc"), unit(0, "native"),
+##                gp = gpar(col = "grey"))
+## })
+
+
+###################################################
+### code chunk number 21: trellispanel
+###################################################
+x <- rnorm(100)
+y <- rnorm(100)
+g <- sample(1:8, 100, replace = TRUE)
+xyplot(y ~ x | g, panel = function(x, y) {
+    panel.xyplot(x, y);
+    grid.lines(unit(c(0, 1), "npc"), unit(0, "native"),
+               gp = gpar(col = "grey"))
+})
+
+
+###################################################
+### code chunk number 22: trellisstripplot (eval = FALSE)
+###################################################
+## xyplot(y ~ x | g, strip = function(which.given, which.panel, ...) {
+##     grid.text(paste("Variable ", which.given, ": Level ",
+##                     which.panel[which.given], sep = ""),
+##               unit(1, "mm"), .5, just = "left")
+## })
+
+
+###################################################
+### code chunk number 23: trellisstrip
+###################################################
+x <- rnorm(100)
+y <- rnorm(100)
+g <- sample(1:8, 100, replace = TRUE)
+xyplot(y ~ x | g, strip = function(which.given, which.panel, ...) {
+    grid.text(paste("Variable ", which.given, ": Level ",
+                    which.panel[which.given], sep = ""),
+              unit(1, "mm"), .5, just = "left")
+})
+
+
+###################################################
+### code chunk number 24: trellisgridplot (eval = FALSE)
+###################################################
+## someText <- paste("A panel of text", "produced using", "raw grid code",
+##                   "that could be used", "to describe",
+##                   "the plot", "to the right.", sep = "\n")
+## latticePlot <- xyplot(y ~ x | g, layout = c(2, 4))
+## grid.rect(gp = gpar(lty = "dashed"))
+## pushViewport(viewport(layout = grid.layout(1, 2,
+##                       widths = unit.c(unit(1, "strwidth", someText) +
+##                       unit(2, "cm"),
+##                       unit(1, "null")))))
+## pushViewport(viewport(layout.pos.col = 1))
+## grid.rect(gp = gpar(fill = "light grey"))
+## grid.text(someText,
+##           x = unit(1, "cm"), y = unit(1, "npc") - unit(1, "inches"),
+##           just = c("left", "top"))
+## popViewport()
+## pushViewport(viewport(layout.pos.col = 2))
+## print(latticePlot, newpage = FALSE)
+## popViewport(2)
+
+
+###################################################
+### code chunk number 25: trellisgrid
+###################################################
+x <- rnorm(100)
+y <- rnorm(100)
+g <- sample(1:8, 100, replace = TRUE)
+someText <- paste("A panel of text", "produced using", "raw grid code",
+                  "that could be used", "to describe",
+                  "the plot", "to the right.", sep = "\n")
+latticePlot <- xyplot(y ~ x | g, layout = c(2, 4))
+grid.rect(gp = gpar(lty = "dashed"))
+pushViewport(viewport(layout = grid.layout(1, 2,
+                      widths = unit.c(unit(1, "strwidth", someText) +
+                      unit(2, "cm"),
+                      unit(1, "null")))))
+pushViewport(viewport(layout.pos.col = 1))
+grid.rect(gp = gpar(fill = "light grey"))
+grid.text(someText,
+          x = unit(1, "cm"), y = unit(1, "npc") - unit(1, "inches"),
+          just = c("left", "top"))
+popViewport()
+pushViewport(viewport(layout.pos.col = 2))
+print(latticePlot, newpage = FALSE)
+popViewport(2)
+
+
diff --git a/win32/deps/library/grid/doc/grid.Rnw b/win32/deps/library/grid/doc/grid.Rnw
new file mode 100644
index 0000000..b2b00c1
--- /dev/null
+++ b/win32/deps/library/grid/doc/grid.Rnw
@@ -0,0 +1,751 @@
+\documentclass[a4paper]{article}
+
+\usepackage{Rd}
+
+% \VignetteIndexEntry{Introduction to grid}
+% \VignettePackage{grid}
+% \VignetteDepends{lattice}
+
+% Definitions
+\newcommand{\slan}{{\sffamily S}}
+\newcommand{\rlan}{{\sffamily R}}
+\newcommand{\grid}{\pkg{grid}}
+\newcommand{\lattice}{\CRANpkg{lattice}}
+
+\setlength{\parindent}{0in}
+\setlength{\parskip}{.1in}
+\setlength{\textwidth}{140mm}
+\setlength{\oddsidemargin}{10mm}
+
+\title{\grid{} Graphics}
+\author{Paul Murrell}
+
+\begin{document}
+
+\maketitle
+
+<<echo=FALSE, results=hide>>=
+library(grDevices)
+library(graphics) # for par
+library(stats) # for rnorm
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+@
+\grid{} is a low-level graphics system which provides a great deal
+of control and flexibility in the appearance and arrangement of
+graphical output.  \grid{} does not provide high-level functions which
+create complete plots.  What it does provide is a basis for developing
+such high-level functions (e.g., the \lattice{} and \CRANpkg{ggplot2}
+packages), the facilities for customising and manipulating \lattice{}
+output, the ability to produce high-level plots or non-statistical
+images from scratch, and the ability to add sophisticated annotations
+to the output from base graphics functions (see the \CRANpkg{gridBase}
+package).
+
+This document provides an introduction to the fundamental concepts
+underlying the \grid{} package:  {\bf viewports}, {\bf units}, and
+{\bf graphical parameters}.  There are also several examples to
+demonstrate what can be achieved and how to achieve it.
+
+The description of the fundamental \grid{} concepts is predicated on the
+following approach to constructing a statistical graphic
+(plot).  You must be able to:
+\begin{enumerate}
+\item create and control different graphical regions
+and coordinate systems.
+\item control which graphical region and
+coordinate system graphical output goes into.
+\item produce graphical output (lines, points, text, \ldots{})
+including controlling its appearance (colour, line type, line width, \ldots{}).
+\end{enumerate}
+
+\section{Creating and Controlling Graphics Regions and Coordinate Systems}
+
+In \grid{} there can be any number of graphics regions.  A graphics
+region is referred to as a \emph{viewport} and is created using the
+\code{viewport()} function.  A viewport can be positioned anywhere on
+a graphics device (page, window, \ldots{}), it can be rotated, and it can
+be clipped to.  The following code describes a viewport which is
+centred within the page, and is half
+the width of the page, one quarter of the height of the page,
+and rotated $45^{\circ}$;  Figure \ref{figure:viewport}
+shows a diagram of this viewport.
+
+<<eval=FALSE>>=
+viewport(x = 0.5, y = 0.5, width = 0.5, height = 0.25, angle=45)
+<<viewport, echo=FALSE, results=hide, fig=TRUE, width=6, height=6, include=FALSE>>=
+grid.show.viewport(viewport(x = 0.5, y = 0.5, width = 0.5, height = 0.25,
+                            angle = 45))
+@
+\begin{figure}[p]
+\begin{center}
+{
+\includegraphics[width=3.5in, height=3.5in]{grid-viewport}
+}
+\end{center}
+\caption{
+  \label{figure:viewport}
+  A diagram of a simple \grid{} viewport (produced using the
+  \code{grid.show.viewport()} function.}
+\end{figure}
+
+The object returned by the \code{viewport()} function is only a
+\emph{description} of a graphics region.  A graphics region is only
+created on a graphics device when a viewport is ``pushed'' onto that
+device.  This is achieved using the \code{pushViewport()} function.
+Each device has only one ``current viewport'' (by default this is the
+entire device surface), but it maintains a ``tree'' of viewports that
+have been pushed.  The current viewport is a node on the viewport
+tree.  The \code{pushViewport()} function adds a viewport as a leaf of
+the tree -- the previous ``current viewport'' becomes the parent of
+this leaf and the new leaf becomes the current viewport.  The
+\code{popViewport()} function prunes the current viewport (and all its
+children) from the tree -- the parent of the pruned leaf becomes the
+current viewport.  The function \code{upViewport()} acts like
+\code{popViewport()} in terms of setting the current viewport, but
+does not prune the previous ``current viewport''.  The
+\code{downViewport()} function navigates down the tree to a viewport
+which has been specified by name (it adds no new viewports to the
+tree).  This means that there is always only one graphics region
+selected to draw into, but it is possible to return to a previous
+graphics region through the appropriate set of push/pop/up/down
+operations.
+
+As an example, the following code creates a graphics
+region in the top-left corner of the page using \code{pushViewport()}.
+This viewport is given the name \code{"vp1"}.
+It then does some drawing and calls \code{upViewport()} to return
+to the root of the viewport tree.  Next, it
+creates another region in the bottom-right corner of the page
+(again using \code{pushViewport()}) and does
+some drawing there.  Finally, it performs an \code{upViewport()}
+to the root of the tree and a \code{downViewport()} to
+return to the first graphics region and
+does some more drawing there (see Figure \ref{figure:viewports}).
+
+<<pushviewports, results=hide, fig=TRUE, width=6, height=6, include=FALSE>>=
+grid.rect(gp = gpar(lty = "dashed"))
+vp1 <- viewport(x = 0, y = 0.5, w = 0.5, h = 0.5,
+                just = c("left", "bottom"), name = "vp1")
+vp2 <- viewport(x = 0.5, y = 0, w = 0.5, h = 0.5,
+                just = c("left", "bottom"))
+pushViewport(vp1)
+grid.rect(gp = gpar(col = "grey"))
+grid.text("Some drawing in graphics region 1", y = 0.8)
+upViewport()
+pushViewport(vp2)
+grid.rect(gp = gpar(col = "grey"))
+grid.text("Some drawing in graphics region 2", y = 0.8)
+upViewport()
+downViewport("vp1")
+grid.text("MORE drawing in graphics region 1", y = 0.2)
+popViewport()
+@
+\begin{figure}[p]
+\begin{center}
+{
+\includegraphics[width=3.5in, height=3.5in]{grid-pushviewports}
+}
+\end{center}
+\caption{\label{figure:viewports}
+        Defining and drawing in multiple graphics regions.}
+\end{figure}
+@
+When several viewports are pushed onto the viewport tree, leaf
+viewports are located and sized within the context of their parent
+viewports.  The following code gives an example;  a viewport is defined
+which is one-quarter the size of its parent (half the width and half the
+height), and this viewport is pushed twice. The first time it
+gets pushed the parent is the root of the viewport tree (which is the
+entire device) so it is quarter of the size of the page.
+The second time the viewport is pushed,
+it is quarter of the size of \emph{its parent viewport}.
+Figure \ref{figure:vpstack} shows the output of these
+commands.
+
+<<vpstack, results=hide, fig=TRUE, width=6, height=6, include=FALSE>>=
+grid.rect(gp = gpar(lty = "dashed"))
+vp <- viewport(width = 0.5, height = 0.5)
+pushViewport(vp)
+grid.rect(gp = gpar(col = "grey"))
+grid.text("quarter of the page", y = 0.85)
+pushViewport(vp)
+grid.rect()
+grid.text("quarter of the\nprevious viewport")
+popViewport(2)
+@
+\begin{figure}[p]
+\begin{center}
+{
+\includegraphics[width=3.5in, height=3.5in]{grid-vpstack}
+}
+\end{center}
+\caption{\label{figure:vpstack}
+        The result of pushing the same viewport onto the viewport
+stack twice.}
+\end{figure}
+@
+
+Each viewport has a number of coordinate systems available.  The full
+set is described in Table \ref{table:coords}, but there are four main
+types: absolute coordinates (e.g., \code{"inches"}, \code{"cm"}) allow
+locations and sizes in terms of physical coordinates -- there is no
+dependence on the size of the page; normalised coordinates (e.g.,
+\code{"npc"}) allow locations and sizes as a proportion of the page
+size (or the current viewport); relative coordinates (i.e.,
+\code{"native"}) allow locations and sizes relative to a user-defined
+set of x- and y-ranges; referential coordinates (e.g.,
+\code{"strwidth"}) where locations and sizes are based on the size of
+some other graphical object.
+
+It is possible to specify the coordinate system
+for relative coordinates, but all other coordinate systems
+are implicitly defined based on the location and size of the viewport
+and/or the size of other graphical objects.
+
+\begin{table}[p]
+\begin{center}
+\begin{tabular}{l l} \hline
+{\bf Coordinate} & \\
+{\bf System Name} & {\bf Description} \\ \hline
+\code{"npc"} & \parbox[t]{3in}{Normalised Parent Coordinates.  Treats
+the bottom-left corner of the current
+viewport as the location $(0, 0)$ and the top-right corner
+as $(1,1)$. }  \\
+\code{"native"} & \parbox[t]{3in}{Locations and sizes are relative
+to the x- and y-scales for the current viewport.} \\
+\code{"inches"} & \parbox[t]{3in}{Locations and sizes are in terms
+of physical inches.  For locations, $(0,0)$ is at the bottom-left
+of the viewport.} \\
+\code{"cm"} & \parbox[t]{3in}{Same as \code{"inches"}, except in
+centimetres.} \\
+\code{"mm"} & \parbox[t]{3in}{Millimetres.} \\
+\code{"points"} & \parbox[t]{3in}{Points.  There are 72.27 points per inch.} \\
+\code{"bigpts"} & \parbox[t]{3in}{Big points. There are 72 big points per inch.} \\
+\code{"picas"} & \parbox[t]{3in}{Picas.  There are 12 points per pica.} \\
+\code{"dida"} & \parbox[t]{3in}{Dida.  1157 dida equals 1238 points. } \\
+\code{"cicero"} & \parbox[t]{3in}{Cicero.  There are 12 dida per cicero. } \\
+\code{"scaledpts"} & \parbox[t]{3in}{Scaled points. There are 65536 scaled
+points per point. } \\
+\code{"char"} & \parbox[t]{3in}{Locations and sizes are specified in
+terms of multiples of the current nominal \code{fontheight}.} \\
+\code{"lines"} & \parbox[t]{3in}{Locations and sizes are specified in
+terms of multiples of the height of a line of text
+ (dependent on both the current \code{fontsize} and
+the current \code{lineheight}).} \\
+\code{"snpc"} & \parbox[t]{3in}{Square Normalised Parent Coordinates.
+Locations and size are expressed as a proportion of the \emph{smaller}
+of the
+width and height of the current viewport.} \\
+\code{"strwidth"} & \parbox[t]{3in}{Locations and sizes are
+expressed as multiples of the width of a given string (dependent
+on the string and the current \code{fontsize}).} \\
+\code{"strheight"} & \parbox[t]{3in}{Locations and sizes are
+expressed as multiples of the height of a given string (dependent
+on the string and the current \code{fontsize}).} \\
+\code{"grobwidth"} & \parbox[t]{3in}{Locations and sizes are
+expressed as multiples of the width of a given graphical object
+(dependent on the current state of the graphical object). } \\
+\code{"grobheight"} & \parbox[t]{3in}{Locations and sizes are
+expressed as multiples of the height of a given graphical object
+(dependent on the current state of the graphical object). } \\
+\hline
+\end{tabular}
+\end{center}
+\caption{\label{table:coords}
+         The full set of coordinate systems available in \grid{}
+viewports.}
+\end{table}
+
+
+\section{Directing Graphics Output into Different \\Graphics Regions
+and Coordinate Systems}
+
+Graphics output is always relative to the current viewport (on the
+current device).  Selecting which region you want is a matter of
+push/pop/up/downing the appropriate viewports.  However, that is not
+all;  every viewport has a number of coordinate systems associated with
+it, so it is also necessary to select the coordinate system that you
+want to work with.
+
+The selection of which coordinate system to use within the current
+viewport is made using the \code{unit()} function.  The
+\code{unit()} function creates an object which is a combination
+of a value and a coordinate system (plus  some extra
+information for certain coordinate systems).  Here are some examples
+from the \code{help(unit)} page:
+
+<<units>>=
+unit(1, "npc")
+unit(1:3/4, "npc")
+unit(1:3/4, "npc")[2]
+unit(1:3/4, "npc") + unit(1, "inches")
+min(unit(0.5, "npc"), unit(1, "inches"))
+unit.c(unit(0.5, "npc"), unit(2, "inches") + unit(1:3/4, "npc"),
+       unit(1, "strwidth", "hi there"))
+@
+Notice that unit objects are treated much like numeric vectors.  You
+can index a unit object, it is possible to do simple arithmetic
+(including \code{min} and \code{max}), and there are several
+unit-versions of common functions (e.g., \code{unit.c},
+\code{unit.rep}, and \code{unit.length}; \code{unit.pmin}, and
+\code{unit.pmax})).
+
+\grid{} functions that have arguments specifying locations and sizes
+typically assume a default coordinate system is being used.  Most
+often this default is \code{"npc"}.  In other words, if a raw numeric
+value, \code{x}, is specified this is implicitly taken to mean
+\code{unit(x, "npc")}.  The \code{viewport()} function is one that
+assumes \code{"npc"} coordinates, so in all of the viewport examples
+to this point, we have only used \code{"npc"} coordinates to position
+viewports within the page or within each other.  It is also possible
+to position viewports using any of the coordinate systems described in
+Table \ref{table:coords}.
+
+As an example, the following code makes use of \code{"npc"},
+\code{"native"}, \code{"inches"}, and \code{"strwidth"}
+coordinates.  It first pushes a viewport with a user-defined
+x-scale, then pushes another viewport which is centred at the x-value
+60 and half-way up the first viewport, and
+is 3 inches high\footnote{If you want to check the figure, the scaling
+factor is $3.5/6$ (i.e., the rectangle in the figure should be 1.75\code{"} or
+3.94cm high).}  and as wide as the text ``coordinates for everyone''.
+Figure \ref{figure:vpcoords} shows the resulting output.
+
+<<vpcoords, results=hide, fig=TRUE, width=6, height=6, include=FALSE>>=
+pushViewport(viewport(y = unit(3, "lines"), width = 0.9, height = 0.8,
+                      just = "bottom", xscale = c(0, 100)))
+grid.rect(gp = gpar(col = "grey"))
+grid.xaxis()
+pushViewport(viewport(x = unit(60, "native"), y = unit(0.5, "npc"),
+                      width = unit(1, "strwidth", "coordinates for everyone"),
+                      height = unit(3, "inches")))
+grid.rect()
+grid.text("coordinates for everyone")
+popViewport(2)
+@
+\begin{figure}[p]
+\begin{center}
+{
+\includegraphics[width=3.5in, height=3.5in]{grid-vpcoords}
+}
+\end{center}
+\caption{\label{figure:vpcoords}
+        A viewport positioned using a variety of coordinate systems.}
+\end{figure}
+
+\clearpage
+\subsection{Layouts}
+
+\grid{} provides an alternative method for positioning viewports
+within each other based on \emph{layouts}\footnote{The primary reference
+for layouts is \cite{murrell:1999}.  Layouts in \grid{} represent
+an extension of the idea to allow a greater range of units for
+specifying row heights and column widths. \grid{} also differs in the
+way that children of the layout specify their location within the layout.}.
+A layout may be specified
+for any viewport.  Any viewport pushed immediately after a viewport
+containing a layout may specify its location with respect to that
+layout.  In the following simple example, a viewport is pushed
+with  a layout
+with 4 rows and 5 columns, then another viewport is pushed which
+occupies the second and third columns of the third row of the layout.
+
+<<vplayout, results=hide, fig=TRUE, width=6, height=6, include=FALSE>>=
+pushViewport(viewport(layout = grid.layout(4, 5)))
+grid.rect(gp = gpar(col = "grey"))
+grid.segments(c(1:4/5, rep(0, 3)), c(rep(0, 4), 1:3/4),
+              c(1:4/5, rep(1, 3)), c(rep(1, 4), 1:3/4),
+              gp = gpar(col = "grey"))
+pushViewport(viewport(layout.pos.col = 2:3, layout.pos.row = 3))
+grid.rect(gp = gpar(lwd = 3))
+popViewport(2)
+@
+\begin{figure}[tbp]
+\begin{center}
+{
+\includegraphics[width=3.5in, height=3.5in]{grid-vplayout}
+}
+\end{center}
+\caption{\label{figure:vplayout}
+        A viewport positioned using a layout.}
+\end{figure}
+
+Layouts introduce a special sort of unit called \code{"null"}.  These
+can be used in layouts to specify relative column-widths or
+row-heights.  In the following, slightly more complex, example, the
+layout specifies something similar to a standard plot arrangement;
+there are bottom and left margins 3 lines of text wide, top and right
+margins 1cm wide, and two rows and columns within these margins where
+the bottom row is twice the height of the top row (see Figure
+\ref{figure:vplayoutcomplex}).
+
+<<layoutcomplex, results=hide, fig=TRUE, width=6, height=6, include=FALSE>>=
+grid.show.layout(grid.layout(4, 4, widths = unit(c(3, 1, 1, 1),
+                             c("lines", "null", "null", "cm")),
+                             heights = c(1, 1, 2, 3),
+                             c("cm", "null", "null", "lines")))
+@
+\begin{figure}[tbp]
+\begin{center}
+{
+\includegraphics[width=3.5in, height=3.5in]{grid-layoutcomplex}
+}
+\end{center}
+\caption{\label{figure:vplayoutcomplex}
+        A more complex layout.}
+\end{figure}
+
+\clearpage
+\section{Producing Graphics Output}
+
+\grid{} provides a standard set of graphical primitives: lines,
+text, points, rectangles, polygons, and circles.  There are also
+two higher level components:  x- and y-axes.  Table \ref{table:primitives}
+lists the \grid{} functions that produce these primitives.
+
+{\bf NOTE:} all of these graphical primitives are available in
+all graphical regions and coordinate systems.
+
+There used to be (prior to R 2.3.0) a separate \code{grid.arrows()}
+function, but this has been superseded by an \code{arrow} argument
+to the line-drawing primitives (lines, segments, line-to).
+
+\begin{table}[h!]
+\begin{center}
+\begin{tabular}{l l} \hline
+\code{grid.text} & Can specify angle of rotation. \\
+\code{grid.rect} &  \\
+\code{grid.circle} &  \\
+\code{grid.polygon} &  \\
+\code{grid.points} & Can specify type of plotting symbol. \\
+\code{grid.lines} &  \\
+\code{grid.segments} &  \\
+\code{grid.grill} & Convenience function for drawing grid lines \\
+\code{grid.move.to} &  \\
+\code{grid.line.to} &  \\
+& \\
+\code{grid.xaxis} & Top or bottom axis \\
+\code{grid.yaxis} & Left or right axis \\
+\hline
+\end{tabular}
+\end{center}
+\caption{\label{table:primitives}
+         \grid{} graphical primitives.}
+\end{table}
+
+
+\subsection{Controlling the Appearance of Graphics Output}
+
+\grid{} recognises a fixed set of graphical parameters for modifying
+the appearance of graphical output (see Table \ref{table:gpars}).
+
+\begin{table}[h!]
+\begin{center}
+\begin{tabular}{l l} \hline
+\code{col} & colour of lines, text, \ldots{} \\
+\code{fill} & colour for filling rectangles, circles, polygons, \ldots{} \\
+\code{lwd} & line width \\
+\code{lty} & line type \\
+\code{fontsize} & The size of text (in points) \\
+\code{fontface} &  The font face (bold, italic, \ldots{}) \\
+\code{fontfamily} & The font family \\
+\hline
+\end{tabular}
+\end{center}
+\caption{\label{table:gpars}
+         \grid{} graphical parameters.}
+\end{table}
+
+Graphical parameter settings may be specified for both viewports
+and graphical objects.  A graphical parameter setting for a viewport
+will hold for all graphical output within that viewport {\em and} for
+all viewports subsequently pushed onto the viewport stack, {\em unless}
+the graphical object or viewport specifies a different parameter
+setting.
+
+A description of graphical parameter settings is created using
+the \code{gpar()} function, and this description is associated with a
+viewport or a graphical object via the \code{gp} argument.
+The following code demonstrates the effect of graphical parameter
+settings (see Figure \ref{figure:gpar}).
+
+<<gpar, results=hide, fig=TRUE, width=6, height=6, include=FALSE>>=
+pushViewport(viewport(gp = gpar(fill = "grey", fontface = "italic")))
+grid.rect()
+grid.rect(width = 0.8, height = 0.6, gp = gpar(fill = "white"))
+grid.text(paste("This text and the inner rectangle",
+                "have specified their own gpar settings", sep = "\n"),
+          y = 0.75, gp = gpar(fontface = "plain"))
+grid.text(paste("This text and the outer rectangle",
+                "accept the gpar settings of the viewport", sep = "\n"),
+          y = 0.25)
+popViewport()
+@
+\begin{figure}[tbp]
+\begin{center}
+{
+\includegraphics[width=3.5in, height=3.5in]{grid-gpar}
+}
+\end{center}
+\caption{\label{figure:gpar}
+        The effect of different graphical parameter settings.}
+\end{figure}
+
+\clearpage
+\section{Examples}
+
+The remaining sections provide some code examples of the use
+of \grid{}.
+
+The first example constructs a simple scatterplot from first
+principles.
+Just like in base graphics, it is quite straightforward
+to create a simple plot by hand.  The following code produces the equivalent
+of a  standard \code{plot(1:10)} (see Figure \ref{figure:simpleplot}).
+
+<<simpleplot, results=hide, fig=TRUE, width=6, height=6, include=FALSE>>=
+grid.rect(gp = gpar(lty = "dashed"))
+x <- y <- 1:10
+pushViewport(plotViewport(c(5.1, 4.1, 4.1, 2.1)))
+pushViewport(dataViewport(x, y))
+grid.rect()
+grid.xaxis()
+grid.yaxis()
+grid.points(x, y)
+grid.text("1:10", x = unit(-3, "lines"), rot = 90)
+popViewport(2)
+@
+\begin{figure}[p]
+\begin{center}
+{
+\includegraphics[width=3.5in, height=3.5in]{grid-simpleplot}
+}
+\end{center}
+\caption{\label{figure:simpleplot}
+        The grid equivalent of \code{plot(1:10)}.}
+\end{figure}
+
+Now consider a more complex example, where we create a barplot
+with a legend (see Figure \ref{figure:barplot}).
+There are two main parts to this because
+grid has no predefined barplot function;  the construction of the
+barplot will itself be instructive, so we will start with just that.
+
+The data to be plotted are as follows:  we have four measures to
+represent at four levels;  the data are in a matrix with the measures
+for each level in a column.
+
+<<bpdata>>=
+barData <- matrix(sample(1:4, 16, replace = TRUE), ncol = 4)
+@
+We will use colours to differentiate
+the measures.
+
+<<barconstraint>>=
+boxColours <- 1:4
+@
+We create the barplot within a function so that we can easily
+reproduce it when we combine it with the legend.
+
+<<bpfun>>=
+bp <- function(barData) {
+    nbars <- dim(barData)[2]
+    nmeasures <- dim(barData)[1]
+    barTotals <- rbind(rep(0, nbars), apply(barData, 2, cumsum))
+    barYscale <- c(0, max(barTotals)*1.05)
+    pushViewport(plotViewport(c(5, 4, 4, 1),
+                              yscale = barYscale,
+                              layout = grid.layout(1, nbars)))
+    grid.rect()
+    grid.yaxis()
+    for (i in 1:nbars) {
+        pushViewport(viewport(layout.pos.col = i, yscale = barYscale))
+        grid.rect(x = rep(0.5, nmeasures),
+                  y = unit(barTotals[1:nmeasures, i], "native"),
+                  height = unit(diff(barTotals[,i]), "native"),
+                  width = 0.8, just = "bottom", gp = gpar(fill = boxColours))
+        popViewport()
+    }
+    popViewport()
+}
+@
+
+Now we turn our attention to the legend.  We need some labels
+and we will enforce the constraint that the boxes in the legend should
+be 0.5\code{"} square:
+
+<<legendlabels>>=
+legLabels <- c("Group A", "Group B", "Group C", "Something Longer")
+boxSize <- unit(0.5, "inches")
+@
+
+The following draws the legend elements in a column, with each
+element consisting of a box with a label beneath.
+
+<<legfun>>=
+leg <- function(legLabels) {
+    nlabels <- length(legLabels)
+    pushViewport(viewport(layout = grid.layout(nlabels, 1)))
+    for (i in 1:nlabels) {
+        pushViewport(viewport(layout.pos.row = i))
+        grid.rect(width = boxSize, height = boxSize, just = "bottom",
+                  gp = gpar(fill = boxColours[i]))
+        grid.text(legLabels[i], y = unit(0.5, "npc") - unit(1, "lines"))
+        popViewport()
+    }
+    popViewport()
+}
+@
+
+Now that we have the two components, we can arrange them together to
+form a complete image.  Notice that we can perform some calculations
+to make sure that we leave enough room for the legend, including
+1 line of text as left and right margins.  We also impose top and bottom
+margins on the legend to match the plot margins.
+
+<<barplot, results=hide, fig=TRUE, width=6, height=6, include=FALSE>>=
+grid.rect(gp = gpar(lty = "dashed"))
+legend.width <- max(unit(rep(1, length(legLabels)),
+                         "strwidth", as.list(legLabels)) +
+                    unit(2, "lines"),
+                    unit(0.5, "inches") + unit(2, "lines"))
+pushViewport(viewport(layout = grid.layout(1, 2,
+                      widths = unit.c(unit(1,"null"), legend.width))))
+pushViewport(viewport(layout.pos.col = 1))
+bp(barData)
+popViewport()
+pushViewport(viewport(layout.pos.col = 2))
+pushViewport(plotViewport(c(5, 0, 4, 0)))
+leg(legLabels)
+popViewport(3)
+@
+\begin{figure}[p]
+\begin{center}
+{
+\includegraphics[width=3.5in, height=3.5in]{grid-barplot}
+}
+\end{center}
+\caption{\label{figure:barplot}
+        A barplot plus legend from first principles using \grid{}.}
+\end{figure}
+
+
+\section{\grid{} and \lattice{}}
+
+The \lattice{} package is built on top of \grid{} and provides a
+quite sophisticated example of writing high-level plotting functions
+using \grid{}.  Because \lattice{} consists of \grid{} calls, it is
+possible to both add \grid{} output to \lattice{} output, and
+\lattice{} output to \grid{} output.
+
+\subsection*{Adding \grid{} to \lattice{}}
+
+Panel functions in \lattice{} can include \grid{} calls.
+The following example adds a horizontal line at 0 to a standard
+\code{xyplot} (see Figure \ref{figure:trellispanel}):
+
+<<echo=FALSE, results=hide>>=
+library(lattice)
+<<trellisdata, echo=FALSE, eval=FALSE>>=
+x <- rnorm(100)
+y <- rnorm(100)
+g <- sample(1:8, 100, replace = TRUE)
+@
+% This is the code the reader sees
+% This WILL get run by checking code, but by then lattice will be
+% installed so it will be ok
+<<trellispanelplot, eval=FALSE>>=
+xyplot(y ~ x | g, panel = function(x, y) {
+    panel.xyplot(x, y);
+    grid.lines(unit(c(0, 1), "npc"), unit(0, "native"),
+               gp = gpar(col = "grey"))
+})
+@
+% This generates the actual plot
+<<trellispanel, echo=FALSE, results=hide, fig=TRUE, width=6, height=6, include=FALSE>>=
+<<trellisdata>>
+<<trellispanelplot>>
+@
+\begin{figure}[p]
+\begin{center}
+{
+\includegraphics[width=3.5in, height=3.5in]{grid-trellispanel}
+}
+\end{center}
+\caption{\label{figure:trellispanel}
+        A \lattice{} panel function using \grid{}.}
+\end{figure}
+@
+The following  example writes a left-justified label in each strip
+(see Figure \ref{figure:trellisstrip}):
+
+<<trellisstripplot, eval=FALSE>>=
+xyplot(y ~ x | g, strip = function(which.given, which.panel, ...) {
+    grid.text(paste("Variable ", which.given, ": Level ",
+                    which.panel[which.given], sep = ""),
+              unit(1, "mm"), .5, just = "left")
+})
+<<trellisstrip, echo=FALSE, results=hide, fig=TRUE, width=6, height=6, include=FALSE>>=
+<<trellisdata>>
+<<trellisstripplot>>
+@
+\begin{figure}[p]
+\begin{center}
+{
+\includegraphics[width=3.5in, height=3.5in]{grid-trellisstrip}
+}
+\end{center}
+\caption{\label{figure:trellisstrip}
+        A \lattice{} strip function using \grid{}.}
+\end{figure}
+
+\subsection*{Adding \lattice{} to \grid{}}
+
+It is also possible to use a \lattice{} plot as an element of
+a \grid{} image.  The following example splits up the page
+so that there is an \code{xyplot} beside a panel of text
+(see Figure \ref{figure:trellisgrid}).  First of all, the
+lattice plot is created, but
+not drawn.  \grid{} is used to create some regions and the lattice
+plot is drawn into one of those regions.
+
+<<trellisgridplot, eval=FALSE>>=
+someText <- paste("A panel of text", "produced using", "raw grid code",
+                  "that could be used", "to describe",
+                  "the plot", "to the right.", sep = "\n")
+latticePlot <- xyplot(y ~ x | g, layout = c(2, 4))
+grid.rect(gp = gpar(lty = "dashed"))
+pushViewport(viewport(layout = grid.layout(1, 2,
+                      widths = unit.c(unit(1, "strwidth", someText) +
+                      unit(2, "cm"),
+                      unit(1, "null")))))
+pushViewport(viewport(layout.pos.col = 1))
+grid.rect(gp = gpar(fill = "light grey"))
+grid.text(someText,
+          x = unit(1, "cm"), y = unit(1, "npc") - unit(1, "inches"),
+          just = c("left", "top"))
+popViewport()
+pushViewport(viewport(layout.pos.col = 2))
+print(latticePlot, newpage = FALSE)
+popViewport(2)
+<<trellisgrid, echo=FALSE, results=hide, fig=TRUE, width=6, height=6, include=FALSE>>=
+<<trellisdata>>
+<<trellisgridplot>>
+@
+\begin{figure}[tbp]
+\begin{center}
+{
+\includegraphics[width=3.5in, height=3.5in]{grid-trellisgrid}
+}
+\end{center}
+\caption{\label{figure:trellisgrid}
+        A \lattice{} plot used as a component of a larger \grid{} image.}
+\end{figure}
+
+
+\bibliographystyle{plain}
+\bibliography{grid}
+
+\end{document}
diff --git a/win32/deps/library/grid/doc/grid.pdf b/win32/deps/library/grid/doc/grid.pdf
new file mode 100644
index 0000000..048403f
Binary files /dev/null and b/win32/deps/library/grid/doc/grid.pdf differ
diff --git a/win32/deps/library/grid/doc/grobs.R b/win32/deps/library/grid/doc/grobs.R
new file mode 100644
index 0000000..e3827cd
--- /dev/null
+++ b/win32/deps/library/grid/doc/grobs.R
@@ -0,0 +1,313 @@
+### R code from vignette source 'grobs.Rnw'
+
+###################################################
+### code chunk number 1: grobs.Rnw:25-29
+###################################################
+library(grDevices)
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+
+
+###################################################
+### code chunk number 2: grobs.Rnw:43-45
+###################################################
+gl <- linesGrob()
+gl <- editGrob(gl, gp = gpar(col = "green"))
+
+
+###################################################
+### code chunk number 3: grobs.Rnw:59-63
+###################################################
+grid.newpage()
+grid.lines(name = "lines")
+grid.edit(gPath("lines"), gp = gpar(col = "pink"))
+grid.edit("lines", gp = gpar(col = "red"))
+
+
+###################################################
+### code chunk number 4: grobs.Rnw:79-86
+###################################################
+grid.newpage()
+pushViewport(viewport(w = .5, h = .5))
+grid.rect(gp = gpar(col = "grey"))
+grid.xaxis(name = "myxaxis")
+grid.edit("myxaxis", at = 1:4/5)
+grid.edit(gPath("myxaxis", "labels"), y = unit(-1, "lines"))
+
+
+
+###################################################
+### code chunk number 5: grobs.Rnw:98-108
+###################################################
+grid.newpage()
+pushViewport(viewport(w = .5, h = .5))
+myplot <-
+    gTree(name = "myplot",
+          children = gList(rectGrob(name = "box", gp = gpar(col = "grey")),
+                           xaxisGrob(name = "xaxis")))
+grid.draw(myplot)
+grid.edit("myplot::xaxis", at = 1:10/11)
+grid.edit("myplot::xaxis::labels", label = round(1:10/11, 2))
+grid.edit("myplot::xaxis::labels", y = unit(-1, "lines"))
+
+
+###################################################
+### code chunk number 6: grobs.Rnw:116-119
+###################################################
+grid.newpage()
+gt <- grid.text("Hi there")
+grid.rect(width = unit(1, "grobwidth", gt))
+
+
+###################################################
+### code chunk number 7: grobs.Rnw:128-132
+###################################################
+grid.newpage()
+gt <- grid.text("Hi there", name = "sometext")
+grid.rect(width = unit(1, "grobwidth", "sometext"))
+grid.edit("sometext", label = "Something different")
+
+
+###################################################
+### code chunk number 8: grobs.Rnw:157-171
+###################################################
+grid.newpage()
+mygrob <- grob(name = "mygrob", cl = "mygrob")
+preDrawDetails.mygrob <- function(x)
+    pushViewport(viewport(gp = gpar(fontsize = 20)))
+
+drawDetails.mygrob <- function(x, recording = TRUE)
+    grid.draw(textGrob("hi there"), recording = FALSE)
+
+postDrawDetails.mygrob <- function(x) popViewport()
+
+widthDetails.mygrob <- function(x) unit(1, "strwidth", "hi there")
+
+grid.draw(mygrob)
+grid.rect(width = unit(1, "grobwidth", mygrob))
+
+
+###################################################
+### code chunk number 9: grobs.Rnw:189-201
+###################################################
+grid.newpage()
+mygtree <- gTree(name = "mygrob",
+                 childrenvp = viewport(name = "labelvp",
+                                       gp = gpar(fontsize = 20)),
+                 children = gList(textGrob("hi there", name = "label",
+                   vp = "labelvp")),
+                 cl = "mygtree")
+widthDetails.mygtree <- function(x)
+    unit(1, "grobwidth", getGrob(x, "label"))
+
+grid.draw(mygtree)
+grid.rect(width = unit(1, "grobwidth", mygtree))
+
+
+###################################################
+### code chunk number 10: grobs.Rnw:209-214
+###################################################
+grid.newpage()
+fg <- frameGrob(layout = grid.layout(1, 2))
+fg <- placeGrob(fg, textGrob("Hi there"), col = 1)
+fg <- placeGrob(fg, rectGrob(), col = 2)
+grid.draw(fg)
+
+
+###################################################
+### code chunk number 11: grobs.Rnw:219-235
+###################################################
+grid.newpage()
+pushViewport(viewport(layout = grid.layout(2, 2)))
+drawIt <- function(row, col) {
+    pushViewport(viewport(layout.pos.col = col, layout.pos.row = row))
+    grid.rect(gp = gpar(col = "grey"))
+    grid.draw(fg)
+    upViewport()
+}
+fg <- frameGrob()
+fg <- packGrob(fg, textGrob("Hi there"))
+fg <- placeGrob(fg, rectGrob())
+drawIt(1, 1)
+fg <- packGrob(fg, textGrob("Hello again"), side = "right")
+drawIt(1, 2)
+fg <- packGrob(fg, rectGrob(), side = "right", width = unit(1, "null"))
+drawIt(2, 2)
+
+
+###################################################
+### code chunk number 12: grobs.Rnw:247-256
+###################################################
+grid.newpage()
+fg <- frameGrob()
+fg <- packGrob(fg, textGrob("Hi there"))
+fg <- placeGrob(fg, rectGrob())
+fg <- packGrob(fg, textGrob("Hello again", name = "midtext"),
+               side = "right", dynamic = TRUE)
+fg <- packGrob(fg, rectGrob(), side = "right", width = unit(1, "null"))
+grid.draw(fg)
+grid.edit("midtext", label = "something much longer")
+
+
+###################################################
+### code chunk number 13: grobs.Rnw:280-304
+###################################################
+grid.newpage()
+pushViewport(viewport(layout = grid.layout(2, 2)))
+drawIt <- function(row, col) {
+    pushViewport(viewport(layout.pos.col = col, layout.pos.row = row))
+    grid.rect(gp = gpar(col = "grey"))
+    grid.draw(gplot)
+    upViewport()
+}
+gplot <- gTree(x = NULL, y = NULL,
+               childrenvp = vpTree(
+                 plotViewport(c(5, 4, 4, 2), name = "plotRegion"),
+                 vpList(viewport(name = "dataRegion"))),
+               children = gList(
+                 xaxisGrob(vp = "plotRegion::dataRegion"),
+                 yaxisGrob(vp = "plotRegion::dataRegion"),
+                 rectGrob(vp = "plotRegion")))
+drawIt(1, 1)
+gplot <- addGrob(gplot, pointsGrob(vp = "plotRegion::dataRegion"))
+drawIt(1, 2)
+gplot <- addGrob(gplot, pointsGrob(name = "data1", pch = 2,
+                                   vp = "plotRegion::dataRegion"))
+drawIt(2, 1)
+gplot <- removeGrob(gplot, "data1")
+drawIt(2, 2)
+
+
+###################################################
+### code chunk number 14: grobs.Rnw:311-332
+###################################################
+gplot <- gTree(x = NULL, y = NULL,
+               childrenvp = vpTree(
+                 plotViewport(c(5, 4, 4, 2), name = "plotRegion"),
+                   vpList(viewport(name = "dataRegion"))),
+               children = gList(
+                 xaxisGrob(vp = "plotRegion::dataRegion"),
+                 yaxisGrob(vp = "plotRegion::dataRegion"),
+                 rectGrob(vp = "plotRegion")))
+save(gplot, file = "gplot1")
+gplot <- addGrob(gplot, pointsGrob(vp = "plotRegion::dataRegion"))
+save(gplot, file = "gplot2")
+grid.newpage()
+pushViewport(viewport(layout = grid.layout(1, 2)))
+pushViewport(viewport(layout.pos.col = 1))
+load("gplot1")
+grid.draw(gplot)
+popViewport()
+pushViewport(viewport(layout.pos.col = 2))
+load("gplot2")
+grid.draw(gplot)
+popViewport()
+
+
+###################################################
+### code chunk number 15: grobs.Rnw:343-354
+###################################################
+myplot <- gTree(name = "myplot",
+                children = gList(
+                  rectGrob(name = "box", gp = gpar(col = "grey")),
+                  xaxisGrob(name = "xaxis")))
+myplot <- editGrob(myplot, gPath = "xaxis", at = 1:10/11)
+myplot <- editGrob(myplot, gPath = "xaxis::labels", label = round(1:10/11, 2))
+myplot <- editGrob(myplot, gPath = "xaxis::labels", y = unit(-1, "lines"))
+grid.newpage()
+pushViewport(viewport(w = .5, h = .5))
+grid.draw(myplot)
+
+
+
+###################################################
+### code chunk number 16: grobs.Rnw:360-373
+###################################################
+myplot <- gTree(name = "myplot",
+                children = gList(
+                  rectGrob(name = "box", gp = gpar(col = "grey")),
+                  xaxisGrob(name = "xaxis")))
+getGrob(myplot, "xaxis")
+myplot <- editGrob(myplot, gPath="xaxis", at=1:10/11)
+getGrob(myplot, "xaxis::labels")
+grid.newpage()
+pushViewport(viewport(w=.5, h=.5))
+grid.draw(myplot)
+grid.get("myplot")
+grid.get("myplot::xaxis")
+grid.get("myplot::xaxis::labels")
+
+
+###################################################
+### code chunk number 17: grobs.Rnw:394-410
+###################################################
+myplot <- gTree(name = "myplot",
+                children = gList(rectGrob(name = "box", gp = gpar(col = "grey")),
+                  xaxisGrob(name = "xaxis")))
+myplot <- setGrob(myplot, "xaxis", rectGrob(name = "xaxis"))
+grid.newpage()
+pushViewport(viewport(w = .5, h = .5))
+grid.draw(myplot)
+grid.set("myplot::xaxis", xaxisGrob(name = "xaxis", at = 1:3/4))
+grid.set("myplot::xaxis::labels",
+         textGrob(name = "labels", x = unit(1:3/4, "native"),
+                  y = unit(-1, "lines"), label = letters[1:3]))
+myplot <- setGrob(grid.get("myplot"), "xaxis::labels",
+                  circleGrob(name = "labels"))
+grid.newpage()
+pushViewport(viewport(w = .5, h = .5))
+grid.draw(myplot)
+
+
+###################################################
+### code chunk number 18: grobs.Rnw:428-459
+###################################################
+drawIt <- function(row, col) {
+  pushViewport(viewport(layout.pos.col = col, layout.pos.row = row))
+  grid.rect(gp = gpar(col = "grey"))
+  grid.draw(gplot)
+  upViewport()
+}
+gplot <- gTree(name = "plot1",
+               childrenvp = vpTree(
+                 plotViewport(c(5, 4, 4, 2), name = "plotRegion"),
+                 vpList(viewport(name = "dataRegion"))),
+               children = gList(
+                 xaxisGrob(name = "xaxis", vp = "plotRegion::dataRegion"),
+                 yaxisGrob(name = "yaxis", vp = "plotRegion::dataRegion"),
+                 rectGrob(name = "box", vp = "plotRegion")))
+grid.newpage()
+pushViewport(viewport(layout = grid.layout(2, 2)))
+drawIt(1, 1)
+grid.add("plot1", pointsGrob(0.5, 0.5, name = "data1",
+                             vp = "plotRegion::dataRegion"))
+grid.add("plot1::xaxis",
+         textGrob("X Axis", y = unit(-2, "lines"), name = "xlab"))
+grid.edit("plot1::xaxis::xlab", y = unit(-3, "lines"))
+gplot <- grid.get("plot1")
+gplot <- addGrob(gplot, gPath = "yaxis",
+                 textGrob("Y Axis", x = unit(-3, "lines"), rot = 90,
+                          name = "ylab"))
+drawIt(1, 2)
+gplot <- removeGrob(gplot, "xaxis::xlab")
+drawIt(2, 1)
+grid.remove("plot1::data1")
+grid.remove("plot1")
+
+
+###################################################
+### code chunk number 19: grobs.Rnw:467-477
+###################################################
+grid.newpage()
+grid.frame(name = "myframe", layout = grid.layout(1, 2))
+grid.place("myframe", textGrob("Hi there"), col = 1)
+grid.place("myframe", rectGrob(), col = 2)
+grid.newpage()
+grid.frame(name = "frame2")
+grid.pack("frame2", textGrob("Hi there"))
+grid.place("frame2", rectGrob())
+grid.pack("frame2", textGrob("Hello again"), side = "right")
+grid.pack("frame2", rectGrob(), side = "right", width = unit(1, "null"))
+
+
diff --git a/win32/deps/library/grid/doc/grobs.Rnw b/win32/deps/library/grid/doc/grobs.Rnw
new file mode 100644
index 0000000..0c9b952
--- /dev/null
+++ b/win32/deps/library/grid/doc/grobs.Rnw
@@ -0,0 +1,482 @@
+\documentclass[a4paper]{article}
+
+\usepackage{Rd}
+
+% \VignetteIndexEntry{Working with grid grobs}
+% \VignettePackage{grid}
+
+\newcommand{\grid}{\pkg{grid}}
+\newcommand{\grob}{\code{grob}}
+\newcommand{\gTree}{\code{gTree}}
+\newcommand{\gPath}{\code{gPath}}
+\newcommand{\lattice}{\CRANpkg{lattice}}
+
+\setlength{\parindent}{0in}
+\setlength{\parskip}{.1in}
+\setlength{\textwidth}{140mm}
+\setlength{\oddsidemargin}{10mm}
+
+\title{Modifying \grid{} \code{grob}s}
+\author{Paul Murrell}
+
+\begin{document}
+\maketitle
+
+<<echo=FALSE, results=hide>>=
+library(grDevices)
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+@
+There is a distinction between \grob{}s which are just stored
+in user-level \R{} objects and \grob{}s which represent
+drawn output (i.e., \grob{}s on the \grid{} display list).
+There is a naming convention that \code{grid.*()}  functions are
+(mainly) used for their side-effect of producing output or
+modifying existing output (they create/affect \grob{}s on the display list).
+Functions of the form \code{*Grob()} are used for their return value;
+the \grob{} that they create/modify.
+For example, the following creates a \grob{} and then modifies it, but
+performs absolutely no drawing;  this is purely manipulating a
+description of a graphical object.
+
+<<>>=
+gl <- linesGrob()
+gl <- editGrob(gl, gp = gpar(col = "green"))
+@
+
+The next example produces output.  A \grob{} is returned,
+but that \grob{} is just a description of the output that was drawn
+and has no direct link to the output.  It is possible to access the
+grob representing the output by
+using the \grob{}'s \code{name}.  In order to access a \grob{}
+which represents drawn output (i.e., a \grob{} on the display list),
+you must specify a \gPath{}.  The \gPath{} should be created using the
+\code{gPath()} function for writing scripts, but in interactive use, it
+is possible to specify the \gPath{} directly as a string.  The code below
+shows both approaches.
+
+<<results=hide>>=
+grid.newpage()
+grid.lines(name = "lines")
+grid.edit(gPath("lines"), gp = gpar(col = "pink"))
+grid.edit("lines", gp = gpar(col = "red"))
+@
+
+Complex graphical objects are provided by the \gTree{} class.  A
+\gTree{} is a \grob{} which may have other \grob{}s as children.  The
+\code{xaxis} and \code{yaxis} \grob{}s provided by \grid{} are
+examples of \gTree{}s; the children of an axis include a lines \grob{}
+for the tick-marks and a text \grob{} for the tick-mark labels.  The
+function \code{childNames()} can be used to list the names of the
+children of a \gTree{}.  When dealing with these hierarchical objects,
+more complex \gPath{}s can be used to access children of a \gTree{}.
+In the following example, an x-axis is drawn, then the xaxis itself is
+edited to modify the locations of the tick-marks, then the xaxis's
+text child is edited to modify the location of the labels on the
+tick-marks.
+
+<<results=hide>>=
+grid.newpage()
+pushViewport(viewport(w = .5, h = .5))
+grid.rect(gp = gpar(col = "grey"))
+grid.xaxis(name = "myxaxis")
+grid.edit("myxaxis", at = 1:4/5)
+grid.edit(gPath("myxaxis", "labels"), y = unit(-1, "lines"))
+
+@
+
+This next example extends the idea a step further to edit the child of
+a child of a \gTree{}.  It also shows the use of the \gTree{} function
+to construct a simple \gTree{} (this is just creating an instance of
+the \gTree{} class -- it is also possible to extend the \gTree{} class
+in order to provide specialised behaviour for drawing and other
+things; more on this later).  Finally, the example demonstrates how
+\gPath{}s of depth greater than 1 can be specified directly as a
+string.
+
+<<results=hide>>=
+grid.newpage()
+pushViewport(viewport(w = .5, h = .5))
+myplot <-
+    gTree(name = "myplot",
+          children = gList(rectGrob(name = "box", gp = gpar(col = "grey")),
+                           xaxisGrob(name = "xaxis")))
+grid.draw(myplot)
+grid.edit("myplot::xaxis", at = 1:10/11)
+grid.edit("myplot::xaxis::labels", label = round(1:10/11, 2))
+grid.edit("myplot::xaxis::labels", y = unit(-1, "lines"))
+@
+\code{"grobwidth"} units require a \grob{} to give the width of.
+There are two ways to specify the \grob{}.  The following example
+shows the most obvious method of simply supplying a \grob{}.  Notice
+that if you modify \code{gt} it will have no effect on the width of
+the drawn rectangle.
+
+<<results=hide>>=
+grid.newpage()
+gt <- grid.text("Hi there")
+grid.rect(width = unit(1, "grobwidth", gt))
+@
+In order to allow a \code{"grobwidth"} unit to track changes in the
+\grob{}, it is possible to specify a \gPath{} rather than a \grob{} as
+the data for a \code{"grobwidth"} unit.  The following example
+modifies the previous example to use a \gPath{}.  Now, the width of
+the rectangle changes when the width of the underlying \grob{}
+changes.
+
+<<results=hide>>=
+grid.newpage()
+gt <- grid.text("Hi there", name = "sometext")
+grid.rect(width = unit(1, "grobwidth", "sometext"))
+grid.edit("sometext", label = "Something different")
+@
+
+One issue in the evaluation of \code{"grobwidth"} units involves
+establishing the correct ``context'' for a \grob{} when determining its width
+(if a \grob{} has a viewport in its \code{vp} slot then that viewport gets
+pushed before the \grob{} is drawn;  that viewport should also be pushed
+when determining the width
+of the \grob{}).
+To achieve this there are
+\code{preDrawDetails()},  \code{drawDetails()}, and \code{postDrawDetails()}
+generic functions.
+(suggestions for better names welcome!).  The idea is that
+pushing and popping of viewports should occur in the \code{pre} and
+\code{post} generics, and any actual drawing happens in the main
+\code{drawDetails()} generic.  This allows the code that calculates a
+\grob{} width to call the \code{preDrawDetails()} in order to establish
+the context in which the \grob{} would be drawn before calculating its
+width.  The following example shows a test case;  a \grob{} is created
+(extending to a new class to allow specific methods to be written),
+and methods are provided which establish a particular context
+for drawing the \grob{}.  These methods are used both in the drawing
+of the \grob{} and in the calculation of the \grob{}'s width (when
+drawing a bounding rectangle).
+
+<<results=hide>>=
+grid.newpage()
+mygrob <- grob(name = "mygrob", cl = "mygrob")
+preDrawDetails.mygrob <- function(x)
+    pushViewport(viewport(gp = gpar(fontsize = 20)))
+
+drawDetails.mygrob <- function(x, recording = TRUE)
+    grid.draw(textGrob("hi there"), recording = FALSE)
+
+postDrawDetails.mygrob <- function(x) popViewport()
+
+widthDetails.mygrob <- function(x) unit(1, "strwidth", "hi there")
+
+grid.draw(mygrob)
+grid.rect(width = unit(1, "grobwidth", mygrob))
+@
+
+This next example shows a slightly different test case where the
+standard \code{preDrawDetails()} and \code{postDrawDetails()} methods
+are used, but the \grob{} does have a \code{vp} slot so these methods
+do something.  Another interesting feature of this example is the
+slightly more complex \gTree{} that is created.  The \gTree{} has a
+\code{childrenvp} specified.  When the \gTree{} is drawn, this
+viewport is pushed and then ``up''ed before the children of the
+\gTree{} are drawn.  This means that the children of the \gTree{} can
+specify a \code{vpPath} to the viewport they should be in.  This
+allows the parent \gTree{} to create a suite of viewports and then
+children of the \gTree{} select which one they want -- this can be
+more efficient than having each child push and pop the viewports it
+needs, especially if several children are drawn within the same
+viewport.  Another, more realistic example of this is given later.
+
+<<results=hide>>=
+grid.newpage()
+mygtree <- gTree(name = "mygrob",
+                 childrenvp = viewport(name = "labelvp",
+                                       gp = gpar(fontsize = 20)),
+                 children = gList(textGrob("hi there", name = "label",
+                   vp = "labelvp")),
+                 cl = "mygtree")
+widthDetails.mygtree <- function(x)
+    unit(1, "grobwidth", getGrob(x, "label"))
+
+grid.draw(mygtree)
+grid.rect(width = unit(1, "grobwidth", mygtree))
+@
+
+Constructing a description of a \code{frame} \grob{} must be
+done via \code{packGrob()} and \code{placeGrob()}.  The following example
+shows the construction of a simple frame consisting of two
+equal-size columns.
+
+<<results = hide>>=
+grid.newpage()
+fg <- frameGrob(layout = grid.layout(1, 2))
+fg <- placeGrob(fg, textGrob("Hi there"), col = 1)
+fg <- placeGrob(fg, rectGrob(), col = 2)
+grid.draw(fg)
+@
+
+This next example constructs a slightly fancier frame using packing.
+
+<<results=hide>>=
+grid.newpage()
+pushViewport(viewport(layout = grid.layout(2, 2)))
+drawIt <- function(row, col) {
+    pushViewport(viewport(layout.pos.col = col, layout.pos.row = row))
+    grid.rect(gp = gpar(col = "grey"))
+    grid.draw(fg)
+    upViewport()
+}
+fg <- frameGrob()
+fg <- packGrob(fg, textGrob("Hi there"))
+fg <- placeGrob(fg, rectGrob())
+drawIt(1, 1)
+fg <- packGrob(fg, textGrob("Hello again"), side = "right")
+drawIt(1, 2)
+fg <- packGrob(fg, rectGrob(), side = "right", width = unit(1, "null"))
+drawIt(2, 2)
+@
+
+In order to allow frames to update when the objects packed within them
+are modified, there is a \code{dynamic} argument to \code{packGrob()}
+(and \code{grid.pack()}).  The following extends the previous example
+to show how this might be used.  Another feature of this example is
+the demonstration of ``non-strict'' searching that occurs in the
+\code{grid.edit()} call; the \grob{} called \code{"midtext"} is not at
+the top-level, but is still found.  Something like
+\code{grid.get("midtext", strict = TRUE)} would fail.
+
+<<results=hide>>=
+grid.newpage()
+fg <- frameGrob()
+fg <- packGrob(fg, textGrob("Hi there"))
+fg <- placeGrob(fg, rectGrob())
+fg <- packGrob(fg, textGrob("Hello again", name = "midtext"),
+               side = "right", dynamic = TRUE)
+fg <- packGrob(fg, rectGrob(), side = "right", width = unit(1, "null"))
+grid.draw(fg)
+grid.edit("midtext", label = "something much longer")
+@
+
+There have been a few examples already which have involved creating a
+\gTree{}.  This next example explicitly demonstrates this technique.
+A \gTree{} is created with two important components.  The
+\code{childrenvp} is a \code{vpTree} consisting of a
+\code{"plotRegion"} viewport to provide margins around a plot and a
+\code{"dataRegion"} viewport to provide x- and y-scales.  The
+\code{"dataRegion"} gets pushed within the \code{"plotRegion"} and
+both are pushed and then ``up''ed before the children are drawn.  The
+\code{children} of the \gTree{} are an \code{xaxis} and a \code{yaxis}
+both drawn within the \code{"dataRegion"}, and a \code{rect} drawn
+around the border of the \code{"plotRegion"}.  A further feature of
+this example is the use of the \code{addGrob()} and
+\code{removeGrob()} functions to modify the \gTree{}.  The first
+modification involves adding a new child to the \gTree{} which is a
+set of points drawn within the \code{"dataRegion"}.  The second
+modification involves adding another set of points with a different
+symbol (NOTE that this second set of points is given a name so that it
+is easy to identify this set amongst the children of the \gTree{}).
+The final modification is to remove the second set of points from the
+\gTree{}.
+
+<<results=hide>>=
+grid.newpage()
+pushViewport(viewport(layout = grid.layout(2, 2)))
+drawIt <- function(row, col) {
+    pushViewport(viewport(layout.pos.col = col, layout.pos.row = row))
+    grid.rect(gp = gpar(col = "grey"))
+    grid.draw(gplot)
+    upViewport()
+}
+gplot <- gTree(x = NULL, y = NULL,
+               childrenvp = vpTree(
+                 plotViewport(c(5, 4, 4, 2), name = "plotRegion"),
+                 vpList(viewport(name = "dataRegion"))),
+               children = gList(
+                 xaxisGrob(vp = "plotRegion::dataRegion"),
+                 yaxisGrob(vp = "plotRegion::dataRegion"),
+                 rectGrob(vp = "plotRegion")))
+drawIt(1, 1)
+gplot <- addGrob(gplot, pointsGrob(vp = "plotRegion::dataRegion"))
+drawIt(1, 2)
+gplot <- addGrob(gplot, pointsGrob(name = "data1", pch = 2,
+                                   vp = "plotRegion::dataRegion"))
+drawIt(2, 1)
+gplot <- removeGrob(gplot, "data1")
+drawIt(2, 2)
+@
+
+This next example provides a simple demonstration of saving and
+loading \grid{} \grob{}s.  It is also a nice demonstration that
+\grob{}s copy like normal \R{} objects.
+
+<<results=hide>>=
+gplot <- gTree(x = NULL, y = NULL,
+               childrenvp = vpTree(
+                 plotViewport(c(5, 4, 4, 2), name = "plotRegion"),
+                   vpList(viewport(name = "dataRegion"))),
+               children = gList(
+                 xaxisGrob(vp = "plotRegion::dataRegion"),
+                 yaxisGrob(vp = "plotRegion::dataRegion"),
+                 rectGrob(vp = "plotRegion")))
+save(gplot, file = "gplot1")
+gplot <- addGrob(gplot, pointsGrob(vp = "plotRegion::dataRegion"))
+save(gplot, file = "gplot2")
+grid.newpage()
+pushViewport(viewport(layout = grid.layout(1, 2)))
+pushViewport(viewport(layout.pos.col = 1))
+load("gplot1")
+grid.draw(gplot)
+popViewport()
+pushViewport(viewport(layout.pos.col = 2))
+load("gplot2")
+grid.draw(gplot)
+popViewport()
+@
+
+This next example just demonstrates that it is possible to use a
+\gPath{} to access the children of a \gTree{} when editing.  This is
+the \code{editGrob()} equivalent of an earlier example that used
+\code{grid.edit()}.  One useful application of this API is the ability
+to modify the appearance of quite precise elements of a large, complex
+graphical object by editing the \code{gp} slot of a child (of a child
+\ldots{}) of a \gTree{}.
+
+<<results = hide>>=
+myplot <- gTree(name = "myplot",
+                children = gList(
+                  rectGrob(name = "box", gp = gpar(col = "grey")),
+                  xaxisGrob(name = "xaxis")))
+myplot <- editGrob(myplot, gPath = "xaxis", at = 1:10/11)
+myplot <- editGrob(myplot, gPath = "xaxis::labels", label = round(1:10/11, 2))
+myplot <- editGrob(myplot, gPath = "xaxis::labels", y = unit(-1, "lines"))
+grid.newpage()
+pushViewport(viewport(w = .5, h = .5))
+grid.draw(myplot)
+
+@
+The following example demonstrates
+the use of the \code{getGrob()} and \code{grid.get()} (along with
+\gPath{}s) to access \grob{}s.
+
+<<results = hide>>=
+myplot <- gTree(name = "myplot",
+                children = gList(
+                  rectGrob(name = "box", gp = gpar(col = "grey")),
+                  xaxisGrob(name = "xaxis")))
+getGrob(myplot, "xaxis")
+myplot <- editGrob(myplot, gPath="xaxis", at=1:10/11)
+getGrob(myplot, "xaxis::labels")
+grid.newpage()
+pushViewport(viewport(w=.5, h=.5))
+grid.draw(myplot)
+grid.get("myplot")
+grid.get("myplot::xaxis")
+grid.get("myplot::xaxis::labels")
+@
+
+There is also an API for (re)setting children of a \gTree{}
+or any drawn \grob{}.  This is not intended for general user use,
+but provides a simple way for developers to perform modifications
+to the structure of a \gTree{} by doing something like \ldots{}
+
+\begin{verbatim}
+grob <- getGrob(<spec>)
+<modify grob>
+setGrob(<spec>, grob)
+\end{verbatim}
+
+This approach is used in the implementation of packing and placing grobs.
+The following example shows some simple usage of the
+\code{setGrob()} and \code{grid.set()} functions to replace
+children of a \gTree{} with different \grob{}s.  NOTE that currently
+such replacement can only occur if the name of the new \grob{}
+is the same as the name of the old \grob{}.
+
+<<results=hide>>=
+myplot <- gTree(name = "myplot",
+                children = gList(rectGrob(name = "box", gp = gpar(col = "grey")),
+                  xaxisGrob(name = "xaxis")))
+myplot <- setGrob(myplot, "xaxis", rectGrob(name = "xaxis"))
+grid.newpage()
+pushViewport(viewport(w = .5, h = .5))
+grid.draw(myplot)
+grid.set("myplot::xaxis", xaxisGrob(name = "xaxis", at = 1:3/4))
+grid.set("myplot::xaxis::labels",
+         textGrob(name = "labels", x = unit(1:3/4, "native"),
+                  y = unit(-1, "lines"), label = letters[1:3]))
+myplot <- setGrob(grid.get("myplot"), "xaxis::labels",
+                  circleGrob(name = "labels"))
+grid.newpage()
+pushViewport(viewport(w = .5, h = .5))
+grid.draw(myplot)
+@
+
+This next example just shows more complex use of the add/remove
+facilities for modifying \grob{}s.  Again, \code{addGrob()} and
+\code{removeGrob()} are for constructing descriptions of graphical
+objects and \code{grid.add()} and \code{grid.remove()} are for
+modifying drawn output.  Of particular note are the last two lines
+involving \code{grid.remove()}.  The first point is that there are
+multiple \grob{}s on the display list with the same name.  The example
+only affects the first one it finds; this could easily be extended to
+affect the display list ``globally'' (for children of \gTree{}s, there
+cannot be multiple children with the same name so the issue does not
+arise).  The last line is interesting because it actually erases the
+\grob{} named \code{"plot1"} from the display list altogether (well,
+the first instance on the display list of a \grob{} called
+\code{"plot1"} anyway).
+
+<<results=hide>>=
+drawIt <- function(row, col) {
+  pushViewport(viewport(layout.pos.col = col, layout.pos.row = row))
+  grid.rect(gp = gpar(col = "grey"))
+  grid.draw(gplot)
+  upViewport()
+}
+gplot <- gTree(name = "plot1",
+               childrenvp = vpTree(
+                 plotViewport(c(5, 4, 4, 2), name = "plotRegion"),
+                 vpList(viewport(name = "dataRegion"))),
+               children = gList(
+                 xaxisGrob(name = "xaxis", vp = "plotRegion::dataRegion"),
+                 yaxisGrob(name = "yaxis", vp = "plotRegion::dataRegion"),
+                 rectGrob(name = "box", vp = "plotRegion")))
+grid.newpage()
+pushViewport(viewport(layout = grid.layout(2, 2)))
+drawIt(1, 1)
+grid.add("plot1", pointsGrob(0.5, 0.5, name = "data1",
+                             vp = "plotRegion::dataRegion"))
+grid.add("plot1::xaxis",
+         textGrob("X Axis", y = unit(-2, "lines"), name = "xlab"))
+grid.edit("plot1::xaxis::xlab", y = unit(-3, "lines"))
+gplot <- grid.get("plot1")
+gplot <- addGrob(gplot, gPath = "yaxis",
+                 textGrob("Y Axis", x = unit(-3, "lines"), rot = 90,
+                          name = "ylab"))
+drawIt(1, 2)
+gplot <- removeGrob(gplot, "xaxis::xlab")
+drawIt(2, 1)
+grid.remove("plot1::data1")
+grid.remove("plot1")
+@
+
+The next example is just a \code{grid.place()} and \code{grid.pack()}
+equivalent of an earlier example involving
+\code{placeGrob()} and \code{packGrob()}.  The interesting feature is
+that each action is reflected in the output as it occurs.
+
+<<results=hide>>=
+grid.newpage()
+grid.frame(name = "myframe", layout = grid.layout(1, 2))
+grid.place("myframe", textGrob("Hi there"), col = 1)
+grid.place("myframe", rectGrob(), col = 2)
+grid.newpage()
+grid.frame(name = "frame2")
+grid.pack("frame2", textGrob("Hi there"))
+grid.place("frame2", rectGrob())
+grid.pack("frame2", textGrob("Hello again"), side = "right")
+grid.pack("frame2", rectGrob(), side = "right", width = unit(1, "null"))
+@
+\end{document}
+
+
+
diff --git a/win32/deps/library/grid/doc/grobs.pdf b/win32/deps/library/grid/doc/grobs.pdf
new file mode 100644
index 0000000..70ab90b
Binary files /dev/null and b/win32/deps/library/grid/doc/grobs.pdf differ
diff --git a/win32/deps/library/grid/doc/index.html b/win32/deps/library/grid/doc/index.html
new file mode 100644
index 0000000..753cd9e
--- /dev/null
+++ b/win32/deps/library/grid/doc/index.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Vignettes</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
+<img class="toplogo" src="/doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="/doc/html/index.html"><img src="/doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div>
+<h2>Vignettes from package 'grid'</h2>
+<table width="100%">
+<col width="22%">
+<col width="2%">
+<col width="50%">
+<col width="8%">
+<col width="8%">
+<col width="8%">
+<tr><td align="right" valign="top"><a href="../../../library/grid/doc/displaylist.pdf">grid::displaylist</a></td>
+<td></td><td valign="top">Display Lists in grid</td>
+<td valign="top"><a href="../../../library/grid/doc/displaylist.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/grid/doc/displaylist.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/grid/doc/displaylist.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/grid/doc/frame.pdf">grid::frame</a></td>
+<td></td><td valign="top">Frames and packing grobs</td>
+<td valign="top"><a href="../../../library/grid/doc/frame.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/grid/doc/frame.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/grid/doc/frame.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/grid/doc/grid.pdf">grid::grid</a></td>
+<td></td><td valign="top">Introduction to grid</td>
+<td valign="top"><a href="../../../library/grid/doc/grid.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/grid/doc/grid.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/grid/doc/grid.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/grid/doc/grobs.pdf">grid::grobs</a></td>
+<td></td><td valign="top">Working with grid grobs</td>
+<td valign="top"><a href="../../../library/grid/doc/grobs.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/grid/doc/grobs.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/grid/doc/grobs.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/grid/doc/interactive.pdf">grid::interactive</a></td>
+<td></td><td valign="top">Editing grid Graphics</td>
+<td valign="top"><a href="../../../library/grid/doc/interactive.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/grid/doc/interactive.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/grid/doc/interactive.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/grid/doc/locndimn.pdf">grid::locndimn</a></td>
+<td></td><td valign="top">Locations versus Dimensions</td>
+<td valign="top"><a href="../../../library/grid/doc/locndimn.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/grid/doc/locndimn.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/grid/doc/locndimn.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/grid/doc/moveline.pdf">grid::moveline</a></td>
+<td></td><td valign="top">Demonstrating move-to and line-to</td>
+<td valign="top"><a href="../../../library/grid/doc/moveline.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/grid/doc/moveline.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/grid/doc/moveline.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/grid/doc/nonfinite.pdf">grid::nonfinite</a></td>
+<td></td><td valign="top">Non-finite values</td>
+<td valign="top"><a href="../../../library/grid/doc/nonfinite.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/grid/doc/nonfinite.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/grid/doc/nonfinite.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/grid/doc/plotexample.pdf">grid::plotexample</a></td>
+<td></td><td valign="top">Writing grid Code</td>
+<td valign="top"><a href="../../../library/grid/doc/plotexample.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/grid/doc/plotexample.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/grid/doc/plotexample.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/grid/doc/rotated.pdf">grid::rotated</a></td>
+<td></td><td valign="top">Rotated Viewports</td>
+<td valign="top"><a href="../../../library/grid/doc/rotated.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/grid/doc/rotated.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/grid/doc/rotated.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/grid/doc/saveload.pdf">grid::saveload</a></td>
+<td></td><td valign="top">Persistent representations</td>
+<td valign="top"><a href="../../../library/grid/doc/saveload.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/grid/doc/saveload.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/grid/doc/saveload.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/grid/doc/sharing.pdf">grid::sharing</a></td>
+<td></td><td valign="top">Modifying multiple grobs simultaneously</td>
+<td valign="top"><a href="../../../library/grid/doc/sharing.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/grid/doc/sharing.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/grid/doc/sharing.R">R code</a></td></tr>
+<tr><td align="right" valign="top"><a href="../../../library/grid/doc/viewports.pdf">grid::viewports</a></td>
+<td></td><td valign="top">Working with viewports</td>
+<td valign="top"><a href="../../../library/grid/doc/viewports.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/grid/doc/viewports.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/grid/doc/viewports.R">R code</a></td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/grid/doc/interactive.R b/win32/deps/library/grid/doc/interactive.R
new file mode 100644
index 0000000..e0547a7
--- /dev/null
+++ b/win32/deps/library/grid/doc/interactive.R
@@ -0,0 +1,90 @@
+### R code from vignette source 'interactive.Rnw'
+
+###################################################
+### code chunk number 1: interactive.Rnw:18-22
+###################################################
+library(grDevices)
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+
+
+###################################################
+### code chunk number 2: fig1
+###################################################
+grid.xaxis(at = 1:4/5, vp = viewport(w = .5, h = 0.01), name = "gxa")
+
+
+###################################################
+### code chunk number 3: edit1 (eval = FALSE)
+###################################################
+## grid.edit("gxa", gp = gpar(col = "red"))
+
+
+###################################################
+### code chunk number 4: fig2
+###################################################
+gxa <- xaxisGrob(at = 1:4/5, vp = viewport(w = .5, h = .01))
+gxa <- editGrob(gxa, gp = gpar(col = "red"))
+grid.draw(gxa)
+
+
+###################################################
+### code chunk number 5: edit2 (eval = FALSE)
+###################################################
+## grid.edit(gPath("gxa", "labels"), gp = gpar(col = "green"))
+
+
+###################################################
+### code chunk number 6: fig3
+###################################################
+gxa <- xaxisGrob(at = 1:4/5, vp = viewport(w = .5, h = .01))
+gxa <- editGrob(gxa, gp = gpar(col = "red"))
+gxa <- editGrob(gxa, gPath = "labels", gp = gpar(col = "green"))
+grid.draw(gxa)
+
+
+###################################################
+### code chunk number 7: edit3 (eval = FALSE)
+###################################################
+## grid.edit("gxa", at = c(0.0, 0.5, 1.0))
+
+
+###################################################
+### code chunk number 8: fig4
+###################################################
+gxa <- xaxisGrob(at = 1:4/5, vp = viewport(w = .5, h = .01))
+gxa <- editGrob(gxa, gp = gpar(col = "red"))
+gxa <- editGrob(gxa, gPath = "labels", gp = gpar(col = "green"))
+gxa <- editGrob(gxa, at = c(0.0, 0.5, 1.0))
+grid.draw(gxa)
+
+
+###################################################
+### code chunk number 9: edit4 (eval = FALSE)
+###################################################
+## grid.edit("gxa::labels", gp = gpar(col = "black"), rot = 30)
+
+
+###################################################
+### code chunk number 10: fig5
+###################################################
+gxa <- xaxisGrob(at = 1:4/5, vp = viewport(w = .5, h = .01))
+gxa <- editGrob(gxa, gp = gpar(col = "red"))
+gxa <- editGrob(gxa, gPath = "labels", gp = gpar(col = "green"))
+gxa <- editGrob(gxa, at = c(0.0, 0.5, 1.0))
+gxa <- editGrob(gxa, gPath = "labels", gp = gpar(col = "black"), rot = 30)
+grid.draw(gxa)
+
+
+###################################################
+### code chunk number 11: interactive.Rnw:123-129
+###################################################
+gxa <- xaxisGrob(at = 1:4/5, vp = viewport(w = .5, h = .01))
+gxa <- editGrob(gxa, gp = gpar(col = "red"))
+gxa <- editGrob(gxa, gPath = "labels", gp = gpar(col = "green"))
+gxa <- editGrob(gxa, at = c(0.0, 0.5, 1.0))
+gxa <- editGrob(gxa, gPath = "labels", gp = gpar(col = "black"), rot = 30)
+grid.draw(gxa)
+
+
diff --git a/win32/deps/library/grid/doc/interactive.Rnw b/win32/deps/library/grid/doc/interactive.Rnw
new file mode 100644
index 0000000..a4362eb
--- /dev/null
+++ b/win32/deps/library/grid/doc/interactive.Rnw
@@ -0,0 +1,132 @@
+\documentclass[a4paper]{article}
+%\VignetteIndexEntry{Editing grid Graphics}
+%\VignettePackage{grid}
+\newcommand{\code}[1]{\texttt{#1}}
+\newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}
+\newcommand{\grid}{\pkg{grid}}
+\newcommand{\R}{{\sffamily R}}
+\setlength{\parindent}{0in}
+\setlength{\parskip}{.1in}
+\setlength{\textwidth}{140mm}
+\setlength{\oddsidemargin}{10mm}
+\title{An Example of Interactive Graphics Editing in \grid}
+\author{Paul Murrell}
+
+\begin{document}
+\maketitle
+
+<<echo=FALSE, results=hide>>=
+library(grDevices)
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+@
+First of all, we create an x-axis and draw it on the device.
+It is very important that we specify a \code{name} for the object
+so that we can refer to it later.
+
+<<fig1, results=hide, fig=TRUE, width=6, height=2, include=FALSE>>=
+grid.xaxis(at = 1:4/5, vp = viewport(w = .5, h = 0.01), name = "gxa")
+@
+\begin{center}
+{
+\includegraphics[width=3in, height=1in]{interactive-fig1}
+}
+\end{center}
+@
+
+Now we edit the axis, changing the colour of the entire axis to red.
+Notice that we refer to the x-axis by its name.
+
+<<edit1, eval=FALSE>>=
+grid.edit("gxa", gp = gpar(col = "red"))
+<<fig2, echo=FALSE, results=hide, fig=TRUE, width=6, height=2, include=FALSE>>=
+gxa <- xaxisGrob(at = 1:4/5, vp = viewport(w = .5, h = .01))
+gxa <- editGrob(gxa, gp = gpar(col = "red"))
+grid.draw(gxa)
+@
+\begin{center}
+{
+\includegraphics[width=3in, height=1in]{interactive-fig2}
+}
+\end{center}
+
+@
+
+Now we change just the labels of the x-axis to green.  We use the
+\code{gPath()} function to concatenate the grob names (we could have used
+\code{"gxa::labels"} here, but \code{gPath()} is recommended for
+writing code that will be reused).
+
+<<edit2, eval=FALSE>>=
+grid.edit(gPath("gxa", "labels"), gp = gpar(col = "green"))
+<<fig3, echo=FALSE, results=hide, fig=TRUE, width=6, height=2, include=FALSE>>=
+gxa <- xaxisGrob(at = 1:4/5, vp = viewport(w = .5, h = .01))
+gxa <- editGrob(gxa, gp = gpar(col = "red"))
+gxa <- editGrob(gxa, gPath = "labels", gp = gpar(col = "green"))
+grid.draw(gxa)
+@
+\begin{center}
+{
+\includegraphics[width=3in, height=1in]{interactive-fig3}
+}
+\end{center}
+@
+
+It is also possible to change the number of tick marks.
+Notice that the labels all change back to red;  this happens
+because new labels are created by the axis and these ``inherit''
+the colour of the axis by default.  In other words, the
+colour specification of the old labels was specific to the old labels
+and was discarded when the old labels were discarded.
+
+<<edit3, eval=FALSE>>=
+grid.edit("gxa", at = c(0.0, 0.5, 1.0))
+<<fig4, echo=FALSE, results=hide, fig=TRUE, width=6, height=2, include=FALSE>>=
+gxa <- xaxisGrob(at = 1:4/5, vp = viewport(w = .5, h = .01))
+gxa <- editGrob(gxa, gp = gpar(col = "red"))
+gxa <- editGrob(gxa, gPath = "labels", gp = gpar(col = "green"))
+gxa <- editGrob(gxa, at = c(0.0, 0.5, 1.0))
+grid.draw(gxa)
+@
+\begin{center}
+{
+\includegraphics[width=3in, height=1in]{interactive-fig4}
+}
+\end{center}
+@
+
+Finally, we change the labels back to black and rotate them all $30\deg$.
+
+<<edit4, eval=FALSE>>=
+grid.edit("gxa::labels", gp = gpar(col = "black"), rot = 30)
+<<fig5, echo=FALSE, results=hide, fig=TRUE, width=6, height=2, include=FALSE>>=
+gxa <- xaxisGrob(at = 1:4/5, vp = viewport(w = .5, h = .01))
+gxa <- editGrob(gxa, gp = gpar(col = "red"))
+gxa <- editGrob(gxa, gPath = "labels", gp = gpar(col = "green"))
+gxa <- editGrob(gxa, at = c(0.0, 0.5, 1.0))
+gxa <- editGrob(gxa, gPath = "labels", gp = gpar(col = "black"), rot = 30)
+grid.draw(gxa)
+@
+\begin{center}
+{
+\includegraphics[width=3in, height=1in]{interactive-fig5}
+}
+\end{center}
+@
+
+The above examples describe how to perform editing on a grid object
+and have the changes updated on screen.  The equivalent can be done
+entirely ``off-screen'', by just working with the grid object.
+The off-screen equivalent in this case would look like:
+
+<<results=hide>>=
+gxa <- xaxisGrob(at = 1:4/5, vp = viewport(w = .5, h = .01))
+gxa <- editGrob(gxa, gp = gpar(col = "red"))
+gxa <- editGrob(gxa, gPath = "labels", gp = gpar(col = "green"))
+gxa <- editGrob(gxa, at = c(0.0, 0.5, 1.0))
+gxa <- editGrob(gxa, gPath = "labels", gp = gpar(col = "black"), rot = 30)
+grid.draw(gxa)
+@
+\end{document}
+
diff --git a/win32/deps/library/grid/doc/interactive.pdf b/win32/deps/library/grid/doc/interactive.pdf
new file mode 100644
index 0000000..f753d7c
Binary files /dev/null and b/win32/deps/library/grid/doc/interactive.pdf differ
diff --git a/win32/deps/library/grid/doc/locndimn.R b/win32/deps/library/grid/doc/locndimn.R
new file mode 100644
index 0000000..7512860
--- /dev/null
+++ b/win32/deps/library/grid/doc/locndimn.R
@@ -0,0 +1,72 @@
+### R code from vignette source 'locndimn.Rnw'
+
+###################################################
+### code chunk number 1: locndimn.Rnw:20-24
+###################################################
+library(grDevices)
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+
+
+###################################################
+### code chunk number 2: locndimn.Rnw:52-91
+###################################################
+diagram.locn <- function(i, n, locn) {
+  x <- i/(n+1)
+  grid.lines(x = unit(rep(x, 2), "npc"),
+             y = unit.c(unit(0, "npc"), locn))
+  grid.lines(x = unit(x, "npc") + unit(c(-2, 0, 2), "mm"),
+             y = locn + unit(c(-2, 0, -2), "mm"))
+  grid.text(paste(as.character(locn), "as a location"),
+            x = unit(x, "npc") - unit(1, "mm"),
+            y = locn - unit(3, "mm"),
+            just = c("right", "bottom"),
+            rot = 90)
+}
+diagram.dimn <- function(i, n, dimn) {
+  x <- i/(n+1)
+  pushViewport(viewport(x = unit(x, "npc"), y = unit(0, "native"),
+            h = dimn, w = unit(1, "lines"), just = c("centre", "bottom")))
+  grid.rect()
+  grid.text(paste(as.character(dimn), "as a dimension"),
+            rot = 90)
+  popViewport()
+}
+pushViewport(viewport(w = 0.8, y=unit(1.7, "inches"),
+                      h = unit(4, "inches"),
+                      just = c("centre", "bottom"),
+                      yscale = c(-0.6, 1.3)))
+grid.grill(v = c(0, 1), h = seq(-0.5, 1, 0.5), default.units = "native")
+grid.rect()
+grid.yaxis()
+n <- 10
+diagram.locn(1, n, unit(1, "native"))
+diagram.locn(2, n, unit(-0.4, "native"))
+diagram.locn(3, n, unit(0.4, "native"))
+diagram.locn(4, n, unit(1, "native") + unit(-0.4, "native"))
+diagram.locn(5, n, unit(1, "native") - unit(0.4, "native"))
+diagram.dimn(6, n, unit(1, "native"))
+diagram.dimn(7, n, unit(-0.4, "native"))
+diagram.dimn(8, n, unit(0.4, "native"))
+diagram.dimn(9, n, unit(1, "native") + unit(-0.4, "native"))
+diagram.dimn(10, n, unit(1, "native") - unit(0.4, "native"))
+
+
+###################################################
+### code chunk number 3: locndimn.Rnw:102-114
+###################################################
+pushViewport(viewport(yscale = c(-0.6, 1.3)))
+# Unexpected results?
+convertY(unit(1,'native'), "native")
+convertY(unit(-.4,'native'), "native")
+convertY(unit(1,'native')+unit(-.4,'native'), "native")
+convertY(unit(1,'native')-unit(.4,'native'), "native")
+# Expected results
+convertHeight(unit(1,'native'), "native")
+convertHeight(unit(-.4,'native'), "native")
+convertHeight(unit(1,'native')+unit(-.4,'native'), "native")
+convertHeight(unit(1,'native')-unit(.4,'native'), "native")
+popViewport()
+
+
diff --git a/win32/deps/library/grid/doc/locndimn.Rnw b/win32/deps/library/grid/doc/locndimn.Rnw
new file mode 100644
index 0000000..826f447
--- /dev/null
+++ b/win32/deps/library/grid/doc/locndimn.Rnw
@@ -0,0 +1,117 @@
+\documentclass[a4paper]{article}
+%\VignetteIndexEntry{Locations versus Dimensions}
+%\VignettePackage{grid}
+\setlength{\parindent}{0in}
+\setlength{\parskip}{.1in}
+\setlength{\textwidth}{140mm}
+\setlength{\oddsidemargin}{10mm}
+
+\newcommand{\code}[1]{\texttt{#1}}
+\newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}
+\newcommand{\grid}{\pkg{grid}}
+
+\title{The difference between Locations and Dimensions in \grid{}}
+\author{Paul Murrell}
+
+\begin{document}
+
+\maketitle
+
+<<echo=FALSE, results=hide>>=
+library(grDevices)
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+@
+\grid{} makes use of unit objects to express both the locations and
+dimensions of graphical components.  For example, the \code{grid.rect()}
+function treats its x- and y-arguments as locations within the current
+viewport, and its width- and height-arguments as dimensions within the
+current viewport.
+
+These different interpretations of units are usually implicit like this;
+if its an x- or y-value then its a location, if its a width- or height-value
+then its a dimension.
+
+The distinction is made at all because, in some coordinate systems, notably
+\code{"native"} coordinates, the location $x$ can have a very different
+meaning
+from the dimension $x$ -- basically, whenever the minimum value of the
+coordinate system is not zero.
+
+In the specification of simple units, the difference between locations
+and dimensions is often not noticeable.  However, there are a couple
+of tricky areas:
+
+\begin{enumerate}
+\item When adding (or performing any arithmetic operation on) units,
+it is important to keep in mind that locations are added like vectors
+and dimensions are added like lengths.  The following
+diagram demonstrates the difference:
+
+<<fig=TRUE, echo=FALSE, results=hide>>=
+diagram.locn <- function(i, n, locn) {
+  x <- i/(n+1)
+  grid.lines(x = unit(rep(x, 2), "npc"),
+             y = unit.c(unit(0, "npc"), locn))
+  grid.lines(x = unit(x, "npc") + unit(c(-2, 0, 2), "mm"),
+             y = locn + unit(c(-2, 0, -2), "mm"))
+  grid.text(paste(as.character(locn), "as a location"),
+            x = unit(x, "npc") - unit(1, "mm"),
+            y = locn - unit(3, "mm"),
+            just = c("right", "bottom"),
+            rot = 90)
+}
+diagram.dimn <- function(i, n, dimn) {
+  x <- i/(n+1)
+  pushViewport(viewport(x = unit(x, "npc"), y = unit(0, "native"),
+            h = dimn, w = unit(1, "lines"), just = c("centre", "bottom")))
+  grid.rect()
+  grid.text(paste(as.character(dimn), "as a dimension"),
+            rot = 90)
+  popViewport()
+}
+pushViewport(viewport(w = 0.8, y=unit(1.7, "inches"),
+                      h = unit(4, "inches"),
+                      just = c("centre", "bottom"),
+                      yscale = c(-0.6, 1.3)))
+grid.grill(v = c(0, 1), h = seq(-0.5, 1, 0.5), default.units = "native")
+grid.rect()
+grid.yaxis()
+n <- 10
+diagram.locn(1, n, unit(1, "native"))
+diagram.locn(2, n, unit(-0.4, "native"))
+diagram.locn(3, n, unit(0.4, "native"))
+diagram.locn(4, n, unit(1, "native") + unit(-0.4, "native"))
+diagram.locn(5, n, unit(1, "native") - unit(0.4, "native"))
+diagram.dimn(6, n, unit(1, "native"))
+diagram.dimn(7, n, unit(-0.4, "native"))
+diagram.dimn(8, n, unit(0.4, "native"))
+diagram.dimn(9, n, unit(1, "native") + unit(-0.4, "native"))
+diagram.dimn(10, n, unit(1, "native") - unit(0.4, "native"))
+@
+\item The functions \code{convertX},
+\code{convertY}, \code{convertWidth}, \code{convertHeight}
+  are used to convert from one coordinate system to another.
+Again, it is important whether the conversion is for a location or
+for a dimension.
+The following code
+demonstrates some results from these functions based on a similar
+situation to that in the preceding diagram:
+
+<<fig=FALSE>>=
+pushViewport(viewport(yscale = c(-0.6, 1.3)))
+# Unexpected results?
+convertY(unit(1,'native'), "native")
+convertY(unit(-.4,'native'), "native")
+convertY(unit(1,'native')+unit(-.4,'native'), "native")
+convertY(unit(1,'native')-unit(.4,'native'), "native")
+# Expected results
+convertHeight(unit(1,'native'), "native")
+convertHeight(unit(-.4,'native'), "native")
+convertHeight(unit(1,'native')+unit(-.4,'native'), "native")
+convertHeight(unit(1,'native')-unit(.4,'native'), "native")
+popViewport()
+@
+\end{enumerate}
+\end{document}
diff --git a/win32/deps/library/grid/doc/locndimn.pdf b/win32/deps/library/grid/doc/locndimn.pdf
new file mode 100644
index 0000000..3cc24b7
Binary files /dev/null and b/win32/deps/library/grid/doc/locndimn.pdf differ
diff --git a/win32/deps/library/grid/doc/moveline.R b/win32/deps/library/grid/doc/moveline.R
new file mode 100644
index 0000000..e342a08
--- /dev/null
+++ b/win32/deps/library/grid/doc/moveline.R
@@ -0,0 +1,30 @@
+### R code from vignette source 'moveline.Rnw'
+
+###################################################
+### code chunk number 1: moveline.Rnw:19-23
+###################################################
+library(grDevices)
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+
+
+###################################################
+### code chunk number 2: fig
+###################################################
+pushViewport(
+    viewport(w = 0.8, h = 0.8,
+             layout = grid.layout(1, 3,
+                                  widths = unit(rep(1, 3),
+                                  c("null", "inches", "null")))))
+pushViewport(viewport(layout.pos.col = 1, yscale = c(0, 4)))
+grid.grill(); grid.yaxis(); grid.xaxis()
+grid.points(0.5, unit(2, "native"))
+grid.move.to(0.5, unit(2,"native"))
+popViewport()
+pushViewport(viewport(layout.pos.col = 3, yscale = c(0, 2)))
+grid.grill(); grid.yaxis(); grid.xaxis()
+grid.points(0.5, unit(2, "native"))
+grid.line.to(0.5, unit(2,"native"))
+
+
diff --git a/win32/deps/library/grid/doc/moveline.Rnw b/win32/deps/library/grid/doc/moveline.Rnw
new file mode 100644
index 0000000..76f3abf
--- /dev/null
+++ b/win32/deps/library/grid/doc/moveline.Rnw
@@ -0,0 +1,64 @@
+\documentclass[a4paper]{article}
+%\VignetteIndexEntry{Demonstrating move-to and line-to}
+%\VignettePackage{grid}
+\newcommand{\code}[1]{\texttt{#1}}
+\newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}
+\newcommand{\grid}{\pkg{grid}}
+\newcommand{\R}{{\sffamily R}}
+\setlength{\parindent}{0in}
+\setlength{\parskip}{.1in}
+\setlength{\textwidth}{140mm}
+\setlength{\oddsidemargin}{10mm}
+\title{Drawing Lines Between Viewports: \\
+\code{grid.move.to} and \code{grid.line.to}}
+\author{Paul Murrell}
+
+\begin{document}
+\maketitle
+
+<<echo=FALSE, results=hide>>=
+library(grDevices)
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+@
+
+Many graphics systems have the notion of a current drawing location.
+This has been added to Grid, with the additional benefit that the
+drawing location can be specified relative to an arbitrary viewport.
+This allows drawing across coordinate
+systems\footnote{There was a request on R-help for exactly this
+sort of thing - I will try to find the exact reference - and there has
+since been another (From: Ross Darnell; Subject: Problems with
+segments and multiple graphs). }.
+
+The following code demonstrates a simple example (the output is
+given after the code).
+
+<<fig, results=hide, fig=TRUE, width=5, height=4, include=FALSE>>=
+pushViewport(
+    viewport(w = 0.8, h = 0.8,
+             layout = grid.layout(1, 3,
+                                  widths = unit(rep(1, 3),
+                                  c("null", "inches", "null")))))
+pushViewport(viewport(layout.pos.col = 1, yscale = c(0, 4)))
+grid.grill(); grid.yaxis(); grid.xaxis()
+grid.points(0.5, unit(2, "native"))
+grid.move.to(0.5, unit(2,"native"))
+popViewport()
+pushViewport(viewport(layout.pos.col = 3, yscale = c(0, 2)))
+grid.grill(); grid.yaxis(); grid.xaxis()
+grid.points(0.5, unit(2, "native"))
+grid.line.to(0.5, unit(2,"native"))
+@
+\begin{center}
+{
+\includegraphics[width=5in, height=4in]{moveline-fig}
+}
+\end{center}
+
+@
+\end{document}
+
+
+
diff --git a/win32/deps/library/grid/doc/moveline.pdf b/win32/deps/library/grid/doc/moveline.pdf
new file mode 100644
index 0000000..7505f0a
Binary files /dev/null and b/win32/deps/library/grid/doc/moveline.pdf differ
diff --git a/win32/deps/library/grid/doc/nonfinite.R b/win32/deps/library/grid/doc/nonfinite.R
new file mode 100644
index 0000000..776ed57
--- /dev/null
+++ b/win32/deps/library/grid/doc/nonfinite.R
@@ -0,0 +1,73 @@
+### R code from vignette source 'nonfinite.Rnw'
+
+###################################################
+### code chunk number 1: nonfinite.Rnw:16-20
+###################################################
+library(grDevices)
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+
+
+###################################################
+### code chunk number 2: prim1
+###################################################
+pushViewport(viewport(layout = grid.layout(1, 2,
+                      widths = unit(c(1, 1), c("inches", "null")))))
+grid.rect(gp = gpar(col = "grey"))
+pushViewport(viewport(layout.pos.col = 1))
+grid.text(c("segments", "text", "lines", "rectangles", "circles", "points"),
+          x = 1, just = "right", y = c(0.75, 6:2/10), gp = gpar(col = "grey"))
+popViewport()
+pushViewport(viewport(layout.pos.col = 2))
+x <- 1:7/8
+x[4] <- NA
+grid.lines(x, 0.5)
+grid.text(letters[1:5], x, 0.6)
+grid.segments(x, 0.7, x, 0.8)
+grid.points(x, rep(0.2, 7))
+grid.rect(x, 0.4, 0.02, 0.02)
+grid.circle(x, 0.3, 0.02)
+grid.text("NA", 0.5, 2:8/10, gp = gpar(col = "grey"))
+popViewport(2)
+
+
+###################################################
+### code chunk number 3: prim2
+###################################################
+n <- 7
+primtest2 <- function(nas, na) {
+    t <- seq(0, 2*pi, length = n+1)[-(n+1)]
+    y <- 0.5 + 0.4*sin(t)
+    x <- 0.5 + 0.4*cos(t)
+    if (any(nas))
+        grid.text(paste("NA", (1:n)[nas], sep = ""),
+                  x[nas], y[nas], gp = gpar(col = "grey"))
+    x[nas] <- na
+    y[nas] <- na
+    grid.move.to(x[1], y[1])
+    for (i in 2:n)
+        grid.line.to(x[i], y[i], gp = gpar(lty = "dashed", lwd = 5))
+    grid.polygon(x, y, gp = gpar(fill = "grey", col = NULL))
+    grid.lines(x, y, arrow = arrow())
+}
+celltest <- function(r, c, nas, na) {
+    pushViewport(viewport(layout.pos.col = c, layout.pos.row = r))
+    primtest2(nas, na)
+    grid.rect(gp = gpar(col = "grey"))
+    popViewport()
+}
+cellnas <- function(i) {
+    temp <- rep(FALSE, n)
+    temp[i] <- TRUE
+    temp[n - 3 + i] <- TRUE
+    temp
+}
+pushViewport(viewport(layout = grid.layout(2, 2)))
+celltest(1, 1, rep(FALSE, n), NA)
+celltest(1, 2, cellnas(1), NA)
+celltest(2, 1, cellnas(2), NA)
+celltest(2, 2, cellnas(3), NA)
+popViewport()
+
+
diff --git a/win32/deps/library/grid/doc/nonfinite.Rnw b/win32/deps/library/grid/doc/nonfinite.Rnw
new file mode 100644
index 0000000..1b47c64
--- /dev/null
+++ b/win32/deps/library/grid/doc/nonfinite.Rnw
@@ -0,0 +1,135 @@
+\documentclass[a4paper]{article}
+%\VignetteIndexEntry{Non-finite values}
+%\VignettePackage{grid}
+\newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}
+\newcommand{\grid}{\pkg{grid}}
+\setlength{\parindent}{0in}
+\setlength{\parskip}{.1in}
+\setlength{\textwidth}{140mm}
+\setlength{\oddsidemargin}{10mm}
+\title{How \grid{} Responds to Non-Finite Values}
+\author{Paul Murrell}
+
+\begin{document}
+\maketitle
+
+<<echo=FALSE, results=hide>>=
+library(grDevices)
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+@
+
+It is possible to include non-finite values, \texttt{NA}, \texttt{NaN}, {\tt
+  Inf}, and \texttt{-Inf}, in specifications of locations and sizes in
+\grid{} functions.  This document describes how \grid{} responds to
+non-finite values in different cases.
+
+\textbf{viewports} {~} \\
+Non-finite values are not permitted in the location, size, or
+scales of a viewport.  Viewport scales are checked
+when a viewport is created.  It is very hard to be certain that
+locations and sizes are not non-finite when the viewport is created
+so this is only checked
+when the viewport is pushed.
+Non-finite values result in error messages.
+
+\textbf{lines},
+\textbf{segments},
+\textbf{rectangles},
+\textbf{text},
+\textbf{points},
+\textbf{circles} {~} \\
+For all of these primitives, non-finite values for locations or
+sizes result in the corresponding primitive not being drawn.
+The following image provides a simple demonstration.  Each primitive
+is drawn at seven x-locations, with the fourth location made non-finite
+ (as indicated by a grey \texttt{"NA"}).
+
+<<prim1, echo=FALSE, fig=TRUE, results=hide, width=4, height=2, include=FALSE>>=
+pushViewport(viewport(layout = grid.layout(1, 2,
+                      widths = unit(c(1, 1), c("inches", "null")))))
+grid.rect(gp = gpar(col = "grey"))
+pushViewport(viewport(layout.pos.col = 1))
+grid.text(c("segments", "text", "lines", "rectangles", "circles", "points"),
+          x = 1, just = "right", y = c(0.75, 6:2/10), gp = gpar(col = "grey"))
+popViewport()
+pushViewport(viewport(layout.pos.col = 2))
+x <- 1:7/8
+x[4] <- NA
+grid.lines(x, 0.5)
+grid.text(letters[1:5], x, 0.6)
+grid.segments(x, 0.7, x, 0.8)
+grid.points(x, rep(0.2, 7))
+grid.rect(x, 0.4, 0.02, 0.02)
+grid.circle(x, 0.3, 0.02)
+grid.text("NA", 0.5, 2:8/10, gp = gpar(col = "grey"))
+popViewport(2)
+@
+
+\vspace{.5in}
+\includegraphics{nonfinite-prim1}
+
+\newpage
+
+\textbf{lineTo} {~} \\
+A line segment is only drawn if the previous location and the
+new location are both not non-finite.
+
+\textbf{polygon} {~} \\
+A non-finite value breaks the polygon into two separate polygons.
+NOTE that this break happens within the current polygon as specified
+by the \texttt{id} argument.  All polygons with the same \texttt{id}
+receive the same \texttt{gp} settings.
+
+\textbf{arrows} {~} \\
+An arrow head is only drawn if the first or last line segment is
+drawn.
+
+The following image demonstrates the behaviour of these primitives
+where x- and y-locations are seven equally-spaced locations around
+the perimeter of a circle.  In the top-left figure, all locations
+are not non-finite.  In each of the other figures, two locations have
+been made non-finite (indicated in each case by grey text).
+
+<<prim2, echo=FALSE, fig=TRUE, results=hide, include=FALSE>>=
+n <- 7
+primtest2 <- function(nas, na) {
+    t <- seq(0, 2*pi, length = n+1)[-(n+1)]
+    y <- 0.5 + 0.4*sin(t)
+    x <- 0.5 + 0.4*cos(t)
+    if (any(nas))
+        grid.text(paste("NA", (1:n)[nas], sep = ""),
+                  x[nas], y[nas], gp = gpar(col = "grey"))
+    x[nas] <- na
+    y[nas] <- na
+    grid.move.to(x[1], y[1])
+    for (i in 2:n)
+        grid.line.to(x[i], y[i], gp = gpar(lty = "dashed", lwd = 5))
+    grid.polygon(x, y, gp = gpar(fill = "grey", col = NULL))
+    grid.lines(x, y, arrow = arrow())
+}
+celltest <- function(r, c, nas, na) {
+    pushViewport(viewport(layout.pos.col = c, layout.pos.row = r))
+    primtest2(nas, na)
+    grid.rect(gp = gpar(col = "grey"))
+    popViewport()
+}
+cellnas <- function(i) {
+    temp <- rep(FALSE, n)
+    temp[i] <- TRUE
+    temp[n - 3 + i] <- TRUE
+    temp
+}
+pushViewport(viewport(layout = grid.layout(2, 2)))
+celltest(1, 1, rep(FALSE, n), NA)
+celltest(1, 2, cellnas(1), NA)
+celltest(2, 1, cellnas(2), NA)
+celltest(2, 2, cellnas(3), NA)
+popViewport()
+@
+
+\vspace{.5in}
+\includegraphics{nonfinite-prim2}
+\end{document}
+
diff --git a/win32/deps/library/grid/doc/nonfinite.pdf b/win32/deps/library/grid/doc/nonfinite.pdf
new file mode 100644
index 0000000..13d67e0
Binary files /dev/null and b/win32/deps/library/grid/doc/nonfinite.pdf differ
diff --git a/win32/deps/library/grid/doc/plotexample.R b/win32/deps/library/grid/doc/plotexample.R
new file mode 100644
index 0000000..2e7defd
--- /dev/null
+++ b/win32/deps/library/grid/doc/plotexample.R
@@ -0,0 +1,465 @@
+### R code from vignette source 'plotexample.Rnw'
+
+###################################################
+### code chunk number 1: plotexample.Rnw:28-33
+###################################################
+library(grDevices)
+library(stats) # for runif()
+library(grid)
+ps.options(pointsize=12)
+options(width=60)
+
+
+###################################################
+### code chunk number 2: plotexample.Rnw:88-90
+###################################################
+x <- runif(10)
+y <- runif(10)
+
+
+###################################################
+### code chunk number 3: datavp
+###################################################
+data.vp <- viewport(x = unit(5, "lines"),
+                    y = unit(4, "lines"),
+                    width = unit(1, "npc") - unit(7, "lines"),
+                    height = unit(1, "npc") - unit(7, "lines"),
+                    just = c("left", "bottom"),
+                    xscale = range(x) + c(-0.05, 0.05)*diff(range(x)),
+                    yscale = range(y) + c(-0.05, 0.05)*diff(range(y)))
+
+
+###################################################
+### code chunk number 4: procplot
+###################################################
+pushViewport(data.vp)
+grid.points(x, y)
+grid.rect()
+grid.xaxis()
+grid.yaxis()
+grid.text("x axis", y = unit(-3, "lines"),
+          gp = gpar(fontsize = 14))
+grid.text("y axis", x = unit(-4, "lines"),
+          gp = gpar(fontsize = 14), rot = 90)
+grid.text("A Simple Plot",
+          y = unit(1, "npc") + unit(1.5, "lines"),
+          gp = gpar(fontsize = 16))
+popViewport()
+
+
+###################################################
+### code chunk number 5: plotexample.Rnw:125-126
+###################################################
+pushViewport(data.vp)
+grid.points(x, y)
+grid.rect()
+grid.xaxis()
+grid.yaxis()
+grid.text("x axis", y = unit(-3, "lines"),
+          gp = gpar(fontsize = 14))
+grid.text("y axis", x = unit(-4, "lines"),
+          gp = gpar(fontsize = 14), rot = 90)
+grid.text("A Simple Plot",
+          y = unit(1, "npc") + unit(1.5, "lines"),
+          gp = gpar(fontsize = 16))
+popViewport()
+
+
+###################################################
+### code chunk number 6: ann1
+###################################################
+pushViewport(data.vp)
+grid.text(date(), x = unit(1, "npc"), y = 0,
+          just = c("right", "bottom"), gp = gpar(col="grey"))
+popViewport()
+
+
+###################################################
+### code chunk number 7: plotexample.Rnw:142-144
+###################################################
+pushViewport(data.vp)
+grid.points(x, y)
+grid.rect()
+grid.xaxis()
+grid.yaxis()
+grid.text("x axis", y = unit(-3, "lines"),
+          gp = gpar(fontsize = 14))
+grid.text("y axis", x = unit(-4, "lines"),
+          gp = gpar(fontsize = 14), rot = 90)
+grid.text("A Simple Plot",
+          y = unit(1, "npc") + unit(1.5, "lines"),
+          gp = gpar(fontsize = 16))
+popViewport()
+pushViewport(data.vp)
+grid.text(date(), x = unit(1, "npc"), y = 0,
+          just = c("right", "bottom"), gp = gpar(col="grey"))
+popViewport()
+
+
+###################################################
+### code chunk number 8: plotexample.Rnw:159-180
+###################################################
+data.vp <- viewport(name = "dataregion",
+                    x = unit(5, "lines"),
+                    y = unit(4, "lines"),
+                    width = unit(1, "npc") - unit(7, "lines"),
+                    height = unit(1, "npc") - unit(7, "lines"),
+                    just = c("left", "bottom"),
+                    xscale = range(x) + c(-0.05, 0.05)*diff(range(x)),
+                    yscale = range(y) + c(-0.05, 0.05)*diff(range(y)))
+pushViewport(data.vp)
+grid.points(x, y)
+grid.rect()
+grid.xaxis()
+grid.yaxis()
+grid.text("x axis", y = unit(-3, "lines"),
+          gp = gpar(fontsize = 14))
+grid.text("y axis", x = unit(-4, "lines"),
+          gp = gpar(fontsize = 14), rot = 90)
+grid.text("A Simple Plot",
+          y = unit(1, "npc") + unit(1.5, "lines"),
+          gp = gpar(fontsize = 16))
+upViewport()
+
+
+###################################################
+### code chunk number 9: plotexample.Rnw:186-190
+###################################################
+downViewport("dataregion")
+grid.text(date(), x = unit(1, "npc"), y  =  0,
+          just = c("right", "bottom"), gp = gpar(col = "grey"))
+upViewport()
+
+
+###################################################
+### code chunk number 10: funcplot
+###################################################
+splot <- function(x = runif(10), y = runif(10), title = "A Simple Plot") {
+    data.vp <- viewport(name = "dataregion",
+                        x = unit(5, "lines"),
+                        y = unit(4, "lines"),
+                        width = unit(1, "npc") - unit(7, "lines"),
+                        height = unit(1, "npc") - unit(7, "lines"),
+                        just = c("left", "bottom"),
+                        xscale = range(x) + c(-.05, .05)*diff(range(x)),
+                        yscale = range(y) + c(-.05, .05)*diff(range(y)))
+    pushViewport(data.vp)
+    grid.points(x, y)
+    grid.rect()
+    grid.xaxis()
+    grid.yaxis()
+    grid.text("y axis", x = unit(-4, "lines"),
+              gp = gpar(fontsize = 14), rot = 90)
+    grid.text(title, y = unit(1, "npc") + unit(1.5, "lines"),
+              gp = gpar(fontsize = 16))
+    upViewport()
+}
+
+
+###################################################
+### code chunk number 11: embed
+###################################################
+grid.rect(gp = gpar(fill = "grey"))
+message <-
+    paste("I could draw all sorts",
+          "of stuff over here",
+          "then create a viewport",
+          "over there and stick",
+          "a scatterplot in it.", sep = "\n")
+grid.text(message, x = 0.25)
+grid.lines(x = unit.c(unit(0.25, "npc") + 0.5*stringWidth(message) +
+           unit(2, "mm"),
+           unit(0.5, "npc") - unit(2, "mm")),
+           y = 0.5,
+           arrow = arrow(angle = 15, type = "closed"),
+           gp = gpar(lwd = 3, fill = "black"))
+pushViewport(viewport(x = 0.5, height = 0.5, width = 0.45, just = "left",
+                      gp = gpar(cex = 0.5)))
+grid.rect(gp = gpar(fill = "white"))
+splot(1:10, 1:10, title = "An Embedded Plot")
+upViewport()
+
+
+###################################################
+### code chunk number 12: ann2 (eval = FALSE)
+###################################################
+## downViewport("dataregion")
+## grid.text(date(), x = unit(1, "npc"), y  =  0,
+##           just = c("right", "bottom"), gp = gpar(col = "grey"))
+## upViewport(0)
+
+
+###################################################
+### code chunk number 13: plotexample.Rnw:266-268
+###################################################
+grid.rect(gp = gpar(fill = "grey"))
+message <-
+    paste("I could draw all sorts",
+          "of stuff over here",
+          "then create a viewport",
+          "over there and stick",
+          "a scatterplot in it.", sep = "\n")
+grid.text(message, x = 0.25)
+grid.lines(x = unit.c(unit(0.25, "npc") + 0.5*stringWidth(message) +
+           unit(2, "mm"),
+           unit(0.5, "npc") - unit(2, "mm")),
+           y = 0.5,
+           arrow = arrow(angle = 15, type = "closed"),
+           gp = gpar(lwd = 3, fill = "black"))
+pushViewport(viewport(x = 0.5, height = 0.5, width = 0.45, just = "left",
+                      gp = gpar(cex = 0.5)))
+grid.rect(gp = gpar(fill = "white"))
+splot(1:10, 1:10, title = "An Embedded Plot")
+upViewport()
+downViewport("dataregion")
+grid.text(date(), x = unit(1, "npc"), y  =  0,
+          just = c("right", "bottom"), gp = gpar(col = "grey"))
+upViewport(0)
+
+
+###################################################
+### code chunk number 14: plotexample.Rnw:295-331
+###################################################
+splot.data.vp <- function(x, y) {
+  viewport(name = "dataregion",
+           x = unit(5, "lines"),
+           y = unit(4, "lines"),
+           width = unit(1, "npc") - unit(7, "lines"),
+           height = unit(1, "npc") - unit(7, "lines"),
+           just = c("left", "bottom"),
+           xscale = range(x) + c(-.05, .05)*diff(range(x)),
+           yscale = range(y) + c(-.05, .05)*diff(range(y)))
+}
+
+splot.title <- function(title) {
+      textGrob(title, name = "title",
+               y = unit(1, "npc") + unit(1.5, "lines"),
+               gp = gpar(fontsize = 16), vp = "dataregion")
+}
+
+splot <- function(x, y, title, name=NULL, draw=TRUE, gp=gpar(), vp=NULL) {
+    spg <- gTree(x = x, y = y, title = title, name = name,
+                 childrenvp  =  splot.data.vp(x, y),
+                 children = gList(rectGrob(name = "border",
+                                           vp = "dataregion"),
+                 xaxisGrob(name = "xaxis", vp = "dataregion"),
+                 yaxisGrob(name = "yaxis", vp = "dataregion"),
+                 pointsGrob(x, y, name = "points", vp = "dataregion"),
+                 textGrob("x axis", y = unit(-3, "lines"), name = "xlab",
+                          gp = gpar(fontsize = 14), vp = "dataregion"),
+                 textGrob("y axis", x = unit(-4, "lines"), name = "ylab",
+                          gp = gpar(fontsize = 14), rot = 90,
+                          vp = "dataregion"),
+                 splot.title(title)),
+                 gp = gp, vp = vp,
+                 cl = "splot")
+    if (draw) grid.draw(spg)
+    spg
+}
+
+
+###################################################
+### code chunk number 15: splotgrob (eval = FALSE)
+###################################################
+## sg <- splot(1:10, 1:10, "Same as Before", name = "splot", draw = FALSE)
+
+
+###################################################
+### code chunk number 16: plotexample.Rnw:348-353
+###################################################
+splot(1:10, 1:10, "Same as Before", name = "splot")
+downViewport("dataregion")
+grid.text(date(), x = unit(1, "npc"), y = 0,
+          just = c("right", "bottom"), gp = gpar(col = "grey"))
+upViewport(0)
+
+
+###################################################
+### code chunk number 17: plotexample.Rnw:401-403
+###################################################
+splot(1:10, 1:10, "Same as Before", name = "splot")
+grid.edit("splot", gp = gpar(cex=0.5))
+
+
+###################################################
+### code chunk number 18: plotexample.Rnw:404-407
+###################################################
+sg <- splot(1:10, 1:10, "Same as Before", name = "splot", draw = FALSE)
+sg <- editGrob(sg, gp = gpar(cex = 0.5))
+grid.draw(sg)
+
+
+###################################################
+### code chunk number 19: plotexample.Rnw:413-415
+###################################################
+splot(1:10, 1:10, "Same as Before", name = "splot")
+grid.edit(gPath("splot", "points"), gp = gpar(col = 1:10))
+
+
+###################################################
+### code chunk number 20: plotexample.Rnw:416-420
+###################################################
+sg <- splot(1:10, 1:10, "Same as Before", name = "splot", draw = FALSE)
+sg <- editGrob(sg, gPath = "points", gp = gpar(col = 1:10))
+grid.draw(sg)
+
+
+
+###################################################
+### code chunk number 21: plotexample.Rnw:428-440
+###################################################
+editDetails.splot <- function(x, specs) {
+    if (any(c("x", "y") %in% names(specs))) {
+        if (is.null(specs$x)) xx <- x$x else xx <- specs$x
+        if (is.null(specs$y)) yy <- x$y else yy <- specs$y
+        x$childrenvp <- splot.data.vp(xx, yy)
+        x <- addGrob(x, pointsGrob(xx, yy, name = "points",
+                                   vp = "dataregion"))
+    }
+  x
+}
+splot(1:10, 1:10, "Same as Before", name = "splot")
+grid.edit("splot", x = 1:100, y = (1:100)^2)
+
+
+###################################################
+### code chunk number 22: plotexample.Rnw:441-444
+###################################################
+sg <- splot(1:10, 1:10, "Same as Before", name = "splot", draw = FALSE)
+sg <- editGrob(sg, x = 1:100, y = (1:100)^2)
+grid.draw(sg)
+
+
+###################################################
+### code chunk number 23: plotexample.Rnw:455-496
+###################################################
+cellname <- function(i, j) paste("cell", i, j, sep = "")
+
+splom.vpTree <- function(n) {
+    vplist <- vector("list", n^2)
+    for (i in 1:n)
+        for (j in 1:n)
+            vplist[[(i - 1)*n + j]] <-
+              viewport(layout.pos.row = i, layout.pos.col = j,
+                       name = cellname(i, j))
+    vpTree(viewport(layout = grid.layout(n, n), name = "cellgrid"),
+    do.call("vpList", vplist))
+}
+
+cellpath <- function(i, j) vpPath("cellgrid", cellname(i, j))
+
+splom <- function(df, name = NULL, draw = TRUE) {
+    n <- dim(df)[2]
+    glist <- vector("list", n*n)
+    for (i in 1:n)
+        for (j in 1:n) {
+            glist[[(i - 1)*n + j]] <-if (i == j)
+                textGrob(paste("diag", i, sep = ""),
+                         gp = gpar(col = "grey"), vp = cellpath(i, j))
+            else if (j > i)
+                textGrob(cellname(i, j),
+                         name = cellname(i, j),
+                         gp = gpar(col = "grey"), vp = cellpath(i, j))
+            else
+                splot(df[,j], df[,i], "",
+                      name = paste("plot", i, j, sep = ""),
+                      vp = cellpath(i, j),
+                      gp = gpar(cex = 0.5), draw = FALSE)
+        }
+    smg <- gTree(name = name, childrenvp = splom.vpTree(n),
+                 children = do.call("gList", glist))
+    if (draw) grid.draw(smg)
+    smg
+}
+
+df <- data.frame(x = rnorm(10), y = rnorm(10), z = rnorm(10))
+splom(df)
+
+
+###################################################
+### code chunk number 24: plotexample.Rnw:501-506
+###################################################
+splom(df)
+grid.edit("plot21::xlab", label = "", redraw = FALSE)
+grid.edit("plot32::ylab", label = "", redraw = FALSE)
+grid.edit("plot21::xaxis", label = FALSE, redraw = FALSE)
+grid.edit("plot32::yaxis", label = FALSE)
+
+
+###################################################
+### code chunk number 25: splomgrob (eval = FALSE)
+###################################################
+## smg <- splom(df, draw = FALSE)
+
+
+###################################################
+### code chunk number 26: plotexample.Rnw:509-515
+###################################################
+smg <- splom(df, draw = FALSE)
+smg <- editGrob(smg, gPath = "plot21::xaxis", label = FALSE)
+smg <- editGrob(smg, gPath = "plot21::xlab", label = "")
+smg <- editGrob(smg, gPath = "plot32::yaxis", label = FALSE)
+smg <- editGrob(smg, gPath = "plot32::ylab", label = "")
+grid.draw(smg)
+
+
+###################################################
+### code chunk number 27: plotexample.Rnw:525-530
+###################################################
+splom(df, name = "splom")
+grid.remove("cell12")
+grid.add("splom", textGrob(date(), name = "date",
+                           gp = gpar(fontface = "italic"),
+                           vp = "cellgrid::cell12"))
+
+
+###################################################
+### code chunk number 28: plotexample.Rnw:531-537
+###################################################
+smg <- splom(df, draw = FALSE)
+smg <- removeGrob(smg, "cell12")
+smg <- addGrob(smg, textGrob(date(), name = "date",
+                             gp = gpar(fontface = "italic"),
+                             vp = "cellgrid::cell12"))
+grid.draw(smg)
+
+
+###################################################
+### code chunk number 29: plotexample.Rnw:545-561
+###################################################
+splom(df, name = "splom")
+grid.remove("cell12")
+grid.add("splom", textGrob(date(), name = "date",
+                           gp = gpar(fontface = "italic"),
+                           vp = "cellgrid::cell12"))
+smg <- grid.get("splom")
+save(smg, file = "splom.RData")
+load("splom.RData")
+plot <- getGrob(smg, "plot31")
+date <- getGrob(smg, "date")
+plot <- editGrob(plot, vp = NULL, gp = gpar(cex = 1))
+date <- editGrob(date, y = unit(1, "npc") - unit(1, "lines"), vp = NULL)
+grid.newpage()
+grid.draw(plot)
+grid.draw(date)
+
+
+
+###################################################
+### code chunk number 30: plotexample.Rnw:562-575
+###################################################
+smg <- splom(df, draw = FALSE)
+smg <- removeGrob(smg, "cell12")
+smg <- addGrob(smg, textGrob(date(), name = "date",
+                             gp = gpar(fontface = "italic"),
+                             vp = "cellgrid::cell12"))
+save(smg, file = "splom.RData")
+load("splom.RData")
+plot <- getGrob(smg, "plot31")
+date <- getGrob(smg, "date")
+plot <- editGrob(plot, vp = NULL, gp = gpar(cex = 1))
+date <- editGrob(date, y = unit(1, "npc") - unit(1, "lines"), vp = NULL)
+grid.draw(plot)
+grid.draw(date)
+
+
diff --git a/win32/deps/library/grid/doc/plotexample.Rnw b/win32/deps/library/grid/doc/plotexample.Rnw
new file mode 100644
index 0000000..8f489e1
--- /dev/null
+++ b/win32/deps/library/grid/doc/plotexample.Rnw
@@ -0,0 +1,582 @@
+\documentclass[a4paper]{article}
+%\VignetteIndexEntry{Writing grid Code}
+%\VignettePackage{grid}
+\newcommand{\code}[1]{\texttt{#1}}
+\newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}
+\newcommand{\grid}{\pkg{grid}}
+\newcommand{\grob}{\code{grob}}
+\newcommand{\gTree}{\code{gTree}}
+\newcommand{\R}{{\sffamily R}}
+\setlength{\parindent}{0in}
+\setlength{\parskip}{.1in}
+\setlength{\textwidth}{140mm}
+\setlength{\oddsidemargin}{10mm}
+
+\newcommand{\aside}[1]{\begin{list}{}
+                                   {\setlength{\leftmargin}{1in}
+                                    \setlength{\rightmargin}{1in}
+                                    \setlength{\itemindent}{0in}}
+                       \item \textsc{Aside:} \emph{#1}
+                       \end{list}}
+
+\title{Writing \grid{} Code}
+\author{Paul Murrell}
+
+\begin{document}
+\maketitle
+
+<<echo=FALSE, results=hide>>=
+library(grDevices)
+library(stats) # for runif()
+library(grid)
+ps.options(pointsize=12)
+options(width=60)
+@
+
+The \grid{} system contains a degree of complexity in order
+to allow things like editing graphical objects, ``packing'' graphical
+objects, and so on.  This means that many of the
+predefined Grid graphics functions are
+relatively complicated\footnote{Although there are exceptions;  some
+functions, such as \code{grid.show.viewport}, are purely for producing
+illustrative diagrams and remain simple and procedural.}.
+
+One design aim of \grid{} is to allow users to create simple graphics
+simply and not to force them to use complicated concepts or write
+complicated code unless they actually need to.  Along similar lines,
+it is intended that people should be able to prototype even complex
+graphics very simply and then refine the implementation into a more
+sophisticated form if necessary.
+
+With the predefined graphics functions being fully-developed and
+complicated implementations, there is a lack of examples of simple,
+prototype code.  Furthermore, given that the aim is to allow a range
+of ways to produce the same graphical output, there is a need for
+examples which demonstrate the various stages, from simple to complex,
+that a piece of \grid{} code can go through.
+
+This document describes the construction of a scatterplot object, like
+that shown below, going from the simplest, prototype implementation to
+the most complex and sophisticated.  It demonstrates that if you only
+want simple graphics output then you can do it pretty simply and
+quickly.  It also demonstrates how to write functions that allow your
+graphics to be used by other people.  Finally, it demonstrates how to
+make your graphics fully interactive (or at least as interactive as
+Grid will let you make it).
+
+@
+This document should be read {\em after} the \grid{} Users'
+Guide.  Here we are assuming that the reader has an understanding
+of viewports, layouts, and units.  For the later sections of the
+document, it will also be helpful to have an understanding of
+\R{}'s \code{S3} object system.
+
+\section*{Procedural \grid{}}
+
+The simplest way to produce graphical output in Grid is just like
+producing standard R graphical output.  You simply issue a series of
+graphics commands and each command adds more ink to the plot.  The
+purpose of the commands is simply to produce graphics output; in
+particular, we are not concerned with any values returned by the
+plotting functions.  I will call this \emph{procedural graphics}.
+
+In order to draw a simple scatterplot, we can  issue a series
+of commands which draw the various components of the plot.
+
+Here are some random data to plot.
+
+<<>>=
+x <- runif(10)
+y <- runif(10)
+@
+\noindent
+The first step in creating the plot involves defining a ``data'' region.
+This is a region which has sensible scales on the axes for plotting the
+data and margins around the outside
+for the axes to fit in, with a space for a title at the top.
+
+<<datavp>>=
+data.vp <- viewport(x = unit(5, "lines"),
+                    y = unit(4, "lines"),
+                    width = unit(1, "npc") - unit(7, "lines"),
+                    height = unit(1, "npc") - unit(7, "lines"),
+                    just = c("left", "bottom"),
+                    xscale = range(x) + c(-0.05, 0.05)*diff(range(x)),
+                    yscale = range(y) + c(-0.05, 0.05)*diff(range(y)))
+@
+\noindent
+Now we create the data region and draw the components of the plot
+relative to it: points, axes, labels, and a title.
+
+<<procplot>>=
+pushViewport(data.vp)
+grid.points(x, y)
+grid.rect()
+grid.xaxis()
+grid.yaxis()
+grid.text("x axis", y = unit(-3, "lines"),
+          gp = gpar(fontsize = 14))
+grid.text("y axis", x = unit(-4, "lines"),
+          gp = gpar(fontsize = 14), rot = 90)
+grid.text("A Simple Plot",
+          y = unit(1, "npc") + unit(1.5, "lines"),
+          gp = gpar(fontsize = 16))
+popViewport()
+<<fig=TRUE, echo=FALSE, results=hide>>=
+<<procplot>>
+@
+\section*{Facilitating Annotation}
+
+Issuing a series of commands to produce a plot, like in the previous
+section, allows the user to have a great deal of flexibility.
+It is always possible to recreate viewports in order to add
+further annotations.  For example, the following code
+recreates the data region in order to place the date
+at the bottom right corner.
+
+<<ann1>>=
+pushViewport(data.vp)
+grid.text(date(), x = unit(1, "npc"), y = 0,
+          just = c("right", "bottom"), gp = gpar(col="grey"))
+popViewport()
+<<fig=TRUE, echo=FALSE, results=hide>>=
+<<procplot>>
+<<ann1>>
+@
+
+When more complex arrangements of viewports are involved, there may be
+a bewildering array of viewports created, which may make it difficult
+for other users to revisit a particular region of a plot.  A
+\code{lattice} plot is a good example.  In such cases, it will be more
+cooperative to use \code{upViewport()} rather than
+\code{popViewport()} and leave the viewports that were created during
+the drawing of the plot.  Other users can then use \code{vpPath}s to
+navigate to the desired region.  For example, here is a slight
+modification of the original series of commands, where the original
+data viewport is given a name and \code{upViewport()} is used at the
+end.
+
+<<results=hide>>=
+data.vp <- viewport(name = "dataregion",
+                    x = unit(5, "lines"),
+                    y = unit(4, "lines"),
+                    width = unit(1, "npc") - unit(7, "lines"),
+                    height = unit(1, "npc") - unit(7, "lines"),
+                    just = c("left", "bottom"),
+                    xscale = range(x) + c(-0.05, 0.05)*diff(range(x)),
+                    yscale = range(y) + c(-0.05, 0.05)*diff(range(y)))
+pushViewport(data.vp)
+grid.points(x, y)
+grid.rect()
+grid.xaxis()
+grid.yaxis()
+grid.text("x axis", y = unit(-3, "lines"),
+          gp = gpar(fontsize = 14))
+grid.text("y axis", x = unit(-4, "lines"),
+          gp = gpar(fontsize = 14), rot = 90)
+grid.text("A Simple Plot",
+          y = unit(1, "npc") + unit(1.5, "lines"),
+          gp = gpar(fontsize = 16))
+upViewport()
+@
+
+The date is now added using \code{downViewport()} to get to the data
+region.
+
+<<results=hide>>=
+downViewport("dataregion")
+grid.text(date(), x = unit(1, "npc"), y  =  0,
+          just = c("right", "bottom"), gp = gpar(col = "grey"))
+upViewport()
+@
+\section*{Writing a \grid{} Function}
+
+Here is the scatterplot code wrapped up as a simple function.
+
+<<funcplot>>=
+splot <- function(x = runif(10), y = runif(10), title = "A Simple Plot") {
+    data.vp <- viewport(name = "dataregion",
+                        x = unit(5, "lines"),
+                        y = unit(4, "lines"),
+                        width = unit(1, "npc") - unit(7, "lines"),
+                        height = unit(1, "npc") - unit(7, "lines"),
+                        just = c("left", "bottom"),
+                        xscale = range(x) + c(-.05, .05)*diff(range(x)),
+                        yscale = range(y) + c(-.05, .05)*diff(range(y)))
+    pushViewport(data.vp)
+    grid.points(x, y)
+    grid.rect()
+    grid.xaxis()
+    grid.yaxis()
+    grid.text("y axis", x = unit(-4, "lines"),
+              gp = gpar(fontsize = 14), rot = 90)
+    grid.text(title, y = unit(1, "npc") + unit(1.5, "lines"),
+              gp = gpar(fontsize = 16))
+    upViewport()
+}
+@
+There are several advantages to creating a
+function:
+\begin{enumerate}
+\item We get the standard advantages of a function:
+we can reuse and maintain the plot code more easily.
+\item We can slightly generalise the plot.  In this case, we can use it for
+different data and have a different title.  We could
+add more arguments to allow different margins, control over
+the axis scales, and so on.
+\item The plot can be embedded in other graphics output.
+\end{enumerate}
+Here is an example which uses the \code{splot()} function to
+create a slightly modified scatterplot, embedded within
+other \grid{} output.
+
+<<embed, fig=TRUE, results=hide>>=
+grid.rect(gp = gpar(fill = "grey"))
+message <-
+    paste("I could draw all sorts",
+          "of stuff over here",
+          "then create a viewport",
+          "over there and stick",
+          "a scatterplot in it.", sep = "\n")
+grid.text(message, x = 0.25)
+grid.lines(x = unit.c(unit(0.25, "npc") + 0.5*stringWidth(message) +
+           unit(2, "mm"),
+           unit(0.5, "npc") - unit(2, "mm")),
+           y = 0.5,
+           arrow = arrow(angle = 15, type = "closed"),
+           gp = gpar(lwd = 3, fill = "black"))
+pushViewport(viewport(x = 0.5, height = 0.5, width = 0.45, just = "left",
+                      gp = gpar(cex = 0.5)))
+grid.rect(gp = gpar(fill = "white"))
+splot(1:10, 1:10, title = "An Embedded Plot")
+upViewport()
+@
+
+It is still straightforward to annotate the scatterplot as long as
+we have enough information about the viewports.  In this case,
+a non-strict \code{downViewport()} will still work (though note
+that \code{upViewport({\bf 0})} is required to get right back to the
+top level).
+
+<<ann2, echo = FALSE, eval=FALSE>>=
+downViewport("dataregion")
+grid.text(date(), x = unit(1, "npc"), y  =  0,
+          just = c("right", "bottom"), gp = gpar(col = "grey"))
+upViewport(0)
+<<echo=FALSE, results=hide>>=
+<<embed>>
+<<ann2>>
+@
+\section*{Creating \grid{} Graphical Objects}
+
+A \grid{} function like the one in the previous section provides
+output which is very flexible and can be annotated in arbitrary ways
+and can be embedded within other output.  This is likely
+to satisfy most uses.
+
+However, there are some things that cannot be done (or at least would
+be extremely hard to do) with such a function.  The output produced by
+the function cannot be addressed as a coherent whole.  It is not
+possible, for example, to to change the \code{x} and \code{y} data
+used in the plot and have the points and axes update automatically.
+There is no scatterplot object to save; the individual components
+exist, but they are not bound together as a whole.  If/when these
+sorts of issues become important, it becomes necessary to create a
+\grid{} graphical object (a \grob{}) to represent the plot.
+
+The first step is to write a function which will create a \grob{}
+-- a \emph{constructor} function.  In most cases, this will involve
+creating a special sort of \grob{} called a \gTree{};  this is just
+a \grob{} that can have other \grob{}s as children.  Here's an example
+for creating an \code{splot} \grob{}.  I have put bits of the
+construction into separate functions, for reasons which will become
+apparent later.
+
+<<>>=
+splot.data.vp <- function(x, y) {
+  viewport(name = "dataregion",
+           x = unit(5, "lines"),
+           y = unit(4, "lines"),
+           width = unit(1, "npc") - unit(7, "lines"),
+           height = unit(1, "npc") - unit(7, "lines"),
+           just = c("left", "bottom"),
+           xscale = range(x) + c(-.05, .05)*diff(range(x)),
+           yscale = range(y) + c(-.05, .05)*diff(range(y)))
+}
+
+splot.title <- function(title) {
+      textGrob(title, name = "title",
+               y = unit(1, "npc") + unit(1.5, "lines"),
+               gp = gpar(fontsize = 16), vp = "dataregion")
+}
+
+splot <- function(x, y, title, name=NULL, draw=TRUE, gp=gpar(), vp=NULL) {
+    spg <- gTree(x = x, y = y, title = title, name = name,
+                 childrenvp  =  splot.data.vp(x, y),
+                 children = gList(rectGrob(name = "border",
+                                           vp = "dataregion"),
+                 xaxisGrob(name = "xaxis", vp = "dataregion"),
+                 yaxisGrob(name = "yaxis", vp = "dataregion"),
+                 pointsGrob(x, y, name = "points", vp = "dataregion"),
+                 textGrob("x axis", y = unit(-3, "lines"), name = "xlab",
+                          gp = gpar(fontsize = 14), vp = "dataregion"),
+                 textGrob("y axis", x = unit(-4, "lines"), name = "ylab",
+                          gp = gpar(fontsize = 14), rot = 90,
+                          vp = "dataregion"),
+                 splot.title(title)),
+                 gp = gp, vp = vp,
+                 cl = "splot")
+    if (draw) grid.draw(spg)
+    spg
+}
+@
+
+There are four important additions to the argument list compared
+to the original \code{splot()} function:
+\begin{enumerate}
+\item The \code{name} argument allows a string identifier to be
+  associated with the scatterplot object we create.  This is important
+  for being able to specify the scatterplot when we try to edit it
+  after drawing it and/or when it is part of a larger \grob{} (see
+  later examples).
+
+\item The \code{draw} argument makes it possible to use the function
+  in a procedural manner as before:
+
+<<splotgrob, eval=FALSE, echo=FALSE>>=
+sg <- splot(1:10, 1:10, "Same as Before", name = "splot", draw = FALSE)
+<<>>=
+splot(1:10, 1:10, "Same as Before", name = "splot")
+downViewport("dataregion")
+grid.text(date(), x = unit(1, "npc"), y = 0,
+          just = c("right", "bottom"), gp = gpar(col = "grey"))
+upViewport(0)
+@
+\item The \code{gp} argument allows the user to supply \code{gpar()}
+  settings for the scatterplot as a whole.
+
+\item The \code{vp} argument allows the user to supply a viewport for
+  the \code{splot} \grob{} to be drawn in.  This is especially useful
+  for specifying a \code{vpPath} when the \code{splot} is used as a
+  component of another \grob{} (see scatterplot matrix example below).
+\end{enumerate}
+
+The important parts of the \gTree{}  definition are:
+\begin{enumerate}
+\item The \code{children} argument provides a list of \grob{}s which
+  are part of the scatterplot.  When the scatterplot is drawn, all
+  children will be drawn.  Notice that instead of the procedural
+  \code{grid.*()} functions we use \code{*Grob()} functions which just
+  produce \grob{}s and do not perform any drawing.  Also notice that I
+  have given each of the children a name; this will make it possible
+  to access the components of the scatterplot (see later examples).
+\item The \code{childrenvp} argument provides a viewport (or
+  \code{vpStack}, \code{vpList}, or \code{vpTree}) which will be
+  pushed before the children are drawn.  The difference between this
+  argument and the \code{vp} argument common to all \grob{}s is that
+  the \code{vp} is pushed before drawing the children and then popped
+  after, whereas the \code{childrenvp} gets pushed \emph{and} then a
+  call to \code{upViewport()} is made before the children are drawn.
+  This allows the children to simply specify the viewport they should
+  be drawn in by way of a \code{vpPath} in their \code{vp} argument.
+  In this way, viewports remain available for further annotation such
+  as we have already seen in procedural code.
+\item The \code{gp} and \code{vp} arguments are automatically handled
+  by the \gTree{} drawing methods so that \code{gpar()} settings will
+  be enforced and the viewport will be pushed when the \code{splot} is
+  drawn.
+\item The \code{cl} argument means that the \grob{} created is a
+  special sort of \grob{} called \code{splot}.  This will allow us to
+  write methods specifically for our scatterplot (see later examples).
+\end{enumerate}
+
+
+@
+
+Now that we have a \grob{}, there are some more interesting things
+that we can do with it.  First of all, the \code{splot} \grob{}
+provides a container for the \grob{}s which make up the scatterplot.
+If we modify the \code{splot} \grob{}, it affects all of the children.
+
+<<results=hide>>=
+splot(1:10, 1:10, "Same as Before", name = "splot")
+grid.edit("splot", gp = gpar(cex=0.5))
+<<fig=TRUE, echo=FALSE, results=hide>>=
+<<splotgrob>>
+sg <- editGrob(sg, gp = gpar(cex = 0.5))
+grid.draw(sg)
+@
+
+We can access elements of the \code{splot} \grob{} to edit them
+individually.
+
+<<results=hide>>=
+splot(1:10, 1:10, "Same as Before", name = "splot")
+grid.edit(gPath("splot", "points"), gp = gpar(col = 1:10))
+<<fig=TRUE, echo=FALSE, results=hide>>=
+<<splotgrob>>
+sg <- editGrob(sg, gPath = "points", gp = gpar(col = 1:10))
+grid.draw(sg)
+
+@
+
+With a little more work we can make the scatterplot a bit more dynamic.
+The following describes a \code{editDetails()} method for the
+\code{splot} \grob{}.  This will be called whenever a scatterplot
+is edited and will update the components of the scatterplot.
+
+<<>>=
+editDetails.splot <- function(x, specs) {
+    if (any(c("x", "y") %in% names(specs))) {
+        if (is.null(specs$x)) xx <- x$x else xx <- specs$x
+        if (is.null(specs$y)) yy <- x$y else yy <- specs$y
+        x$childrenvp <- splot.data.vp(xx, yy)
+        x <- addGrob(x, pointsGrob(xx, yy, name = "points",
+                                   vp = "dataregion"))
+    }
+  x
+}
+splot(1:10, 1:10, "Same as Before", name = "splot")
+grid.edit("splot", x = 1:100, y = (1:100)^2)
+<<fig=TRUE, echo=FALSE, results=hide>>=
+<<splotgrob>>
+sg <- editGrob(sg, x = 1:100, y = (1:100)^2)
+grid.draw(sg)
+@
+
+The \code{splot} \grob{} can also be used in the construction of other
+\grob{}s.  Here's a simple scatterplot matrix \grob{}\footnote{{\bf
+    Warning:} As the number of \grob{}s in a \gTree{} gets larger the
+  construction of the \gTree{} will get slow.  If this happens, the
+  best solution is to just use a \grid{} function rather than a
+  \gTree{}, and wait for me to implement some ideas for speeding
+  things up!}.
+
+<<fig=TRUE>>=
+cellname <- function(i, j) paste("cell", i, j, sep = "")
+
+splom.vpTree <- function(n) {
+    vplist <- vector("list", n^2)
+    for (i in 1:n)
+        for (j in 1:n)
+            vplist[[(i - 1)*n + j]] <-
+              viewport(layout.pos.row = i, layout.pos.col = j,
+                       name = cellname(i, j))
+    vpTree(viewport(layout = grid.layout(n, n), name = "cellgrid"),
+    do.call("vpList", vplist))
+}
+
+cellpath <- function(i, j) vpPath("cellgrid", cellname(i, j))
+
+splom <- function(df, name = NULL, draw = TRUE) {
+    n <- dim(df)[2]
+    glist <- vector("list", n*n)
+    for (i in 1:n)
+        for (j in 1:n) {
+            glist[[(i - 1)*n + j]] <-if (i == j)
+                textGrob(paste("diag", i, sep = ""),
+                         gp = gpar(col = "grey"), vp = cellpath(i, j))
+            else if (j > i)
+                textGrob(cellname(i, j),
+                         name = cellname(i, j),
+                         gp = gpar(col = "grey"), vp = cellpath(i, j))
+            else
+                splot(df[,j], df[,i], "",
+                      name = paste("plot", i, j, sep = ""),
+                      vp = cellpath(i, j),
+                      gp = gpar(cex = 0.5), draw = FALSE)
+        }
+    smg <- gTree(name = name, childrenvp = splom.vpTree(n),
+                 children = do.call("gList", glist))
+    if (draw) grid.draw(smg)
+    smg
+}
+
+df <- data.frame(x = rnorm(10), y = rnorm(10), z = rnorm(10))
+splom(df)
+@
+
+This \grob{} can be edited as usual:
+
+<<>>=
+splom(df)
+grid.edit("plot21::xlab", label = "", redraw = FALSE)
+grid.edit("plot32::ylab", label = "", redraw = FALSE)
+grid.edit("plot21::xaxis", label = FALSE, redraw = FALSE)
+grid.edit("plot32::yaxis", label = FALSE)
+<<splomgrob, eval=FALSE, echo=FALSE>>=
+smg <- splom(df, draw = FALSE)
+<<fig=TRUE, echo=FALSE, results=hide>>=
+<<splomgrob>>
+smg <- editGrob(smg, gPath = "plot21::xaxis", label = FALSE)
+smg <- editGrob(smg, gPath = "plot21::xlab", label = "")
+smg <- editGrob(smg, gPath = "plot32::yaxis", label = FALSE)
+smg <- editGrob(smg, gPath = "plot32::ylab", label = "")
+grid.draw(smg)
+@
+
+But of more interest, because this is a \grob{}, is the
+\emph{programmatic} interface.  With a \grob{} (as opposed to a
+function) it is possible to modify the description of what is being
+drawn via an API (as opposed to having to edit the original code).  In
+the following, we remove one of the ``spare'' cell labels and put in
+its place the current date.
+
+<<>>=
+splom(df, name = "splom")
+grid.remove("cell12")
+grid.add("splom", textGrob(date(), name = "date",
+                           gp = gpar(fontface = "italic"),
+                           vp = "cellgrid::cell12"))
+<<fig=TRUE, echo=FALSE, results=hide>>=
+<<splomgrob>>
+smg <- removeGrob(smg, "cell12")
+smg <- addGrob(smg, textGrob(date(), name = "date",
+                             gp = gpar(fontface = "italic"),
+                             vp = "cellgrid::cell12"))
+grid.draw(smg)
+@
+
+With the date added as a component of the scatterplot matrix, it is
+saved as part of the matrix.  The next sequence saves the scatterplot
+matrix, loads it again, extracts the bottom-left plot and the date
+and just draws those two objects together.
+
+<<>>=
+splom(df, name = "splom")
+grid.remove("cell12")
+grid.add("splom", textGrob(date(), name = "date",
+                           gp = gpar(fontface = "italic"),
+                           vp = "cellgrid::cell12"))
+smg <- grid.get("splom")
+save(smg, file = "splom.RData")
+load("splom.RData")
+plot <- getGrob(smg, "plot31")
+date <- getGrob(smg, "date")
+plot <- editGrob(plot, vp = NULL, gp = gpar(cex = 1))
+date <- editGrob(date, y = unit(1, "npc") - unit(1, "lines"), vp = NULL)
+grid.newpage()
+grid.draw(plot)
+grid.draw(date)
+
+<<fig=TRUE, echo=FALSE, results=hide>>=
+<<splomgrob>>
+smg <- removeGrob(smg, "cell12")
+smg <- addGrob(smg, textGrob(date(), name = "date",
+                             gp = gpar(fontface = "italic"),
+                             vp = "cellgrid::cell12"))
+save(smg, file = "splom.RData")
+load("splom.RData")
+plot <- getGrob(smg, "plot31")
+date <- getGrob(smg, "date")
+plot <- editGrob(plot, vp = NULL, gp = gpar(cex = 1))
+date <- editGrob(date, y = unit(1, "npc") - unit(1, "lines"), vp = NULL)
+grid.draw(plot)
+grid.draw(date)
+@
+
+All of this may seem a bit irrelevant to interactive use, but it does
+provide a basis for creating an editable plot interface as used in
+M.~Kondrin's \pkg{Rgrace} package (available on CRAN 2005--7).
+
+\end{document}
diff --git a/win32/deps/library/grid/doc/plotexample.pdf b/win32/deps/library/grid/doc/plotexample.pdf
new file mode 100644
index 0000000..382b636
Binary files /dev/null and b/win32/deps/library/grid/doc/plotexample.pdf differ
diff --git a/win32/deps/library/grid/doc/rotated.R b/win32/deps/library/grid/doc/rotated.R
new file mode 100644
index 0000000..a93f292
--- /dev/null
+++ b/win32/deps/library/grid/doc/rotated.R
@@ -0,0 +1,188 @@
+### R code from vignette source 'rotated.Rnw'
+
+###################################################
+### code chunk number 1: rotated.Rnw:18-24
+###################################################
+library(grDevices)
+library(graphics) # for boxplot
+library(stats) # for rnorm
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+
+
+###################################################
+### code chunk number 2: rotated.Rnw:30-33
+###################################################
+pushViewport(viewport(h = .8, w = .8, angle = 15))
+grid.multipanel(newpage = FALSE)
+popViewport()
+
+
+###################################################
+### code chunk number 3: complex1
+###################################################
+x <- rnorm(50)
+y <- x + rnorm(50, 1, 2)
+
+
+###################################################
+### code chunk number 4: complex2
+###################################################
+# We will extend the axes over the entire region so
+# extrapolate scale from main data region
+scale <- extendrange(r = range(x,y))
+extscale <- c(min(scale), max(scale)+diff(scale)*1/3)
+
+
+###################################################
+### code chunk number 5: complex3
+###################################################
+lay <- grid.layout(2, 2,
+                   widths = unit(c(3, 1), "inches"),
+                   heights = unit(c(1, 3), "inches"))
+vp1 <- viewport(width = unit(4, "inches"), height = unit(4, "inches"),
+                layout = lay, xscale = extscale, yscale = extscale)
+
+
+###################################################
+### code chunk number 6: complex4
+###################################################
+grid.newpage()
+pushViewport(vp1)
+grid.rect()
+grid.xaxis()
+grid.text("Test", y = unit(-3, "lines"))
+grid.yaxis()
+grid.text("Retest", x = unit(-3, "lines"), rot = 90)
+
+
+###################################################
+### code chunk number 7: complex5
+###################################################
+vp2 <- viewport(layout.pos.row = 2, layout.pos.col = 1,
+                xscale = scale, yscale = scale)
+pushViewport(vp2)
+grid.lines()
+grid.points(x, y, gp = gpar(col = "blue"))
+popViewport()
+
+
+###################################################
+### code chunk number 8: complex6
+###################################################
+diffs <- (y - x)
+rdiffs <- range(diffs)
+ddiffs <- diff(rdiffs)
+bxp <- boxplot(diffs, plot = FALSE)
+vp3 <- viewport(x = unit(3, "inches"),
+                y = unit(3, "inches"),
+                width = unit(.5, "inches"),
+                # NOTE that the axis on the boxplot represents
+                # actual (y - x) values BUT to make
+                # the bits of the boxplot line
+                # up with the data points we have to plot
+                # (y - x)/sqrt(2)
+                # Hence the sin(pi/4) below
+                height = unit(ddiffs*sin(pi/4)/diff(scale)*3, "inches"),
+                just = c("centre", "center"),
+                angle = 45,
+	        gp = gpar(col = "red"),
+                yscale = c(-ddiffs/2, ddiffs/2))
+pushViewport(vp3)
+left <- -.3
+width <- .8
+middle <- left + width/2
+grid.rect(x = left, y = unit(bxp$conf[1,1], "native"),
+          width = width, height = unit(diff(bxp$conf[,1]), "native"),
+          just = c("left", "bottom"),
+	  gp = gpar(col = NULL, fill = "orange"))
+grid.rect(x = left, y = unit(bxp$stats[4,1], "native"),
+          width = width, height = unit(diff(bxp$stats[4:3,1]), "native"),
+          just = c("left", "bottom"))
+grid.rect(x = left, y = unit(bxp$stats[3,1], "native"),
+          width = width, height = unit(diff(bxp$stats[3:2,1]), "native"),
+          just = c("left", "bottom"))
+grid.lines(x = c(middle, middle), y = unit(bxp$stats[1:2,1], "native"))
+grid.lines(x = c(middle, middle), y = unit(bxp$stats[4:5,1], "native"))
+grid.lines(x = c(middle-.1, middle+.1), y = unit(bxp$stats[1,1], "native"))
+grid.lines(x = c(middle-.1, middle+.1), y = unit(bxp$stats[5,1], "native"))
+np <- length(bxp$out)
+if (np > 0)
+  grid.points(x = rep(middle, np), y = unit(bxp$out, "native"))
+grid.yaxis(main = FALSE)
+popViewport(2)
+
+
+
+###################################################
+### code chunk number 9: rotated.Rnw:139-145
+###################################################
+x <- rnorm(50)
+y <- x + rnorm(50, 1, 2)
+# We will extend the axes over the entire region so
+# extrapolate scale from main data region
+scale <- extendrange(r = range(x,y))
+extscale <- c(min(scale), max(scale)+diff(scale)*1/3)
+lay <- grid.layout(2, 2,
+                   widths = unit(c(3, 1), "inches"),
+                   heights = unit(c(1, 3), "inches"))
+vp1 <- viewport(width = unit(4, "inches"), height = unit(4, "inches"),
+                layout = lay, xscale = extscale, yscale = extscale)
+grid.newpage()
+pushViewport(vp1)
+grid.rect()
+grid.xaxis()
+grid.text("Test", y = unit(-3, "lines"))
+grid.yaxis()
+grid.text("Retest", x = unit(-3, "lines"), rot = 90)
+vp2 <- viewport(layout.pos.row = 2, layout.pos.col = 1,
+                xscale = scale, yscale = scale)
+pushViewport(vp2)
+grid.lines()
+grid.points(x, y, gp = gpar(col = "blue"))
+popViewport()
+diffs <- (y - x)
+rdiffs <- range(diffs)
+ddiffs <- diff(rdiffs)
+bxp <- boxplot(diffs, plot = FALSE)
+vp3 <- viewport(x = unit(3, "inches"),
+                y = unit(3, "inches"),
+                width = unit(.5, "inches"),
+                # NOTE that the axis on the boxplot represents
+                # actual (y - x) values BUT to make
+                # the bits of the boxplot line
+                # up with the data points we have to plot
+                # (y - x)/sqrt(2)
+                # Hence the sin(pi/4) below
+                height = unit(ddiffs*sin(pi/4)/diff(scale)*3, "inches"),
+                just = c("centre", "center"),
+                angle = 45,
+	        gp = gpar(col = "red"),
+                yscale = c(-ddiffs/2, ddiffs/2))
+pushViewport(vp3)
+left <- -.3
+width <- .8
+middle <- left + width/2
+grid.rect(x = left, y = unit(bxp$conf[1,1], "native"),
+          width = width, height = unit(diff(bxp$conf[,1]), "native"),
+          just = c("left", "bottom"),
+	  gp = gpar(col = NULL, fill = "orange"))
+grid.rect(x = left, y = unit(bxp$stats[4,1], "native"),
+          width = width, height = unit(diff(bxp$stats[4:3,1]), "native"),
+          just = c("left", "bottom"))
+grid.rect(x = left, y = unit(bxp$stats[3,1], "native"),
+          width = width, height = unit(diff(bxp$stats[3:2,1]), "native"),
+          just = c("left", "bottom"))
+grid.lines(x = c(middle, middle), y = unit(bxp$stats[1:2,1], "native"))
+grid.lines(x = c(middle, middle), y = unit(bxp$stats[4:5,1], "native"))
+grid.lines(x = c(middle-.1, middle+.1), y = unit(bxp$stats[1,1], "native"))
+grid.lines(x = c(middle-.1, middle+.1), y = unit(bxp$stats[5,1], "native"))
+np <- length(bxp$out)
+if (np > 0)
+  grid.points(x = rep(middle, np), y = unit(bxp$out, "native"))
+grid.yaxis(main = FALSE)
+popViewport(2)
+
+
+
diff --git a/win32/deps/library/grid/doc/rotated.Rnw b/win32/deps/library/grid/doc/rotated.Rnw
new file mode 100644
index 0000000..68ad412
--- /dev/null
+++ b/win32/deps/library/grid/doc/rotated.Rnw
@@ -0,0 +1,156 @@
+\documentclass[a4paper]{article}
+%\VignetteIndexEntry{Rotated Viewports}
+%\VignettePackage{grid}
+\newcommand{\code}[1]{\texttt{#1}}
+\newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}
+\newcommand{\grid}{\pkg{grid}}
+\newcommand{\R}{{\sffamily R}}
+\setlength{\parindent}{0in}
+\setlength{\parskip}{.1in}
+\setlength{\textwidth}{140mm}
+\setlength{\oddsidemargin}{10mm}
+\title{Rotated Viewports}
+\author{Paul Murrell}
+
+\begin{document}
+\maketitle
+
+<<echo=FALSE, results=hide>>=
+library(grDevices)
+library(graphics) # for boxplot
+library(stats) # for rnorm
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+@
+It is possible to specify an angle of rotation for a Grid viewport.
+For example, the following code draws the example multipanel plot
+at an angle of $15^\circ$.
+
+<<fig=TRUE, results=hide>>=
+pushViewport(viewport(h = .8, w = .8, angle = 15))
+grid.multipanel(newpage = FALSE)
+popViewport()
+@
+
+\vspace{.5in}
+A more complicated example is now developed.  First of all we
+generate some data to plot; an $x$ and a $y$ with an obvious correlation.
+
+<<complex1, results=hide>>=
+x <- rnorm(50)
+y <- x + rnorm(50, 1, 2)
+@
+\noindent
+Next we generate some statistics from the data.
+
+<<complex2, results=hide>>=
+# We will extend the axes over the entire region so
+# extrapolate scale from main data region
+scale <- extendrange(r = range(x,y))
+extscale <- c(min(scale), max(scale)+diff(scale)*1/3)
+@
+\noindent
+Now generate a layout of regions:  a 3" by 3" region for a
+scatterplot, inside a 4" by 4" region.
+
+<<complex3, results=hide>>=
+lay <- grid.layout(2, 2,
+                   widths = unit(c(3, 1), "inches"),
+                   heights = unit(c(1, 3), "inches"))
+vp1 <- viewport(width = unit(4, "inches"), height = unit(4, "inches"),
+                layout = lay, xscale = extscale, yscale = extscale)
+@
+\noindent
+We draw a box around the outside and axes on the entire region.
+
+<<complex4, results=hide>>=
+grid.newpage()
+pushViewport(vp1)
+grid.rect()
+grid.xaxis()
+grid.text("Test", y = unit(-3, "lines"))
+grid.yaxis()
+grid.text("Retest", x = unit(-3, "lines"), rot = 90)
+@
+\noindent
+We draw points within the interior region.
+
+<<complex5, results=hide>>=
+vp2 <- viewport(layout.pos.row = 2, layout.pos.col = 1,
+                xscale = scale, yscale = scale)
+pushViewport(vp2)
+grid.lines()
+grid.points(x, y, gp = gpar(col = "blue"))
+popViewport()
+@
+\noindent
+Now we use a rotated viewport to draw a boxplot which indicates
+the distribution of the distances between the points in the scatterplot
+and the line $y = x$\footnote{This may look like a large amount of
+code, but that's mostly because its doing a boxplot by hand
+rather than using a predefined high-level function.}.
+
+The final output is shown on the last page.
+
+<<complex6, results=hide>>=
+diffs <- (y - x)
+rdiffs <- range(diffs)
+ddiffs <- diff(rdiffs)
+bxp <- boxplot(diffs, plot = FALSE)
+vp3 <- viewport(x = unit(3, "inches"),
+                y = unit(3, "inches"),
+                width = unit(.5, "inches"),
+                # NOTE that the axis on the boxplot represents
+                # actual (y - x) values BUT to make
+                # the bits of the boxplot line
+                # up with the data points we have to plot
+                # (y - x)/sqrt(2)
+                # Hence the sin(pi/4) below
+                height = unit(ddiffs*sin(pi/4)/diff(scale)*3, "inches"),
+                just = c("centre", "center"),
+                angle = 45,
+	        gp = gpar(col = "red"),
+                yscale = c(-ddiffs/2, ddiffs/2))
+pushViewport(vp3)
+left <- -.3
+width <- .8
+middle <- left + width/2
+grid.rect(x = left, y = unit(bxp$conf[1,1], "native"),
+          width = width, height = unit(diff(bxp$conf[,1]), "native"),
+          just = c("left", "bottom"),
+	  gp = gpar(col = NULL, fill = "orange"))
+grid.rect(x = left, y = unit(bxp$stats[4,1], "native"),
+          width = width, height = unit(diff(bxp$stats[4:3,1]), "native"),
+          just = c("left", "bottom"))
+grid.rect(x = left, y = unit(bxp$stats[3,1], "native"),
+          width = width, height = unit(diff(bxp$stats[3:2,1]), "native"),
+          just = c("left", "bottom"))
+grid.lines(x = c(middle, middle), y = unit(bxp$stats[1:2,1], "native"))
+grid.lines(x = c(middle, middle), y = unit(bxp$stats[4:5,1], "native"))
+grid.lines(x = c(middle-.1, middle+.1), y = unit(bxp$stats[1,1], "native"))
+grid.lines(x = c(middle-.1, middle+.1), y = unit(bxp$stats[5,1], "native"))
+np <- length(bxp$out)
+if (np > 0)
+  grid.points(x = rep(middle, np), y = unit(bxp$out, "native"))
+grid.yaxis(main = FALSE)
+popViewport(2)
+
+<<echo=FALSE, fig=TRUE, results=hide>>=
+<<complex1>>
+<<complex2>>
+<<complex3>>
+<<complex4>>
+<<complex5>>
+<<complex6>>
+@
+\section*{Problems}
+
+\begin{enumerate}
+\item Data symbols will not be affected by the angle of rotation.  For
+  round data symbols this does not matter, but it will make just about
+  everything else look pretty odd.
+\end{enumerate}
+
+@
+\end{document}
diff --git a/win32/deps/library/grid/doc/rotated.pdf b/win32/deps/library/grid/doc/rotated.pdf
new file mode 100644
index 0000000..4e406a9
Binary files /dev/null and b/win32/deps/library/grid/doc/rotated.pdf differ
diff --git a/win32/deps/library/grid/doc/saveload.R b/win32/deps/library/grid/doc/saveload.R
new file mode 100644
index 0000000..695d8ad
--- /dev/null
+++ b/win32/deps/library/grid/doc/saveload.R
@@ -0,0 +1,40 @@
+### R code from vignette source 'saveload.Rnw'
+
+###################################################
+### code chunk number 1: saveload.Rnw:18-22
+###################################################
+library(grDevices)
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+
+
+###################################################
+### code chunk number 2: saveload.Rnw:49-51
+###################################################
+gt <- textGrob("hi")
+save(gt, file = "mygridplot")
+
+
+###################################################
+### code chunk number 3: saveload.Rnw:55-57
+###################################################
+load("mygridplot")
+grid.draw(gt)
+
+
+###################################################
+### code chunk number 4: saveload.Rnw:90-93
+###################################################
+grid.grill()
+temp <- recordPlot()
+save(temp, file = "mygridplot")
+
+
+###################################################
+### code chunk number 5: saveload.Rnw:100-102
+###################################################
+load("mygridplot")
+temp
+
+
diff --git a/win32/deps/library/grid/doc/saveload.Rnw b/win32/deps/library/grid/doc/saveload.Rnw
new file mode 100644
index 0000000..513588c
--- /dev/null
+++ b/win32/deps/library/grid/doc/saveload.Rnw
@@ -0,0 +1,110 @@
+\documentclass[a4paper]{article}
+%\VignetteIndexEntry{Persistent representations}
+%\VignettePackage{grid}
+\newcommand{\code}[1]{\texttt{#1}}
+\newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}
+\newcommand{\grid}{\pkg{grid}}
+\newcommand{\R}{{\sffamily R}}
+\setlength{\parindent}{0in}
+\setlength{\parskip}{.1in}
+\setlength{\textwidth}{140mm}
+\setlength{\oddsidemargin}{10mm}
+\title{Saving and Loading \grid{} Graphics}
+\author{Paul Murrell}
+
+\begin{document}
+\maketitle
+
+<<echo=FALSE, results=hide>>=
+library(grDevices)
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+@
+This is a general discussion concerning how you might go about
+creating (and reusing) persistent representations of \grid{}
+graphics, and some of the pitfalls in the various options.
+
+\subsection*{\R{} code}
+
+The way I usually work with graphics is to write \R{} code in a text file
+and copy-and-paste or \code{source()} it into R.  In this case,
+the persistent
+representation of the graphics is the raw \R{} code.
+
+The representation is fully editable.
+
+The representation is persistent across \R{} sessions, but may not be
+persistent across \R{} versions because the names, argument lists,
+and/or behaviour of the \grid{} functions may
+change.  The representation can be reloaded into R.
+Incompatibilities between versions should be handled gracefully by
+\R{}'s argument-matching, type-checking, and/or version-checking.
+
+\subsection*{\grid{} \code{grob}s}
+
+The next most flexible way of creating a persistent version of \grid{}
+graphics is to \code{save()} a \grid{} \code{grob} \ldots
+
+<<>>=
+gt <- textGrob("hi")
+save(gt, file = "mygridplot")
+@
+The representation is reloadable so you can reproduce an image \ldots{}
+
+<<results=hide>>=
+load("mygridplot")
+grid.draw(gt)
+@
+And the representation is editable;  there is an API for interacting
+with \grid{} \code{grobs}, including adding new elements, removing
+elements, editing features of a \code{grob} and so on.  See
+\code{getGrob()}, \code{addGrob()}, \code{removeGrob()},
+and \code{editGrob()}.
+
+The representation is persistent across \R{} sessions, but is
+vulnerable to changes in the internal representation of \grid{}
+\code{grob}s.  The advantage of this representation is that it is
+possible to share and edit graphics produced by someone else,
+without seeing the code they used to produce it.
+
+\subsection*{Device output}
+
+A third way of creating a persistent version of \grid{} graphics is to
+``save'' it to a persistent device format (e.g., PostScript, PDF, \ldots).
+
+It is possible to edit these representations, but hardly convenient.
+In particular, none of the coordinate systems used in the
+construction of plots (e.g., axis scales) are available for editing.
+
+The representation is persistent regardless of \R{} sessions or versions,
+but it cannot be reloaded into \R{}.
+
+\subsection*{Display lists}
+
+This final option is \emph{not} recommended, but it is possible to do
+so its downsides need to be explained.
+
+What you can do is ``save'' an \R{} display list using, for example, \ldots
+
+<<>>=
+grid.grill()
+temp <- recordPlot()
+save(temp, file = "mygridplot")
+@
+This representation is not editable\footnote{Well, there's nothing stopping
+you editing it, but you should take out life insurance first.}, but it can be
+reloaded
+and rerun to reproduce the output \ldots
+
+<<>>=
+load("mygridplot")
+temp
+@
+The representation is persistent across \R{} sessions, but the saved
+information involves non-public interfaces and structures which may
+change between \R{} versions.  You also have to make sure that \grid{}
+has been reloaded.  Differences between \grid{} and/or \R{} versions
+may lead to segmentation faults.
+\end{document}
+
diff --git a/win32/deps/library/grid/doc/saveload.pdf b/win32/deps/library/grid/doc/saveload.pdf
new file mode 100644
index 0000000..fee31b0
Binary files /dev/null and b/win32/deps/library/grid/doc/saveload.pdf differ
diff --git a/win32/deps/library/grid/doc/sharing.R b/win32/deps/library/grid/doc/sharing.R
new file mode 100644
index 0000000..c42446d
--- /dev/null
+++ b/win32/deps/library/grid/doc/sharing.R
@@ -0,0 +1,140 @@
+### R code from vignette source 'sharing.Rnw'
+
+###################################################
+### code chunk number 1: sharing.Rnw:15-21
+###################################################
+library(grDevices)
+library(graphics)
+library(stats) # for rnorm
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+
+
+###################################################
+### code chunk number 2: axes1 (eval = FALSE)
+###################################################
+## pushViewport(viewport(layout = grid.layout(1, 2, respect = TRUE)))
+
+
+###################################################
+### code chunk number 3: axes2 (eval = FALSE)
+###################################################
+## x <- 1:10
+## y1 <- rnorm(10)
+## vp1a <- viewport(layout.pos.col = 1)
+## vp1b <- viewport(width = 0.6, height = 0.6,
+##                  xscale = c(0, 11), yscale = c(-4, 4))
+## pushViewport(vp1a, vp1b)
+## grid.xaxis(name = "xaxis")
+## grid.yaxis(name = "yaxis")
+## grid.points(x, y1)
+## popViewport(2)
+
+
+###################################################
+### code chunk number 4: axes3 (eval = FALSE)
+###################################################
+## y2 <- rnorm(10)
+## vp2a <- viewport(layout.pos.col = 2)
+## vp2b <- viewport(width = 0.6, height = 0.6,
+##                  xscale = c(0, 11), yscale = c(-4, 4))
+## pushViewport(vp2a, vp2b)
+## grid.xaxis
+## grid.xaxis(name = "xaxis")
+## grid.yaxis(name = "yaxis")
+## grid.points(x, y2)
+## popViewport(2)
+
+
+###################################################
+### code chunk number 5: shared
+###################################################
+pushViewport(viewport(layout = grid.layout(1, 2, respect = TRUE)))
+x <- 1:10
+y1 <- rnorm(10)
+vp1a <- viewport(layout.pos.col = 1)
+vp1b <- viewport(width = 0.6, height = 0.6,
+                 xscale = c(0, 11), yscale = c(-4, 4))
+pushViewport(vp1a, vp1b)
+grid.xaxis(name = "xaxis")
+grid.yaxis(name = "yaxis")
+grid.points(x, y1)
+popViewport(2)
+y2 <- rnorm(10)
+vp2a <- viewport(layout.pos.col = 2)
+vp2b <- viewport(width = 0.6, height = 0.6,
+                 xscale = c(0, 11), yscale = c(-4, 4))
+pushViewport(vp2a, vp2b)
+grid.xaxis
+grid.xaxis(name = "xaxis")
+grid.yaxis(name = "yaxis")
+grid.points(x, y2)
+popViewport(2)
+
+
+
+###################################################
+### code chunk number 6: axesedit (eval = FALSE)
+###################################################
+## grid.edit("xaxis", at = c(1, 5, 9), global = TRUE)
+## 
+
+
+###################################################
+### code chunk number 7: shared2
+###################################################
+postscript("shared2-%02d.eps", onefile = FALSE, paper = "special",
+           width = 4, height = 2)
+pushViewport(viewport(layout = grid.layout(1, 2, respect = TRUE)))
+x <- 1:10
+y1 <- rnorm(10)
+vp1a <- viewport(layout.pos.col = 1)
+vp1b <- viewport(width = 0.6, height = 0.6,
+                 xscale = c(0, 11), yscale = c(-4, 4))
+pushViewport(vp1a, vp1b)
+grid.xaxis(name = "xaxis")
+grid.yaxis(name = "yaxis")
+grid.points(x, y1)
+popViewport(2)
+y2 <- rnorm(10)
+vp2a <- viewport(layout.pos.col = 2)
+vp2b <- viewport(width = 0.6, height = 0.6,
+                 xscale = c(0, 11), yscale = c(-4, 4))
+pushViewport(vp2a, vp2b)
+grid.xaxis
+grid.xaxis(name = "xaxis")
+grid.yaxis(name = "yaxis")
+grid.points(x, y2)
+popViewport(2)
+grid.edit("xaxis", at = c(1, 5, 9), global = TRUE)
+
+dev.off()
+
+pdf("shared2-%02d.pdf", onefile = FALSE, width = 4, height = 2)
+pushViewport(viewport(layout = grid.layout(1, 2, respect = TRUE)))
+x <- 1:10
+y1 <- rnorm(10)
+vp1a <- viewport(layout.pos.col = 1)
+vp1b <- viewport(width = 0.6, height = 0.6,
+                 xscale = c(0, 11), yscale = c(-4, 4))
+pushViewport(vp1a, vp1b)
+grid.xaxis(name = "xaxis")
+grid.yaxis(name = "yaxis")
+grid.points(x, y1)
+popViewport(2)
+y2 <- rnorm(10)
+vp2a <- viewport(layout.pos.col = 2)
+vp2b <- viewport(width = 0.6, height = 0.6,
+                 xscale = c(0, 11), yscale = c(-4, 4))
+pushViewport(vp2a, vp2b)
+grid.xaxis
+grid.xaxis(name = "xaxis")
+grid.yaxis(name = "yaxis")
+grid.points(x, y2)
+popViewport(2)
+grid.edit("xaxis", at = c(1, 5, 9), global = TRUE)
+
+dev.off()
+
+
diff --git a/win32/deps/library/grid/doc/sharing.Rnw b/win32/deps/library/grid/doc/sharing.Rnw
new file mode 100644
index 0000000..0509be5
--- /dev/null
+++ b/win32/deps/library/grid/doc/sharing.Rnw
@@ -0,0 +1,110 @@
+\documentclass[a4paper]{article}
+%\VignetteIndexEntry{Modifying multiple grobs simultaneously}
+\newcommand{\code}[1]{\texttt{#1}}
+\newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}
+\newcommand{\grid}{\pkg{grid}}
+\newcommand{\R}{{\sffamily R}}
+\setlength{\parindent}{0in}
+\setlength{\parskip}{.1in}
+\title{An Example of ``Linking'' Graphical Objects in \grid{}}
+\author{Paul Murrell}
+
+\begin{document}
+\maketitle
+
+<<echo=FALSE, results=hide>>=
+library(grDevices)
+library(graphics)
+library(stats) # for rnorm
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+@
+Suppose that I am drawing two graphs on a page, which are the results
+from two subjects in an experiment.  I want the graphs to have the same
+axes to aid in comparison of the subjects.
+
+First of all, I will split the page up into two bits for the two graphs.
+
+<<axes1, eval=FALSE, results=hide>>=
+pushViewport(viewport(layout = grid.layout(1, 2, respect = TRUE)))
+@
+Now I generate some data and draw the first plot.
+
+<<axes2, eval=FALSE, results=hide>>=
+x <- 1:10
+y1 <- rnorm(10)
+vp1a <- viewport(layout.pos.col = 1)
+vp1b <- viewport(width = 0.6, height = 0.6,
+                 xscale = c(0, 11), yscale = c(-4, 4))
+pushViewport(vp1a, vp1b)
+grid.xaxis(name = "xaxis")
+grid.yaxis(name = "yaxis")
+grid.points(x, y1)
+popViewport(2)
+@
+Notice that I have named the graphical objects for the axes.
+When I draw the second plot I will use the same names for the
+axis objects.
+
+<<axes3, eval=FALSE, results=hide>>=
+y2 <- rnorm(10)
+vp2a <- viewport(layout.pos.col = 2)
+vp2b <- viewport(width = 0.6, height = 0.6,
+                 xscale = c(0, 11), yscale = c(-4, 4))
+pushViewport(vp2a, vp2b)
+grid.xaxis
+grid.xaxis(name = "xaxis")
+grid.yaxis(name = "yaxis")
+grid.points(x, y2)
+popViewport(2)
+@
+The output looks like the figure below.
+
+<<shared, results=hide, fig=TRUE, echo=FALSE, width=4, height=2, include=FALSE>>=
+<<axes1>>
+<<axes2>>
+<<axes3>>
+
+@
+\begin{center}
+\includegraphics[width=4in, height=2in]{sharing-shared}
+\end{center}
+@
+
+Because I have used the same name for the axis objects in both plots,
+ I can edit the axes for both plots
+simultaneously rather than having to edit each one in turn.
+For example ...
+
+<<axesedit, eval=FALSE, results=hide>>=
+grid.edit("xaxis", at = c(1, 5, 9), global = TRUE)
+
+@
+The output now looks like the figure below.
+
+<<shared2, results=hide, echo=FALSE>>=
+postscript("shared2-%02d.eps", onefile = FALSE, paper = "special",
+           width = 4, height = 2)
+<<axes1>>
+<<axes2>>
+<<axes3>>
+<<axesedit>>
+dev.off()
+
+pdf("shared2-%02d.pdf", onefile = FALSE, width = 4, height = 2)
+<<axes1>>
+<<axes2>>
+<<axes3>>
+<<axesedit>>
+dev.off()
+@
+\begin{center}
+\includegraphics[width=4in, height=2in]{shared2-02}
+\end{center}
+@
+
+This might seem a very small gain in this example, but it is
+potentially of great use in, for example, the implementation of a scatterplot
+matrix.
+\end{document}
diff --git a/win32/deps/library/grid/doc/sharing.pdf b/win32/deps/library/grid/doc/sharing.pdf
new file mode 100644
index 0000000..1e25bfd
Binary files /dev/null and b/win32/deps/library/grid/doc/sharing.pdf differ
diff --git a/win32/deps/library/grid/doc/viewports.R b/win32/deps/library/grid/doc/viewports.R
new file mode 100644
index 0000000..add9952
--- /dev/null
+++ b/win32/deps/library/grid/doc/viewports.R
@@ -0,0 +1,288 @@
+### R code from vignette source 'viewports.Rnw'
+
+###################################################
+### code chunk number 1: viewports.Rnw:21-26
+###################################################
+library(grDevices)
+library(stats) # for runif()
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+
+
+###################################################
+### code chunk number 2: viewports.Rnw:45-48
+###################################################
+pushViewport(viewport())
+upViewport()
+pushViewport(viewport())
+
+
+###################################################
+### code chunk number 3: viewports.Rnw:63-65
+###################################################
+grid.newpage()
+
+
+
+###################################################
+### code chunk number 4: viewports.Rnw:66-71
+###################################################
+pushViewport(viewport(name = "A"))
+upViewport()
+pushViewport(viewport(name = "B"))
+upViewport()
+downViewport("A")
+
+
+###################################################
+### code chunk number 5: viewports.Rnw:80-81
+###################################################
+seekViewport("B")
+
+
+###################################################
+### code chunk number 6: viewports.Rnw:86-88
+###################################################
+current.vpTree()
+
+
+
+###################################################
+### code chunk number 7: vpstackguts
+###################################################
+vp <- viewport(width = 0.5, height = 0.5)
+grid.rect(vp = vpStack(vp, vp))
+
+
+###################################################
+### code chunk number 8: viewports.Rnw:109-111
+###################################################
+grid.rect(gp = gpar(col = "grey"))
+vp <- viewport(width = 0.5, height = 0.5)
+grid.rect(vp = vpStack(vp, vp))
+
+
+###################################################
+### code chunk number 9: viewports.Rnw:135-137
+###################################################
+grid.newpage()
+
+
+
+###################################################
+### code chunk number 10: viewports.Rnw:138-141
+###################################################
+pushViewport(viewport(name = "A"))
+pushViewport(viewport(name = "B"))
+pushViewport(viewport(name = "A"))
+
+
+###################################################
+### code chunk number 11: viewports.Rnw:147-149
+###################################################
+seekViewport("A")
+current.vpTree(FALSE)
+
+
+###################################################
+### code chunk number 12: viewports.Rnw:154-156
+###################################################
+seekViewport(vpPath("B", "A"))
+current.vpTree(FALSE)
+
+
+###################################################
+### code chunk number 13: viewports.Rnw:161-162
+###################################################
+vpPath("A", "B")
+
+
+###################################################
+### code chunk number 14: viewports.Rnw:169-171 (eval = FALSE)
+###################################################
+## seekViewport(vpPath("A", "B"))
+## seekViewport("A::B")
+
+
+###################################################
+### code chunk number 15: viewports.Rnw:180-182
+###################################################
+x <- runif(10)
+y <- runif(10)
+
+
+###################################################
+### code chunk number 16: viewports.Rnw:187-189
+###################################################
+xscale <- extendrange(x)
+yscale <- extendrange(y)
+
+
+###################################################
+### code chunk number 17: viewports.Rnw:198-203
+###################################################
+top.vp <-
+    viewport(layout=grid.layout(3, 3,
+             widths=unit(c(5, 1, 2), c("lines", "null", "lines")),
+             heights=unit(c(5, 1, 4), c("lines", "null", "lines"))))
+
+
+
+###################################################
+### code chunk number 18: viewports.Rnw:204-205
+###################################################
+grid.show.layout(viewport.layout(top.vp))
+
+
+###################################################
+### code chunk number 19: viewports.Rnw:212-222
+###################################################
+margin1 <- viewport(layout.pos.col = 2, layout.pos.row = 3,
+                    name = "margin1")
+margin2 <- viewport(layout.pos.col = 1, layout.pos.row = 2,
+                    name = "margin2")
+margin3 <- viewport(layout.pos.col = 2, layout.pos.row = 1,
+                    name = "margin3")
+margin4 <- viewport(layout.pos.col = 3, layout.pos.row = 2,
+                    name = "margin4")
+plot <- viewport(layout.pos.col = 2, layout.pos.row = 2,
+                 name = "plot", xscale = xscale, yscale = yscale)
+
+
+###################################################
+### code chunk number 20: viewports.Rnw:229-230
+###################################################
+splot <- vpTree(top.vp, vpList(margin1, margin2, margin3, margin4, plot))
+
+
+###################################################
+### code chunk number 21: viewports
+###################################################
+pushViewport(splot)
+
+
+###################################################
+### code chunk number 22: grid (eval = FALSE)
+###################################################
+## labelvp <- function(name) {
+##     seekViewport(name)
+##     grid.rect(gp = gpar(col = "grey", lwd = 5))
+##     grid.rect(x = 0, y = 1, width = unit(1, "strwidth", name) + unit(2, "mm"),
+##               height = unit(1, "lines"), just = c("left", "top"),
+##               gp = gpar(fill = "grey", col = NULL))
+##     grid.text(name, x = unit(1, "mm"), y = unit(1, "npc") - unit(1, "mm"),
+##               just = c("left", "top"), gp = gpar(col = "white"))
+## }
+## labelvp("plot")
+## labelvp("margin1")
+## labelvp("margin2")
+## labelvp("margin3")
+## labelvp("margin4")
+
+
+###################################################
+### code chunk number 23: plot (eval = FALSE)
+###################################################
+## seekViewport("plot")
+## grid.points(x, y)
+## grid.xaxis()
+## grid.yaxis()
+## grid.rect()
+
+
+###################################################
+### code chunk number 24: margin1 (eval = FALSE)
+###################################################
+## seekViewport("margin1")
+## grid.text("Random X", y = unit(1, "lines"))
+
+
+###################################################
+### code chunk number 25: margin2 (eval = FALSE)
+###################################################
+## seekViewport("margin2")
+## grid.text("Random Y", x = unit(1, "lines"), rot = 90)
+## 
+
+
+###################################################
+### code chunk number 26: viewports.Rnw:282-288
+###################################################
+pushViewport(viewport(w = 0.9, h = 0.9))
+pushViewport(splot)
+labelvp <- function(name) {
+    seekViewport(name)
+    grid.rect(gp = gpar(col = "grey", lwd = 5))
+    grid.rect(x = 0, y = 1, width = unit(1, "strwidth", name) + unit(2, "mm"),
+              height = unit(1, "lines"), just = c("left", "top"),
+              gp = gpar(fill = "grey", col = NULL))
+    grid.text(name, x = unit(1, "mm"), y = unit(1, "npc") - unit(1, "mm"),
+              just = c("left", "top"), gp = gpar(col = "white"))
+}
+labelvp("plot")
+labelvp("margin1")
+labelvp("margin2")
+labelvp("margin3")
+labelvp("margin4")
+seekViewport("plot")
+grid.points(x, y)
+grid.xaxis()
+grid.yaxis()
+grid.rect()
+seekViewport("margin1")
+grid.text("Random X", y = unit(1, "lines"))
+seekViewport("margin2")
+grid.text("Random Y", x = unit(1, "lines"), rot = 90)
+
+
+
+###################################################
+### code chunk number 27: viewports.Rnw:302-303
+###################################################
+upViewport(0)
+
+
+###################################################
+### code chunk number 28: annguts (eval = FALSE)
+###################################################
+## seekViewport("margin3")
+## grid.text("The user adds a title!", gp = gpar(fontsize = 20))
+## 
+
+
+###################################################
+### code chunk number 29: viewports.Rnw:320-328
+###################################################
+pushViewport(viewport(w = 0.9, h = 0.9))
+pushViewport(splot)
+labelvp <- function(name) {
+    seekViewport(name)
+    grid.rect(gp = gpar(col = "grey", lwd = 5))
+    grid.rect(x = 0, y = 1, width = unit(1, "strwidth", name) + unit(2, "mm"),
+              height = unit(1, "lines"), just = c("left", "top"),
+              gp = gpar(fill = "grey", col = NULL))
+    grid.text(name, x = unit(1, "mm"), y = unit(1, "npc") - unit(1, "mm"),
+              just = c("left", "top"), gp = gpar(col = "white"))
+}
+labelvp("plot")
+labelvp("margin1")
+labelvp("margin2")
+labelvp("margin3")
+labelvp("margin4")
+seekViewport("plot")
+grid.points(x, y)
+grid.xaxis()
+grid.yaxis()
+grid.rect()
+seekViewport("margin1")
+grid.text("Random X", y = unit(1, "lines"))
+seekViewport("margin2")
+grid.text("Random Y", x = unit(1, "lines"), rot = 90)
+
+seekViewport("margin3")
+grid.text("The user adds a title!", gp = gpar(fontsize = 20))
+
+popViewport(0)
+
+
diff --git a/win32/deps/library/grid/doc/viewports.Rnw b/win32/deps/library/grid/doc/viewports.Rnw
new file mode 100644
index 0000000..c693448
--- /dev/null
+++ b/win32/deps/library/grid/doc/viewports.Rnw
@@ -0,0 +1,332 @@
+\documentclass[a4paper]{article}
+
+\usepackage{Rd}
+
+% \VignetteIndexEntry{Working with viewports}
+
+\newcommand{\grid}{\pkg{grid}}
+\newcommand{\lattice}{\CRANpkg{lattice}}
+
+\setlength{\parindent}{0in}
+\setlength{\parskip}{.1in}
+\setlength{\textwidth}{140mm}
+\setlength{\oddsidemargin}{10mm}
+
+\title{Working with \grid{} Viewports}
+\author{Paul Murrell}
+
+\begin{document}
+\maketitle
+
+<<echo=FALSE, results=hide>>=
+library(grDevices)
+library(stats) # for runif()
+library(grid)
+ps.options(pointsize = 12)
+options(width = 60)
+@
+This document describes some features of \grid{} viewports which
+make it easy to travel back and forth between multiple regions
+on a device (without having to recreate those regions), and provides a
+mechanism for a complex plotting function to provide users with access
+to all of the regions created during plotting.
+
+\section*{The viewport tree}
+
+\grid{} maintains a
+tree of pushed viewports on each device.
+When the \code{upViewport()}
+function is called it works like \code{popViewport()} except that
+it does not remove viewports from the viewport tree.
+For example, the following code pushes a viewport, then navigates
+back up to the top level viewport and pushes another viewport,
+without removing the first viewport.
+
+<<>>=
+pushViewport(viewport())
+upViewport()
+pushViewport(viewport())
+@
+There are now two viewports pushed directly beneath the top-level
+viewport.  This immediately creates an ambiguity;  if I navigate
+back up to the top-level and attempt to revisit one of the
+viewports, how can I specify which one I want?  The answer is that
+viewports have a \code{name} argument\footnote{The print method
+for viewports shows the viewport name within square brackets.  Try
+typing \code{current.viewport()}.}.  This name, combined with
+the \code{downViewport()} function, makes it possible to
+navigate back down to viewports in the viewport tree.  Consider the
+following example, which pushes two viewports called \code{"A"} and
+\code{"B"}, then navigates to viewport \code{"A"} from the
+top level.
+
+<<echo=FALSE, results=hide>>=
+grid.newpage()
+
+<<>>=
+pushViewport(viewport(name = "A"))
+upViewport()
+pushViewport(viewport(name = "B"))
+upViewport()
+downViewport("A")
+@
+The \code{downViewport()} function searches down the tree from the
+current position in the tree.  The \code{seekViewport()}
+function is similar, but it always starts searching from the top-level
+viewport.  In the previous example we ended up in viewport
+\code{"A"};  the following command navigates from \code{"A"} to \code{"B"}
+in a single step.
+
+<<>>=
+seekViewport("B")
+@
+The function \code{current.vpTree()} provides a
+(textual) view of the current viewport tree.
+
+<<>>=
+current.vpTree()
+
+@
+\section*{Viewport stacks, lists, and trees}
+
+It is possible to create multiple viewport descriptions
+\emph{and their relationships}.  The functions
+\code{vpStack()}, \code{vpList()}, and
+\code{vpTree()} can be used to create a stack, a list, or a tree
+of viewport descriptions, respectively.  It is then possible to
+push these multiple descriptions at once;  viewports in a stack
+are pushed in series, viewports in  a list are pushed in parallel,
+and for a tree of viewports, the parent is pushed then the children
+are pushed in parallel.  The following simple
+example demonstrates one usage of this feature;  a \grid{} rectangle
+is drawn \emph{two} viewports below the current level by
+specifying a stack of viewports in its \code{vp} argument.
+
+
+<<vpstackguts>>=
+vp <- viewport(width = 0.5, height = 0.5)
+grid.rect(vp = vpStack(vp, vp))
+<<echo=FALSE, fig=TRUE>>=
+grid.rect(gp = gpar(col = "grey"))
+<<vpstackguts>>
+@
+\section*{Viewport paths}
+The previous example demonstrates a subtle feature of \grid{}'s viewport
+tree.  The same viewport, \emph{with the same name}, was pushed
+twice (in series).  This demonstrates that viewport names only
+have to be unique for viewports which share the same parent.
+This makes it possible, especially in repetitive plot arrangements,
+to reuse convenient viewport names.  For example, in a \lattice{}
+style plot, each panel could have a viewport called \code{"strip"}
+to represent the strip region.
+
+This design creates a further ambiguity because there may be
+more than one viewport with the same name within the viewport
+tree\footnote{\code{downViewport()} and \code{seekViewport()} will stop at the
+first match they find (the search is currently depth-first).}.
+This ambiguity can be resolved by using the \code{vpPath()}
+function to generate a specification of a stack of viewports
+that must be matched by name.  This path can be passed to
+either \code{downViewport()} or \code{seekViewport()} as in the
+following example;  notice that we are calling
+\code{current.vpTree(FALSE)} in order to see the current viewport
+tree \emph{only from the current viewport down}.
+
+<<echo=FALSE, results=hide>>=
+grid.newpage()
+
+<<>>=
+pushViewport(viewport(name = "A"))
+pushViewport(viewport(name = "B"))
+pushViewport(viewport(name = "A"))
+@
+
+When we do a seek on just \code{"A"}, we find the first \code{"A"}
+(just below the top-level viewport).
+
+<<>>=
+seekViewport("A")
+current.vpTree(FALSE)
+@
+By specifying a \code{vpPath}, we can get the \code{"A"} directly
+below viewport \code{"B"}.
+
+<<>>=
+seekViewport(vpPath("B", "A"))
+current.vpTree(FALSE)
+@
+A viewport path is conceptually just a concatenation of several
+names using a path separator (currently \code{::}).
+
+<<>>=
+vpPath("A", "B")
+@
+For interactive use, it is possible to specify the path as a simple
+string, but this is not recommended otherwise in case the path
+separator changes in future versions of \grid{}.  As an example, the
+following two commands are currently equivalent.
+
+<<eval=FALSE>>=
+seekViewport(vpPath("A", "B"))
+seekViewport("A::B")
+@
+\section*{An example}
+
+In this section, we consider a simple example to demonstrate
+how these new viewport features might be used together.
+The goal is to produce a simple scatterplot.  We will work
+with some random data.
+
+<<>>=
+x <- runif(10)
+y <- runif(10)
+@
+We will be establishing some scales appropriate for these data,
+so we calculate sensible ranges now.
+
+<<>>=
+xscale <- extendrange(x)
+yscale <- extendrange(y)
+@
+We now produce a set of viewports that will be useful in creating the
+plot.  The first viewport contains a layout to divide the drawing region
+into several rows and columns.  The left and right columns and top and
+bottom rows provide room for axes and labels, while the central cell provides
+a region for plotting the data.  The diagram below the code shows
+the layout that we create.
+
+<<>>=
+top.vp <-
+    viewport(layout=grid.layout(3, 3,
+             widths=unit(c(5, 1, 2), c("lines", "null", "lines")),
+             heights=unit(c(5, 1, 4), c("lines", "null", "lines"))))
+
+<<echo=FALSE, fig=TRUE>>=
+grid.show.layout(viewport.layout(top.vp))
+@
+
+Next we create a set of viewports which will occupy different areas within the
+layout, corresponding to the margins for axes and labels, and the plotting
+region.
+
+<<>>=
+margin1 <- viewport(layout.pos.col = 2, layout.pos.row = 3,
+                    name = "margin1")
+margin2 <- viewport(layout.pos.col = 1, layout.pos.row = 2,
+                    name = "margin2")
+margin3 <- viewport(layout.pos.col = 2, layout.pos.row = 1,
+                    name = "margin3")
+margin4 <- viewport(layout.pos.col = 3, layout.pos.row = 2,
+                    name = "margin4")
+plot <- viewport(layout.pos.col = 2, layout.pos.row = 2,
+                 name = "plot", xscale = xscale, yscale = yscale)
+@
+Notice that we have not pushed any of these viewports yet so no regions
+exist on the output device.  We first of all arrange the viewports into
+a tree structure, with  the \code{top.vp} as the parent node and
+all of the other viewports as its children.
+
+<<>>=
+splot <- vpTree(top.vp, vpList(margin1, margin2, margin3, margin4, plot))
+@
+Now we can push this entire tree of viewports in order to create all of the
+different areas within the drawing region that we need to draw the
+scatterplot.
+The result of this push is that we are left in the \code{plot} viewport.
+
+<<viewports>>=
+pushViewport(splot)
+@
+Now we can navigate to whichever viewport we require and draw the
+different elements of the plot\footnote{The named viewports that we created
+are drawn as grey rectangles as a guide.}.
+
+<<grid, echo=FALSE, eval=FALSE>>=
+labelvp <- function(name) {
+    seekViewport(name)
+    grid.rect(gp = gpar(col = "grey", lwd = 5))
+    grid.rect(x = 0, y = 1, width = unit(1, "strwidth", name) + unit(2, "mm"),
+              height = unit(1, "lines"), just = c("left", "top"),
+              gp = gpar(fill = "grey", col = NULL))
+    grid.text(name, x = unit(1, "mm"), y = unit(1, "npc") - unit(1, "mm"),
+              just = c("left", "top"), gp = gpar(col = "white"))
+}
+labelvp("plot")
+labelvp("margin1")
+labelvp("margin2")
+labelvp("margin3")
+labelvp("margin4")
+@
+The data symbols and axes are drawn relative to the plot region \ldots{}
+
+<<plot, eval=FALSE>>=
+seekViewport("plot")
+grid.points(x, y)
+grid.xaxis()
+grid.yaxis()
+grid.rect()
+@
+\ldots{} the x-axis label is drawn in margin 1 \ldots{}
+
+<<margin1, eval=FALSE>>=
+seekViewport("margin1")
+grid.text("Random X", y = unit(1, "lines"))
+@
+\ldots{} and the y-axis label is drawn in margin 2 (the final output
+is shown on the next page).
+
+<<margin2, eval=FALSE>>=
+seekViewport("margin2")
+grid.text("Random Y", x = unit(1, "lines"), rot = 90)
+
+<<echo=FALSE, results=hide, fig=TRUE>>=
+pushViewport(viewport(w = 0.9, h = 0.9))
+<<viewports>>
+<<grid>>
+<<plot>>
+<<margin1>>
+<<margin2>>
+@
+
+As a final step, we navigate back to the top-level viewport (i.e.,
+back to the viewport we started in)\footnote{Here we have used
+  \code{0} to indicate ``navigate to the top-level viewport''.  When
+  writing code that could be used by others (i.e., a graphical
+  component that could be embedded within something else), it would be
+  necessary to specify a precise number of viewports to navigate back
+  up.  In this case, the number would be {\tt} 2.  The
+  \code{downViewport()} function returns the number of viewports it
+  went down, so a general solution is of the form: \code{depth <-
+    downViewport("avp"); upViewport(depth)}.}.
+
+<<>>=
+upViewport(0)
+@
+So far this example has just shown
+an alternative way of constructing this sort of plot.  The output we have
+generated so far could have been done using \code{pushViewport()}
+and \code{popViewport()}.  The difference is that we still have
+all of the viewports in the \grid{} viewport tree (and they are addressable
+by name).  This means that a user can seek any of the viewports
+we used to construct the plot (by name) and add annotations or
+use \code{grid.locator()} or whatever.  For example, a user could
+use the following commands
+to add a title.
+
+<<annguts, eval=FALSE>>=
+seekViewport("margin3")
+grid.text("The user adds a title!", gp = gpar(fontsize = 20))
+
+<<echo=FALSE, results=hide, fig=TRUE>>=
+pushViewport(viewport(w = 0.9, h = 0.9))
+<<viewports>>
+<<grid>>
+<<plot>>
+<<margin1>>
+<<margin2>>
+<<annguts>>
+popViewport(0)
+@
+
+\end{document}
+
diff --git a/win32/deps/library/grid/doc/viewports.pdf b/win32/deps/library/grid/doc/viewports.pdf
new file mode 100644
index 0000000..9d94768
Binary files /dev/null and b/win32/deps/library/grid/doc/viewports.pdf differ
diff --git a/win32/deps/library/grid/help/AnIndex b/win32/deps/library/grid/help/AnIndex
index b0d9b5d..d8cbcde 100644
--- a/win32/deps/library/grid/help/AnIndex
+++ b/win32/deps/library/grid/help/AnIndex
@@ -6,6 +6,10 @@ applyEdits	gEdit
 arcCurvature	grid.curve
 arrow	arrow
 arrowsGrob	grid.arrows
+ascentDetails	widthDetails
+bezierGrob	grid.bezier
+bezierPoints	xsplinePoints
+calcStringMetric	calcStringMetric
 childNames	grid.grob
 circleGrob	grid.circle
 clipGrob	grid.clip
@@ -21,6 +25,7 @@ current.vpPath	current.viewport
 current.vpTree	current.viewport
 curveGrob	grid.curve
 dataViewport	dataViewport
+descentDetails	widthDetails
 downViewport	viewports
 draw.details	drawDetails
 drawDetails	drawDetails
@@ -28,6 +33,7 @@ editDetails	editDetails
 editGrob	grid.edit
 engine.display.list	grid.display.list
 frameGrob	grid.frame
+functionGrob	grid.function
 gEdit	gEdit
 gEditList	gEdit
 get.gpar	gpar
@@ -37,8 +43,11 @@ gList	grid.grob
 gpar	gpar
 gPath	gPath
 Grid	Grid
+grid.abline	grid.function
 grid.add	grid.add
 grid.arrows	grid.arrows
+grid.bezier	grid.bezier
+grid.cap	grid.cap
 grid.circle	grid.circle
 grid.clip	grid.clip
 grid.collection	grid.collection
@@ -50,9 +59,11 @@ grid.convertY	grid.convert
 grid.copy	grid.copy
 grid.curve	grid.curve
 grid.display.list	grid.display.list
+grid.DLapply	grid.DLapply
 grid.draw	grid.draw
 grid.edit	grid.edit
 grid.frame	grid.frame
+grid.function	grid.function
 grid.gedit	grid.edit
 grid.get	grid.get
 grid.gget	grid.get
@@ -73,6 +84,7 @@ grid.newpage	grid.newpage
 grid.null	grid.null
 grid.pack	grid.pack
 grid.panel	grid-internal
+grid.path	grid.path
 grid.place	grid.place
 grid.plot.and.legend	grid.plot.and.legend
 grid.points	grid.points
@@ -80,6 +92,7 @@ grid.polygon	grid.polygon
 grid.polyline	grid.lines
 grid.pretty	grid.pretty
 grid.prompt	grid.prompt
+grid.raster	grid.raster
 grid.record	grid.record
 grid.rect	grid.rect
 grid.refresh	grid.refresh
@@ -95,6 +108,8 @@ grid.xaxis	grid.xaxis
 grid.xspline	grid.xspline
 grid.yaxis	grid.yaxis
 grob	grid.grob
+grobAscent	grobWidth
+grobDescent	grobWidth
 grobHeight	grobWidth
 grobName	grobName
 grobPathListing	grid.ls
@@ -116,6 +131,7 @@ moveToGrob	grid.move.to
 nestedListing	grid.ls
 nullGrob	grid.null
 packGrob	grid.pack
+pathGrob	grid.path
 pathListing	grid.ls
 placeGrob	grid.place
 plotViewport	plotViewport
@@ -128,6 +144,7 @@ postDrawDetails	drawDetails
 preDrawDetails	drawDetails
 push.viewport	push.viewport
 pushViewport	viewports
+rasterGrob	grid.raster
 recordGrob	grid.record
 rectGrob	grid.rect
 removeGrob	grid.remove
@@ -137,6 +154,10 @@ seekViewport	viewports
 segmentsGrob	grid.segments
 setChildren	grid.add
 setGrob	grid.set
+showGrob	showGrob
+showViewport	showViewport
+stringAscent	stringWidth
+stringDescent	stringWidth
 stringHeight	stringWidth
 stringWidth	stringWidth
 textGrob	grid.text
@@ -160,5 +181,6 @@ widthDetails	widthDetails
 xaxisGrob	grid.xaxis
 xDetails	xDetails
 xsplineGrob	grid.xspline
+xsplinePoints	xsplinePoints
 yaxisGrob	grid.yaxis
 yDetails	xDetails
diff --git a/win32/deps/library/grid/help/aliases.rds b/win32/deps/library/grid/help/aliases.rds
new file mode 100644
index 0000000..a746848
Binary files /dev/null and b/win32/deps/library/grid/help/aliases.rds differ
diff --git a/win32/deps/library/grid/help/grid.rdb b/win32/deps/library/grid/help/grid.rdb
new file mode 100644
index 0000000..5280b1b
Binary files /dev/null and b/win32/deps/library/grid/help/grid.rdb differ
diff --git a/win32/deps/library/grid/help/grid.rdx b/win32/deps/library/grid/help/grid.rdx
new file mode 100644
index 0000000..d1cbd00
Binary files /dev/null and b/win32/deps/library/grid/help/grid.rdx differ
diff --git a/win32/deps/library/grid/help/paths.rds b/win32/deps/library/grid/help/paths.rds
new file mode 100644
index 0000000..f49c6c0
Binary files /dev/null and b/win32/deps/library/grid/help/paths.rds differ
diff --git a/win32/deps/library/grid/html/00Index.html b/win32/deps/library/grid/html/00Index.html
new file mode 100644
index 0000000..6f9b7a0
--- /dev/null
+++ b/win32/deps/library/grid/html/00Index.html
@@ -0,0 +1,504 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: The Grid Graphics Package</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> The Grid Graphics Package
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;grid&rsquo; version 2.15.2</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../doc/index.html">Overview of user guides and package vignettes</a>; browse <a href="../doc">directory</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p 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="#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="#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="#X">X</a>
+<a href="#Y">Y</a>
+</p>
+
+<table width="100%">
+<tr><td width="25%"><a href="grid-package.html">grid-package</a></td>
+<td>The Grid Graphics Package</td></tr>
+</table>
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="absolute.size.html">absolute.size</a></td>
+<td>Absolute Size of a Grob</td></tr>
+<tr><td width="25%"><a href="grid.add.html">addGrob</a></td>
+<td>Add a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="gEdit.html">applyEdit</a></td>
+<td>Create and Apply Edit Objects</td></tr>
+<tr><td width="25%"><a href="gEdit.html">applyEdits</a></td>
+<td>Create and Apply Edit Objects</td></tr>
+<tr><td width="25%"><a href="grid.curve.html">arcCurvature</a></td>
+<td>Draw a Curve Between Locations</td></tr>
+<tr><td width="25%"><a href="arrow.html">arrow</a></td>
+<td>Describe arrows to add to a line.</td></tr>
+<tr><td width="25%"><a href="grid.arrows.html">arrowsGrob</a></td>
+<td>Draw Arrows</td></tr>
+<tr><td width="25%"><a href="widthDetails.html">ascentDetails</a></td>
+<td>Width and Height of a grid grob</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="grid.bezier.html">bezierGrob</a></td>
+<td>Draw a Bezier Curve</td></tr>
+<tr><td width="25%"><a href="xsplinePoints.html">bezierPoints</a></td>
+<td>Return the points that would be used to draw an Xspline (or a Bezier curve).</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="calcStringMetric.html">calcStringMetric</a></td>
+<td>Calculate Metric Information for Text</td></tr>
+<tr><td width="25%"><a href="grid.grob.html">childNames</a></td>
+<td>Create a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.circle.html">circleGrob</a></td>
+<td>Draw a Circle</td></tr>
+<tr><td width="25%"><a href="grid.clip.html">clipGrob</a></td>
+<td>Set the Clipping Region</td></tr>
+<tr><td width="25%"><a href="grid.convert.html">convertHeight</a></td>
+<td>Convert Between Different grid Coordinate Systems</td></tr>
+<tr><td width="25%"><a href="convertNative.html">convertNative</a></td>
+<td>Convert a Unit Object to Native units</td></tr>
+<tr><td width="25%"><a href="grid.convert.html">convertUnit</a></td>
+<td>Convert Between Different grid Coordinate Systems</td></tr>
+<tr><td width="25%"><a href="grid.convert.html">convertWidth</a></td>
+<td>Convert Between Different grid Coordinate Systems</td></tr>
+<tr><td width="25%"><a href="grid.convert.html">convertX</a></td>
+<td>Convert Between Different grid Coordinate Systems</td></tr>
+<tr><td width="25%"><a href="grid.convert.html">convertY</a></td>
+<td>Convert Between Different grid Coordinate Systems</td></tr>
+<tr><td width="25%"><a href="current.viewport.html">current.transform</a></td>
+<td>Get the Current Grid Viewport (Tree)</td></tr>
+<tr><td width="25%"><a href="current.viewport.html">current.viewport</a></td>
+<td>Get the Current Grid Viewport (Tree)</td></tr>
+<tr><td width="25%"><a href="current.viewport.html">current.vpPath</a></td>
+<td>Get the Current Grid Viewport (Tree)</td></tr>
+<tr><td width="25%"><a href="current.viewport.html">current.vpTree</a></td>
+<td>Get the Current Grid Viewport (Tree)</td></tr>
+<tr><td width="25%"><a href="grid.curve.html">curveGrob</a></td>
+<td>Draw a Curve Between Locations</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="dataViewport.html">dataViewport</a></td>
+<td>Create a Viewport with Scales based on Data</td></tr>
+<tr><td width="25%"><a href="widthDetails.html">descentDetails</a></td>
+<td>Width and Height of a grid grob</td></tr>
+<tr><td width="25%"><a href="viewports.html">downViewport</a></td>
+<td>Maintaining and Navigating the Grid Viewport Tree</td></tr>
+<tr><td width="25%"><a href="drawDetails.html">draw.details</a></td>
+<td>Customising grid Drawing</td></tr>
+<tr><td width="25%"><a href="drawDetails.html">drawDetails</a></td>
+<td>Customising grid Drawing</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="editDetails.html">editDetails</a></td>
+<td>Customising grid Editing</td></tr>
+<tr><td width="25%"><a href="grid.edit.html">editGrob</a></td>
+<td>Edit the Description of a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.display.list.html">engine.display.list</a></td>
+<td>Control the Grid Display List</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="grid.frame.html">frameGrob</a></td>
+<td>Create a Frame for Packing Objects</td></tr>
+<tr><td width="25%"><a href="grid.function.html">functionGrob</a></td>
+<td>Draw a curve representing a function</td></tr>
+</table>
+
+<h2><a name="G">-- G --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="gEdit.html">gEdit</a></td>
+<td>Create and Apply Edit Objects</td></tr>
+<tr><td width="25%"><a href="gEdit.html">gEditList</a></td>
+<td>Create and Apply Edit Objects</td></tr>
+<tr><td width="25%"><a href="gpar.html">get.gpar</a></td>
+<td>Handling Grid Graphical Parameters</td></tr>
+<tr><td width="25%"><a href="grid.get.html">getGrob</a></td>
+<td>Get a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="getNames.html">getNames</a></td>
+<td>List the names of grobs on the display list</td></tr>
+<tr><td width="25%"><a href="grid.grob.html">gList</a></td>
+<td>Create a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="gpar.html">gpar</a></td>
+<td>Handling Grid Graphical Parameters</td></tr>
+<tr><td width="25%"><a href="gPath.html">gPath</a></td>
+<td>Concatenate Grob Names</td></tr>
+<tr><td width="25%"><a href="Grid.html">Grid</a></td>
+<td>Grid Graphics</td></tr>
+<tr><td width="25%"><a href="grid.function.html">grid.abline</a></td>
+<td>Draw a curve representing a function</td></tr>
+<tr><td width="25%"><a href="grid.add.html">grid.add</a></td>
+<td>Add a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.arrows.html">grid.arrows</a></td>
+<td>Draw Arrows</td></tr>
+<tr><td width="25%"><a href="grid.bezier.html">grid.bezier</a></td>
+<td>Draw a Bezier Curve</td></tr>
+<tr><td width="25%"><a href="grid.cap.html">grid.cap</a></td>
+<td>Capture a raster image</td></tr>
+<tr><td width="25%"><a href="grid.circle.html">grid.circle</a></td>
+<td>Draw a Circle</td></tr>
+<tr><td width="25%"><a href="grid.clip.html">grid.clip</a></td>
+<td>Set the Clipping Region</td></tr>
+<tr><td width="25%"><a href="grid.collection.html">grid.collection</a></td>
+<td>Create a Coherent Group of Grid Graphical Objects</td></tr>
+<tr><td width="25%"><a href="grid.convert.html">grid.convert</a></td>
+<td>Convert Between Different grid Coordinate Systems</td></tr>
+<tr><td width="25%"><a href="grid.convert.html">grid.convertHeight</a></td>
+<td>Convert Between Different grid Coordinate Systems</td></tr>
+<tr><td width="25%"><a href="grid.convert.html">grid.convertWidth</a></td>
+<td>Convert Between Different grid Coordinate Systems</td></tr>
+<tr><td width="25%"><a href="grid.convert.html">grid.convertX</a></td>
+<td>Convert Between Different grid Coordinate Systems</td></tr>
+<tr><td width="25%"><a href="grid.convert.html">grid.convertY</a></td>
+<td>Convert Between Different grid Coordinate Systems</td></tr>
+<tr><td width="25%"><a href="grid.copy.html">grid.copy</a></td>
+<td>Make a Copy of a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.curve.html">grid.curve</a></td>
+<td>Draw a Curve Between Locations</td></tr>
+<tr><td width="25%"><a href="grid.display.list.html">grid.display.list</a></td>
+<td>Control the Grid Display List</td></tr>
+<tr><td width="25%"><a href="grid.DLapply.html">grid.DLapply</a></td>
+<td>Modify the Grid Display List</td></tr>
+<tr><td width="25%"><a href="grid.draw.html">grid.draw</a></td>
+<td>Draw a grid grob</td></tr>
+<tr><td width="25%"><a href="grid.edit.html">grid.edit</a></td>
+<td>Edit the Description of a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.frame.html">grid.frame</a></td>
+<td>Create a Frame for Packing Objects</td></tr>
+<tr><td width="25%"><a href="grid.function.html">grid.function</a></td>
+<td>Draw a curve representing a function</td></tr>
+<tr><td width="25%"><a href="grid.edit.html">grid.gedit</a></td>
+<td>Edit the Description of a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.get.html">grid.get</a></td>
+<td>Get a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.get.html">grid.gget</a></td>
+<td>Get a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.grab.html">grid.grab</a></td>
+<td>Grab the current grid output</td></tr>
+<tr><td width="25%"><a href="grid.grab.html">grid.grabExpr</a></td>
+<td>Grab the current grid output</td></tr>
+<tr><td width="25%"><a href="grid.remove.html">grid.gremove</a></td>
+<td>Remove a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.grill.html">grid.grill</a></td>
+<td>Draw a Grill</td></tr>
+<tr><td width="25%"><a href="grid.grob.html">grid.grob</a></td>
+<td>Create a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.layout.html">grid.layout</a></td>
+<td>Create a Grid Layout</td></tr>
+<tr><td width="25%"><a href="grid.move.to.html">grid.line.to</a></td>
+<td>Move or Draw to a Specified Position</td></tr>
+<tr><td width="25%"><a href="grid.lines.html">grid.lines</a></td>
+<td>Draw Lines in a Grid Viewport</td></tr>
+<tr><td width="25%"><a href="grid.locator.html">grid.locator</a></td>
+<td>Capture a Mouse Click</td></tr>
+<tr><td width="25%"><a href="grid.ls.html">grid.ls</a></td>
+<td>List the names of grobs or viewports</td></tr>
+<tr><td width="25%"><a href="grid.move.to.html">grid.move.to</a></td>
+<td>Move or Draw to a Specified Position</td></tr>
+<tr><td width="25%"><a href="grid.newpage.html">grid.newpage</a></td>
+<td>Move to a New Page on a Grid Device</td></tr>
+<tr><td width="25%"><a href="grid.null.html">grid.null</a></td>
+<td>Null Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.pack.html">grid.pack</a></td>
+<td>Pack an Object within a Frame</td></tr>
+<tr><td width="25%"><a href="grid.path.html">grid.path</a></td>
+<td>Draw a Path</td></tr>
+<tr><td width="25%"><a href="grid.place.html">grid.place</a></td>
+<td>Place an Object within a Frame</td></tr>
+<tr><td width="25%"><a href="grid.plot.and.legend.html">grid.plot.and.legend</a></td>
+<td>A Simple Plot and Legend Demo</td></tr>
+<tr><td width="25%"><a href="grid.points.html">grid.points</a></td>
+<td>Draw Data Symbols</td></tr>
+<tr><td width="25%"><a href="grid.polygon.html">grid.polygon</a></td>
+<td>Draw a Polygon</td></tr>
+<tr><td width="25%"><a href="grid.lines.html">grid.polyline</a></td>
+<td>Draw Lines in a Grid Viewport</td></tr>
+<tr><td width="25%"><a href="grid.pretty.html">grid.pretty</a></td>
+<td>Generate a Sensible Set of Breakpoints</td></tr>
+<tr><td width="25%"><a href="grid.prompt.html">grid.prompt</a></td>
+<td>Prompt before New Page</td></tr>
+<tr><td width="25%"><a href="grid.raster.html">grid.raster</a></td>
+<td>Render a raster object</td></tr>
+<tr><td width="25%"><a href="grid.record.html">grid.record</a></td>
+<td>Encapsulate calculations and drawing</td></tr>
+<tr><td width="25%"><a href="grid.rect.html">grid.rect</a></td>
+<td>Draw rectangles</td></tr>
+<tr><td width="25%"><a href="grid.refresh.html">grid.refresh</a></td>
+<td>Refresh the current grid scene</td></tr>
+<tr><td width="25%"><a href="grid.remove.html">grid.remove</a></td>
+<td>Remove a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.roundrect.html">grid.roundrect</a></td>
+<td>Draw a rectangle with rounded corners</td></tr>
+<tr><td width="25%"><a href="grid.segments.html">grid.segments</a></td>
+<td>Draw Line Segments</td></tr>
+<tr><td width="25%"><a href="grid.set.html">grid.set</a></td>
+<td>Set a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.show.layout.html">grid.show.layout</a></td>
+<td>Draw a Diagram of a Grid Layout</td></tr>
+<tr><td width="25%"><a href="grid.show.viewport.html">grid.show.viewport</a></td>
+<td>Draw a Diagram of a Grid Viewport</td></tr>
+<tr><td width="25%"><a href="grid.text.html">grid.text</a></td>
+<td>Draw Text</td></tr>
+<tr><td width="25%"><a href="grid.xaxis.html">grid.xaxis</a></td>
+<td>Draw an X-Axis</td></tr>
+<tr><td width="25%"><a href="grid.xspline.html">grid.xspline</a></td>
+<td>Draw an Xspline</td></tr>
+<tr><td width="25%"><a href="grid.yaxis.html">grid.yaxis</a></td>
+<td>Draw a Y-Axis</td></tr>
+<tr><td width="25%"><a href="grid.grob.html">grob</a></td>
+<td>Create a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grobWidth.html">grobAscent</a></td>
+<td>Create a Unit Describing the Width of a Grob</td></tr>
+<tr><td width="25%"><a href="grobWidth.html">grobDescent</a></td>
+<td>Create a Unit Describing the Width of a Grob</td></tr>
+<tr><td width="25%"><a href="grobWidth.html">grobHeight</a></td>
+<td>Create a Unit Describing the Width of a Grob</td></tr>
+<tr><td width="25%"><a href="grobName.html">grobName</a></td>
+<td>Generate a Name for a Grob</td></tr>
+<tr><td width="25%"><a href="grid.ls.html">grobPathListing</a></td>
+<td>List the names of grobs or viewports</td></tr>
+<tr><td width="25%"><a href="grid.grob.html">grobTree</a></td>
+<td>Create a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grobWidth.html">grobWidth</a></td>
+<td>Create a Unit Describing the Width of a Grob</td></tr>
+<tr><td width="25%"><a href="grobX.html">grobX</a></td>
+<td>Create a Unit Describing a Grob Boundary Location</td></tr>
+<tr><td width="25%"><a href="grobX.html">grobY</a></td>
+<td>Create a Unit Describing a Grob Boundary Location</td></tr>
+<tr><td width="25%"><a href="grid.grob.html">gTree</a></td>
+<td>Create a Grid Graphical Object</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="widthDetails.html">heightDetails</a></td>
+<td>Width and Height of a grid grob</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="grid.grob.html">is.grob</a></td>
+<td>Create a Grid Graphical Object</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="grid.lines.html">linesGrob</a></td>
+<td>Draw Lines in a Grid Viewport</td></tr>
+<tr><td width="25%"><a href="grid.move.to.html">lineToGrob</a></td>
+<td>Move or Draw to a Specified Position</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="grid.move.to.html">moveToGrob</a></td>
+<td>Move or Draw to a Specified Position</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="grid.ls.html">nestedListing</a></td>
+<td>List the names of grobs or viewports</td></tr>
+<tr><td width="25%"><a href="grid.null.html">nullGrob</a></td>
+<td>Null Graphical Object</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="grid.pack.html">packGrob</a></td>
+<td>Pack an Object within a Frame</td></tr>
+<tr><td width="25%"><a href="grid.path.html">pathGrob</a></td>
+<td>Draw a Path</td></tr>
+<tr><td width="25%"><a href="grid.ls.html">pathListing</a></td>
+<td>List the names of grobs or viewports</td></tr>
+<tr><td width="25%"><a href="grid.place.html">placeGrob</a></td>
+<td>Place an Object within a Frame</td></tr>
+<tr><td width="25%"><a href="plotViewport.html">plotViewport</a></td>
+<td>Create a Viewport with a Standard Plot Layout</td></tr>
+<tr><td width="25%"><a href="grid.points.html">pointsGrob</a></td>
+<td>Draw Data Symbols</td></tr>
+<tr><td width="25%"><a href="grid.polygon.html">polygonGrob</a></td>
+<td>Draw a Polygon</td></tr>
+<tr><td width="25%"><a href="grid.lines.html">polylineGrob</a></td>
+<td>Draw Lines in a Grid Viewport</td></tr>
+<tr><td width="25%"><a href="pop.viewport.html">pop.viewport</a></td>
+<td>Pop a Viewport off the Grid Viewport Stack</td></tr>
+<tr><td width="25%"><a href="viewports.html">popViewport</a></td>
+<td>Maintaining and Navigating the Grid Viewport Tree</td></tr>
+<tr><td width="25%"><a href="drawDetails.html">postDrawDetails</a></td>
+<td>Customising grid Drawing</td></tr>
+<tr><td width="25%"><a href="drawDetails.html">preDrawDetails</a></td>
+<td>Customising grid Drawing</td></tr>
+<tr><td width="25%"><a href="push.viewport.html">push.viewport</a></td>
+<td>Push a Viewport onto the Grid Viewport Stack</td></tr>
+<tr><td width="25%"><a href="viewports.html">pushViewport</a></td>
+<td>Maintaining and Navigating the Grid Viewport Tree</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="grid.raster.html">rasterGrob</a></td>
+<td>Render a raster object</td></tr>
+<tr><td width="25%"><a href="grid.record.html">recordGrob</a></td>
+<td>Encapsulate calculations and drawing</td></tr>
+<tr><td width="25%"><a href="grid.rect.html">rectGrob</a></td>
+<td>Draw rectangles</td></tr>
+<tr><td width="25%"><a href="grid.remove.html">removeGrob</a></td>
+<td>Remove a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.roundrect.html">roundrect</a></td>
+<td>Draw a rectangle with rounded corners</td></tr>
+<tr><td width="25%"><a href="grid.roundrect.html">roundrectGrob</a></td>
+<td>Draw a rectangle with rounded corners</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="viewports.html">seekViewport</a></td>
+<td>Maintaining and Navigating the Grid Viewport Tree</td></tr>
+<tr><td width="25%"><a href="grid.segments.html">segmentsGrob</a></td>
+<td>Draw Line Segments</td></tr>
+<tr><td width="25%"><a href="grid.add.html">setChildren</a></td>
+<td>Add a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="grid.set.html">setGrob</a></td>
+<td>Set a Grid Graphical Object</td></tr>
+<tr><td width="25%"><a href="showGrob.html">showGrob</a></td>
+<td>Label grid grobs.</td></tr>
+<tr><td width="25%"><a href="showViewport.html">showViewport</a></td>
+<td>Display grid viewports.</td></tr>
+<tr><td width="25%"><a href="stringWidth.html">stringAscent</a></td>
+<td>Create a Unit Describing the Width and Height of a String or Math Expression</td></tr>
+<tr><td width="25%"><a href="stringWidth.html">stringDescent</a></td>
+<td>Create a Unit Describing the Width and Height of a String or Math Expression</td></tr>
+<tr><td width="25%"><a href="stringWidth.html">stringHeight</a></td>
+<td>Create a Unit Describing the Width and Height of a String or Math Expression</td></tr>
+<tr><td width="25%"><a href="stringWidth.html">stringWidth</a></td>
+<td>Create a Unit Describing the Width and Height of a String or Math Expression</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="grid.text.html">textGrob</a></td>
+<td>Draw Text</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="unit.html">unit</a></td>
+<td>Function to Create a Unit Object</td></tr>
+<tr><td width="25%"><a href="unit.c.html">unit.c</a></td>
+<td>Combine Unit Objects</td></tr>
+<tr><td width="25%"><a href="unit.length.html">unit.length</a></td>
+<td>Length of a Unit Object</td></tr>
+<tr><td width="25%"><a href="unit.pmin.html">unit.pmax</a></td>
+<td>Parallel Unit Minima and Maxima</td></tr>
+<tr><td width="25%"><a href="unit.pmin.html">unit.pmin</a></td>
+<td>Parallel Unit Minima and Maxima</td></tr>
+<tr><td width="25%"><a href="unit.rep.html">unit.rep</a></td>
+<td>Replicate Elements of Unit Objects</td></tr>
+<tr><td width="25%"><a href="viewports.html">upViewport</a></td>
+<td>Maintaining and Navigating the Grid Viewport Tree</td></tr>
+</table>
+
+<h2><a name="V">-- V --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="valid.just.html">valid.just</a></td>
+<td>Validate a Justification</td></tr>
+<tr><td width="25%"><a href="validDetails.html">validDetails</a></td>
+<td>Customising grid grob Validation</td></tr>
+<tr><td width="25%"><a href="viewport.html">viewport</a></td>
+<td>Create a Grid Viewport</td></tr>
+<tr><td width="25%"><a href="viewport.html">vpList</a></td>
+<td>Create a Grid Viewport</td></tr>
+<tr><td width="25%"><a href="vpPath.html">vpPath</a></td>
+<td>Concatenate Viewport Names</td></tr>
+<tr><td width="25%"><a href="viewport.html">vpStack</a></td>
+<td>Create a Grid Viewport</td></tr>
+<tr><td width="25%"><a href="viewport.html">vpTree</a></td>
+<td>Create a Grid Viewport</td></tr>
+</table>
+
+<h2><a name="W">-- W --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="widthDetails.html">widthDetails</a></td>
+<td>Width and Height of a grid grob</td></tr>
+</table>
+
+<h2><a name="X">-- X --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="grid.xaxis.html">xaxisGrob</a></td>
+<td>Draw an X-Axis</td></tr>
+<tr><td width="25%"><a href="xDetails.html">xDetails</a></td>
+<td>Boundary of a grid grob</td></tr>
+<tr><td width="25%"><a href="grid.xspline.html">xsplineGrob</a></td>
+<td>Draw an Xspline</td></tr>
+<tr><td width="25%"><a href="xsplinePoints.html">xsplinePoints</a></td>
+<td>Return the points that would be used to draw an Xspline (or a Bezier curve).</td></tr>
+</table>
+
+<h2><a name="Y">-- Y --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="grid.yaxis.html">yaxisGrob</a></td>
+<td>Draw a Y-Axis</td></tr>
+<tr><td width="25%"><a href="xDetails.html">yDetails</a></td>
+<td>Boundary of a grid grob</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/grid/html/R.css b/win32/deps/library/grid/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/grid/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/grid/libs/i386/grid.dll b/win32/deps/library/grid/libs/i386/grid.dll
new file mode 100644
index 0000000..f498e0a
Binary files /dev/null and b/win32/deps/library/grid/libs/i386/grid.dll differ
diff --git a/win32/deps/library/grid/po/da/LC_MESSAGES/R-grid.mo b/win32/deps/library/grid/po/da/LC_MESSAGES/R-grid.mo
new file mode 100644
index 0000000..72387dc
Binary files /dev/null and b/win32/deps/library/grid/po/da/LC_MESSAGES/R-grid.mo differ
diff --git a/win32/deps/library/grid/po/da/LC_MESSAGES/grid.mo b/win32/deps/library/grid/po/da/LC_MESSAGES/grid.mo
new file mode 100644
index 0000000..5a4a0d8
Binary files /dev/null and b/win32/deps/library/grid/po/da/LC_MESSAGES/grid.mo differ
diff --git a/win32/deps/library/grid/po/de/LC_MESSAGES/R-grid.mo b/win32/deps/library/grid/po/de/LC_MESSAGES/R-grid.mo
new file mode 100644
index 0000000..7b8a8ad
Binary files /dev/null and b/win32/deps/library/grid/po/de/LC_MESSAGES/R-grid.mo differ
diff --git a/win32/deps/library/grid/po/de/LC_MESSAGES/grid.mo b/win32/deps/library/grid/po/de/LC_MESSAGES/grid.mo
new file mode 100644
index 0000000..099e02f
Binary files /dev/null and b/win32/deps/library/grid/po/de/LC_MESSAGES/grid.mo differ
diff --git a/win32/deps/library/grid/po/en quot/LC_MESSAGES/R-grid.mo b/win32/deps/library/grid/po/en quot/LC_MESSAGES/R-grid.mo
new file mode 100644
index 0000000..b186d26
Binary files /dev/null and b/win32/deps/library/grid/po/en quot/LC_MESSAGES/R-grid.mo differ
diff --git a/win32/deps/library/grid/po/en quot/LC_MESSAGES/grid.mo b/win32/deps/library/grid/po/en quot/LC_MESSAGES/grid.mo
new file mode 100644
index 0000000..9070b40
Binary files /dev/null and b/win32/deps/library/grid/po/en quot/LC_MESSAGES/grid.mo differ
diff --git a/win32/deps/library/grid/po/fr/LC_MESSAGES/R-grid.mo b/win32/deps/library/grid/po/fr/LC_MESSAGES/R-grid.mo
new file mode 100644
index 0000000..5b297fb
Binary files /dev/null and b/win32/deps/library/grid/po/fr/LC_MESSAGES/R-grid.mo differ
diff --git a/win32/deps/library/grid/po/fr/LC_MESSAGES/grid.mo b/win32/deps/library/grid/po/fr/LC_MESSAGES/grid.mo
new file mode 100644
index 0000000..1e11157
Binary files /dev/null and b/win32/deps/library/grid/po/fr/LC_MESSAGES/grid.mo differ
diff --git a/win32/deps/library/grid/po/it/LC_MESSAGES/grid.mo b/win32/deps/library/grid/po/it/LC_MESSAGES/grid.mo
new file mode 100644
index 0000000..59f6425
Binary files /dev/null and b/win32/deps/library/grid/po/it/LC_MESSAGES/grid.mo differ
diff --git a/win32/deps/library/grid/po/ja/LC_MESSAGES/R-grid.mo b/win32/deps/library/grid/po/ja/LC_MESSAGES/R-grid.mo
new file mode 100644
index 0000000..db198e5
Binary files /dev/null and b/win32/deps/library/grid/po/ja/LC_MESSAGES/R-grid.mo differ
diff --git a/win32/deps/library/grid/po/ja/LC_MESSAGES/grid.mo b/win32/deps/library/grid/po/ja/LC_MESSAGES/grid.mo
new file mode 100644
index 0000000..e1fc626
Binary files /dev/null and b/win32/deps/library/grid/po/ja/LC_MESSAGES/grid.mo differ
diff --git a/win32/deps/library/grid/po/ko/LC_MESSAGES/R-grid.mo b/win32/deps/library/grid/po/ko/LC_MESSAGES/R-grid.mo
new file mode 100644
index 0000000..de8ac4b
Binary files /dev/null and b/win32/deps/library/grid/po/ko/LC_MESSAGES/R-grid.mo differ
diff --git a/win32/deps/library/grid/po/ko/LC_MESSAGES/grid.mo b/win32/deps/library/grid/po/ko/LC_MESSAGES/grid.mo
new file mode 100644
index 0000000..5620120
Binary files /dev/null and b/win32/deps/library/grid/po/ko/LC_MESSAGES/grid.mo differ
diff --git a/win32/deps/library/grid/po/pl/LC_MESSAGES/R-grid.mo b/win32/deps/library/grid/po/pl/LC_MESSAGES/R-grid.mo
new file mode 100644
index 0000000..f29dcc4
Binary files /dev/null and b/win32/deps/library/grid/po/pl/LC_MESSAGES/R-grid.mo differ
diff --git a/win32/deps/library/grid/po/pl/LC_MESSAGES/grid.mo b/win32/deps/library/grid/po/pl/LC_MESSAGES/grid.mo
new file mode 100644
index 0000000..5a74ae5
Binary files /dev/null and b/win32/deps/library/grid/po/pl/LC_MESSAGES/grid.mo differ
diff --git a/win32/deps/library/grid/po/pt_BR/LC_MESSAGES/R-grid.mo b/win32/deps/library/grid/po/pt_BR/LC_MESSAGES/R-grid.mo
new file mode 100644
index 0000000..272ea25
Binary files /dev/null and b/win32/deps/library/grid/po/pt_BR/LC_MESSAGES/R-grid.mo differ
diff --git a/win32/deps/library/grid/po/pt_BR/LC_MESSAGES/grid.mo b/win32/deps/library/grid/po/pt_BR/LC_MESSAGES/grid.mo
new file mode 100644
index 0000000..df698b2
Binary files /dev/null and b/win32/deps/library/grid/po/pt_BR/LC_MESSAGES/grid.mo differ
diff --git a/win32/deps/library/grid/po/ru/LC_MESSAGES/R-grid.mo b/win32/deps/library/grid/po/ru/LC_MESSAGES/R-grid.mo
new file mode 100644
index 0000000..b42fd4c
Binary files /dev/null and b/win32/deps/library/grid/po/ru/LC_MESSAGES/R-grid.mo differ
diff --git a/win32/deps/library/grid/po/ru/LC_MESSAGES/grid.mo b/win32/deps/library/grid/po/ru/LC_MESSAGES/grid.mo
new file mode 100644
index 0000000..2ac83a2
Binary files /dev/null and b/win32/deps/library/grid/po/ru/LC_MESSAGES/grid.mo differ
diff --git a/win32/deps/library/grid/po/zh_CN/LC_MESSAGES/R-grid.mo b/win32/deps/library/grid/po/zh_CN/LC_MESSAGES/R-grid.mo
new file mode 100644
index 0000000..4ba5f61
Binary files /dev/null and b/win32/deps/library/grid/po/zh_CN/LC_MESSAGES/R-grid.mo differ
diff --git a/win32/deps/library/grid/po/zh_CN/LC_MESSAGES/grid.mo b/win32/deps/library/grid/po/zh_CN/LC_MESSAGES/grid.mo
new file mode 100644
index 0000000..142f80f
Binary files /dev/null and b/win32/deps/library/grid/po/zh_CN/LC_MESSAGES/grid.mo differ
diff --git a/win32/deps/library/grid/tests/bugs.R b/win32/deps/library/grid/tests/bugs.R
new file mode 100644
index 0000000..d491c63
--- /dev/null
+++ b/win32/deps/library/grid/tests/bugs.R
@@ -0,0 +1,30 @@
+library(grid)
+
+# Physical units in viewport of height 0
+pushViewport(viewport(h=0))
+stopifnot(is.finite(convertHeight(unit(72, "bigpts"), "inches")))
+popViewport()
+
+# The gpar font settings for a grob should affect the grob itself
+stopifnot(round(convertHeight(grobHeight(rectGrob(height=unit(1, "lines"), 
+                                                  gp=gpar(lineheight=2))),
+                              "inches", valueOnly=TRUE) -
+                convertHeight(grobHeight(rectGrob(height=unit(1, "lines"),
+                                                  vp=viewport(
+                                                    gp=gpar(lineheight=2)))),
+                              "inches", valueOnly=TRUE),
+                digits=5) == 0)
+
+# Calculation of size of packed grob with gp which is non-empty
+gf1 <- frameGrob(gp=gpar(fontsize=20))
+gf1 <- packGrob(gf1, textGrob("howdy"))
+gf1 <- packGrob(gf1, rectGrob(), col=1, row=1)
+gf2 <- frameGrob()
+gf2 <- packGrob(gf2, gf1)
+gf2 <- packGrob(gf2, rectGrob(gp=gpar(col="red")), col=1, row=1)
+stopifnot(round(convertWidth(grobWidth(gf1),
+                             "inches", valueOnly=TRUE) -
+                convertWidth(grobWidth(gf2),
+                             "inches", valueOnly=TRUE),
+                digits=5) == 0)
+
diff --git a/win32/deps/library/grid/tests/reg.R b/win32/deps/library/grid/tests/reg.R
new file mode 100644
index 0000000..51ee57f
--- /dev/null
+++ b/win32/deps/library/grid/tests/reg.R
@@ -0,0 +1,433 @@
+library(grid)
+
+# Unit conversions
+stopifnot(round(convertX(unit(1, "inches"), "inches", valueOnly=TRUE) - 1,
+                digits=5) == 0)
+stopifnot(round(convertX(unit(2.54, "cm"), "inches", valueOnly=TRUE) - 1,
+                digits=5) == 0)
+stopifnot(round(convertX(unit(25.4, "mm"), "inches", valueOnly=TRUE) - 1,
+                digits=5) == 0)
+stopifnot(round(convertX(unit(72.27, "points"), "inches", valueOnly=TRUE) - 1,
+                digits=5) == 0)
+stopifnot(round(convertX(unit(1/12*72.27, "picas"), "inches",
+                         valueOnly=TRUE) - 1, digits=5) == 0)
+stopifnot(round(convertX(unit(72, "bigpts"), "inches", valueOnly=TRUE) - 1,
+                digits=5) == 0)
+stopifnot(round(convertX(unit(1157/1238*72.27, "dida"), "inches",
+                         valueOnly=TRUE) - 1, digits=5) == 0)
+stopifnot(round(convertX(unit(1/12*1157/1238*72.27, "cicero"), "inches",
+                         valueOnly=TRUE) - 1, digits=5) == 0)
+stopifnot(round(convertX(unit(65536*72.27, "scaledpts"), "inches",
+                         valueOnly=TRUE) - 1, digits=5) == 0)
+stopifnot(round(convertX(unit(1/2.54, "inches"), "cm", valueOnly=TRUE) - 1,
+                digits=5) == 0)
+stopifnot(round(convertX(unit(1/25.4, "inches"), "mm", valueOnly=TRUE) - 1,
+                digits=5) == 0)
+stopifnot(round(convertX(unit(1/72.27, "inches"), "points",
+                         valueOnly=TRUE) - 1, digits=5) == 0)
+stopifnot(round(convertX(unit(1/(1/12*72.27), "inches"), "picas",
+                         valueOnly=TRUE) - 1, digits=5) == 0)
+stopifnot(round(convertX(unit(1/72, "inches"), "bigpts", valueOnly=TRUE) - 1,
+                digits=5) == 0)
+stopifnot(round(convertX(unit(1/(1157/1238*72.27), "inches"), "dida",
+                         valueOnly=TRUE) - 1, digits=5) == 0)
+stopifnot(round(convertX(unit(1/(1/12*1157/1238*72.27), "inches"), "cicero",
+                         valueOnly=TRUE) - 1, digits=5) == 0)
+stopifnot(round(convertX(unit(1/(65536*72.27), "inches"), "scaledpts",
+                         valueOnly=TRUE) - 1, digits=5) == 0)
+
+pushViewport(viewport(width=unit(1, "inches"),
+                       height=unit(2, "inches"),
+                       xscale=c(0, 1),
+                       yscale=c(1, 3)))
+  ## Location versus dimension
+stopifnot(round(convertY(unit(2, "native"), "inches", valueOnly=TRUE) -
+                1, digits=5) == 0)
+stopifnot(round(convertHeight(unit(2, "native"), "inches", valueOnly=TRUE) -
+                2, digits=5) == 0)
+  ## From "x" to "y" (the conversion is via "inches")
+stopifnot(round(convertUnit(unit(1, "native"), "native",
+                            axisFrom="x", axisTo="y", valueOnly=TRUE) -
+                2, digits=5) == 0)
+  ## Convert several values at once
+stopifnot(all(round(convertX(unit(c(0.5, 2.54), c("npc", "cm")),
+                             c("inches", "native"), valueOnly=TRUE) -
+                    c(0.5, 1), digits=5) == 0))
+popViewport()
+
+# packing a frame inside a frame
+fg <- frameGrob()
+fg <- packGrob(fg, textGrob("Hi there"))
+
+fg2 <- frameGrob()
+fg2 <- packGrob(fg2, fg)
+fg2 <- packGrob(fg2, rectGrob(), side="bottom")
+fg2 <- packGrob(fg2, rectGrob(height=unit(1, "inches")), side="top")
+
+stopifnot(convertHeight(fg2$framevp$layout$heights, "inches",
+                        valueOnly=TRUE)[2] < 1)
+
+# Regression tests for:
+
+# A: grob[X|Y|Width|Height]
+
+# B: grid.[circle|lines|segments|rect|polygon|text|xspline|points]
+
+# C: at angles seq(0, 360, 45)[-1]
+
+# D: single AND multiple output 
+
+# In each casem, set up a situation where the answer is (easily) known,
+# then compare the numeric answer
+
+test <- function(x, y) {
+    on.exit(cat(paste("x =", x, " ; y =", y, "\n")))
+    stopifnot(isTRUE(all.equal(x, y)))
+}
+
+testX <- function(x1, x2) {
+    test(convertX(x1, "inches", valueOnly=TRUE),
+         convertX(x2, "inches", valueOnly=TRUE))
+}
+
+testY <- function(y1, y2) {
+    test(convertY(y1, "inches", valueOnly=TRUE),
+         convertY(y2, "inches", valueOnly=TRUE))
+}
+
+testWidth <- function(w1, w2) {
+    test(convertWidth(w1, "inches", valueOnly=TRUE),
+         convertWidth(w2, "inches", valueOnly=TRUE))
+}
+
+testHeight <- function(h1, h2) {
+    test(convertHeight(h1, "inches", valueOnly=TRUE),
+         convertHeight(h2, "inches", valueOnly=TRUE))
+}
+
+########
+# CIRCLE
+########
+# A = X;  B = circle; C = ALL; D = BOTH
+for (theta in seq(0, 360, 45)[-1]) {
+    testX(grobX(circleGrob(r=unit(.5, "inches")), theta),
+          unit(.5, "npc") + cos(theta/180*pi)*unit(.5, "inches"))
+    # Bounding box is 1" by 1"
+    testX(grobX(circleGrob(x=unit(.5, "npc") + unit(c(-.25, .25), "inches"),
+                           y=unit(.5, "npc") + unit(c(-.25, .25), "inches"),
+                           r=unit(.25, "inches")),
+                theta),
+          switch(as.character(theta),
+                 "360"=, "315"=,
+                 "45"=unit(.5, "npc") + unit(.5, "inches"),
+                 "180"=, "225"=,
+                 "135"=unit(.5, "npc") - unit(.5, "inches"),
+                 "90"=,
+                 "270"=unit(.5, "npc")))
+}
+
+# A = Y;  B = circle; C = ALL; D = BOTH
+for (theta in seq(0, 360, 45)[-1]) {
+    testY(grobY(circleGrob(r=unit(.5, "inches")), theta),
+          unit(.5, "npc") + sin(theta/180*pi)*unit(.5, "inches"))
+    # Bounding box is 1" by 1"
+    testY(grobY(circleGrob(x=unit(.5, "npc") + unit(c(-.25, .25), "inches"),
+                           y=unit(.5, "npc") + unit(c(-.25, .25), "inches"),
+                           r=unit(.25, "inches")),
+                theta),
+          switch(as.character(theta),
+                 "90"=, "135"=,
+                 "45"=unit(.5, "npc") + unit(.5, "inches"),
+                 "270"=, "315"=,
+                 "225"=unit(.5, "npc") - unit(.5, "inches"),
+                 "180"=,
+                 "360"=unit(.5, "npc")))
+}
+
+# A = Width;  B = circle; C = ALL; D = BOTH
+testWidth(grobWidth(circleGrob(r=unit(.5, "inches"))),
+          unit(1, "inches"))
+testWidth(grobWidth(circleGrob(x=unit(.5, "npc") +
+                               unit(c(-.25, .25), "inches"),
+                               y=unit(.5, "npc") +
+                               unit(c(-.25, .25), "inches"),
+                               r=unit(.25, "inches"))),
+          unit(1, "inches"))          
+                    
+# A = Height;  B = circle; C = ALL; D = BOTH
+testHeight(grobHeight(circleGrob(r=unit(.5, "inches"))),
+          unit(1, "inches"))
+testHeight(grobHeight(circleGrob(x=unit(.5, "npc") +
+                                 unit(c(-.25, .25), "inches"),
+                                 y=unit(.5, "npc") +
+                                 unit(c(-.25, .25), "inches"),
+                                 r=unit(.25, "inches"))),
+           unit(1, "inches"))          
+                    
+########
+# RECT
+########
+# A = X;  B = rect; C = ALL; D = BOTH
+for (theta in seq(0, 360, 45)[-1]) {
+    testX(grobX(rectGrob(width=unit(1, "inches"),
+                         height=unit(1, "inches")), theta),
+          switch(as.character(theta),
+                 "360"=, "315"=,
+                 "45"=unit(.5, "npc") + unit(.5, "inches"),
+                 "180"=, "225"=,
+                 "135"=unit(.5, "npc") - unit(.5, "inches"),
+                 "90"=,
+                 "270"=unit(.5, "npc")))
+    # Bounding box is 1" by 1"
+    testX(grobX(rectGrob(x=unit(.5, "npc") + unit(c(-.25, .25), "inches"),
+                         y=unit(.5, "npc") + unit(c(-.25, .25), "inches"),
+                         width=unit(.5, "inches"),
+                         height=unit(.5, "inches")),
+                theta),
+          switch(as.character(theta),
+                 "360"=, "315"=,
+                 "45"=unit(.5, "npc") + unit(.5, "inches"),
+                 "180"=, "225"=,
+                 "135"=unit(.5, "npc") - unit(.5, "inches"),
+                 "90"=,
+                 "270"=unit(.5, "npc")))
+}
+
+# A = Y;  B = rect; C = ALL; D = BOTH
+for (theta in seq(0, 360, 45)[-1]) {
+    testY(grobY(rectGrob(width=unit(1, "inches"),
+                         height=unit(1, "inches")), theta),
+          switch(as.character(theta),
+                 "90"=, "135"=,
+                 "45"=unit(.5, "npc") + unit(.5, "inches"),
+                 "270"=, "315"=,
+                 "225"=unit(.5, "npc") - unit(.5, "inches"),
+                 "180"=,
+                 "360"=unit(.5, "npc")))
+    # Bounding box is 1" by 1"
+    testY(grobY(rectGrob(x=unit(.5, "npc") + unit(c(-.25, .25), "inches"),
+                         y=unit(.5, "npc") + unit(c(-.25, .25), "inches"),
+                         width=unit(.5, "inches"),
+                         height=unit(.5, "inches")),
+                theta),
+          switch(as.character(theta),
+                 "90"=, "135"=,
+                 "45"=unit(.5, "npc") + unit(.5, "inches"),
+                 "270"=, "315"=,
+                 "225"=unit(.5, "npc") - unit(.5, "inches"),
+                 "180"=,
+                 "360"=unit(.5, "npc")))
+}
+
+# A = Width;  B = rect; C = ALL; D = BOTH
+testWidth(grobWidth(rectGrob(width=unit(1, "inches"),
+                             height=unit(1, "inches"))),
+          unit(1, "inches"))
+testWidth(grobWidth(rectGrob(x=unit(.5, "npc") +
+                             unit(c(-.25, .25), "inches"),
+                             y=unit(.5, "npc") +
+                             unit(c(-.25, .25), "inches"),
+                             width=unit(.5, "inches"),
+                             height=unit(.5, "inches"))),
+          unit(1, "inches"))          
+                    
+# A = Height;  B = rect; C = ALL; D = BOTH
+testHeight(grobHeight(rectGrob(width=unit(1, "inches"),
+                               height=unit(1, "inches"))),
+           unit(1, "inches"))
+testHeight(grobHeight(rectGrob(x=unit(.5, "npc") +
+                               unit(c(-.25, .25), "inches"),
+                               y=unit(.5, "npc") +
+                               unit(c(-.25, .25), "inches"),
+                               width=unit(.5, "inches"),
+                               height=unit(.5, "inches"))),
+           unit(1, "inches"))          
+                    
+########
+# polygon
+# Four locations in a diamond
+########
+# A = X;  B = polygon; C = ALL; D = BOTH
+for (theta in seq(0, 360, 45)[-1]) {
+    testX(grobX(polygonGrob(x=unit(.5, "npc") +
+                            unit(c(-.5, 0, .5, 0), "inches"),
+                            y=unit(.5, "npc") +
+                            unit(c(0, -.5, 0, .5), "inches")),
+                theta),
+          switch(as.character(theta),
+                 "45"=,
+                 "315"=unit(.5, "npc") + unit(.25, "inches"),
+                 "90"=,
+                 "270"=unit(.5, "npc"),
+                 "135"=,
+                 "225"=unit(.5, "npc") - unit(.25, "inches"),
+                 "180"=unit(.5, "npc") - unit(.5, "inches"),
+                 "360"=unit(.5, "npc") + unit(.5, "inches")))
+    # NOTE:  for polygons, even if there are multiple polygons,
+    # we still produce edge of hull for ALL points
+    testX(grobX(polygonGrob(x=unit(.5, "npc") +
+                            unit(c(-.5, -.25, 0, -.25,
+                                   0, .25, .5, .25), "inches"),
+                            y=unit(.5, "npc") +
+                            unit(c(-.25, -.5, -.25, 0,
+                                   .25, 0, .25, .5), "inches"),
+                            id=rep(1:2, each=4)),
+                theta),
+          switch(as.character(theta),
+                 "45"=unit(.5, "npc") + unit(.375, "inches"),
+                 "90"=unit(.5, "npc"),
+                 "135"=unit(.5, "npc") - unit(.125, "inches"),
+                 "180"=unit(.5, "npc") - unit(.25, "inches"),
+                 "225"=unit(.5, "npc") - unit(.375, "inches"),
+                 "270"=unit(.5, "npc"),
+                 "315"=unit(.5, "npc") + unit(.125, "inches"),
+                 "360"=unit(.5, "npc") + unit(.25, "inches")))
+}
+
+# A = Y;  B = polygon; C = ALL; D = BOTH
+for (theta in seq(0, 360, 45)[-1]) {
+    testY(grobY(polygonGrob(x=unit(.5, "npc") +
+                            unit(c(-.5, 0, .5, 0), "inches"),
+                            y=unit(.5, "npc") +
+                            unit(c(0, -.5, 0, .5), "inches")),
+                theta),
+          switch(as.character(theta),
+                 "45"=,
+                 "135"=unit(.5, "npc") + unit(.25, "inches"),
+                 "90"=unit(.5, "npc") + unit(.5, "inches"),
+                 "180"=,
+                 "360"=unit(.5, "npc"),
+                 "225"=,
+                 "315"=unit(.5, "npc") - unit(.25, "inches"),
+                 "270"=unit(.5, "npc") - unit(.5, "inches")))
+    # NOTE:  for polygons, even if there are multiple polygons,
+    # we still produce edge of hull for ALL points
+    testY(grobY(polygonGrob(x=unit(.5, "npc") +
+                            unit(c(-.5, -.25, 0, -.25,
+                                   0, .25, .5, .25), "inches"),
+                            y=unit(.5, "npc") +
+                            unit(c(-.25, -.5, -.25, 0,
+                                   .25, 0, .25, .5), "inches"),
+                            id=rep(1:2, each=4)),
+                theta),
+          switch(as.character(theta),
+                 "45"=unit(.5, "npc") + unit(.375, "inches"),
+                 "90"=unit(.5, "npc") + unit(.25, "inches"),
+                 "135"=unit(.5, "npc") + unit(.125, "inches"),
+                 "180"=unit(.5, "npc"),
+                 "225"=unit(.5, "npc") - unit(.375, "inches"),
+                 "270"=unit(.5, "npc") - unit(.25, "inches"),
+                 "315"=unit(.5, "npc") - unit(.125, "inches"),
+                 "360"=unit(.5, "npc")))
+}
+
+# A = Width;  B = polygon; C = ALL; D = BOTH
+testWidth(grobWidth(polygonGrob(x=unit(.5, "npc") +
+                            unit(c(-.5, 0, .5, 0), "inches"),
+                            y=unit(.5, "npc") +
+                            unit(c(0, -.5, 0, .5), "inches"))),
+          unit(1, "inches"))
+testWidth(grobWidth(polygonGrob(x=unit(.5, "npc") +
+                            unit(c(-.5, -.25, 0, -.25,
+                                   0, .25, .5, .25), "inches"),
+                            y=unit(.5, "npc") +
+                            unit(c(-.25, -.5, -.25, 0,
+                                   .25, 0, .25, .5), "inches"),
+                            id=rep(1:2, each=4))),
+          unit(1, "inches"))          
+                    
+# A = Height;  B = polygon; C = ALL; D = BOTH
+testHeight(grobHeight(polygonGrob(x=unit(.5, "npc") +
+                            unit(c(-.5, 0, .5, 0), "inches"),
+                            y=unit(.5, "npc") +
+                            unit(c(0, -.5, 0, .5), "inches"))),
+          unit(1, "inches"))
+testHeight(grobHeight(polygonGrob(x=unit(.5, "npc") +
+                            unit(c(-.5, -.25, 0, -.25,
+                                   0, .25, .5, .25), "inches"),
+                            y=unit(.5, "npc") +
+                            unit(c(-.25, -.5, -.25, 0,
+                                   .25, 0, .25, .5), "inches"),
+                            id=rep(1:2, each=4))),
+           unit(1, "inches"))          
+                    
+########
+# TEXT
+########
+# A = X;  B = text; C = ALL; D = BOTH
+str <- "testcase"
+strw <- stringWidth(str)
+strh <- stringHeight(str)
+for (theta in seq(0, 360, 45)[-1]) {
+    testX(grobX(textGrob(str), theta),
+          switch(as.character(theta),
+                 "360"=unit(.5, "npc") + 0.5*strw,
+                 "135"=,
+                 "45"=unit(.5, "npc") + 1/tan(theta/180*pi)*0.5*strh,
+                 "315"=,
+                 "225"=unit(.5, "npc") - 1/tan(theta/180*pi)*0.5*strh,
+                 "180"=unit(.5, "npc") - 0.5*strw,
+                 "90"=,
+                 "270"=unit(.5, "npc")))
+    # Bounding box is 1" by 1"
+    testX(grobX(textGrob(str,
+                         x=unit(.5, "npc") + unit(c(-.5, .5), "inches"),
+                         y=unit(.5, "npc") + unit(c(-.5, .5), "inches"),
+                         hjust=c(0, 1), vjust=c(0, 1)),
+                theta),
+          switch(as.character(theta),
+                 "360"=, "315"=,
+                 "45"=unit(.5, "npc") + unit(.5, "inches"),
+                 "180"=, "225"=,
+                 "135"=unit(.5, "npc") - unit(.5, "inches"),
+                 "90"=,
+                 "270"=unit(.5, "npc")))
+}
+
+# A = Y;  B = text; C = ALL; D = BOTH
+for (theta in seq(0, 360, 45)[-1]) {
+    testY(grobY(textGrob(str), theta),
+          switch(as.character(theta),
+                 "90"=, "135"=,
+                 "45"=unit(.5, "npc") + 0.5*strh,
+                 "270"=, "315"=,
+                 "225"=unit(.5, "npc") - 0.5*strh,
+                 "180"=,
+                 "360"=unit(.5, "npc")))
+    # Bounding box is 1" by 1"
+    testY(grobY(textGrob(str,
+                         x=unit(.5, "npc") + unit(c(-.5, .5), "inches"),
+                         y=unit(.5, "npc") + unit(c(-.5, .5), "inches"),
+                         hjust=c(0, 1), vjust=c(0, 1)),
+                theta),
+          switch(as.character(theta),
+                 "90"=, "135"=,
+                 "45"=unit(.5, "npc") + unit(.5, "inches"),
+                 "270"=, "315"=,
+                 "225"=unit(.5, "npc") - unit(.5, "inches"),
+                 "180"=,
+                 "360"=unit(.5, "npc")))
+}
+
+# A = Width;  B = text; C = ALL; D = BOTH
+testWidth(grobWidth(textGrob(str)),
+          strw)
+testWidth(grobWidth(textGrob(str,
+                             x=unit(.5, "npc") + unit(c(-.5, .5), "inches"),
+                             y=unit(.5, "npc") + unit(c(-.5, .5), "inches"),
+                             hjust=c(0, 1), vjust=c(0, 1))),
+          unit(1, "inches"))          
+                    
+# A = Height;  B = text; C = ALL; D = BOTH
+testHeight(grobHeight(textGrob(str)),
+          strh)
+testHeight(grobHeight(textGrob(str,
+                               x=unit(.5, "npc") + unit(c(-.5, .5), "inches"),
+                               y=unit(.5, "npc") + unit(c(-.5, .5), "inches"),
+                               hjust=c(0, 1), vjust=c(0, 1))),
+           unit(1, "inches"))
+
+# Determining unit lengths
+stopifnot(length(unit.c(unit(1, "npc") + unit(1, "cm"), unit(2, "cm"))) == 2)
+stopifnot(length(unit.c(unit(1, "npc") + unit(1, "cm"), unit(2:4, "cm"))) == 4)
+stopifnot(length(unit.c(unit(1:3, "npc") + unit(1, "cm"), unit(2:4, "cm"))) == 6)
diff --git a/win32/deps/library/grid/tests/testls.R b/win32/deps/library/grid/tests/testls.R
new file mode 100644
index 0000000..f651ef4
--- /dev/null
+++ b/win32/deps/library/grid/tests/testls.R
@@ -0,0 +1,158 @@
+library(grid)
+
+# Test hole in DL (deleted grob)
+grid.lines(name="foo")
+grid.lines(x=1:0, name="foo2")
+grid.ls()
+grid.remove("foo")
+grid.ls()
+# New blank page
+grid.newpage()
+
+
+#######
+# GROBS
+#######
+# Plain grob
+grid.ls(grob(name="g1"))
+# gList
+grid.ls(gList(grob(name="gl1"), grob(name="gl2")))
+# gTree
+grid.ls(gTree(children=gList(grob(name="child")),
+              name="parent"))
+grid.ls(gTree(children=gList(grob(name="child1"), grob(name="child1")),
+              name="parent"))
+
+###########
+# VIEWPORTS
+###########
+# Plain viewport
+grid.ls(viewport(name="vp1"),
+        view=TRUE)
+# vpList
+grid.ls(vpList(viewport(name="vpl1")),
+        view=TRUE)
+grid.ls(vpList(viewport(name="vpl1"), viewport(name="vpl2")),
+        view=TRUE)
+grid.ls(vpList(viewport(name="vpl1"), viewport(name="vpl2"),
+               viewport(name="vpl3")),
+        view=TRUE)
+# vpStack
+grid.ls(vpStack(viewport(name="vps1"), viewport(name="vps2")),
+        view=TRUE)
+grid.ls(vpStack(viewport(name="vps1"), viewport(name="vps2"),
+                viewport(name="vps3")),
+        view=TRUE)
+# vpTrees
+grid.ls(vpTree(viewport(name="parentvp"), vpList(viewport(name="childvp"))),
+        view=TRUE)
+grid.ls(vpTree(viewport(name="parentvp"),
+               vpList(viewport(name="cvp1"), viewport(name="cvp2"))),
+        view=TRUE)
+# vpPaths
+grid.ls(vpPath("A"),
+        view=TRUE)
+grid.ls(vpPath("A", "B"),
+        view=TRUE)
+grid.ls(vpPath("A", "B", "C"),
+        view=TRUE)
+
+##########
+# MIXTURES
+##########
+# grob with vp viewport
+g1 <- grob(vp=viewport(name="gvp"), name="g1")
+grid.ls(g1, view=TRUE, full=TRUE)
+grid.ls(g1, view=TRUE, full=TRUE, grob=FALSE)
+# grob with vp vpList
+grid.ls(grob(vp=vpList(viewport(name="vpl")), name="g1"),
+        view=TRUE, full=TRUE)
+grid.ls(grob(vp=vpList(viewport(name="vpl1"), viewport(name="vpl2")),
+             name="g1"),
+        view=TRUE, full=TRUE)
+# grob with vp vpStack
+grid.ls(grob(vp=vpStack(viewport(name="vps1"), viewport(name="vps2")),
+             name="g1"),
+        view=TRUE, full=TRUE)
+grid.ls(grob(vp=vpStack(viewport(name="vps1"), viewport(name="vps2"),
+               viewport(name="vps3")),
+             name="g1"),
+        view=TRUE)
+# grob with vp vpTree
+grid.ls(grob(vp=vpTree(viewport(name="parentvp"),
+               vpList(viewport(name="cvp"))),
+             name="g1"),
+        view=TRUE, full=TRUE)
+grid.ls(grob(vp=vpTree(viewport(name="parentvp"),
+               vpList(viewport(name="cvp1"), viewport(name="cvp2"))),
+             name="g1"),
+        view=TRUE, full=TRUE)
+# gTree with vp viewport
+# and child grob with vp viewport
+grid.ls(gTree(children=gList(grob(vp=viewport(name="childvp"), name="cg1"),
+                grob(name="cg2")),
+              name="parent",
+              vp=viewport(name="parentvp")),
+        view=TRUE)
+# gTree with childrenvp viewport
+grid.ls(gTree(childrenvp=viewport(name="vp"), name="gtree"),
+        view=TRUE, full=TRUE)
+grid.ls(gTree(childrenvp=viewport(name="vp"), name="gtree"),
+        view=TRUE, full=TRUE, grob=FALSE)
+grid.ls(gTree(children=gList(grob(name="child")),
+              name="parent",
+              childrenvp=viewport(name="vp")),
+        view=TRUE, full=TRUE)
+grid.ls(gTree(children=gList(grob(name="child1"), grob(name="child2")),
+              name="parent",
+              childrenvp=viewport(name="vp")),
+        view=TRUE, full=TRUE)
+grid.ls(gTree(children=gList(grob(name="child")),
+              childrenvp=viewport(name="vp"),
+              name="parent"), 
+        view=TRUE, full=TRUE)
+grid.ls(gTree(children=gList(grob(name="child1"), grob(name="child2")),
+              name="parent",
+              childrenvp=viewport(name="vp")),
+        view=TRUE, full=TRUE, grob=FALSE)
+# gTree with childrenvp vpTree
+grid.ls(gTree(childrenvp=vpTree(parent=viewport(name="vp1"),
+                children=vpList(viewport(name="vp2"))),
+              name="gtree"),
+        view=TRUE, full=TRUE)
+grid.ls(gTree(children=gList(grob(name="child")),
+              name="parent",
+              childrenvp=vpTree(parent=viewport(name="vp1"),
+                children=vpList(viewport(name="vp2")))),
+        view=TRUE, full=TRUE)
+# gTree with childrenvp vpTree
+# and child grob with vp vpPath
+# 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)
+# Show viewports too
+grid.ls(sampleGTree, view=TRUE)
+# Only show viewports
+grid.ls(sampleGTree, view=TRUE, grob=FALSE)
+# Alternate displays
+# nested listing, custom indent
+grid.ls(sampleGTree, view=TRUE, print=nestedListing, gindent="--")
+# path listing
+grid.ls(sampleGTree, view=TRUE, print=pathListing)
+# path listing, without grobs aligned
+grid.ls(sampleGTree, view=TRUE, print=pathListing, gAlign=FALSE)
+# grob path listing 
+grid.ls(sampleGTree, view=TRUE, print=grobPathListing)
+# path listing, grobs only
+grid.ls(sampleGTree, print=pathListing)
+# path listing, viewports only
+grid.ls(sampleGTree, view=TRUE, grob=FALSE, print=pathListing)
+# raw flat listing
+str(grid.ls(sampleGTree, view=TRUE, print=FALSE))
+
+
+
diff --git a/win32/deps/library/grid/tests/testls.Rout.save b/win32/deps/library/grid/tests/testls.Rout.save
new file mode 100644
index 0000000..df8e0ed
--- /dev/null
+++ b/win32/deps/library/grid/tests/testls.Rout.save
@@ -0,0 +1,340 @@
+
+R version 2.8.0 Under development (unstable) (2008-07-28 r46138)
+Copyright (C) 2008 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(grid)
+> 
+> # Test hole in DL (deleted grob)
+> grid.lines(name="foo")
+> grid.lines(x=1:0, name="foo2")
+> grid.ls()
+foo
+foo2
+> grid.remove("foo")
+> grid.ls()
+foo2
+> # New blank page
+> grid.newpage()
+> 
+> 
+> #######
+> # GROBS
+> #######
+> # Plain grob
+> grid.ls(grob(name="g1"))
+g1
+> # gList
+> grid.ls(gList(grob(name="gl1"), grob(name="gl2")))
+gl1
+gl2
+> # gTree
+> grid.ls(gTree(children=gList(grob(name="child")),
++               name="parent"))
+parent
+  child
+> grid.ls(gTree(children=gList(grob(name="child1"), grob(name="child1")),
++               name="parent"))
+parent
+  child1
+  child1
+> 
+> ###########
+> # VIEWPORTS
+> ###########
+> # Plain viewport
+> grid.ls(viewport(name="vp1"),
++         view=TRUE)
+vp1
+> # vpList
+> grid.ls(vpList(viewport(name="vpl1")),
++         view=TRUE)
+vpl1
+> grid.ls(vpList(viewport(name="vpl1"), viewport(name="vpl2")),
++         view=TRUE)
+vpl1
+  1
+vpl2
+> grid.ls(vpList(viewport(name="vpl1"), viewport(name="vpl2"),
++                viewport(name="vpl3")),
++         view=TRUE)
+vpl1
+  1
+vpl2
+  1
+vpl3
+> # vpStack
+> grid.ls(vpStack(viewport(name="vps1"), viewport(name="vps2")),
++         view=TRUE)
+vps1
+  vps2
+> grid.ls(vpStack(viewport(name="vps1"), viewport(name="vps2"),
++                 viewport(name="vps3")),
++         view=TRUE)
+vps1
+  vps2
+    vps3
+> # vpTrees
+> grid.ls(vpTree(viewport(name="parentvp"), vpList(viewport(name="childvp"))),
++         view=TRUE)
+parentvp
+  childvp
+> grid.ls(vpTree(viewport(name="parentvp"),
++                vpList(viewport(name="cvp1"), viewport(name="cvp2"))),
++         view=TRUE)
+parentvp
+  cvp1
+    1
+  cvp2
+> # vpPaths
+> grid.ls(vpPath("A"),
++         view=TRUE)
+A
+> grid.ls(vpPath("A", "B"),
++         view=TRUE)
+A
+  B
+> grid.ls(vpPath("A", "B", "C"),
++         view=TRUE)
+A
+  B
+    C
+> 
+> ##########
+> # MIXTURES
+> ##########
+> # grob with vp viewport
+> g1 <- grob(vp=viewport(name="gvp"), name="g1")
+> grid.ls(g1, view=TRUE, full=TRUE)
+viewport[gvp]
+  grob[g1]
+  upViewport[1]
+> grid.ls(g1, view=TRUE, full=TRUE, grob=FALSE)
+viewport[gvp]
+  upViewport[1]
+> # grob with vp vpList
+> grid.ls(grob(vp=vpList(viewport(name="vpl")), name="g1"),
++         view=TRUE, full=TRUE)
+viewport[vpl]
+  grob[g1]
+  upViewport[1]
+> grid.ls(grob(vp=vpList(viewport(name="vpl1"), viewport(name="vpl2")),
++              name="g1"),
++         view=TRUE, full=TRUE)
+viewport[vpl1]
+  upViewport[1]
+viewport[vpl2]
+  grob[g1]
+  upViewport[1]
+> # grob with vp vpStack
+> grid.ls(grob(vp=vpStack(viewport(name="vps1"), viewport(name="vps2")),
++              name="g1"),
++         view=TRUE, full=TRUE)
+viewport[vps1]
+  viewport[vps2]
+    grob[g1]
+    upViewport[2]
+> grid.ls(grob(vp=vpStack(viewport(name="vps1"), viewport(name="vps2"),
++                viewport(name="vps3")),
++              name="g1"),
++         view=TRUE)
+vps1
+  vps2
+    vps3
+      g1
+      3
+> # grob with vp vpTree
+> grid.ls(grob(vp=vpTree(viewport(name="parentvp"),
++                vpList(viewport(name="cvp"))),
++              name="g1"),
++         view=TRUE, full=TRUE)
+viewport[parentvp]
+  viewport[cvp]
+    grob[g1]
+    upViewport[2]
+> grid.ls(grob(vp=vpTree(viewport(name="parentvp"),
++                vpList(viewport(name="cvp1"), viewport(name="cvp2"))),
++              name="g1"),
++         view=TRUE, full=TRUE)
+viewport[parentvp]
+  viewport[cvp1]
+    upViewport[1]
+  viewport[cvp2]
+    grob[g1]
+    upViewport[2]
+> # gTree with vp viewport
+> # and child grob with vp viewport
+> grid.ls(gTree(children=gList(grob(vp=viewport(name="childvp"), name="cg1"),
++                 grob(name="cg2")),
++               name="parent",
++               vp=viewport(name="parentvp")),
++         view=TRUE)
+parentvp
+  parent
+    childvp
+      cg1
+      1
+    cg2
+  1
+> # gTree with childrenvp viewport
+> grid.ls(gTree(childrenvp=viewport(name="vp"), name="gtree"),
++         view=TRUE, full=TRUE)
+gTree[gtree]
+  viewport[vp]
+    upViewport[1]
+> grid.ls(gTree(childrenvp=viewport(name="vp"), name="gtree"),
++         view=TRUE, full=TRUE, grob=FALSE)
+viewport[vp]
+  upViewport[1]
+> grid.ls(gTree(children=gList(grob(name="child")),
++               name="parent",
++               childrenvp=viewport(name="vp")),
++         view=TRUE, full=TRUE)
+gTree[parent]
+  viewport[vp]
+    upViewport[1]
+  grob[child]
+> grid.ls(gTree(children=gList(grob(name="child1"), grob(name="child2")),
++               name="parent",
++               childrenvp=viewport(name="vp")),
++         view=TRUE, full=TRUE)
+gTree[parent]
+  viewport[vp]
+    upViewport[1]
+  grob[child1]
+  grob[child2]
+> grid.ls(gTree(children=gList(grob(name="child")),
++               childrenvp=viewport(name="vp"),
++               name="parent"), 
++         view=TRUE, full=TRUE)
+gTree[parent]
+  viewport[vp]
+    upViewport[1]
+  grob[child]
+> grid.ls(gTree(children=gList(grob(name="child1"), grob(name="child2")),
++               name="parent",
++               childrenvp=viewport(name="vp")),
++         view=TRUE, full=TRUE, grob=FALSE)
+viewport[vp]
+  upViewport[1]
+> # gTree with childrenvp vpTree
+> grid.ls(gTree(childrenvp=vpTree(parent=viewport(name="vp1"),
++                 children=vpList(viewport(name="vp2"))),
++               name="gtree"),
++         view=TRUE, full=TRUE)
+gTree[gtree]
+  viewport[vp1]
+    viewport[vp2]
+      upViewport[2]
+> grid.ls(gTree(children=gList(grob(name="child")),
++               name="parent",
++               childrenvp=vpTree(parent=viewport(name="vp1"),
++                 children=vpList(viewport(name="vp2")))),
++         view=TRUE, full=TRUE)
+gTree[parent]
+  viewport[vp1]
+    viewport[vp2]
+      upViewport[2]
+  grob[child]
+> # gTree with childrenvp vpTree
+> # and child grob with vp vpPath
+> # 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" "vpTreeListing" "vpListing" "vpUpListing" ...
+ - attr(*, "class")= chr "flatGridListing"
+> 
+> 
+> 
+> 
diff --git a/win32/deps/library/grid/tests/units.R b/win32/deps/library/grid/tests/units.R
new file mode 100644
index 0000000..a81cec5
--- /dev/null
+++ b/win32/deps/library/grid/tests/units.R
@@ -0,0 +1,135 @@
+
+library(grid)
+
+unitCheck <- function(u1, u2) {
+    stopifnot(identical(as.character(u1), as.character(u2)))
+}
+
+# Mixture of rep() arguments based on example(rep) examples
+
+# simple tests
+simpleUnit <- unit(1:4, "npc")
+
+unitCheck(rep(simpleUnit, 2),
+          unit(rep(1:4, 2), "npc"))
+unitCheck(rep(simpleUnit, each=2),
+          unit(rep(1:4, each=2), "npc"))
+unitCheck(rep(simpleUnit, c(2, 1, 2, 1)),
+          unit(rep(1:4, c(2, 1, 2, 1)), "npc"))
+unitCheck(rep(simpleUnit, each=2, len=4),
+          unit(rep(1:4, each=2, len=4), "npc"))
+unitCheck(rep(simpleUnit, each=2, len=10),
+          unit(rep(1:4, each=2, len=10), "npc"))
+unitCheck(rep(simpleUnit, each=2, times=3),
+          unit(rep(1:4, each=2, times=3), "npc"))
+
+simpleUnitMixed <- unit(1:4, c("npc", "cm"))
+
+unitCheck(rep(simpleUnitMixed, 2),
+          unit(rep(1:4, 2), c("npc", "cm")))
+unitCheck(rep(simpleUnitMixed, each=2),
+          unit(rep(1:4, each=2),
+               rep(c("npc", "cm"), each=2)))
+unitCheck(rep(simpleUnitMixed, c(2, 1, 2, 1)),
+          unit(rep(1:4, c(2, 1, 2, 1)),
+               rep(c("npc", "cm"), c(2, 1))))
+unitCheck(rep(simpleUnitMixed, each=2, len=4),
+          unit(rep(1:4, each=2, len=4),
+               rep(c("npc", "cm"), each=2, len=4)))
+unitCheck(rep(simpleUnitMixed, each=2, len=10),
+          unit(rep(1:4, each=2, len=10),
+               rep(c("npc", "cm"), each=2, len=10)))
+unitCheck(rep(simpleUnitMixed, each=2, times=3),
+          unit(rep(1:4, each=2, times=3),
+               rep(c("npc", "cm"), each=2, times=3)))
+
+units <- c("npc", "inch", "strwidth", "cm")
+dataL <- list(NULL, NULL, "test", NULL)
+unitWithData <- unit(1:4, units, data=dataL)
+unitCheck(rep(unitWithData, 2),
+          unit(rep(1:4, 2),
+               rep(units, 2),
+               rep(dataL, 2)))
+unitCheck(rep(unitWithData, each=2),
+          unit(rep(1:4, each=2),
+               rep(units, each=2),
+               rep(dataL, each=2)))
+unitCheck(rep(unitWithData, c(2, 1, 2, 1)),
+          unit(rep(1:4, c(2, 1, 2, 1)),
+               rep(units, c(2, 1, 2, 1)),
+               rep(dataL, c(2, 1, 2, 1))))
+unitCheck(rep(unitWithData, each=2, len=4),
+          unit(rep(1:4, each=2, len=4),
+               rep(units, each=2, len=4),
+               rep(dataL, each=2, len=4)))
+unitCheck(rep(unitWithData, each=2, len=10),
+          unit(rep(1:4, each=2, len=10),
+               rep(units, each=2, len=10),
+               rep(dataL, each=2, len=10)))
+unitCheck(rep(unitWithData, each=2, times=3),
+          unit(rep(1:4, each=2, times=3),
+               rep(units, each=2, times=3),
+               rep(dataL, each=2, times=3)))
+
+# unit.arithmetic
+unitArith <- unit(1, "npc") + unit(1:2, "inch")
+
+unitCheck(rep(unitArith, 2),
+          unit(1, "npc") + unit(rep(1:2, 2), "inch"))
+unitCheck(rep(unitArith, each=2),
+          unit(1, "npc") + unit(rep(1:2, each=2), "inch"))
+unitCheck(rep(unitArith, c(2, 1)),
+          unit(1, "npc") + unit(rep(1:2, c(2 ,1)), "inch"))
+unitCheck(rep(unitArith, each=2, len=3),
+          unit(1, "npc") + unit(rep(1:2, each=2, len=3), "inch"))
+unitCheck(rep(unitArith, each=2, len=5),
+          unit(1, "npc") + unit(rep(1:2, each=2, len=5), "inch"))
+unitCheck(rep(unitArith, each=2, times=3),
+          unit(1, "npc") + unit(rep(1:2, each=2, times=3), "inch"))
+
+# unit.list
+arg1 <- unit(1, "npc") + unit(1:2, "inch")
+arg2 <- unit(3, "cm")
+unitList <- unit.c(arg1, arg2)
+
+unitCheck(rep(unitList, 2),
+          unit.c(arg1, arg2, arg1, arg2))
+unitCheck(rep(unitList, each=2),
+          unit.c(rep(arg1, each=2), rep(arg2, 2)))
+unitCheck(rep(unitList, c(2, 1, 2)),
+          unit.c(rep(arg1, c(2, 1)), rep(arg2, 2)))
+unitCheck(rep(unitList, each=2, len=4),
+          rep(arg1, each=2))
+unitCheck(rep(unitList, each=2, len=8),
+          unit.c(rep(arg1, each=2), rep(arg2, 2), rep(arg1, each=2, len=2)))
+unitCheck(rep(unitList, each=2, times=3),
+          unit.c(rep(arg1, each=2), rep(arg2, 2),
+                 rep(arg1, each=2), rep(arg2, 2),
+                 rep(arg1, each=2), rep(arg2, 2)))
+
+# Special test
+# rep() unit.arithmetic where operands have different lengths
+uaDiffLength <- unit(1:2, "npc") + unit(1:3, "npc")
+uaSameLength <- unit(c(1, 2, 1), "npc") + unit(1:3, "npc")
+unitCheck(rep(uaDiffLength, 2),
+          rep(uaSameLength, 2))
+
+
+# Bug report PR#14170 test
+
+x <- unit.c(unit(5,"mm"),unit(3,"npc"))
+rep(x, 2)
+rep(x, each=2)
+rep(x, c(2, 2))
+
+x <- x - unit(1,"mm")
+rep(x, 2)
+rep(x, each=2)
+rep(x, c(2, 2))
+
+
+## grid::unit.pmax, PR#14443
+x <- unit(1, "cm")
+stopifnot(length(unit.pmax(x)) == 1L, length(unit.pmin(x)) == 1L)
+## was 3 in R <= 2.12.0
+
diff --git a/win32/deps/library/lattice/CITATION b/win32/deps/library/lattice/CITATION
new file mode 100644
index 0000000..3219f8b
--- /dev/null
+++ b/win32/deps/library/lattice/CITATION
@@ -0,0 +1,17 @@
+citHeader("To cite the lattice package in publications use:")
+
+citEntry(entry="Book",
+         title = "Lattice: Multivariate Data Visualization with R",
+         author = personList(as.person("Deepayan Sarkar")),
+         publisher = "Springer",
+	 ## edition = "First",
+         address      = "New York",
+         year         = 2008,
+         note         = "ISBN 978-0-387-75968-5",
+         url          = "http://lmdvr.r-forge.r-project.org";,
+         
+         textVersion = 
+         paste("Sarkar, Deepayan (2008)", 
+               "Lattice: Multivariate Data Visualization with R.",
+               "Springer, New York. ISBN 978-0-387-75968-5"))
+
diff --git a/win32/deps/library/lattice/DESCRIPTION b/win32/deps/library/lattice/DESCRIPTION
index 4d3e1cf..5581de5 100644
--- a/win32/deps/library/lattice/DESCRIPTION
+++ b/win32/deps/library/lattice/DESCRIPTION
@@ -1,20 +1,25 @@
-Package: lattice
-Version: 0.17-25
-Date: 2009/05/14
-Priority: recommended
-Title: Lattice Graphics
-Author: Deepayan Sarkar <deepayan sarkar r-project org>
-Maintainer: Deepayan Sarkar <deepayan sarkar r-project org>
-Description: Implementation of Trellis Graphics. See ?Lattice for a
-        brief introduction
-Depends: R (>= 2.5.0)
-Suggests: grid, KernSmooth
-Imports: grid, grDevices, graphics, stats, utils
-Enhances: chron
-LazyLoad: yes
-LazyData: yes
-License: GPL (>= 2)
-Packaged: Thu May 14 16:27:57 2009; dsarkar
-Repository: CRAN
-Date/Publication: 2009-05-15 11:26:16
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 13:04:25 UTC; windows
+Package: lattice
+Version: 0.20-10
+Date: 2012/08/21
+Priority: recommended
+Title: Lattice Graphics
+Author: Deepayan Sarkar <deepayan sarkar r-project org>
+Maintainer: Deepayan Sarkar <deepayan sarkar r-project org>
+Description: Lattice is a powerful and elegant high-level data
+        visualization system, with an emphasis on multivariate data,
+        that is sufficient for typical graphics needs, and is also
+        flexible enough to handle most nonstandard requirements.  See
+        ?Lattice for an introduction.
+Depends: R (>= 2.14.0)
+Suggests: grid, KernSmooth, MASS
+Imports: grid, grDevices, graphics, stats, utils, methods
+Enhances: chron
+LazyLoad: yes
+LazyData: yes
+License: GPL (>= 2)
+URL: http://lattice.r-forge.r-project.org/
+Packaged: 2012-08-21 11:22:23 UTC; deepayan
+Repository: CRAN
+Date/Publication: 2012-08-22 13:48:18
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:10:35 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/lattice/INDEX b/win32/deps/library/lattice/INDEX
index f4e928a..5a9a01f 100644
--- a/win32/deps/library/lattice/INDEX
+++ b/win32/deps/library/lattice/INDEX
@@ -1,68 +1,70 @@
-axis.default            Default axis annotation utilities
-banking                 Banking
-barchart.table          table methods for barchart and dotplot
-barley                  Yield data from a Minnesota barley trial
-cloud                   3d Scatter Plot and Wireframe Surface Plot
-draw.colorkey           Produce a Colorkey for levelplot
-draw.key                Produce a Legend or Key
-environmental           Atmospheric environmental conditions in New
-                        York City
-equal.count             shingles
-ethanol                 Engine exhaust fumes from burning ethanol
-histogram               Histograms and Kernel Density Plots
-Lattice                 Lattice Graphics
-lattice.options         Low-level Options Controlling Behaviour of
-                        Lattice
-latticeParseFormula     Parse Trellis formula
-level.colors            A function to compute false colors representing
-                        a numeric or categorical variable
-levelplot               Level plots and contour plots
-llines                  Replacements of traditional graphics functions
-lset                    Interface to modify Trellis Settings -
-                        Deprecated
-make.groups             Grouped data from multiple vectors
-melanoma                Melanoma skin cancer incidence
-oneway                  Fit One-way Model
-packet.panel.default    Associating Packets with Panels
-panel.axis              Panel Function for Drawing Axis Ticks and
-                        Labels
-panel.barchart          Default Panel Function for barchart
-panel.bwplot            Default Panel Function for bwplot
-panel.cloud             Default Panel Function for cloud
-panel.densityplot       Default Panel Function for densityplot
-panel.dotplot           Default Panel Function for dotplot
-panel.functions         Useful Panel Functions
-panel.histogram         Default Panel Function for histogram
-panel.identify          Functions to Interact with Lattice Plots
-panel.levelplot         Default Panel Function for levelplot
-panel.number            Accessing Auxiliary Information During Plotting
-panel.pairs             Default Superpanel Function for splom
-panel.parallel          Default Panel Function for parallel
-panel.qqmath            Default Panel and Prepanel Function for qqmath
-panel.qqmathline        Useful panel function with qqmath
-panel.smoothScatter     Lattice panel function analogous to
-                        smoothScatter
-panel.stripplot         Default Panel Function for stripplot
-panel.superpose         Panel Function for Display Marked by groups
-panel.violin            Panel Function to create Violin Plots
-panel.xyplot            Default Panel Function for xyplot
-prepanel.default.bwplot
-                        Default Prepanel Functions
-prepanel.lmline         Useful Prepanel Function for Lattice
-print.trellis           Plot and Summarize Trellis Objects
-qq                      Quantile-Quantile Plots of Two Samples
-qqmath                  Q-Q Plot with Theoretical Distribution
-rfs                     Residual and Fit Spread Plots
-Rows                    Extract rows from a list
-simpleKey               Function to generate a simple key
-simpleTheme             Function to generate a simple theme
-singer                  Heights of New York Choral Society singers
-splom                   Scatter Plot Matrices
-strip.default           Default Trellis Strip Function
-tmd                     Tukey Mean-Difference Plot
-trellis.device          Initializing Trellis Displays
-trellis.object          A Trellis Plot Object
-trellis.par.get         Graphical Parameters for Trellis Displays
-update.trellis          Retrieve and Update Trellis Object
-utilities.3d            Utility functions for 3-D plots
-xyplot                  Common Bivariate Trellis Plots
+Lattice                 Lattice Graphics
+Rows                    Extract rows from a list
+axis.default            Default axis annotation utilities
+banking                 Banking
+barchart.table          table methods for barchart and dotplot
+barley                  Yield data from a Minnesota barley trial
+cloud                   3d Scatter Plot and Wireframe Surface Plot
+current.row             Accessing Auxiliary Information During Plotting
+draw.colorkey           Produce a Colorkey for levelplot
+draw.key                Produce a Legend or Key
+environmental           Atmospheric environmental conditions in New
+                        York City
+equal.count             shingles
+ethanol                 Engine exhaust fumes from burning ethanol
+histogram               Histograms and Kernel Density Plots
+lattice.options         Low-level Options Controlling Behaviour of
+                        Lattice
+latticeParseFormula     Parse Trellis formula
+level.colors            A function to compute false colors representing
+                        a numeric or categorical variable
+levelplot               Level plots and contour plots
+llines                  Replacements of traditional graphics functions
+lset                    Interface to modify Trellis Settings - Defunct
+make.groups             Grouped data from multiple vectors
+melanoma                Melanoma skin cancer incidence
+oneway                  Fit One-way Model
+packet.panel.default    Associating Packets with Panels
+panel.axis              Panel Function for Drawing Axis Ticks and
+                        Labels
+panel.barchart          Default Panel Function for barchart
+panel.bwplot            Default Panel Function for bwplot
+panel.cloud             Default Panel Function for cloud
+panel.densityplot       Default Panel Function for densityplot
+panel.dotplot           Default Panel Function for dotplot
+panel.functions         Useful Panel Function Components
+panel.histogram         Default Panel Function for histogram
+panel.identify          Functions to Interact with Lattice Plots
+panel.levelplot         Panel Functions for levelplot and contourplot
+panel.loess             Panel Function to Add a LOESS Smooth
+panel.pairs             Default Superpanel Function for splom
+panel.parallel          Default Panel Function for parallel
+panel.qqmath            Default Panel Function for qqmath
+panel.qqmathline        Useful panel function with qqmath
+panel.smoothScatter     Lattice panel function analogous to
+                        smoothScatter
+panel.spline            Panel Function to Add a Spline Smooth
+panel.stripplot         Default Panel Function for stripplot
+panel.superpose         Panel Function for Display Marked by groups
+panel.violin            Panel Function to create Violin Plots
+panel.xyplot            Default Panel Function for xyplot
+prepanel.default.bwplot
+                        Default Prepanel Functions
+prepanel.lmline         Useful Prepanel Function for Lattice
+print.trellis           Plot and Summarize Trellis Objects
+qq                      Quantile-Quantile Plots of Two Samples
+qqmath                  Q-Q Plot with Theoretical Distribution
+rfs                     Residual and Fit Spread Plots
+simpleKey               Function to generate a simple key
+simpleTheme             Function to generate a simple theme
+singer                  Heights of New York Choral Society singers
+splom                   Scatter Plot Matrices
+strip.default           Default Trellis Strip Function
+tmd                     Tukey Mean-Difference Plot
+trellis.device          Initializing Trellis Displays
+trellis.object          A Trellis Plot Object
+trellis.par.get         Graphical Parameters for Trellis Displays
+update.trellis          Retrieve and Update Trellis Object
+utilities.3d            Utility functions for 3-D plots
+xyplot                  Common Bivariate Trellis Plots
+xyplot.ts               Time series plotting methods
diff --git a/win32/deps/library/lattice/LICENSE b/win32/deps/library/lattice/LICENSE
new file mode 100644
index 0000000..2e33dd5
--- /dev/null
+++ b/win32/deps/library/lattice/LICENSE
@@ -0,0 +1,16 @@
+
+This software is distributed 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.
+
+As of writing, this essentially boils down to two possible licenses,
+GPL version 2 and version 3.  Copies of these licenses are available
+in files GPL-2 and GPL-3 in the sources of this package, as well as at
+
+http://www.r-project.org/Licenses/
+
+They can also be viewed from within R using 
+
+RShowDoc("GPL-2")
+RShowDoc("GPL-3")
+
diff --git a/win32/deps/library/lattice/Meta/Rd.rds b/win32/deps/library/lattice/Meta/Rd.rds
index 7a1dd63..56abff0 100644
Binary files a/win32/deps/library/lattice/Meta/Rd.rds and b/win32/deps/library/lattice/Meta/Rd.rds differ
diff --git a/win32/deps/library/lattice/Meta/data.rds b/win32/deps/library/lattice/Meta/data.rds
index 0054219..7f643bb 100644
Binary files a/win32/deps/library/lattice/Meta/data.rds and b/win32/deps/library/lattice/Meta/data.rds differ
diff --git a/win32/deps/library/lattice/Meta/demo.rds b/win32/deps/library/lattice/Meta/demo.rds
index b42b138..a827611 100644
Binary files a/win32/deps/library/lattice/Meta/demo.rds and b/win32/deps/library/lattice/Meta/demo.rds differ
diff --git a/win32/deps/library/lattice/Meta/hsearch.rds b/win32/deps/library/lattice/Meta/hsearch.rds
index e663335..ee2758e 100644
Binary files a/win32/deps/library/lattice/Meta/hsearch.rds and b/win32/deps/library/lattice/Meta/hsearch.rds differ
diff --git a/win32/deps/library/lattice/Meta/links.rds b/win32/deps/library/lattice/Meta/links.rds
new file mode 100644
index 0000000..73a41ac
Binary files /dev/null and b/win32/deps/library/lattice/Meta/links.rds differ
diff --git a/win32/deps/library/lattice/Meta/nsInfo.rds b/win32/deps/library/lattice/Meta/nsInfo.rds
index a815a4a..3806a85 100644
Binary files a/win32/deps/library/lattice/Meta/nsInfo.rds and b/win32/deps/library/lattice/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/lattice/Meta/package.rds b/win32/deps/library/lattice/Meta/package.rds
index 23511be..e99b233 100644
Binary files a/win32/deps/library/lattice/Meta/package.rds and b/win32/deps/library/lattice/Meta/package.rds differ
diff --git a/win32/deps/library/lattice/NAMESPACE b/win32/deps/library/lattice/NAMESPACE
index df109b8..216fbc1 100644
--- a/win32/deps/library/lattice/NAMESPACE
+++ b/win32/deps/library/lattice/NAMESPACE
@@ -3,16 +3,14 @@ useDynLib(lattice, .registration = TRUE)
 
 import(grid)
 
-
-## ## can I do this?
-## export(grid.prompt)
-
+importFrom(methods, hasArg)
 
 importFrom(grDevices,
 
-           dev.list, cm.colors, gray, col2rgb,
+           dev.hold, dev.flush,
+           dev.list, cm.colors, gray, col2rgb, rgb,
            heat.colors, grey, hsv, xy.coords,
-           boxplot.stats, contourLines)
+           boxplot.stats, contourLines, colorRampPalette, as.raster)
 
 importFrom(graphics, par, plot, co.intervals, hist)
 
@@ -23,7 +21,7 @@ importFrom(stats,
 
            as.formula, density, fitted.values, loess.smooth, median,
            ppoints, qnorm, residuals, update, var, coef, quantile, lm,
-           dnorm, qunif)
+           dnorm, qunif, uniroot, smooth.spline)
 
 
 export(
@@ -44,7 +42,8 @@ export(
        cloud,
        wireframe,
        splom,
-       parallel,
+       parallel, # deprecated
+       parallelplot,
        tmd,
 
        rfs,
@@ -62,7 +61,7 @@ export(
        panel.stripplot,
        panel.xyplot,
        panel.contourplot,
-       panel.levelplot,
+       panel.levelplot,   panel.levelplot.raster,
        panel.cloud,       panel.3dscatter, 
        panel.wireframe,   panel.3dwire,
        panel.pairs,
@@ -78,6 +77,7 @@ export(
 
        panel.superpose,
        panel.superpose.2,
+       panel.superpose.plain,
        
        ## data-driven (usually summary of some sort)
 
@@ -88,6 +88,7 @@ export(
        panel.linejoin,
        panel.lmline,
        panel.loess,
+       panel.spline,
        panel.qqmathline,
 
        ## decorative / adds reference
@@ -126,6 +127,7 @@ export(
        prepanel.tmd.default, prepanel.tmd.qqmath,
        prepanel.lmline,
        prepanel.loess,
+       prepanel.spline,
        prepanel.qqmathline,
 
 
@@ -240,60 +242,66 @@ S3method(print,    summary.trellis)
 
 ## methods for high level functions
 
-S3method(barchart,    formula)
-S3method(barchart,    array)
-S3method(barchart,    default)
-S3method(barchart,    matrix)
-S3method(barchart,    numeric)
-S3method(barchart,    table)
-
-S3method(bwplot,      formula)
-S3method(bwplot,      numeric)
-S3method(densityplot, formula)
-S3method(densityplot, numeric)
-S3method(dotplot,     formula)
-S3method(dotplot,     array)
-S3method(dotplot,     default)
-S3method(dotplot,     matrix)
-S3method(dotplot,     numeric)
-S3method(dotplot,     table)
-S3method(histogram,   formula)
-S3method(histogram,   factor)
-S3method(histogram,   numeric)
-S3method(qqmath,      formula)
-S3method(qqmath,      numeric)
-S3method(stripplot,   formula)
-S3method(stripplot,   numeric)
-S3method(qq,          formula)
-S3method(xyplot,      formula)
-S3method(levelplot,   formula)
-S3method(levelplot,   table)
-S3method(levelplot,   array)
-S3method(levelplot,   matrix)
-S3method(contourplot, formula)
-S3method(contourplot, table)
-S3method(contourplot, array)
-S3method(contourplot, matrix)
-S3method(cloud,       formula)
-S3method(cloud,       matrix)
-S3method(cloud,       table)
-S3method(wireframe,   formula)
-S3method(wireframe,   matrix)
-S3method(splom,       formula)
-S3method(splom,       matrix)
-S3method(splom,       data.frame)
-S3method(parallel,    formula)
-S3method(parallel,    matrix)
-S3method(parallel,    data.frame)
-
-S3method(tmd,         formula)
-S3method(tmd,         trellis)
-
-
-S3method(llines,      default)
-S3method(ltext,       default)
-S3method(lpoints,     default)
-
+S3method(barchart,      formula)
+S3method(barchart,      array)
+S3method(barchart,      default)
+S3method(barchart,      matrix)
+S3method(barchart,      numeric)
+S3method(barchart,      table)
+
+S3method(bwplot,        formula)
+S3method(bwplot,        numeric)
+S3method(densityplot,   formula)
+S3method(densityplot,   numeric)
+S3method(dotplot,       formula)
+S3method(dotplot,       array)
+S3method(dotplot,       default)
+S3method(dotplot,       matrix)
+S3method(dotplot,       numeric)
+S3method(dotplot,       table)
+S3method(histogram,     formula)
+S3method(histogram,     factor)
+S3method(histogram,     numeric)
+S3method(qqmath,        formula)
+S3method(qqmath,        numeric)
+S3method(stripplot,     formula)
+S3method(stripplot,     numeric)
+S3method(qq,            formula)
+S3method(xyplot,        formula)
+S3method(xyplot,        ts)
+S3method(levelplot,     formula)
+S3method(levelplot,     table)
+S3method(levelplot,     array)
+S3method(levelplot,     matrix)
+S3method(contourplot,   formula)
+S3method(contourplot,   table)
+S3method(contourplot,   array)
+S3method(contourplot,   matrix)
+S3method(cloud,         formula)
+S3method(cloud,         matrix)
+S3method(cloud,         table)
+S3method(wireframe,     formula)
+S3method(wireframe,     matrix)
+S3method(splom,         formula)
+S3method(splom,         matrix)
+S3method(splom,         data.frame)
+
+S3method(parallelplot,  formula)
+S3method(parallelplot,  matrix)
+S3method(parallelplot,  data.frame)
+
+# deprecated
+S3method(parallel,  formula)
+S3method(parallel,  matrix)
+S3method(parallel,  data.frame)
+
+S3method(tmd,           formula)
+S3method(tmd,           trellis)
+
+
+S3method(llines,        default)
+S3method(ltext,         default)
+S3method(lpoints,       default)
 
 
 ### Local variables:
diff --git a/win32/deps/library/lattice/NEWS b/win32/deps/library/lattice/NEWS
index b446364..48499d1 100644
--- a/win32/deps/library/lattice/NEWS
+++ b/win32/deps/library/lattice/NEWS
@@ -1,5 +1,126 @@
 
 
+Changes in lattice 0.20
+=======================
+
+ o The primary goal of the 0.20 series is to further improve
+   documentation, building up to an eventual 1.0 release.  Specific
+   major changes are given below.
+
+ o Use dev.hold()/dev.flush() introduced in R 2.14.0 for smoother
+   displays and transition.
+
+ o It is now easier to use raster images in levelplot() by specifying
+   top-level argument 'useRaster=TRUE'.
+
+ o 'pos' can now be a vector in ltext(), just as it can in text().
+
+ o Explicit components in 'colorkey' (for levelplot()) to specify
+   graphical parameters of boundary and tick marks/labels.
+
+ o "spline" added as a possibly 'type' in panel.xyplot(), following a
+   suggestion from Patrick Breheny.
+
+ o Support for traditional graphics-like log scale annotation, using
+   'scales=list(equispaced.log = FALSE)'.
+
+ o parallel() deprecated in favour of parallelplot(), to avoid
+   potential confusion with the parallel package.
+
+
+Changes in lattice 0.19
+=======================
+
+ o The primary goal of the 0.19 series is to improve documentation and
+   fix some obscure but long-standing bugs, building up to an eventual
+   1.0 release.  Specific major changes are given below.
+
+ o Added new arguments 'grid' and 'abline' in panel.xyplot().
+
+ o Added a "panel.background" setting.
+
+ o Restructured storage of plot-specific information, fixing bug
+   reported in
+   https://stat.ethz.ch/pipermail/r-help/2007-October/143567.html
+
+ o Added a CITATION file.
+
+ o Added a new "axis.text" setting. 
+
+ o Added the option to scale data inside panel.3dscatter() and
+   panel.3dwire() rather than assuming ther are already scaled.  This
+   may be helpful for use in user-written panel functions, with
+   (additional) data specified in the original scale.
+
+ o 'varnames' can now be expressions in splom()/parallel().
+ 
+ o Added support for 'xlab.top' and 'ylab.right' arguments.
+
+ o Improved axis labelling in splom(), including support for date-time
+   data.
+
+ o panel.pairs() now passes arguments i and j to (sub)panel and
+   diag.panel functions.
+
+ o Default prepanel functions are now user-settable through
+   lattice.options()
+
+ o par.[main|sub|xlab|ylab].text parameter settings are more powerful.
+
+ o Added support for 'just' component in draw.key() to allow
+   justification of legend placement.
+
+ o Graphical arguments in panel.superpose can now be lists.
+
+ o Added support for raster colorkeys.
+
+ o Added new 'height' component for keys.
+
+ o Improved vectorization of graphical parameters in panel.bwplot.
+
+ o Expanded trellis.grobname() and used it to provide a name for all grobs.
+
+ o New panel.spline() function.
+
+bug fixes
+---------
+
+ o More realistic check for equispaced grid in
+   panel.levelplot.raster().
+
+ o Improved partial matching of component names in 'key' and 'scales'.
+
+ o xyplot.ts() now allows graphical parameters to be given as vectors 
+   (inside a list) for each series. Passes lists to panel.superpose.
+
+ o panel.axis() now does NOT draw tick marks if 'ticks = FALSE'.
+
+
+Changes in lattice 0.18
+=======================
+
+ o Hosting of the upstream sources has moved to R-forge.  This allows,
+   among other things, the use of the R-forge issue tracker.
+
+ o New xyplot.ts method, merging versions previously available
+   in latticeExtra and zoo (thanks to the efforts of Felix Andrews)
+
+ o An argument 'group.value', containing the level of the group, is now
+   passed by panel.superpose to the 'panel.groups' function
+
+ o Specifying 'auto.key' as a list now produces a legend even in the
+   absence of 'groups', provided a 'text' component has been included
+
+ o The 'layout' argument now accepts NA for number of columns or rows.
+
+ o Scale limits 'xlim' & 'ylim' can have one NA to fix only one side.
+
+ o Date and POSIXt scales now use new methods to calculate axis ticks,
+   and now respond to the 'tick.number' component of 'scales'.
+
+ o 'panel.qqmath' gains an argument 'tails.n' for exact data on tails.
+
+
 Changes in lattice 0.17
 =======================
 
@@ -37,6 +158,8 @@ new features
 
  o Added German translations (contributed by Chris Leick)
 
+ o reordered documentation to make PDF manual more readable
+
 bug fixes
 ---------
 
@@ -76,7 +199,7 @@ changes in behaviour
    their list form, they support more graphical parameters as well as
    finer positioning (justification, rotation, etc.)
 
- o 'strip.left' gets called with 'horizontal = FALSE', so 
+ o 'strip.left' gets called with 'horizontal = FALSE', so
    'strip.left = strip.default' now works as expected
 
 
@@ -110,7 +233,7 @@ new features
    panel.brush.splom()
 
  o There is now an error handling mechanism for panel functions.  By
-   default, errors in panel functions no longer stop execution.  See 
+   default, errors in panel functions no longer stop execution.  See
    ?print.trellis for details.
 
 
@@ -119,7 +242,7 @@ changes in behaviour
 
  o non-numeric data no longer cause warnings in bwplot
 
- o the default padding between components has been changed to 
+ o the default padding between components has been changed to
    0.5 "chars"
 
 
@@ -207,7 +330,7 @@ new features
    by calling 'panel.superpose'.  Consequently, the default of 'panel'
    in 'xyplot' etc does not need to be conditional on 'groups'.
 
- o added 'lineheight' as a graphical parameter where appropriate. 
+ o added 'lineheight' as a graphical parameter where appropriate.
 
  o added a 'grid.pars' setting for arbitrary grid parameters to be
    set initially via gpar().
@@ -286,8 +409,8 @@ Changes in lattice 0.12
 improvements
 ------------
 
- o panel.bwplot has a new 'stats' argument, which is a function used to 
-   calculate the statistics in the box and whisker plot.  Defaults 
+ o panel.bwplot has a new 'stats' argument, which is a function used to
+   calculate the statistics in the box and whisker plot.  Defaults
    to boxplot.stats, which was the hard-coded value earlier.
 
  o panel.bwplot has been re-implemented.  Faster, avoids direct grid
@@ -478,7 +601,7 @@ new features
  o type="H" in lplot.xy (for horizontal line).  New argument
    'horizontal' for panel.xyplot, which affects what happens for
    various 'type'-s.
- 
+
  o type="g" in panel.xyplot, which draws a reference grid
 
  o the print method now (optionally) saves the (last) object printed
@@ -508,7 +631,7 @@ changes in behaviour
  o choice of color for grouped barcharts now taken from a new setting
    parameter 'superpose.fill' and not 'regions' as previously
 
- o arguments to panel.levelplot has changed (this is related to how 
+ o arguments to panel.levelplot has changed (this is related to how
    default colors are obtained, as described above).
 
 
@@ -576,8 +699,8 @@ new features
    multiple legends and the use of arbitrary grid objects as keys
 
  o option to NOT drop unused factor levels when subsetting, by setting
-   drop.unused.levels = FALSE or 
-   drop.unused.levels = list(cond = FALSE, data = FALSE) 
+   drop.unused.levels = FALSE or
+   drop.unused.levels = list(cond = FALSE, data = FALSE)
    in high-level functions like xyplot.
 
  o Ability to attach settings to a trellis object (rather than
@@ -612,7 +735,7 @@ bug fixes
 
  o Fixed important bug concerning interaction of subscripts and
    subsets
-   
+
 
  o lots of other fixes, mostly obscure
 
@@ -639,7 +762,7 @@ Changes in lattice 0.8
  o Clipping can now be turned off in panels and strips via the
    trellis.par.get("clip") setting.
 
-See the Changelog for other minor changes. 
+See the Changelog for other minor changes.
 
 
 
@@ -692,7 +815,7 @@ scales
 Changes in lattice 0.6
 ======================
 
-API change: 
+API change:
 ----------
 
  o panel functions: In earlier versions, panel functions and prepanel
@@ -747,7 +870,7 @@ New Features and Fixes:
    routine currently used is a hack of axis.POSIXt (without the format
    option), but will hopefully improve in future.
 
- o 3-D functions: 
+ o 3-D functions:
 
    The 3-D functions cloud and wireframe have been greatly improved in
    terms of extensibility. The code is much cleaner, and writing new
@@ -778,7 +901,7 @@ New Features and Fixes:
 
 
 
-Known bugs: 
+Known bugs:
 ==========
 
  o Handling of NA values are often inconsistent and buggy. Some of
@@ -794,7 +917,7 @@ Known bugs:
 Changes in lattice 0.5
 ======================
 
-Not many. 
+Not many.
 
  o Biggest change in the way settings are handled. Settings are now
    stored in a global list called lattice.theme, and is truly
@@ -821,7 +944,7 @@ Not many.
 
  o Following changes in grid, calls to base R graphics and lattice
    functions can now be mixed.
-  
+
 
 Changes in lattice 0.4
 ======================
@@ -859,7 +982,7 @@ bugfixes (notably in levelplot). The important changes are:
    the left, top or bottom as well
 
  o new ``lines'' component in the par.strip.text argument that can be
-   used to change the height of strips 
+   used to change the height of strips
 
  o xlab, main etc can be double height strings (containing "\n"-s),
    the spaces allocated for these would be automatically adjusted
@@ -883,7 +1006,7 @@ bugfixes (notably in levelplot). The important changes are:
 
 
 
-  
+
 
 Changes in lattice 0.3
 ======================
@@ -905,13 +1028,13 @@ New Features:
  o levelplot (but no contourplot. In particular, the contour = T option
    in levelplot does not work)
 
- o tmd now works on the output from qq 
+ o tmd now works on the output from qq
 
  o panel function names can now be quoted strings
 
  o scales and its x and y components can now be just a character
    string like "free" or "sliced", i.e., the relation tag can be
-   omitted. 
+   omitted.
 
  o extension to the `type' argument in panel.xyplot and
    panel.superpose to allow stair-like and histogram-like plots
@@ -926,7 +1049,7 @@ New Features:
    functions to help port existing S-Plus Trellis code. See below for
    details.
 
- o changes in print.trellis to allow mixing of Lattice and usual R 
+ o changes in print.trellis to allow mixing of Lattice and usual R
    graphics. See below for details.
 
 
@@ -965,7 +1088,7 @@ Still Missing [OBSOLETE, except for the parts about piechart and scale]
  o Some components of scale (I haven't found a full list, so
    can't say exactly which are missing)
 
- o Fonts 
+ o Fonts
 
  o axis labels badly implemented, no checking for overlaps.
 
diff --git a/win32/deps/library/lattice/R/lattice b/win32/deps/library/lattice/R/lattice
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/lattice/R/lattice
+++ b/win32/deps/library/lattice/R/lattice
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/lattice/R/lattice.rdb b/win32/deps/library/lattice/R/lattice.rdb
index 42d9aaa..d857b91 100644
Binary files a/win32/deps/library/lattice/R/lattice.rdb and b/win32/deps/library/lattice/R/lattice.rdb differ
diff --git a/win32/deps/library/lattice/R/lattice.rdx b/win32/deps/library/lattice/R/lattice.rdx
index 7f21296..fc4fe4c 100644
Binary files a/win32/deps/library/lattice/R/lattice.rdx and b/win32/deps/library/lattice/R/lattice.rdx differ
diff --git a/win32/deps/library/lattice/data/Rdata.rdb b/win32/deps/library/lattice/data/Rdata.rdb
index bcce736..5af8262 100644
Binary files a/win32/deps/library/lattice/data/Rdata.rdb and b/win32/deps/library/lattice/data/Rdata.rdb differ
diff --git a/win32/deps/library/lattice/data/Rdata.rds b/win32/deps/library/lattice/data/Rdata.rds
index 64ed4a3..e4eb0a6 100644
Binary files a/win32/deps/library/lattice/data/Rdata.rds and b/win32/deps/library/lattice/data/Rdata.rds differ
diff --git a/win32/deps/library/lattice/data/Rdata.rdx b/win32/deps/library/lattice/data/Rdata.rdx
index ac4064f..a327b5e 100644
Binary files a/win32/deps/library/lattice/data/Rdata.rdx and b/win32/deps/library/lattice/data/Rdata.rdx differ
diff --git a/win32/deps/library/lattice/demo/lattice.R b/win32/deps/library/lattice/demo/lattice.R
index 3ec5b4f..f20b9c9 100644
--- a/win32/deps/library/lattice/demo/lattice.R
+++ b/win32/deps/library/lattice/demo/lattice.R
@@ -1,21 +1,7 @@
 
 require(grid)
-
-## branch for compatibility with older R
-
-old.prompt <-
-    if (exists("devAskNewPage", mode = "function",
-               where = getNamespace("grDevices"),
-               inherits = FALSE)) {
-        devAskNewPage(TRUE)
-    } else {
-        grid.prompt(TRUE)
-    }
-    
-
-
+old.prompt <- devAskNewPage(TRUE)
 ## store current settings, to be restored later
-
 old.settings <- trellis.par.get()
 
 ## changing settings to new 'theme'
@@ -52,7 +38,7 @@ states <- data.frame(state.x77,
 xyplot(Murder ~ Population | state.region, data = states, 
        groups = state.name,
        panel = function(x, y, subscripts, groups)  
-       ltext(x = x, y = y, label = groups[subscripts],
+       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),
@@ -70,7 +56,7 @@ levels(states$state.region) <-
 xyplot(Murder  ~ Population | state.region, data = states,
        groups = as.character(state.name),
        panel = function(x, y, subscripts, groups)
-       ltext(x = x, y = y, label = groups[subscripts], srt = -50, col = "blue",
+       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", 
@@ -93,14 +79,14 @@ 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 = function(irr, ref, height, w = .5)
+          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, len = 2*n), 2*n, n)
-ty <- matrix(seq(-pi, pi, len = n) / 2, 2*n, n, byrow = T)
+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)
@@ -141,23 +127,29 @@ barchart(variety ~ yield | year * site, barley, origin = 0,
                   bg = trellis.par.get("strip.background")$col[which.given],
                   ...) {
              axis.line <- trellis.par.get("axis.line")
-             pushViewport(viewport(clip = trellis.par.get("clip")$strip))
+             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)
+                       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)
+                       x = .28, y = .5, adj = 0,
+                       name.type = "strip")
              }
              upViewport()
-             grid.rect(gp =
+             grid.rect(name = trellis.grobname("border", type="strip"),
+                       gp =
                        gpar(col = axis.line$col,
                             lty = axis.line$lty,
                             lwd = axis.line$lwd,
@@ -166,14 +158,7 @@ barchart(variety ~ yield | year * site, barley, origin = 0,
          }, par.strip.text = list(lines = 0.4))
 
 
-trellis.par.set(theme = old.settings)
-
-if (exists("devAskNewPage", mode = "function",
-           where = getNamespace("grDevices"),
-           inherits = FALSE)) {
-    devAskNewPage(old.prompt)
-} else {
-    grid.prompt(old.prompt)
-}
+trellis.par.set(theme = old.settings, strict = 2)
+devAskNewPage(old.prompt)
 
 
diff --git a/win32/deps/library/lattice/help/AnIndex b/win32/deps/library/lattice/help/AnIndex
index c6dd221..1eab752 100644
--- a/win32/deps/library/lattice/help/AnIndex
+++ b/win32/deps/library/lattice/help/AnIndex
@@ -108,11 +108,12 @@ panel.identify	interaction
 panel.identify.cloud	interaction
 panel.identify.qqmath	interaction
 panel.levelplot	panel.levelplot
+panel.levelplot.raster	panel.levelplot
 panel.linejoin	panel.functions
 panel.lines	llines
 panel.link.splom	interaction
 panel.lmline	panel.functions
-panel.loess	panel.functions
+panel.loess	panel.loess
 panel.mathdensity	panel.functions
 panel.number	panel.number
 panel.pairs	panel.pairs
@@ -127,10 +128,12 @@ panel.refline	panel.functions
 panel.rug	panel.functions
 panel.segments	llines
 panel.smoothScatter	panel.smoothScatter
+panel.spline	panel.spline
 panel.splom	panel.xyplot
 panel.stripplot	panel.stripplot
 panel.superpose	panel.superpose
 panel.superpose.2	panel.superpose
+panel.superpose.plain	panel.superpose
 panel.text	llines
 panel.tmd.default	tmd
 panel.tmd.qqmath	tmd
@@ -138,9 +141,10 @@ panel.violin	panel.violin
 panel.wireframe	panel.cloud
 panel.xyplot	panel.xyplot
 parallel	splom
-parallel.data.frame	splom
-parallel.formula	splom
-parallel.matrix	splom
+parallelplot	splom
+parallelplot.data.frame	splom
+parallelplot.formula	splom
+parallelplot.matrix	splom
 plot.shingle	shingles
 plot.trellis	print.trellis
 prepanel.default.bwplot	prepanel.default
@@ -156,6 +160,7 @@ prepanel.default.xyplot	prepanel.default
 prepanel.lmline	prepanel.functions
 prepanel.loess	prepanel.functions
 prepanel.qqmathline	prepanel.functions
+prepanel.spline	prepanel.functions
 prepanel.tmd.default	tmd
 prepanel.tmd.qqmath	tmd
 print.shingle	shingles
@@ -210,6 +215,7 @@ wireframe.matrix	cloud
 xscale.components.default	axis.default
 xyplot	xyplot
 xyplot.formula	xyplot
+xyplot.ts	xyplot.ts
 yscale.components.default	axis.default
 [.shingle	shingles
 [.trellis	update.trellis
diff --git a/win32/deps/library/lattice/help/aliases.rds b/win32/deps/library/lattice/help/aliases.rds
new file mode 100644
index 0000000..aebed54
Binary files /dev/null and b/win32/deps/library/lattice/help/aliases.rds differ
diff --git a/win32/deps/library/lattice/help/lattice.rdb b/win32/deps/library/lattice/help/lattice.rdb
new file mode 100644
index 0000000..b8b45e2
Binary files /dev/null and b/win32/deps/library/lattice/help/lattice.rdb differ
diff --git a/win32/deps/library/lattice/help/lattice.rdx b/win32/deps/library/lattice/help/lattice.rdx
new file mode 100644
index 0000000..e177e0c
Binary files /dev/null and b/win32/deps/library/lattice/help/lattice.rdx differ
diff --git a/win32/deps/library/lattice/help/paths.rds b/win32/deps/library/lattice/help/paths.rds
new file mode 100644
index 0000000..951af64
Binary files /dev/null and b/win32/deps/library/lattice/help/paths.rds differ
diff --git a/win32/deps/library/lattice/html/00Index.html b/win32/deps/library/lattice/html/00Index.html
new file mode 100644
index 0000000..53f09d1
--- /dev/null
+++ b/win32/deps/library/lattice/html/00Index.html
@@ -0,0 +1,591 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Lattice Graphics</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Lattice Graphics
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;lattice&rsquo; version 0.20-10</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 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 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 width="25%"><a href="shingles.html">as.character.shingleLevel</a></td>
+<td>shingles</td></tr>
+<tr><td width="25%"><a href="shingles.html">as.data.frame.shingle</a></td>
+<td>shingles</td></tr>
+<tr><td width="25%"><a href="shingles.html">as.factorOrShingle</a></td>
+<td>shingles</td></tr>
+<tr><td width="25%"><a href="shingles.html">as.shingle</a></td>
+<td>shingles</td></tr>
+<tr><td 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 width="25%"><a href="banking.html">banking</a></td>
+<td>Banking</td></tr>
+<tr><td width="25%"><a href="xyplot.html">barchart</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td width="25%"><a href="barchart.table.html">barchart.array</a></td>
+<td>table methods for barchart and dotplot</td></tr>
+<tr><td width="25%"><a href="xyplot.html">barchart.default</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td width="25%"><a href="xyplot.html">barchart.formula</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td width="25%"><a href="barchart.table.html">barchart.matrix</a></td>
+<td>table methods for barchart and dotplot</td></tr>
+<tr><td width="25%"><a href="xyplot.html">barchart.numeric</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td width="25%"><a href="barchart.table.html">barchart.table</a></td>
+<td>table methods for barchart and dotplot</td></tr>
+<tr><td width="25%"><a href="barley.html">barley</a></td>
+<td>Yield data from a Minnesota barley trial</td></tr>
+<tr><td width="25%"><a href="xyplot.html">bwplot</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td width="25%"><a href="xyplot.html">bwplot.formula</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td 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 width="25%"><a href="trellis.device.html">canonical.theme</a></td>
+<td>Initializing Trellis Displays</td></tr>
+<tr><td width="25%"><a href="cloud.html">cloud</a></td>
+<td>3d Scatter Plot and Wireframe Surface Plot</td></tr>
+<tr><td width="25%"><a href="cloud.html">cloud.formula</a></td>
+<td>3d Scatter Plot and Wireframe Surface Plot</td></tr>
+<tr><td width="25%"><a href="cloud.html">cloud.matrix</a></td>
+<td>3d Scatter Plot and Wireframe Surface Plot</td></tr>
+<tr><td width="25%"><a href="cloud.html">cloud.table</a></td>
+<td>3d Scatter Plot and Wireframe Surface Plot</td></tr>
+<tr><td width="25%"><a href="trellis.device.html">col.whitebg</a></td>
+<td>Initializing Trellis Displays</td></tr>
+<tr><td width="25%"><a href="levelplot.html">contourplot</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td width="25%"><a href="levelplot.html">contourplot.array</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td width="25%"><a href="levelplot.html">contourplot.formula</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td width="25%"><a href="levelplot.html">contourplot.matrix</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td width="25%"><a href="levelplot.html">contourplot.table</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td width="25%"><a href="panel.number.html">current.column</a></td>
+<td>Accessing Auxiliary Information During Plotting</td></tr>
+<tr><td 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 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 width="25%"><a href="histogram.html">densityplot</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td width="25%"><a href="histogram.html">densityplot.formula</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td width="25%"><a href="histogram.html">densityplot.numeric</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td width="25%"><a href="panel.pairs.html">diag.panel.splom</a></td>
+<td>Default Superpanel Function for splom</td></tr>
+<tr><td width="25%"><a href="print.trellis.html">dim.trellis</a></td>
+<td>Plot and Summarize Trellis Objects</td></tr>
+<tr><td width="25%"><a href="print.trellis.html">dimnames.trellis</a></td>
+<td>Plot and Summarize Trellis Objects</td></tr>
+<tr><td width="25%"><a href="histogram.html">do.breaks</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td width="25%"><a href="xyplot.html">dotplot</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td width="25%"><a href="barchart.table.html">dotplot.array</a></td>
+<td>table methods for barchart and dotplot</td></tr>
+<tr><td width="25%"><a href="xyplot.html">dotplot.default</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td width="25%"><a href="xyplot.html">dotplot.formula</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td width="25%"><a href="barchart.table.html">dotplot.matrix</a></td>
+<td>table methods for barchart and dotplot</td></tr>
+<tr><td width="25%"><a href="xyplot.html">dotplot.numeric</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td width="25%"><a href="barchart.table.html">dotplot.table</a></td>
+<td>table methods for barchart and dotplot</td></tr>
+<tr><td width="25%"><a href="draw.colorkey.html">draw.colorkey</a></td>
+<td>Produce a Colorkey for levelplot</td></tr>
+<tr><td 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 width="25%"><a href="environmental.html">environmental</a></td>
+<td>Atmospheric environmental conditions in New York City</td></tr>
+<tr><td width="25%"><a href="shingles.html">equal.count</a></td>
+<td>shingles</td></tr>
+<tr><td 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 width="25%"><a href="histogram.html">histogram</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td width="25%"><a href="histogram.html">histogram.factor</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td width="25%"><a href="histogram.html">histogram.formula</a></td>
+<td>Histograms and Kernel Density Plots</td></tr>
+<tr><td 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 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 width="25%"><a href="llines.html">larrows</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="Lattice.html">Lattice</a></td>
+<td>Lattice Graphics</td></tr>
+<tr><td width="25%"><a href="Lattice.html">lattice</a></td>
+<td>Lattice Graphics</td></tr>
+<tr><td width="25%"><a href="lattice.options.html">lattice.getOption</a></td>
+<td>Low-level Options Controlling Behaviour of Lattice</td></tr>
+<tr><td width="25%"><a href="lattice.options.html">lattice.options</a></td>
+<td>Low-level Options Controlling Behaviour of Lattice</td></tr>
+<tr><td width="25%"><a href="latticeParseFormula.html">latticeParseFormula</a></td>
+<td>Parse Trellis formula</td></tr>
+<tr><td 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 width="25%"><a href="levelplot.html">levelplot</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td width="25%"><a href="levelplot.html">levelplot.array</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td width="25%"><a href="levelplot.html">levelplot.formula</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td width="25%"><a href="levelplot.html">levelplot.matrix</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td width="25%"><a href="levelplot.html">levelplot.table</a></td>
+<td>Level plots and contour plots</td></tr>
+<tr><td width="25%"><a href="llines.html">llines</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="llines.html">llines.default</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="llines.html">lplot.xy</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="llines.html">lpoints</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="llines.html">lpoints.default</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="llines.html">lpolygon</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="llines.html">lrect</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="llines.html">lsegments</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="lset.html">lset</a></td>
+<td>Interface to modify Trellis Settings - Defunct</td></tr>
+<tr><td width="25%"><a href="llines.html">ltext</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="llines.html">ltext.default</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="utilities.3d.html">ltransform3dMatrix</a></td>
+<td>Utility functions for 3-D plots</td></tr>
+<tr><td 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 width="25%"><a href="make.groups.html">make.groups</a></td>
+<td>Grouped data from multiple vectors</td></tr>
+<tr><td 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 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 width="25%"><a href="panel.number.html">packet.number</a></td>
+<td>Accessing Auxiliary Information During Plotting</td></tr>
+<tr><td width="25%"><a href="packet.panel.default.html">packet.panel.default</a></td>
+<td>Associating Packets with Panels</td></tr>
+<tr><td width="25%"><a href="utilities.3d.html">palette.shade</a></td>
+<td>Utility functions for 3-D plots</td></tr>
+<tr><td width="25%"><a href="panel.cloud.html">panel.3dscatter</a></td>
+<td>Default Panel Function for cloud</td></tr>
+<tr><td width="25%"><a href="panel.cloud.html">panel.3dwire</a></td>
+<td>Default Panel Function for cloud</td></tr>
+<tr><td width="25%"><a href="panel.functions.html">panel.abline</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td width="25%"><a href="llines.html">panel.arrows</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="panel.functions.html">panel.average</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td width="25%"><a href="panel.axis.html">panel.axis</a></td>
+<td>Panel Function for Drawing Axis Ticks and Labels</td></tr>
+<tr><td width="25%"><a href="panel.barchart.html">panel.barchart</a></td>
+<td>Default Panel Function for barchart</td></tr>
+<tr><td width="25%"><a href="interaction.html">panel.brush.splom</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td width="25%"><a href="panel.bwplot.html">panel.bwplot</a></td>
+<td>Default Panel Function for bwplot</td></tr>
+<tr><td width="25%"><a href="panel.cloud.html">panel.cloud</a></td>
+<td>Default Panel Function for cloud</td></tr>
+<tr><td width="25%"><a href="panel.levelplot.html">panel.contourplot</a></td>
+<td>Panel Functions for levelplot and contourplot</td></tr>
+<tr><td width="25%"><a href="panel.functions.html">panel.curve</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td width="25%"><a href="panel.densityplot.html">panel.densityplot</a></td>
+<td>Default Panel Function for densityplot</td></tr>
+<tr><td width="25%"><a href="panel.dotplot.html">panel.dotplot</a></td>
+<td>Default Panel Function for dotplot</td></tr>
+<tr><td width="25%"><a href="print.trellis.html">panel.error</a></td>
+<td>Plot and Summarize Trellis Objects</td></tr>
+<tr><td width="25%"><a href="panel.functions.html">panel.fill</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td width="25%"><a href="panel.functions.html">panel.functions</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td width="25%"><a href="panel.functions.html">panel.grid</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td width="25%"><a href="panel.histogram.html">panel.histogram</a></td>
+<td>Default Panel Function for histogram</td></tr>
+<tr><td width="25%"><a href="interaction.html">panel.identify</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td width="25%"><a href="interaction.html">panel.identify.cloud</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td width="25%"><a href="interaction.html">panel.identify.qqmath</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td width="25%"><a href="panel.levelplot.html">panel.levelplot</a></td>
+<td>Panel Functions for levelplot and contourplot</td></tr>
+<tr><td width="25%"><a href="panel.levelplot.html">panel.levelplot.raster</a></td>
+<td>Panel Functions for levelplot and contourplot</td></tr>
+<tr><td width="25%"><a href="panel.functions.html">panel.linejoin</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td width="25%"><a href="llines.html">panel.lines</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="interaction.html">panel.link.splom</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td width="25%"><a href="panel.functions.html">panel.lmline</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td width="25%"><a href="panel.loess.html">panel.loess</a></td>
+<td>Panel Function to Add a LOESS Smooth</td></tr>
+<tr><td width="25%"><a href="panel.functions.html">panel.mathdensity</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td width="25%"><a href="panel.number.html">panel.number</a></td>
+<td>Accessing Auxiliary Information During Plotting</td></tr>
+<tr><td width="25%"><a href="panel.pairs.html">panel.pairs</a></td>
+<td>Default Superpanel Function for splom</td></tr>
+<tr><td width="25%"><a href="panel.parallel.html">panel.parallel</a></td>
+<td>Default Panel Function for parallel</td></tr>
+<tr><td width="25%"><a href="llines.html">panel.points</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="llines.html">panel.polygon</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="panel.xyplot.html">panel.qq</a></td>
+<td>Default Panel Function for xyplot</td></tr>
+<tr><td width="25%"><a href="panel.qqmath.html">panel.qqmath</a></td>
+<td>Default Panel Function for qqmath</td></tr>
+<tr><td width="25%"><a href="panel.qqmathline.html">panel.qqmathline</a></td>
+<td>Useful panel function with qqmath</td></tr>
+<tr><td width="25%"><a href="llines.html">panel.rect</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="panel.functions.html">panel.refline</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td width="25%"><a href="panel.functions.html">panel.rug</a></td>
+<td>Useful Panel Function Components</td></tr>
+<tr><td width="25%"><a href="llines.html">panel.segments</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="panel.smoothScatter.html">panel.smoothScatter</a></td>
+<td>Lattice panel function analogous to smoothScatter</td></tr>
+<tr><td width="25%"><a href="panel.spline.html">panel.spline</a></td>
+<td>Panel Function to Add a Spline Smooth</td></tr>
+<tr><td width="25%"><a href="panel.xyplot.html">panel.splom</a></td>
+<td>Default Panel Function for xyplot</td></tr>
+<tr><td width="25%"><a href="panel.stripplot.html">panel.stripplot</a></td>
+<td>Default Panel Function for stripplot</td></tr>
+<tr><td width="25%"><a href="panel.superpose.html">panel.superpose</a></td>
+<td>Panel Function for Display Marked by groups</td></tr>
+<tr><td width="25%"><a href="panel.superpose.html">panel.superpose.2</a></td>
+<td>Panel Function for Display Marked by groups</td></tr>
+<tr><td width="25%"><a href="panel.superpose.html">panel.superpose.plain</a></td>
+<td>Panel Function for Display Marked by groups</td></tr>
+<tr><td width="25%"><a href="llines.html">panel.text</a></td>
+<td>Replacements of traditional graphics functions</td></tr>
+<tr><td width="25%"><a href="tmd.html">panel.tmd.default</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td width="25%"><a href="tmd.html">panel.tmd.qqmath</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td width="25%"><a href="panel.violin.html">panel.violin</a></td>
+<td>Panel Function to create Violin Plots</td></tr>
+<tr><td width="25%"><a href="panel.cloud.html">panel.wireframe</a></td>
+<td>Default Panel Function for cloud</td></tr>
+<tr><td width="25%"><a href="panel.xyplot.html">panel.xyplot</a></td>
+<td>Default Panel Function for xyplot</td></tr>
+<tr><td width="25%"><a href="splom.html">parallel</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td width="25%"><a href="splom.html">parallelplot</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td width="25%"><a href="splom.html">parallelplot.data.frame</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td width="25%"><a href="splom.html">parallelplot.formula</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td width="25%"><a href="splom.html">parallelplot.matrix</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td width="25%"><a href="shingles.html">plot.shingle</a></td>
+<td>shingles</td></tr>
+<tr><td width="25%"><a href="print.trellis.html">plot.trellis</a></td>
+<td>Plot and Summarize Trellis Objects</td></tr>
+<tr><td width="25%"><a href="prepanel.default.html">prepanel.default.bwplot</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td width="25%"><a href="prepanel.default.html">prepanel.default.cloud</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td width="25%"><a href="prepanel.default.html">prepanel.default.densityplot</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td width="25%"><a href="prepanel.default.html">prepanel.default.histogram</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td width="25%"><a href="prepanel.default.html">prepanel.default.levelplot</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td width="25%"><a href="prepanel.default.html">prepanel.default.parallel</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td width="25%"><a href="prepanel.default.html">prepanel.default.qq</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td width="25%"><a href="prepanel.default.html">prepanel.default.qqmath</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td width="25%"><a href="prepanel.default.html">prepanel.default.splom</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td width="25%"><a href="prepanel.default.html">prepanel.default.xyplot</a></td>
+<td>Default Prepanel Functions</td></tr>
+<tr><td width="25%"><a href="prepanel.functions.html">prepanel.lmline</a></td>
+<td>Useful Prepanel Function for Lattice</td></tr>
+<tr><td width="25%"><a href="prepanel.functions.html">prepanel.loess</a></td>
+<td>Useful Prepanel Function for Lattice</td></tr>
+<tr><td width="25%"><a href="prepanel.functions.html">prepanel.qqmathline</a></td>
+<td>Useful Prepanel Function for Lattice</td></tr>
+<tr><td width="25%"><a href="prepanel.functions.html">prepanel.spline</a></td>
+<td>Useful Prepanel Function for Lattice</td></tr>
+<tr><td width="25%"><a href="tmd.html">prepanel.tmd.default</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td width="25%"><a href="tmd.html">prepanel.tmd.qqmath</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td width="25%"><a href="shingles.html">print.shingle</a></td>
+<td>shingles</td></tr>
+<tr><td width="25%"><a href="shingles.html">print.shingleLevel</a></td>
+<td>shingles</td></tr>
+<tr><td 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 width="25%"><a href="qq.html">qq</a></td>
+<td>Quantile-Quantile Plots of Two Samples</td></tr>
+<tr><td width="25%"><a href="qq.html">qq.formula</a></td>
+<td>Quantile-Quantile Plots of Two Samples</td></tr>
+<tr><td width="25%"><a href="qqmath.html">qqmath</a></td>
+<td>Q-Q Plot with Theoretical Distribution</td></tr>
+<tr><td width="25%"><a href="qqmath.html">qqmath.formula</a></td>
+<td>Q-Q Plot with Theoretical Distribution</td></tr>
+<tr><td 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 width="25%"><a href="rfs.html">rfs</a></td>
+<td>Residual and Fit Spread Plots</td></tr>
+<tr><td 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 width="25%"><a href="shingles.html">shingle</a></td>
+<td>shingles</td></tr>
+<tr><td width="25%"><a href="trellis.par.get.html">show.settings</a></td>
+<td>Graphical Parameters for Trellis Displays</td></tr>
+<tr><td width="25%"><a href="simpleKey.html">simpleKey</a></td>
+<td>Function to generate a simple key</td></tr>
+<tr><td width="25%"><a href="simpleTheme.html">simpleTheme</a></td>
+<td>Function to generate a simple theme</td></tr>
+<tr><td width="25%"><a href="singer.html">singer</a></td>
+<td>Heights of New York Choral Society singers</td></tr>
+<tr><td width="25%"><a href="splom.html">splom</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td width="25%"><a href="splom.html">splom.data.frame</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td width="25%"><a href="splom.html">splom.formula</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td width="25%"><a href="splom.html">splom.matrix</a></td>
+<td>Scatter Plot Matrices</td></tr>
+<tr><td width="25%"><a href="trellis.device.html">standard.theme</a></td>
+<td>Initializing Trellis Displays</td></tr>
+<tr><td width="25%"><a href="strip.default.html">strip.custom</a></td>
+<td>Default Trellis Strip Function</td></tr>
+<tr><td width="25%"><a href="strip.default.html">strip.default</a></td>
+<td>Default Trellis Strip Function</td></tr>
+<tr><td width="25%"><a href="xyplot.html">stripplot</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td width="25%"><a href="xyplot.html">stripplot.formula</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td width="25%"><a href="xyplot.html">stripplot.numeric</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td width="25%"><a href="shingles.html">summary.shingle</a></td>
+<td>shingles</td></tr>
+<tr><td 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 width="25%"><a href="update.trellis.html">t.trellis</a></td>
+<td>Retrieve and Update Trellis Object</td></tr>
+<tr><td width="25%"><a href="tmd.html">tmd</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td width="25%"><a href="tmd.html">tmd.formula</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td width="25%"><a href="tmd.html">tmd.trellis</a></td>
+<td>Tukey Mean-Difference Plot</td></tr>
+<tr><td width="25%"><a href="panel.number.html">trellis.currentLayout</a></td>
+<td>Accessing Auxiliary Information During Plotting</td></tr>
+<tr><td width="25%"><a href="trellis.device.html">trellis.device</a></td>
+<td>Initializing Trellis Displays</td></tr>
+<tr><td width="25%"><a href="interaction.html">trellis.focus</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td width="25%"><a href="interaction.html">trellis.grobname</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td width="25%"><a href="update.trellis.html">trellis.last.object</a></td>
+<td>Retrieve and Update Trellis Object</td></tr>
+<tr><td width="25%"><a href="trellis.object.html">trellis.object</a></td>
+<td>A Trellis Plot Object</td></tr>
+<tr><td width="25%"><a href="interaction.html">trellis.panelArgs</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td width="25%"><a href="trellis.par.get.html">trellis.par.get</a></td>
+<td>Graphical Parameters for Trellis Displays</td></tr>
+<tr><td width="25%"><a href="trellis.par.get.html">trellis.par.set</a></td>
+<td>Graphical Parameters for Trellis Displays</td></tr>
+<tr><td width="25%"><a href="interaction.html">trellis.switchFocus</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td width="25%"><a href="interaction.html">trellis.unfocus</a></td>
+<td>Functions to Interact with Lattice Plots</td></tr>
+<tr><td 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 width="25%"><a href="update.trellis.html">update.trellis</a></td>
+<td>Retrieve and Update Trellis Object</td></tr>
+<tr><td 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 width="25%"><a href="panel.number.html">which.packet</a></td>
+<td>Accessing Auxiliary Information During Plotting</td></tr>
+<tr><td width="25%"><a href="cloud.html">wireframe</a></td>
+<td>3d Scatter Plot and Wireframe Surface Plot</td></tr>
+<tr><td width="25%"><a href="cloud.html">wireframe.formula</a></td>
+<td>3d Scatter Plot and Wireframe Surface Plot</td></tr>
+<tr><td 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 width="25%"><a href="axis.default.html">xscale.components.default</a></td>
+<td>Default axis annotation utilities</td></tr>
+<tr><td width="25%"><a href="xyplot.html">xyplot</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td width="25%"><a href="xyplot.html">xyplot.formula</a></td>
+<td>Common Bivariate Trellis Plots</td></tr>
+<tr><td 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 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 width="25%"><a href="shingles.html">[.shingle</a></td>
+<td>shingles</td></tr>
+<tr><td width="25%"><a href="update.trellis.html">[.trellis</a></td>
+<td>Retrieve and Update Trellis Object</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/lattice/html/R.css b/win32/deps/library/lattice/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/lattice/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/lattice/libs/i386/lattice.dll b/win32/deps/library/lattice/libs/i386/lattice.dll
new file mode 100644
index 0000000..47736a3
Binary files /dev/null and b/win32/deps/library/lattice/libs/i386/lattice.dll differ
diff --git a/win32/deps/library/lattice/po/de/LC_MESSAGES/R-lattice.mo b/win32/deps/library/lattice/po/de/LC_MESSAGES/R-lattice.mo
new file mode 100644
index 0000000..026ccdd
Binary files /dev/null and b/win32/deps/library/lattice/po/de/LC_MESSAGES/R-lattice.mo differ
diff --git a/win32/deps/library/lattice/po/en quot/LC_MESSAGES/R-lattice.mo b/win32/deps/library/lattice/po/en quot/LC_MESSAGES/R-lattice.mo
new file mode 100644
index 0000000..62ba516
Binary files /dev/null and b/win32/deps/library/lattice/po/en quot/LC_MESSAGES/R-lattice.mo differ
diff --git a/win32/deps/library/lattice/po/fr/LC_MESSAGES/R-lattice.mo b/win32/deps/library/lattice/po/fr/LC_MESSAGES/R-lattice.mo
new file mode 100644
index 0000000..06d9e4c
Binary files /dev/null and b/win32/deps/library/lattice/po/fr/LC_MESSAGES/R-lattice.mo differ
diff --git a/win32/deps/library/lattice/tests/MASSch04.R b/win32/deps/library/lattice/tests/MASSch04.R
new file mode 100644
index 0000000..5f74de8
--- /dev/null
+++ b/win32/deps/library/lattice/tests/MASSch04.R
@@ -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
diff --git a/win32/deps/library/lattice/tests/dates.R b/win32/deps/library/lattice/tests/dates.R
new file mode 100644
index 0000000..88c2f37
--- /dev/null
+++ b/win32/deps/library/lattice/tests/dates.R
@@ -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()
+
diff --git a/win32/deps/library/lattice/tests/dotplotscoping.R b/win32/deps/library/lattice/tests/dotplotscoping.R
new file mode 100644
index 0000000..07f4c79
--- /dev/null
+++ b/win32/deps/library/lattice/tests/dotplotscoping.R
@@ -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()
diff --git a/win32/deps/library/lattice/tests/levelplot.R b/win32/deps/library/lattice/tests/levelplot.R
new file mode 100644
index 0000000..40cffc6
--- /dev/null
+++ b/win32/deps/library/lattice/tests/levelplot.R
@@ -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]))))
+
diff --git a/win32/deps/library/lattice/tests/scales.R b/win32/deps/library/lattice/tests/scales.R
new file mode 100644
index 0000000..0103ae7
--- /dev/null
+++ b/win32/deps/library/lattice/tests/scales.R
@@ -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()
diff --git a/win32/deps/library/lattice/tests/temp.R b/win32/deps/library/lattice/tests/temp.R
new file mode 100644
index 0000000..4807f5b
--- /dev/null
+++ b/win32/deps/library/lattice/tests/temp.R
@@ -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()
+
+
+
diff --git a/win32/deps/library/lattice/tests/test.R b/win32/deps/library/lattice/tests/test.R
new file mode 100644
index 0000000..b448f29
--- /dev/null
+++ b/win32/deps/library/lattice/tests/test.R
@@ -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')
+
+
+
+## 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()
+
+
diff --git a/win32/deps/library/lattice/tests/wireframe.R b/win32/deps/library/lattice/tests/wireframe.R
new file mode 100644
index 0000000..8d2f02c
--- /dev/null
+++ b/win32/deps/library/lattice/tests/wireframe.R
@@ -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.
+
diff --git a/win32/deps/library/methods/DESCRIPTION b/win32/deps/library/methods/DESCRIPTION
index 2ff072d..ce1f5a5 100644
--- a/win32/deps/library/methods/DESCRIPTION
+++ b/win32/deps/library/methods/DESCRIPTION
@@ -1,14 +1,13 @@
 Package: methods
-Version: 2.9.2
+Version: 2.15.2
 Priority: base
 Imports: utils
 Title: Formal Methods and Classes
-Author: R Development Core Team
+Author: R Core Team
 Maintainer: R Core Team <R-core r-project org>
-Description: Formally defined methods and classes for R objects, plus
-        other programming tools, as described in the reference
-References: ``Programming with Data'' (1998), John M. Chambers,
-        Springer NY. http://www.omegahat.org/RSMethods/Intro.ps and
-        .../Intro.pdf
-License: Part of R 2.9.2
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 12:45:21 UTC; windows
+Description: Formally defined methods and classes for R objects,
+  plus other programming tools, as described in the reference
+References: John M. Chambers (2008) ``Software for Data Analysis:
+        Programming with R''; Springer NY.
+License: Part of R 2.15.2
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:07:06 UTC; windows
diff --git a/win32/deps/library/methods/INDEX b/win32/deps/library/methods/INDEX
index c41209c..8556951 100644
--- a/win32/deps/library/methods/INDEX
+++ b/win32/deps/library/methods/INDEX
@@ -9,13 +9,15 @@ MethodDefinition-class
                         Classes to Represent Method Definitions
 MethodWithNext-class    Class MethodWithNext
 Methods                 General Information on Methods
-MethodsList-class       Class MethodsList, Representation of Methods
-                        for a Generic Function
+MethodsList-class       Class MethodsList, Deprecated Representation of
+                        Methods
 ObjectsWithPackage-class
                         A Vector of Object Names, with associated
                         Package Names
+ReferenceClasses        Objects With Fields Treated by Reference
+                        (OOP-style)
 S3Part                  S3-style Objects and S4-class Objects
-S4groupGeneric          Group Generic Functions
+S4groupGeneric          S4 Group Generic Functions
 SClassExtension-class   Class to Represent Inheritance (Extension)
                         Relations
 as                      Force an Object to Belong to a Class
@@ -24,14 +26,18 @@ callNextMethod          Call an Inherited Method
 canCoerce               Can an Object be Coerced to a Certain S4 Class?
 cbind2                  Combine two Objects by Columns or Rows
 character-class         Classes Corresponding to Basic Data Types
+className               Class names including the corresponding package
 classRepresentation-class
                         Class Objects
 classesToAM             Compute an Adjacency Matrix for Superclasses of
-                        one or more Class Definitions
-dotsMethods             The Use of "..." in Method Signatures
-environment-class       Class "environment"
+                        Class Definitions
+dotsMethods             The Use of '...' in Method Signatures
+envRefClass-class       Class '"envRefClass"'
+environment-class       Class '"environment"'
+evalSource              Use Function Definitions from a Source File
+                        without Reinstalling a Package
 findClass               Computations with Classes
-findMethods             Descriptions of the Methods Defined for a
+findMethods             Description of the Methods Defined for a
                         Generic Function
 fixPre1.8               Fix Objects Saved from R Versions Previous to
                         1.8
@@ -41,8 +47,9 @@ getMethod               Get or Test for the Definition of a Method
 getPackageName          The Name associated with a Given Package
 hasArg                  Look for an Argument in the Call
 implicitGeneric         Manage Implicit Versions of Generic Functions
+inheritedSlotNames      Names of Slots Inherited From a Super Class
 initialize-methods      Methods to Initialize New Objects from a Class
-is                      Is an Object from a Class
+is                      Is an Object from a Class?
 isSealedMethod          Check for a Sealed Method or Class
 language-class          Classes to Represent Unevaluated Language
                         Objects
@@ -62,12 +69,13 @@ selectSuperClasses      Super Classes (of Specific Kinds) of a Class
 setClass                Create a Class Definition
 setClassUnion           Classes Defined as the Union of Other Classes
 setGeneric              Define a New Generic Function
+setLoadActions          Set Actions For Package Loading
 setMethod               Create and Save a Method
 setOldClass             Register Old-Style (S3) Classes and Inheritance
 show                    Show an Object
 showMethods             Show all the methods for the specified
                         function(s)
-signature-class         Class "signature" For Method Definitions
+signature-class         Class '"signature"' For Method Definitions
 slot                    The Slots in an Object from a Formal Class
 structure-class         Classes Corresponding to Basic Structures
 testInheritedMethods    Test for and Report about Selection of
diff --git a/win32/deps/library/methods/Meta/Rd.rds b/win32/deps/library/methods/Meta/Rd.rds
index 65f1967..e0dac62 100644
Binary files a/win32/deps/library/methods/Meta/Rd.rds and b/win32/deps/library/methods/Meta/Rd.rds differ
diff --git a/win32/deps/library/methods/Meta/hsearch.rds b/win32/deps/library/methods/Meta/hsearch.rds
index 086bae6..a73e2be 100644
Binary files a/win32/deps/library/methods/Meta/hsearch.rds and b/win32/deps/library/methods/Meta/hsearch.rds differ
diff --git a/win32/deps/library/methods/Meta/links.rds b/win32/deps/library/methods/Meta/links.rds
new file mode 100644
index 0000000..d007e45
Binary files /dev/null and b/win32/deps/library/methods/Meta/links.rds differ
diff --git a/win32/deps/library/methods/Meta/nsInfo.rds b/win32/deps/library/methods/Meta/nsInfo.rds
index dbae3fb..0ad24e0 100644
Binary files a/win32/deps/library/methods/Meta/nsInfo.rds and b/win32/deps/library/methods/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/methods/Meta/package.rds b/win32/deps/library/methods/Meta/package.rds
index e60bb97..c603a99 100644
Binary files a/win32/deps/library/methods/Meta/package.rds and b/win32/deps/library/methods/Meta/package.rds differ
diff --git a/win32/deps/library/methods/NAMESPACE b/win32/deps/library/methods/NAMESPACE
index b0b70ac..b37fb65 100644
--- a/win32/deps/library/methods/NAMESPACE
+++ b/win32/deps/library/methods/NAMESPACE
@@ -33,8 +33,7 @@ export(Summary)
 export(addNextMethod)
 export(allGenerics)
 export(allNames)
-export(as)
-export("as<-")
+export(as, "as<-")
 export(asMethodDefinition)
 export(assignClassDef)
 export(assignMethodsMetaData)
@@ -48,9 +47,10 @@ export(callNextMethod)
 export(canCoerce)
 export(checkSlotAssignment)
 export(classMetaName)
+export(classLabel)
+export(className, .classEnv)
 export(classesToAM)
-export(coerce)
-export("coerce<-")
+export(coerce, "coerce<-")
 export(completeClassDefinition)
 export(completeExtends)
 export(completeSubclasses)
@@ -60,12 +60,13 @@ export(defaultPrototype)
 export(doPrimitiveMethod)
 export(dumpMethod)
 export(dumpMethods)
-export(el)
-export("el<-")
-export(elNamed)
-export("elNamed<-")
+export(el, "el<-")
+export(elNamed, "elNamed<-")
 export(empty.dump)
 export(emptyMethodsList)
+export(evalOnLoad)
+export(evalqOnLoad)
+export(evalSource)
 export(existsFunction)
 export(existsMethod)
 export(extends)
@@ -78,8 +79,7 @@ export(findMethodSignatures)
 export(findUnique)
 export(fixPre1.8)
 export(formalArgs)
-export(functionBody)
-export("functionBody<-")
+export(functionBody, "functionBody<-")
 export(generic.skeleton)
 export(getAccess)
 export(getAllMethods)
@@ -96,6 +96,7 @@ export(getGeneric)
 export(getGenerics)
 export(getGroup)
 export(getGroupMembers)
+export(getLoadActions)
 export(getMethod)
 export(getMethods)
 export(getMethodsForDispatch)
@@ -108,10 +109,14 @@ export(getSubclasses)
 export(getValidity)
 export(getVirtual)
 export(hasArg)
+export(hasLoadAction)
 export(hasMethod)
 export(hasMethods)
+export(inheritedSlotNames)
 export(initialize)
+export(insertClassMethods)
 export(insertMethod)
+export(insertSource)
 export(is)
 export(isClass)
 export(isClassDef)
@@ -143,6 +148,7 @@ export(methodsPackageMetaName)
 export(method.skeleton)
 export(missingArg)
 export(mlistMetaName)
+export(multipleClasses)
 export(new)
 export(newBasic)
 export(newClassRepresentation)
@@ -176,8 +182,10 @@ export(setDataPart)
 export(setGeneric)
 export(setGroupGeneric)
 export(setIs)
+export(setLoadAction)
+export(setLoadActions)
 export(setMethod)
-export(setOldClass)
+export(setOldClass, .OldClassesList)
 export(setPackageName)
 export(setPrimitiveMethods)
 export(setReplaceMethod)
@@ -190,8 +198,7 @@ export(showMethods)
 export(showMlist)
 export(sigToEnv)
 export(signature)
-export(slot)
-export("slot<-")
+export(slot, "slot<-", ".hasSlot")
 export(slotNames, ".slotNames")
 export(slotsFromS3)
 export(substituteDirect)
@@ -214,6 +221,7 @@ export(.EmptyPrimitiveSkeletons)
 ## to allow "S4-cbind/rbind (./R/cbind-rbind.R)
 export(cbind2)
 export(rbind2)
+export(kronecker)
 
 ## implicit generic functionality
 
@@ -221,3 +229,9 @@ export(implicitGeneric)
 export(setGenericImplicit)
 export(prohibitGeneric)
 export(registerImplicitGenerics)
+
+## reference classes
+export(setRefClass)
+export(getRefClass)
+export(initFieldArgs) # used in initialize methods--old version
+export(initRefFields) # used in initialize methods
diff --git a/win32/deps/library/methods/R/methods b/win32/deps/library/methods/R/methods
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/methods/R/methods
+++ b/win32/deps/library/methods/R/methods
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/methods/R/methods.rdb b/win32/deps/library/methods/R/methods.rdb
index 35bb81e..fa6da41 100644
Binary files a/win32/deps/library/methods/R/methods.rdb and b/win32/deps/library/methods/R/methods.rdb differ
diff --git a/win32/deps/library/methods/R/methods.rdx b/win32/deps/library/methods/R/methods.rdx
index cccc8aa..0c5e3c3 100644
Binary files a/win32/deps/library/methods/R/methods.rdx and b/win32/deps/library/methods/R/methods.rdx differ
diff --git a/win32/deps/library/methods/help/AnIndex b/win32/deps/library/methods/help/AnIndex
index 5dc5ade..2c87306 100644
--- a/win32/deps/library/methods/help/AnIndex
+++ b/win32/deps/library/methods/help/AnIndex
@@ -1,13 +1,16 @@
 methods-package	methods-package
+$,envRefClass-method	stdRefClass
+$<-,envRefClass-method	stdRefClass
 (-class	LanguageClasses
 .BasicClasses	RClassUtils
 .BasicFunsList	zBasicFunsList
 .BasicVectorClasses	RClassUtils
-.conflicts.OK	MethodSupport
+.classEnv	RClassUtils
 .doTracePrint	TraceClasses
 .EmptyPrimitiveSkeletons	RMethodUtils
 .environment-class	Classes
 .externalptr-class	Classes
+.hasSlot	slot
 .InitBasicClasses	RClassUtils
 .InitMethodsListClass	RClassUtils
 .InitTraceFunctions	TraceClasses
@@ -26,6 +29,7 @@ methods-package	methods-package
 .valueClassTest	RMethodUtils
 <--class	LanguageClasses
 @<-	slot
+activeBindingFunction-class	refClass
 addNextMethod	RMethodUtils
 addNextMethod,MethodDefinition-method	RMethodUtils
 addNextMethod,MethodWithNext-method	RMethodUtils
@@ -46,6 +50,7 @@ assignMethodsMetaData	RMethodUtils
 balanceMethodsList	RMethodUtils
 body<-,MethodDefinition-method	MethodsList-class
 browseAll	Session
+builtin-class	BasicClasses
 cacheGenericsMetaData	RMethodUtils
 cacheMetaData	RMethodUtils
 cacheMethod	MethodSupport
@@ -61,7 +66,11 @@ character-class	BasicClasses
 checkSlotAssignment	RClassUtils
 Classes	Classes
 classesToAM	classesToAM
+classGeneratorFunction-class	setClass
+classLabel	RClassUtils
 classMetaName	RClassUtils
+className	className
+className-class	className
 classPrototypeDef-class	RClassUtils
 classRepresentation-class	classRepresentation-class
 ClassUnionRepresentation-class	setClassUnion
@@ -99,6 +108,7 @@ conformMethod	RMethodUtils
 data.frame-class	setOldClass
 data.frameRowLabels-class	setOldClass
 Date-class	setOldClass
+defaultBindingFunction-class	refClass
 defaultDumpName	RMethodUtils
 defaultPrototype	RClassUtils
 density-class	setOldClass
@@ -121,6 +131,10 @@ empty.dump	RClassUtils
 emptyMethodsList	MethodsList
 EmptyMethodsList-class	EmptyMethodsList-class
 environment-class	EnvironmentClass
+envRefClass-class	stdRefClass
+evalOnLoad	setLoadActions
+evalqOnLoad	setLoadActions
+evalSource	evalSource
 existsFunction	methodUtilities
 existsMethod	getMethod
 expression-class	BasicClasses
@@ -162,6 +176,7 @@ getGeneric	RMethodUtils
 getGenerics	GenericFunctions
 getGroup	RMethodUtils
 getGroupMembers	RMethodUtils
+getLoadActions	setLoadActions
 getMethod	getMethod
 getMethods	findMethods
 getMethodsForDispatch	MethodSupport
@@ -169,6 +184,7 @@ getMethodsMetaData	RMethodUtils
 getPackageName	getPackageName
 getProperties	methods-defunct
 getPrototype	methods-defunct
+getRefClass	refClass
 getSlots	slot
 getSubclasses	methods-defunct
 getValidity	validObject
@@ -179,18 +195,23 @@ groupGenericFunction-class	genericFunction-class
 GroupGenericFunctions	S4groupGeneric
 groupGenericFunctionWithTrace-class	TraceClasses
 hasArg	hasArg
+hasLoadAction	setLoadActions
 hasMethod	getMethod
 hasMethods	findMethods
 hsearch-class	setOldClass
 if-class	LanguageClasses
 implicit generic	implicitGeneric
 implicitGeneric	implicitGeneric
+inheritedSlotNames	inheritedSlotNames
 inheritedSubMethodLists	MethodsList
+initFieldArgs	refClass
 initialize	new
+initialize,.environment-method	initialize-methods
 initialize,ANY-method	initialize-methods
 initialize,array-method	StructureClasses
 initialize,data.frame-method	setOldClass
 initialize,environment-method	initialize-methods
+initialize,envRefClass-method	stdRefClass
 initialize,factor-method	setOldClass
 initialize,matrix-method	StructureClasses
 initialize,mts-method	StructureClasses
@@ -202,8 +223,11 @@ initialize,traceable-method	initialize-methods
 initialize,ts-method	StructureClasses
 initialize-methods	initialize-methods
 initMethodDispatch	methodUtilities
+initRefFields	refClass
+insertClassMethods	RMethodUtils
 insertMethod	MethodsList
 insertMethodInEmptyList	MethodsList
+insertSource	evalSource
 integer-class	BasicClasses
 integrate-class	setOldClass
 is	is
@@ -226,6 +250,7 @@ LinearMethodsList-class	LinearMethodsList-class
 list-class	BasicClasses
 listFromMethods	MethodSupport
 listFromMlist	MethodsList
+listOfMethods-class	findMethods
 lm-class	setOldClass
 loadMethod	MethodsList
 loadMethod,ANY-method	MethodsList
@@ -257,6 +282,7 @@ MethodDefinition-class	MethodDefinition-class
 MethodDefinitionWithTrace-class	TraceClasses
 Methods	Methods
 methods-defunct	methods-defunct
+methods-deprecated	methods-deprecated
 MethodSelectionReport-class	testInheritedMethods
 methodSignatureMatrix	methodUtilities
 MethodsList	MethodsList
@@ -271,7 +297,9 @@ mlistMetaName	methods-defunct
 mlm-class	setOldClass
 mtable-class	setOldClass
 mts-class	setOldClass
+multipleClasses	className
 name-class	LanguageClasses
+namedList-class	BasicClasses
 new	new
 newBasic	RClassUtils
 newClassRepresentation	RClassUtils
@@ -297,6 +325,7 @@ Ops,structure,vector-method	StructureClasses
 Ops,vector,nonStructure-method	nonStructure-class
 Ops,vector,structure-method	StructureClasses
 OptionalFunction-class	RMethodUtils
+optionalMethod-class	RMethodUtils
 ordered-class	setOldClass
 packageInfo-class	setOldClass
 packageIQR-class	setOldClass
@@ -321,6 +350,13 @@ rbind2,ANY,missing-method	cbind2
 rbind2-methods	cbind2
 reconcilePropertiesAndPrototype	RClassUtils
 recordedplot-class	setOldClass
+refClass-class	refClass
+refClassRepresentation-class	refClass
+ReferenceClasses	refClass
+refMethodDef-class	refClass
+refMethodDefWithTrace-class	refClass
+refObject-class	refClass
+refObjectGenerator-class	refClass
 registerImplicitGenerics	implicitGeneric
 rematchDefinition	RMethodUtils
 removeClass	findClass
@@ -359,21 +395,31 @@ setGeneric	setGeneric
 setGenericImplicit	implicitGeneric
 setGroupGeneric	setGeneric
 setIs	is
+setLoadAction	setLoadActions
+setLoadActions	setLoadActions
 setMethod	setMethod
 setOldClass	setOldClass
 setPackageName	getPackageName
 setPrimitiveMethods	RMethodUtils
+setRefClass	refClass
 setReplaceMethod	GenericFunctions
 setSubclassMetaData	RClassUtils
 setValidity	validObject
 show	show
 show,ANY-method	show
 show,classRepresentation-method	show
+show,envRefClass-method	refClass
 show,genericFunction-method	show
+show,genericFunctionWithTrace-method	TraceClasses
 show,MethodDefinition-method	show
+show,MethodDefinitionWithTrace-method	TraceClasses
 show,MethodWithNext-method	show
+show,MethodWithNextWithTrace-method	TraceClasses
 show,ObjectsWithPackage-method	show
+show,refClassRepresentation-method	refClass
+show,refMethodDef-method	refClass
 show,signature-method	signature-class
+show,sourceEnvironment-method	TraceClasses
 show,traceable-method	show
 show,ts-method	StructureClasses
 show-methods	show
@@ -392,6 +438,8 @@ slot<-	slot
 slotNames	slot
 slotsFromS3	S3Part
 socket-class	setOldClass
+sourceEnvironment-class	evalSource
+special-class	BasicClasses
 standardGeneric-class	RMethodUtils
 standardGenericWithTrace-class	RMethodUtils
 structure-class	StructureClasses
@@ -400,7 +448,9 @@ substituteDirect	substituteDirect
 substituteFunctionArgs	RMethodUtils
 Summary	S4groupGeneric
 summary.table-class	setOldClass
+summaryDefault-class	setOldClass
 superClassDepth	RClassUtils
+SuperClassMethod-class	refClass
 table-class	setOldClass
 testInheritedMethods	testInheritedMethods
 testVirtual	RClassUtils
@@ -408,8 +458,9 @@ traceable-class	TraceClasses
 traceOff	Session
 traceOn	Session
 tryNew	RClassUtils
-trySilent	RClassUtils
+trySilent	methods-defunct
 ts-class	StructureClasses
+uninitializedField-class	refClass
 unRematchDefinition	RMethodUtils
 validObject	validObject
 validSlotNames	RClassUtils
diff --git a/win32/deps/library/methods/help/aliases.rds b/win32/deps/library/methods/help/aliases.rds
new file mode 100644
index 0000000..4bb6f09
Binary files /dev/null and b/win32/deps/library/methods/help/aliases.rds differ
diff --git a/win32/deps/library/methods/help/methods.rdb b/win32/deps/library/methods/help/methods.rdb
new file mode 100644
index 0000000..27a4a10
Binary files /dev/null and b/win32/deps/library/methods/help/methods.rdb differ
diff --git a/win32/deps/library/methods/help/methods.rdx b/win32/deps/library/methods/help/methods.rdx
new file mode 100644
index 0000000..fa5c5a6
Binary files /dev/null and b/win32/deps/library/methods/help/methods.rdx differ
diff --git a/win32/deps/library/methods/help/paths.rds b/win32/deps/library/methods/help/paths.rds
new file mode 100644
index 0000000..8077a14
Binary files /dev/null and b/win32/deps/library/methods/help/paths.rds differ
diff --git a/win32/deps/library/methods/html/00Index.html b/win32/deps/library/methods/html/00Index.html
new file mode 100644
index 0000000..82bf5d7
--- /dev/null
+++ b/win32/deps/library/methods/html/00Index.html
@@ -0,0 +1,703 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Formal Methods and Classes</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Formal Methods and Classes
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;methods&rsquo; version 2.15.2</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p 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="#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="#O">O</a>
+<a href="#P">P</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>
+
+<table width="100%">
+<tr><td width="25%"><a href="methods-package.html">methods-package</a></td>
+<td>Formal Methods and Classes</td></tr>
+</table>
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="refClass.html">activeBindingFunction-class</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">anova-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">anova.glm-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">anova.glm.null-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">ANY-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">aov-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="S4groupGeneric.html">Arith</a></td>
+<td>S4 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="StructureClasses.html">array-class</a></td>
+<td>Classes Corresponding to Basic Structures</td></tr>
+<tr><td width="25%"><a href="as.html">as</a></td>
+<td>Force an Object to Belong to a Class</td></tr>
+<tr><td width="25%"><a href="as.html">as&lt;-</a></td>
+<td>Force an Object to Belong to a Class</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="MethodsList-class.html">body&lt;--method</a></td>
+<td>Class MethodsList, Deprecated Representation of Methods</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">builtin-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="LanguageClasses.html">call-class</a></td>
+<td>Classes to Represent Unevaluated Language Objects</td></tr>
+<tr><td width="25%"><a href="callGeneric.html">callGeneric</a></td>
+<td>Call the Current Generic Function from a Method</td></tr>
+<tr><td width="25%"><a href="NextMethod.html">callNextMethod</a></td>
+<td>Call an Inherited Method</td></tr>
+<tr><td width="25%"><a href="canCoerce.html">canCoerce</a></td>
+<td>Can an Object be Coerced to a Certain S4 Class?</td></tr>
+<tr><td width="25%"><a href="cbind2.html">cbind2</a></td>
+<td>Combine two Objects by Columns or Rows</td></tr>
+<tr><td width="25%"><a href="cbind2.html">cbind2-method</a></td>
+<td>Combine two Objects by Columns or Rows</td></tr>
+<tr><td width="25%"><a href="cbind2.html">cbind2-methods</a></td>
+<td>Combine two Objects by Columns or Rows</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">character-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="Classes.html">Classes</a></td>
+<td>Class Definitions</td></tr>
+<tr><td width="25%"><a href="classesToAM.html">classesToAM</a></td>
+<td>Compute an Adjacency Matrix for Superclasses of Class Definitions</td></tr>
+<tr><td width="25%"><a href="setClass.html">classGeneratorFunction-class</a></td>
+<td>Create a Class Definition</td></tr>
+<tr><td width="25%"><a href="className.html">className</a></td>
+<td>Class names including the corresponding package</td></tr>
+<tr><td width="25%"><a href="className.html">className-class</a></td>
+<td>Class names including the corresponding package</td></tr>
+<tr><td width="25%"><a href="classRepresentation-class.html">classRepresentation-class</a></td>
+<td>Class Objects</td></tr>
+<tr><td width="25%"><a href="setClassUnion.html">ClassUnionRepresentation-class</a></td>
+<td>Classes Defined as the Union of Other Classes</td></tr>
+<tr><td width="25%"><a href="as.html">coerce</a></td>
+<td>Force an Object to Belong to a Class</td></tr>
+<tr><td width="25%"><a href="as.html">coerce-method</a></td>
+<td>Force an Object to Belong to a Class</td></tr>
+<tr><td width="25%"><a href="S3Part.html">coerce-method</a></td>
+<td>S3-style Objects and S4-class Objects</td></tr>
+<tr><td width="25%"><a href="as.html">coerce-methods</a></td>
+<td>Force an Object to Belong to a Class</td></tr>
+<tr><td width="25%"><a href="as.html">coerce&lt;-</a></td>
+<td>Force an Object to Belong to a Class</td></tr>
+<tr><td width="25%"><a href="S4groupGeneric.html">Compare</a></td>
+<td>S4 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="S4groupGeneric.html">Complex</a></td>
+<td>S4 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">complex-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="setOldClass.html">data.frame-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">data.frameRowLabels-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">Date-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="refClass.html">defaultBindingFunction-class</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">density-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="TraceClasses.html">derivedDefaultMethodWithTrace-class</a></td>
+<td>Classes Used Internally to Control Tracing</td></tr>
+<tr><td width="25%"><a href="Documentation.html">Documentation</a></td>
+<td>Using and Creating On-line Documentation for Classes and Methods</td></tr>
+<tr><td width="25%"><a href="Documentation.html">Documentation-class</a></td>
+<td>Using and Creating On-line Documentation for Classes and Methods</td></tr>
+<tr><td width="25%"><a href="Documentation.html">Documentation-methods</a></td>
+<td>Using and Creating On-line Documentation for Classes and Methods</td></tr>
+<tr><td width="25%"><a href="dotsMethods.html">dotsMethods</a></td>
+<td>The Use of '...' in Method Signatures</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">double-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">dump.frames-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="GenericFunctions.html">dumpMethod</a></td>
+<td>Tools for Managing Generic Functions</td></tr>
+<tr><td width="25%"><a href="GenericFunctions.html">dumpMethods</a></td>
+<td>Tools for Managing Generic Functions</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="EnvironmentClass.html">environment-class</a></td>
+<td>Class '"environment"'</td></tr>
+<tr><td width="25%"><a href="stdRefClass.html">envRefClass-class</a></td>
+<td>Class '"envRefClass"'</td></tr>
+<tr><td width="25%"><a href="setLoadActions.html">evalOnLoad</a></td>
+<td>Set Actions For Package Loading</td></tr>
+<tr><td width="25%"><a href="setLoadActions.html">evalqOnLoad</a></td>
+<td>Set Actions For Package Loading</td></tr>
+<tr><td width="25%"><a href="evalSource.html">evalSource</a></td>
+<td>Use Function Definitions from a Source File without Reinstalling a Package</td></tr>
+<tr><td width="25%"><a href="getMethod.html">existsMethod</a></td>
+<td>Get or Test for the Definition of a Method</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">expression-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="is.html">extends</a></td>
+<td>Is an Object from a Class?</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">externalptr-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="setOldClass.html">factor-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="findClass.html">findClass</a></td>
+<td>Computations with Classes</td></tr>
+<tr><td width="25%"><a href="GenericFunctions.html">findFunction</a></td>
+<td>Tools for Managing Generic Functions</td></tr>
+<tr><td width="25%"><a href="getMethod.html">findMethod</a></td>
+<td>Get or Test for the Definition of a Method</td></tr>
+<tr><td width="25%"><a href="findMethods.html">findMethods</a></td>
+<td>Description of the Methods Defined for a Generic Function</td></tr>
+<tr><td width="25%"><a href="findMethods.html">findMethodSignatures</a></td>
+<td>Description of the Methods Defined for a Generic Function</td></tr>
+<tr><td width="25%"><a href="fixPrevious.html">fixPre1.8</a></td>
+<td>Fix Objects Saved from R Versions Previous to 1.8</td></tr>
+<tr><td width="25%"><a href="LanguageClasses.html">for-class</a></td>
+<td>Classes to Represent Unevaluated Language Objects</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">formula-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">function-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="TraceClasses.html">functionWithTrace-class</a></td>
+<td>Classes Used Internally to Control Tracing</td></tr>
+</table>
+
+<h2><a name="G">-- G --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="genericFunction-class.html">genericFunction-class</a></td>
+<td>Generic Function Objects</td></tr>
+<tr><td width="25%"><a href="GenericFunctions.html">GenericFunctions</a></td>
+<td>Tools for Managing Generic Functions</td></tr>
+<tr><td width="25%"><a href="TraceClasses.html">genericFunctionWithTrace-class</a></td>
+<td>Classes Used Internally to Control Tracing</td></tr>
+<tr><td width="25%"><a href="getClass.html">getClass</a></td>
+<td>Get Class Definition</td></tr>
+<tr><td width="25%"><a href="getClass.html">getClassDef</a></td>
+<td>Get Class Definition</td></tr>
+<tr><td width="25%"><a href="findClass.html">getClasses</a></td>
+<td>Computations with Classes</td></tr>
+<tr><td width="25%"><a href="GenericFunctions.html">getGenerics</a></td>
+<td>Tools for Managing Generic Functions</td></tr>
+<tr><td width="25%"><a href="setLoadActions.html">getLoadActions</a></td>
+<td>Set Actions For Package Loading</td></tr>
+<tr><td width="25%"><a href="getMethod.html">getMethod</a></td>
+<td>Get or Test for the Definition of a Method</td></tr>
+<tr><td width="25%"><a href="findMethods.html">getMethods</a></td>
+<td>Description of the Methods Defined for a Generic Function</td></tr>
+<tr><td width="25%"><a href="getPackageName.html">getPackageName</a></td>
+<td>The Name associated with a Given Package</td></tr>
+<tr><td width="25%"><a href="refClass.html">getRefClass</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="slot.html">getSlots</a></td>
+<td>The Slots in an Object from a Formal Class</td></tr>
+<tr><td width="25%"><a href="validObject.html">getValidity</a></td>
+<td>Test the Validity of an Object</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">glm-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">glm.null-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="genericFunction-class.html">groupGenericFunction-class</a></td>
+<td>Generic Function Objects</td></tr>
+<tr><td width="25%"><a href="S4groupGeneric.html">GroupGenericFunctions</a></td>
+<td>S4 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="TraceClasses.html">groupGenericFunctionWithTrace-class</a></td>
+<td>Classes Used Internally to Control Tracing</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="hasArg.html">hasArg</a></td>
+<td>Look for an Argument in the Call</td></tr>
+<tr><td width="25%"><a href="setLoadActions.html">hasLoadAction</a></td>
+<td>Set Actions For Package Loading</td></tr>
+<tr><td width="25%"><a href="getMethod.html">hasMethod</a></td>
+<td>Get or Test for the Definition of a Method</td></tr>
+<tr><td width="25%"><a href="findMethods.html">hasMethods</a></td>
+<td>Description of the Methods Defined for a Generic Function</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">hsearch-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="LanguageClasses.html">if-class</a></td>
+<td>Classes to Represent Unevaluated Language Objects</td></tr>
+<tr><td width="25%"><a href="implicitGeneric.html">implicit generic</a></td>
+<td>Manage Implicit Versions of Generic Functions</td></tr>
+<tr><td width="25%"><a href="implicitGeneric.html">implicitGeneric</a></td>
+<td>Manage Implicit Versions of Generic Functions</td></tr>
+<tr><td width="25%"><a href="inheritedSlotNames.html">inheritedSlotNames</a></td>
+<td>Names of Slots Inherited From a Super Class</td></tr>
+<tr><td width="25%"><a href="refClass.html">initFieldArgs</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="new.html">initialize</a></td>
+<td>Generate an Object from a Class</td></tr>
+<tr><td width="25%"><a href="initialize-methods.html">initialize-method</a></td>
+<td>Methods to Initialize New Objects from a Class</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">initialize-method</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="stdRefClass.html">initialize-method</a></td>
+<td>Class '"envRefClass"'</td></tr>
+<tr><td width="25%"><a href="StructureClasses.html">initialize-method</a></td>
+<td>Classes Corresponding to Basic Structures</td></tr>
+<tr><td width="25%"><a href="initialize-methods.html">initialize-methods</a></td>
+<td>Methods to Initialize New Objects from a Class</td></tr>
+<tr><td width="25%"><a href="refClass.html">initRefFields</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="evalSource.html">insertSource</a></td>
+<td>Use Function Definitions from a Source File without Reinstalling a Package</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">integer-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">integrate-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="is.html">is</a></td>
+<td>Is an Object from a Class?</td></tr>
+<tr><td width="25%"><a href="findClass.html">isClass</a></td>
+<td>Computations with Classes</td></tr>
+<tr><td width="25%"><a href="setClassUnion.html">isClassUnion</a></td>
+<td>Classes Defined as the Union of Other Classes</td></tr>
+<tr><td width="25%"><a href="GenericFunctions.html">isGeneric</a></td>
+<td>Tools for Managing Generic Functions</td></tr>
+<tr><td width="25%"><a href="GenericFunctions.html">isGroup</a></td>
+<td>Tools for Managing Generic Functions</td></tr>
+<tr><td width="25%"><a href="isSealedMethod.html">isSealedClass</a></td>
+<td>Check for a Sealed Method or Class</td></tr>
+<tr><td width="25%"><a href="isSealedMethod.html">isSealedMethod</a></td>
+<td>Check for a Sealed Method or Class</td></tr>
+<tr><td width="25%"><a href="S3Part.html">isXS3Class</a></td>
+<td>S3-style Objects and S4-class Objects</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="LanguageClasses.html">language-class</a></td>
+<td>Classes to Represent Unevaluated Language Objects</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">libraryIQR-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="LinearMethodsList-class.html">LinearMethodsList-class</a></td>
+<td>Class "LinearMethodsList"</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">list-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="findMethods.html">listOfMethods-class</a></td>
+<td>Description of the Methods Defined for a Generic Function</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">lm-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="S4groupGeneric.html">Logic</a></td>
+<td>S4 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">logical-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">logLik-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="setSClass.html">makeClassRepresentation</a></td>
+<td>Create a Class Definition</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">maov-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="S4groupGeneric.html">Math</a></td>
+<td>S4 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="nonStructure-class.html">Math-method</a></td>
+<td>A non-structure S4 Class for basic types</td></tr>
+<tr><td width="25%"><a href="StructureClasses.html">Math-method</a></td>
+<td>Classes Corresponding to Basic Structures</td></tr>
+<tr><td width="25%"><a href="S4groupGeneric.html">Math2</a></td>
+<td>S4 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="nonStructure-class.html">Math2-method</a></td>
+<td>A non-structure S4 Class for basic types</td></tr>
+<tr><td width="25%"><a href="StructureClasses.html">matrix-class</a></td>
+<td>Classes Corresponding to Basic Structures</td></tr>
+<tr><td width="25%"><a href="method.skeleton.html">method.skeleton</a></td>
+<td>Create a Skeleton File for a New Method</td></tr>
+<tr><td width="25%"><a href="MethodDefinition-class.html">MethodDefinition-class</a></td>
+<td>Classes to Represent Method Definitions</td></tr>
+<tr><td width="25%"><a href="TraceClasses.html">MethodDefinitionWithTrace-class</a></td>
+<td>Classes Used Internally to Control Tracing</td></tr>
+<tr><td width="25%"><a href="Methods.html">Methods</a></td>
+<td>General Information on Methods</td></tr>
+<tr><td width="25%"><a href="testInheritedMethods.html">MethodSelectionReport-class</a></td>
+<td>Test for and Report about Selection of Inherited Methods</td></tr>
+<tr><td width="25%"><a href="MethodsList-class.html">MethodsList-class</a></td>
+<td>Class MethodsList, Deprecated Representation of Methods</td></tr>
+<tr><td width="25%"><a href="MethodWithNext-class.html">MethodWithNext-class</a></td>
+<td>Class MethodWithNext</td></tr>
+<tr><td width="25%"><a href="TraceClasses.html">MethodWithNextWithTrace-class</a></td>
+<td>Classes Used Internally to Control Tracing</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">missing-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">mlm-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">mtable-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">mts-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="className.html">multipleClasses</a></td>
+<td>Class names including the corresponding package</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="LanguageClasses.html">name-class</a></td>
+<td>Classes to Represent Unevaluated Language Objects</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">namedList-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="new.html">new</a></td>
+<td>Generate an Object from a Class</td></tr>
+<tr><td width="25%"><a href="TraceClasses.html">nonstandardGenericWithTrace-class</a></td>
+<td>Classes Used Internally to Control Tracing</td></tr>
+<tr><td width="25%"><a href="nonStructure-class.html">nonStructure-class</a></td>
+<td>A non-structure S4 Class for basic types</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">NULL-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">numeric-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+</table>
+
+<h2><a name="O">-- O --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="ObjectsWithPackage-class.html">ObjectsWithPackage-class</a></td>
+<td>A Vector of Object Names, with associated Package Names</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">oldClass-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="S4groupGeneric.html">Ops</a></td>
+<td>S4 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="nonStructure-class.html">Ops-method</a></td>
+<td>A non-structure S4 Class for basic types</td></tr>
+<tr><td width="25%"><a href="StructureClasses.html">Ops-method</a></td>
+<td>Classes Corresponding to Basic Structures</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">ordered-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="setOldClass.html">packageInfo-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">packageIQR-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="getPackageName.html">packageSlot</a></td>
+<td>The Name associated with a Given Package</td></tr>
+<tr><td width="25%"><a href="getPackageName.html">packageSlot&lt;-</a></td>
+<td>The Name associated with a Given Package</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">POSIXct-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">POSIXlt-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">POSIXt-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="implicitGeneric.html">prohibitGeneric</a></td>
+<td>Manage Implicit Versions of Generic Functions</td></tr>
+<tr><td width="25%"><a href="promptClass.html">promptClass</a></td>
+<td>Generate a Shell for Documentation of a Formal Class</td></tr>
+<tr><td width="25%"><a href="promptMethods.html">promptMethods</a></td>
+<td>Generate a Shell for Documentation of Formal Methods</td></tr>
+<tr><td width="25%"><a href="representation.html">prototype</a></td>
+<td>Construct a Representation or a Prototype for a Class Definition</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="BasicClasses.html">raw-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="cbind2.html">rbind2</a></td>
+<td>Combine two Objects by Columns or Rows</td></tr>
+<tr><td width="25%"><a href="cbind2.html">rbind2-method</a></td>
+<td>Combine two Objects by Columns or Rows</td></tr>
+<tr><td width="25%"><a href="cbind2.html">rbind2-methods</a></td>
+<td>Combine two Objects by Columns or Rows</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">recordedplot-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="refClass.html">refClass-class</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="refClass.html">refClassRepresentation-class</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="refClass.html">ReferenceClasses</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="refClass.html">refMethodDef-class</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="refClass.html">refMethodDefWithTrace-class</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="refClass.html">refObject-class</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="refClass.html">refObjectGenerator-class</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="implicitGeneric.html">registerImplicitGenerics</a></td>
+<td>Manage Implicit Versions of Generic Functions</td></tr>
+<tr><td width="25%"><a href="findClass.html">removeClass</a></td>
+<td>Computations with Classes</td></tr>
+<tr><td width="25%"><a href="GenericFunctions.html">removeGeneric</a></td>
+<td>Tools for Managing Generic Functions</td></tr>
+<tr><td width="25%"><a href="setMethod.html">removeMethod</a></td>
+<td>Create and Save a Method</td></tr>
+<tr><td width="25%"><a href="GenericFunctions.html">removeMethods</a></td>
+<td>Tools for Managing Generic Functions</td></tr>
+<tr><td width="25%"><a href="LanguageClasses.html">repeat-class</a></td>
+<td>Classes to Represent Unevaluated Language Objects</td></tr>
+<tr><td width="25%"><a href="representation.html">representation</a></td>
+<td>Construct a Representation or a Prototype for a Class Definition</td></tr>
+<tr><td width="25%"><a href="findClass.html">resetClass</a></td>
+<td>Computations with Classes</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">rle-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="S3Part.html">S3</a></td>
+<td>S3-style Objects and S4-class Objects</td></tr>
+<tr><td width="25%"><a href="S3Part.html">S3-class</a></td>
+<td>S3-style Objects and S4-class Objects</td></tr>
+<tr><td width="25%"><a href="S3Part.html">S3Class</a></td>
+<td>S3-style Objects and S4-class Objects</td></tr>
+<tr><td width="25%"><a href="S3Part.html">S3Class&lt;-</a></td>
+<td>S3-style Objects and S4-class Objects</td></tr>
+<tr><td width="25%"><a href="S3Part.html">S3Part</a></td>
+<td>S3-style Objects and S4-class Objects</td></tr>
+<tr><td width="25%"><a href="S3Part.html">S3Part&lt;-</a></td>
+<td>S3-style Objects and S4-class Objects</td></tr>
+<tr><td width="25%"><a href="S3Part.html">S4</a></td>
+<td>S3-style Objects and S4-class Objects</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">S4-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="S4groupGeneric.html">S4groupGeneric</a></td>
+<td>S4 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="SClassExtension-class.html">SClassExtension-class</a></td>
+<td>Class to Represent Inheritance (Extension) Relations</td></tr>
+<tr><td width="25%"><a href="findClass.html">sealClass</a></td>
+<td>Computations with Classes</td></tr>
+<tr><td width="25%"><a href="MethodDefinition-class.html">SealedMethodDefinition-class</a></td>
+<td>Classes to Represent Method Definitions</td></tr>
+<tr><td width="25%"><a href="getMethod.html">selectMethod</a></td>
+<td>Get or Test for the Definition of a Method</td></tr>
+<tr><td width="25%"><a href="selectSuperClasses.html">selectSuperClasses</a></td>
+<td>Super Classes (of Specific Kinds) of a Class</td></tr>
+<tr><td width="25%"><a href="as.html">setAs</a></td>
+<td>Force an Object to Belong to a Class</td></tr>
+<tr><td width="25%"><a href="setClass.html">setClass</a></td>
+<td>Create a Class Definition</td></tr>
+<tr><td width="25%"><a href="setClassUnion.html">setClassUnion</a></td>
+<td>Classes Defined as the Union of Other Classes</td></tr>
+<tr><td width="25%"><a href="setGeneric.html">setGeneric</a></td>
+<td>Define a New Generic Function</td></tr>
+<tr><td width="25%"><a href="implicitGeneric.html">setGenericImplicit</a></td>
+<td>Manage Implicit Versions of Generic Functions</td></tr>
+<tr><td width="25%"><a href="setGeneric.html">setGroupGeneric</a></td>
+<td>Define a New Generic Function</td></tr>
+<tr><td width="25%"><a href="is.html">setIs</a></td>
+<td>Is an Object from a Class?</td></tr>
+<tr><td width="25%"><a href="setLoadActions.html">setLoadAction</a></td>
+<td>Set Actions For Package Loading</td></tr>
+<tr><td width="25%"><a href="setLoadActions.html">setLoadActions</a></td>
+<td>Set Actions For Package Loading</td></tr>
+<tr><td width="25%"><a href="setMethod.html">setMethod</a></td>
+<td>Create and Save a Method</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">setOldClass</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="getPackageName.html">setPackageName</a></td>
+<td>The Name associated with a Given Package</td></tr>
+<tr><td width="25%"><a href="refClass.html">setRefClass</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="GenericFunctions.html">setReplaceMethod</a></td>
+<td>Tools for Managing Generic Functions</td></tr>
+<tr><td width="25%"><a href="validObject.html">setValidity</a></td>
+<td>Test the Validity of an Object</td></tr>
+<tr><td width="25%"><a href="show.html">show</a></td>
+<td>Show an Object</td></tr>
+<tr><td width="25%"><a href="refClass.html">show-method</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+<tr><td width="25%"><a href="show.html">show-method</a></td>
+<td>Show an Object</td></tr>
+<tr><td width="25%"><a href="signature-class.html">show-method</a></td>
+<td>Class '"signature"' For Method Definitions</td></tr>
+<tr><td width="25%"><a href="StructureClasses.html">show-method</a></td>
+<td>Classes Corresponding to Basic Structures</td></tr>
+<tr><td width="25%"><a href="TraceClasses.html">show-method</a></td>
+<td>Classes Used Internally to Control Tracing</td></tr>
+<tr><td width="25%"><a href="show.html">show-methods</a></td>
+<td>Show an Object</td></tr>
+<tr><td width="25%"><a href="showMethods.html">showMethods</a></td>
+<td>Show all the methods for the specified function(s)</td></tr>
+<tr><td width="25%"><a href="GenericFunctions.html">signature</a></td>
+<td>Tools for Managing Generic Functions</td></tr>
+<tr><td width="25%"><a href="signature-class.html">signature-class</a></td>
+<td>Class '"signature"' For Method Definitions</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">single-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="slot.html">slot</a></td>
+<td>The Slots in an Object from a Formal Class</td></tr>
+<tr><td width="25%"><a href="slot.html">slot&lt;-</a></td>
+<td>The Slots in an Object from a Formal Class</td></tr>
+<tr><td width="25%"><a href="slot.html">slotNames</a></td>
+<td>The Slots in an Object from a Formal Class</td></tr>
+<tr><td width="25%"><a href="S3Part.html">slotsFromS3</a></td>
+<td>S3-style Objects and S4-class Objects</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">socket-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="evalSource.html">sourceEnvironment-class</a></td>
+<td>Use Function Definitions from a Source File without Reinstalling a Package</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">special-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="StructureClasses.html">structure-class</a></td>
+<td>Classes Corresponding to Basic Structures</td></tr>
+<tr><td width="25%"><a href="S4groupGeneric.html">Summary</a></td>
+<td>S4 Group Generic Functions</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">summary.table-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">summaryDefault-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="refClass.html">SuperClassMethod-class</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="setOldClass.html">table-class</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="testInheritedMethods.html">testInheritedMethods</a></td>
+<td>Test for and Report about Selection of Inherited Methods</td></tr>
+<tr><td width="25%"><a href="TraceClasses.html">traceable-class</a></td>
+<td>Classes Used Internally to Control Tracing</td></tr>
+<tr><td width="25%"><a href="StructureClasses.html">ts-class</a></td>
+<td>Classes Corresponding to Basic Structures</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="refClass.html">uninitializedField-class</a></td>
+<td>Objects With Fields Treated by Reference (OOP-style)</td></tr>
+</table>
+
+<h2><a name="V">-- V --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="validObject.html">validObject</a></td>
+<td>Test the Validity of an Object</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">vector-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+<tr><td width="25%"><a href="BasicClasses.html">VIRTUAL-class</a></td>
+<td>Classes Corresponding to Basic Data Types</td></tr>
+</table>
+
+<h2><a name="W">-- W --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="LanguageClasses.html">while-class</a></td>
+<td>Classes to Represent Unevaluated Language Objects</td></tr>
+</table>
+
+<h2><a name="misc">-- misc --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="stdRefClass.html">$-method</a></td>
+<td>Class '"envRefClass"'</td></tr>
+<tr><td width="25%"><a href="stdRefClass.html">$&lt;--method</a></td>
+<td>Class '"envRefClass"'</td></tr>
+<tr><td width="25%"><a href="LanguageClasses.html">(-class</a></td>
+<td>Classes to Represent Unevaluated Language Objects</td></tr>
+<tr><td width="25%"><a href="zBasicFunsList.html">.BasicFunsList</a></td>
+<td>List of Builtin and Special Functions</td></tr>
+<tr><td width="25%"><a href="TraceClasses.html">.doTracePrint</a></td>
+<td>Classes Used Internally to Control Tracing</td></tr>
+<tr><td width="25%"><a href="Classes.html">.environment-class</a></td>
+<td>Class Definitions</td></tr>
+<tr><td width="25%"><a href="Classes.html">.externalptr-class</a></td>
+<td>Class Definitions</td></tr>
+<tr><td width="25%"><a href="slot.html">.hasSlot</a></td>
+<td>The Slots in an Object from a Formal Class</td></tr>
+<tr><td width="25%"><a href="TraceClasses.html">.InitTraceFunctions</a></td>
+<td>Classes Used Internally to Control Tracing</td></tr>
+<tr><td width="25%"><a href="TraceClasses.html">.makeTracedFunction</a></td>
+<td>Classes Used Internally to Control Tracing</td></tr>
+<tr><td width="25%"><a href="Classes.html">.name-class</a></td>
+<td>Class Definitions</td></tr>
+<tr><td width="25%"><a href="Classes.html">.NULL-class</a></td>
+<td>Class Definitions</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">.OldClassesList</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="testInheritedMethods.html">.Other-class</a></td>
+<td>Test for and Report about Selection of Inherited Methods</td></tr>
+<tr><td width="25%"><a href="selectSuperClasses.html">.selectSuperClasses</a></td>
+<td>Super Classes (of Specific Kinds) of a Class</td></tr>
+<tr><td width="25%"><a href="setOldClass.html">.setOldIs</a></td>
+<td>Register Old-Style (S3) Classes and Inheritance</td></tr>
+<tr><td width="25%"><a href="slot.html">.slotNames</a></td>
+<td>The Slots in an Object from a Formal Class</td></tr>
+<tr><td width="25%"><a href="TraceClasses.html">.untracedFunction</a></td>
+<td>Classes Used Internally to Control Tracing</td></tr>
+<tr><td width="25%"><a href="LanguageClasses.html">&lt;--class</a></td>
+<td>Classes to Represent Unevaluated Language Objects</td></tr>
+<tr><td width="25%"><a href="slot.html">@&lt;-</a></td>
+<td>The Slots in an Object from a Formal Class</td></tr>
+<tr><td width="25%"><a href="Classes.html">__ClassMetaData</a></td>
+<td>Class Definitions</td></tr>
+<tr><td width="25%"><a href="LanguageClasses.html">{-class</a></td>
+<td>Classes to Represent Unevaluated Language Objects</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/methods/html/R.css b/win32/deps/library/methods/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/methods/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/methods/libs/i386/methods.dll b/win32/deps/library/methods/libs/i386/methods.dll
new file mode 100644
index 0000000..2bb29f0
Binary files /dev/null and b/win32/deps/library/methods/libs/i386/methods.dll differ
diff --git a/win32/deps/library/methods/po/da/LC_MESSAGES/R-methods.mo b/win32/deps/library/methods/po/da/LC_MESSAGES/R-methods.mo
new file mode 100644
index 0000000..eb1dd4d
Binary files /dev/null and b/win32/deps/library/methods/po/da/LC_MESSAGES/R-methods.mo differ
diff --git a/win32/deps/library/methods/po/da/LC_MESSAGES/methods.mo b/win32/deps/library/methods/po/da/LC_MESSAGES/methods.mo
new file mode 100644
index 0000000..4803b61
Binary files /dev/null and b/win32/deps/library/methods/po/da/LC_MESSAGES/methods.mo differ
diff --git a/win32/deps/library/methods/po/de/LC_MESSAGES/R-methods.mo b/win32/deps/library/methods/po/de/LC_MESSAGES/R-methods.mo
new file mode 100644
index 0000000..b3d88e4
Binary files /dev/null and b/win32/deps/library/methods/po/de/LC_MESSAGES/R-methods.mo differ
diff --git a/win32/deps/library/methods/po/de/LC_MESSAGES/methods.mo b/win32/deps/library/methods/po/de/LC_MESSAGES/methods.mo
new file mode 100644
index 0000000..b8a41e6
Binary files /dev/null and b/win32/deps/library/methods/po/de/LC_MESSAGES/methods.mo differ
diff --git a/win32/deps/library/methods/po/en quot/LC_MESSAGES/R-methods.mo b/win32/deps/library/methods/po/en quot/LC_MESSAGES/R-methods.mo
new file mode 100644
index 0000000..18b930a
Binary files /dev/null and b/win32/deps/library/methods/po/en quot/LC_MESSAGES/R-methods.mo differ
diff --git a/win32/deps/library/methods/po/en quot/LC_MESSAGES/methods.mo b/win32/deps/library/methods/po/en quot/LC_MESSAGES/methods.mo
new file mode 100644
index 0000000..7d9fdcc
Binary files /dev/null and b/win32/deps/library/methods/po/en quot/LC_MESSAGES/methods.mo differ
diff --git a/win32/deps/library/methods/po/fr/LC_MESSAGES/R-methods.mo b/win32/deps/library/methods/po/fr/LC_MESSAGES/R-methods.mo
new file mode 100644
index 0000000..305759d
Binary files /dev/null and b/win32/deps/library/methods/po/fr/LC_MESSAGES/R-methods.mo differ
diff --git a/win32/deps/library/methods/po/fr/LC_MESSAGES/methods.mo b/win32/deps/library/methods/po/fr/LC_MESSAGES/methods.mo
new file mode 100644
index 0000000..9f3f4cd
Binary files /dev/null and b/win32/deps/library/methods/po/fr/LC_MESSAGES/methods.mo differ
diff --git a/win32/deps/library/methods/po/ja/LC_MESSAGES/R-methods.mo b/win32/deps/library/methods/po/ja/LC_MESSAGES/R-methods.mo
new file mode 100644
index 0000000..d8c4db0
Binary files /dev/null and b/win32/deps/library/methods/po/ja/LC_MESSAGES/R-methods.mo differ
diff --git a/win32/deps/library/methods/po/ja/LC_MESSAGES/methods.mo b/win32/deps/library/methods/po/ja/LC_MESSAGES/methods.mo
new file mode 100644
index 0000000..16ac038
Binary files /dev/null and b/win32/deps/library/methods/po/ja/LC_MESSAGES/methods.mo differ
diff --git a/win32/deps/library/methods/po/ko/LC_MESSAGES/R-methods.mo b/win32/deps/library/methods/po/ko/LC_MESSAGES/R-methods.mo
new file mode 100644
index 0000000..d2c3cd3
Binary files /dev/null and b/win32/deps/library/methods/po/ko/LC_MESSAGES/R-methods.mo differ
diff --git a/win32/deps/library/methods/po/ko/LC_MESSAGES/methods.mo b/win32/deps/library/methods/po/ko/LC_MESSAGES/methods.mo
new file mode 100644
index 0000000..c63723a
Binary files /dev/null and b/win32/deps/library/methods/po/ko/LC_MESSAGES/methods.mo differ
diff --git a/win32/deps/library/methods/po/pl/LC_MESSAGES/R-methods.mo b/win32/deps/library/methods/po/pl/LC_MESSAGES/R-methods.mo
new file mode 100644
index 0000000..6904d09
Binary files /dev/null and b/win32/deps/library/methods/po/pl/LC_MESSAGES/R-methods.mo differ
diff --git a/win32/deps/library/methods/po/pl/LC_MESSAGES/methods.mo b/win32/deps/library/methods/po/pl/LC_MESSAGES/methods.mo
new file mode 100644
index 0000000..30e28ca
Binary files /dev/null and b/win32/deps/library/methods/po/pl/LC_MESSAGES/methods.mo differ
diff --git a/win32/deps/library/methods/po/pt_BR/LC_MESSAGES/R-methods.mo b/win32/deps/library/methods/po/pt_BR/LC_MESSAGES/R-methods.mo
new file mode 100644
index 0000000..b6d8833
Binary files /dev/null and b/win32/deps/library/methods/po/pt_BR/LC_MESSAGES/R-methods.mo differ
diff --git a/win32/deps/library/methods/po/pt_BR/LC_MESSAGES/methods.mo b/win32/deps/library/methods/po/pt_BR/LC_MESSAGES/methods.mo
new file mode 100644
index 0000000..53df6d2
Binary files /dev/null and b/win32/deps/library/methods/po/pt_BR/LC_MESSAGES/methods.mo differ
diff --git a/win32/deps/library/methods/po/ru/LC_MESSAGES/R-methods.mo b/win32/deps/library/methods/po/ru/LC_MESSAGES/R-methods.mo
new file mode 100644
index 0000000..931d2f8
Binary files /dev/null and b/win32/deps/library/methods/po/ru/LC_MESSAGES/R-methods.mo differ
diff --git a/win32/deps/library/methods/po/ru/LC_MESSAGES/methods.mo b/win32/deps/library/methods/po/ru/LC_MESSAGES/methods.mo
new file mode 100644
index 0000000..47ae979
Binary files /dev/null and b/win32/deps/library/methods/po/ru/LC_MESSAGES/methods.mo differ
diff --git a/win32/deps/library/methods/po/zh_CN/LC_MESSAGES/R-methods.mo b/win32/deps/library/methods/po/zh_CN/LC_MESSAGES/R-methods.mo
new file mode 100644
index 0000000..52bbe12
Binary files /dev/null and b/win32/deps/library/methods/po/zh_CN/LC_MESSAGES/R-methods.mo differ
diff --git a/win32/deps/library/methods/po/zh_CN/LC_MESSAGES/methods.mo b/win32/deps/library/methods/po/zh_CN/LC_MESSAGES/methods.mo
new file mode 100644
index 0000000..34ed0c1
Binary files /dev/null and b/win32/deps/library/methods/po/zh_CN/LC_MESSAGES/methods.mo differ
diff --git a/win32/deps/library/methods/tests/S3.R b/win32/deps/library/methods/tests/S3.R
new file mode 100644
index 0000000..331d336
--- /dev/null
+++ b/win32/deps/library/methods/tests/S3.R
@@ -0,0 +1,29 @@
+## accumulate here tests of the relation between S4 and S3 classes
+
+## $<-.data.frame did stupid things with the class attribute
+## that clobbered S4 classes extending "data.frame"
+## Test that the S4 method (R 2.13.0) works transparently
+
+set.seed(864)
+
+xx <- data.frame(a=rnorm(10),
+                 b=as.factor(sample(c("T", "F"), 10, TRUE)),
+                 row.names = paste("R",1:10,sep=":"))
+
+setClass("myData", representation(extra = "character"),
+         contains = "data.frame")
+
+mx <- new("myData", xx, extra = "testing")
+
+## three kinds of $<-: replace, add, delete (NULL value)
+
+mx$a <- mx$a * 2
+xx$a <- xx$a * 2
+
+mx$c <- 1:10
+xx$c <- 1:10
+
+mx$b <- NULL
+xx$b <- NULL
+
+stopifnot(identical(mx, new("myData", xx, extra = "testing")))
diff --git a/win32/deps/library/methods/tests/basicRefClass.R b/win32/deps/library/methods/tests/basicRefClass.R
new file mode 100644
index 0000000..4460efe
--- /dev/null
+++ b/win32/deps/library/methods/tests/basicRefClass.R
@@ -0,0 +1,502 @@
+## simple call, only field names
+fg <- setRefClass("foo", c("bar", "flag"))
+f1 <- new("foo")
+f1$bar
+f1 <- fg$new(flag = "testing")
+f1$bar <- 1
+stopifnot(identical(f1$bar, 1))
+fg$methods(showAll = function() c(bar, flag))
+stopifnot(all.equal(f1$showAll(), c(1, "testing")))
+str(f1)
+
+fg <- setRefClass("foo", list(bar = "numeric", flag = "character",
+                              tag = "ANY"),
+                  methods = list(addToBar = function(incr) {
+                      b <- bar + incr
+                      bar <<- b
+                      b
+                  } )
+                  )
+fg$lock("flag")
+stopifnot(identical(fg$lock(), "flag"))
+
+ff <- new("foo", bar = 1.5)
+stopifnot(identical(ff$bar, 1.5))
+ff$bar <- pi
+stopifnot(identical(ff$bar, pi))
+## flag has not yet been set
+ff$flag <- "flag test"
+stopifnot(identical(ff$flag, "flag test"))
+## but no second assign
+stopifnot(is(tryCatch(ff$flag <- "new", error = function(e)e), "error"))
+
+## test against generator
+
+f2 <- fg$new(bar = pi, flag = "flag test")
+## identical does not return TRUE if *contents* of env are identical
+stopifnot(identical(ff$bar, f2$bar), identical(ff$flag, f2$flag))
+## but flag was now assigned once
+stopifnot(is(tryCatch(f2$flag <- "new", error = function(e)e), "error"))
+
+str(f2)
+
+
+## add some accessor methods
+fg$accessors("bar")
+
+ff$setBar(1:3)
+stopifnot(identical(ff$getBar(), 1:3))
+
+ff$getBar()
+stopifnot(all.equal(ff$addToBar(1), 2:4))
+
+
+## Add a method
+fg$methods(barTimes = function(x) {
+    "This method multiples field bar by argument x
+and this string is self-documentation"
+    setBar(getBar() * x)})
+
+ffbar <- ff$getBar()
+ff$barTimes(10)
+stopifnot(all.equal(ffbar * 10, ff$getBar()))
+ff$barTimes(.1)
+
+## inheritance.  redefines flag so should fail:
+stopifnot(is(tryCatch(setRefClass("foo2", list(b2 = "numeric",
+					       flag = "complex"),
+            contains = "foo",
+            refMethods = list(addBoth = function(incr) {
+                addToBar(incr) #uses inherited class method
+                setB2(getB2() + incr)
+                })),
+          error = function(e)e), "error"))
+## but with flag as a subclass of "characters", should work
+## Also subclasses "tag" which had class "ANY before
+setClass("ratedChar", contains = "character",
+         representation(score = "numeric"))
+foo2 <- setRefClass("foo2", list(b2 = "numeric", flag = "ratedChar",
+				 tag = "numeric"),
+	    contains = "foo",
+	    methods = list(addBoth = function(incr) {
+                addToBar(incr) #uses inherited class method
+                b2 <<- b2 + incr
+                }))
+## now lock the flag field; should still allow one write
+foo2$lock("flag")
+f2 <- foo2$new(bar = -3, flag = as("ANY", "ratedChar"),
+               b2 = ff$bar, tag = 1.5)
+## but not a second one
+stopifnot(is(tryCatch(f2$flag <- "Try again",
+         error = function(e)e), "error"))
+str(f2)
+f22 <- foo2$new(bar = f2$bar)
+## same story if assignment follows the initialization
+f22$flag <- f2$flag
+stopifnot(is(tryCatch(f22$flag <- "Try again",
+         error = function(e)e), "error"))
+## Exporting superclass object
+f22 <- fg$new(bar = f2$bar, flag = f2$flag)
+f2e <- f2$export("foo")
+stopifnot(identical(f2e$bar, f22$bar), identical(f2e$flag, f22$flag),
+          identical(class(f2e), class(f22)))
+stopifnot(identical(f2$flag,  as("ANY", "ratedChar")),
+          identical(f2$bar, -3),
+          all.equal(f2$b2, 2:4+0))
+f2$addBoth(-1)
+stopifnot(all.equal(f2$bar, -4), all.equal(f2$b2, 1:3+0))
+
+## test callSuper()
+foo3 <- setRefClass("foo3", fields = list(flag2 = "ratedChar"),
+            contains = "foo2",
+	    methods = list(addBoth = function(incr) {
+		callSuper(incr)
+		flag2 <<- as(paste(flag, paste(incr, collapse = ", "),
+				   sep = "; "),
+                             "ratedChar")
+                incr
+            }))
+
+f2 <- foo2$new(bar = -3, flag = as("ANY", "ratedChar"), b2 =  1:3)
+f3 <- foo3$new()
+f3$import(f2)
+stopifnot(all.equal(f3$b2, f2$b2), all.equal(f3$bar, f2$bar),
+          all.equal(f3$flag, f2$flag))
+f3$addBoth(1)
+stopifnot(all.equal(f3$bar, -2), all.equal(f3$b2, 2:4+0),
+          all.equal(f3$flag2, as("ANY; 1", "ratedChar")))
+
+## but the import should have used up the one write for $flag
+stopifnot(is(tryCatch(f3$flag <- "Try again",
+         error = function(e)e), "error"))
+str(f3)
+
+## importing the same class (not very useful but documented to work)
+f3 <- foo3$new()
+f4 <- foo3$new(bar = -3, flag = as("More", "ratedChar"), b2 =  1:3, flag2 = f2$flag)
+f3$import(f4)
+stopifnot(identical(f3$bar, f4$bar),
+          identical(f3$flag, f4$flag),
+          identical(f3$b2, f4$b2),
+          identical(f3$flag2, f4$flag2))
+
+## similar to $import() but using superclass object in the $new() call
+## The explicitly supplied flag= should override and be allowed
+## by the default $initialize()
+f3b <- foo3$new(f2, flag = as("Other", "ratedChar"),
+                flag2 = as("More", "ratedChar"))
+## check that inherited and direct field assignments worked
+stopifnot(identical(f3b$tag, f2$tag),
+          identical(f3b$flag, as("Other", "ratedChar")),
+          identical(f3b$flag2, as("More", "ratedChar")))
+
+## a class with an initialize method, and an extra slot (legal, not a good idea)
+setOldClass(c("simple.list", "list"))
+fg4 <- setRefClass("foo4",
+            contains = "foo2",
+            methods = list(
+              initialize = function(...) {
+                  .self$initFields(...)
+                   self made <<- R.version
+                  .self
+              }),
+            representation = list(made = "simple.list")
+            )
+
+f4 <- new("foo4", flag = as("another test", "ratedChar"), bar = 1:3)
+stopifnot(identical(f4 made, R.version))
+
+## a trivial class with no fields, using fields = list(), failed up to rev 56035
+foo5 <- setRefClass("foo5", fields = list(),
+                    methods = list(bar = function(test)
+                    paste("*",test,"*")))
+
+f5 <- foo5$new()
+stopifnot(identical( f5$bar("xxx"), paste("*","xxx", "*")))
+
+
+## simple active binding test
+abGen <- setRefClass("ab",
+                  fields = list(a = "ANY",
+                  b = function(x) if(missing(x)) a else {a <<- x; x}))
+
+ab1 <- abGen$new(a = 1)
+
+stopifnot(identical(ab1$a, 1), identical(ab1$b, 1))
+
+ab1$b <- 2
+
+stopifnot(identical(ab1$a, 2), identical(ab1$b, 2))
+
+## a simple editor for matrix objects.  Method  $edit() changes some
+## range of values; method $undo() undoes the last edit.
+mEditor <- setRefClass("matrixEditor",
+        fields = list(data = "matrix",
+		     edits = "list"),
+       methods = list(
+     edit = function(i, j, value) {
+       ## the following string documents the edit method
+       'Replaces the range [i, j] of the
+	object by value.
+        '
+         backup <-
+             list(i, j, data[i,j])
+         data[i,j] <<- value
+         edits <<- c(list(backup),
+                     edits)
+         invisible(value)
+     },
+     undo = function() {
+       'Undoes the last edit() operation
+        and update the edits field accordingly.
+        '
+         prev <- edits
+         if(length(prev)) prev <- prev[[1]]
+         else stop("No more edits to undo")
+         edit(prev[[1]], prev[[2]], prev[[3]])
+         ## trim the edits list
+         length(edits) <<- length(edits) - 2
+         invisible(prev)
+     }
+     ))
+xMat <- matrix(1:12,4,3)
+xx <- mEditor$new(data = xMat)
+xx$edit(2, 2, 0)
+xx$data
+xx$undo()
+mEditor$help("undo")
+stopifnot(all.equal(xx$data, xMat))
+
+## add a method to save the object
+mEditor$methods(
+     save = function(file) {
+       'Save the current object on the file
+ in R external object format.
+'
+         base::save(.self, file = file)
+     },
+     counter = function(i) {
+         'The number of items in the i-th edit.
+ (Used to test usingMethods())
+'
+         if(i > 0 && i <= length(edits))
+             length(edits[[i]][[3]])
+         else
+             0L
+     }
+)
+
+tf <- tempfile()
+xx$save(tf) #$
+load(tf)
+unlink(tf)
+stopifnot(identical(xx$data, .self$data))
+
+markViewer <- ""
+setMarkViewer <- function(what)
+    markViewer <<- what
+
+## Inheriting a reference class:  a matrix viewer
+mv <- setRefClass("matrixViewer",
+    fields = c("viewerDevice", "viewerFile"),
+    contains = "matrixEditor",
+    methods = list( view = function() {
+        dd <- dev.cur(); dev.set(viewerDevice)
+        devAskNewPage(FALSE)
+        matplot(data, main = paste("After",length(edits),"edits"))
+        dev.set(dd)},
+        edit = # invoke previous method, then replot
+          function(i, j, value) {
+            callSuper(i, j, value)
+            view()
+          }))
+
+## initialize and finalize methods
+mv$methods( initialize = function(file = "./matrixView.pdf", ...) {
+    viewerFile <<- file
+    pdf(viewerFile)
+    viewerDevice <<- dev.cur()
+    message("Plotting to ", viewerFile)
+    dev.set(dev.prev())
+    setMarkViewer("ON")
+    initFields(...)
+  },
+  finalize = function() {
+    dev.off(viewerDevice)
+    setMarkViewer("OFF")
+  })
+
+## a counts method to test usingMethods()
+mv$methods( counts = function() {
+    usingMethods("counter")
+    sapply(seq_along(edits), "counter")
+})
+
+
+ff <- mv$new( data = xMat)
+stopifnot(identical(markViewer, "ON")) # check initialize
+ff$edit(2,2,0)
+ff$data
+stopifnot(identical(ff$counts(), length(ff$edits[[1]][[3]])))
+ff$undo()
+stopifnot(all.equal(ff$data, xMat))
+rm(ff)
+gc()
+stopifnot(identical(markViewer, "OFF")) #check finalize
+
+## tests of copying
+viewerPlus <- setRefClass("viewerPlus",
+                   fields = list( text = "character",
+                      viewer = "matrixViewer"))
+ff <- mv$new( data = xMat)
+v1 <- viewerPlus$new(text = letters, viewer = ff)
+v2 <- v1$copy()
+v3 <- v1$copy(TRUE)
+v2$text <- "Hello, world"
+v2$viewer$data <- t(xMat) # change a field in v2$viewer
+v3$text <- LETTERS
+v3$viewer <- mv$new( data = matrix(nrow=1,ncol=1))
+## with a deep copy all is protected, with a shallow copy
+## the environment of a copied field remains the same,
+## but replacing the whole field should be local
+stopifnot(identical(v1$text, letters),
+          identical(v1$viewer, ff),
+          identical(v2$text, "Hello, world"))
+v3 <- v1$copy(TRUE)
+v3$viewer$data <- t(xMat) # should modify v1$viewer as well
+stopifnot(identical(v1$viewer$data, t(xMat)))
+
+## the field() method
+stopifnot(identical(v1$text, v1$field("text")))
+v1$field("text", "Now is the time")
+stopifnot(identical(v1$field("text"), "Now is the time"))
+
+## setting a non-existent field, or a method, should throw an error
+stopifnot(is(tryCatch(v1$field("foobar", 0), error = function(e)e), "error"),
+         is(tryCatch(v1$field("copy", 0), error = function(e)e), "error") )
+
+## the methods to extract class definition and generator
+stopifnot(identical(v3$getRefClass()$def, getRefClass("viewerPlus")$def),
+          identical(v3$getClass(), getClass("viewerPlus")))
+
+## deal correctly with inherited methods and overriding existing
+## methods from $methods(...)
+refClassA <- setRefClass("refClassA", methods=list(foo=function() "A"))
+refClassB <- setRefClass("refClassB", contains="refClassA")
+mnames <- objects(getClass("refClassB")@refMethods)
+refClassB$methods(foo=function() callSuper())
+stopifnot(identical(refClassB$new()$foo(), "A"))
+mnames2 <- objects(getClass("refClassB")@refMethods)
+stopifnot(identical(mnames2[is.na(match(mnames2,mnames))], "foo#refClassA"))
+refClassB$methods(foo=function() paste(callSuper(), "Version 2"))
+stopifnot(identical(refClassB$new()$foo(), "A Version 2"))
+stopifnot(identical(mnames2, objects(getClass("refClassB")@refMethods)))
+
+if(methods:::.hasCodeTools()) {
+    ## code warnings assigning locally to field names
+    stopifnot(is(tryCatch(mv$methods(test = function(x)
+                                 { data <- x[!is.na(x)]; mean(data)}),
+                          warning = function(e)e), "warning"))
+
+    ## warnings for nonlocal assignment that is not a field
+    stopifnot(is(tryCatch(mv$methods(test2 = function(x) {something <<- data[!is.na(x)]}), warning = function(e)e), "warning"))
+
+    ## error for trying to assign to a method name
+    stopifnot(is(tryCatch(mv$methods(test3 = function(x) {edit <<- data[!is.na(x)]}), error = function(e)e), "error"))
+} else
+    warning("Can't run some tests:  recommended package codetools is not available")
+
+## tests (fragmentary by necessity) of promptClass for reference class
+ccon <- textConnection("ctxt", "w")
+suppressMessages(promptClass("refClassB", filename = ccon))
+## look for a method, inheritance, inherited method
+stopifnot(length(c(grep("foo.*refClassA", ctxt),
+                   grep("code{foo()}", ctxt, fixed = TRUE),
+                   grep("linkS4class{refClassA", ctxt, fixed = TRUE))) >= 3)
+close(ccon)
+rm(ctxt)
+
+
+## tests related to subclassing environments.  These really test code in the core, viz. builtin.c
+a <- refClassA$new()
+ev <- new.env(parent = a) # parent= arg
+stopifnot(is.environment(ev))
+foo <- function()"A"; environment(foo) <- a # environment of function
+stopifnot(identical(as.environment(a), environment(foo)))
+xx <- 1:10; environment(xx) <- a # environment attribute
+stopifnot(identical(as.environment(a), environment(xx)))
+
+
+## tests of [[<- and $<- for subclasses of environment.  At one point
+## methods for these assignments were defined and caused
+## inf. recursion when the arguments to the [[<- case were changed in base.
+setClass("myEnv", contains = "environment")
+m <- new("myEnv", a="test")
+m2 <- new("myEnv"); m3 <- new("myEnv")
+## test that new.env() is called for each new object
+stopifnot(!identical(as.environment(m), as.environment(m2)),
+          !identical(as.environment(m3), as.environment(m2)))
+m[["x"]] <- 1; m$y <- 2
+stopifnot(identical(c(m[["x"]], m$y), c(1,2)), is(m, "myEnv"))
+rm(x, envir = m) # check rm() works, does not clobber class
+stopifnot(identical(sort(objects(m)), sort(c("a", "y"))),
+          is(m, "myEnv"))
+
+## tests of binding & environment tools with subclases of environment
+lockBinding("y", m)
+stopifnot(bindingIsLocked("y", m))
+unlockBinding("y", m)
+stopifnot(!bindingIsLocked("y", m))
+
+makeActiveBinding("z", function(value) {
+    if(missing(value))
+        "dummy"
+    else
+        "dummy assignment"
+}, m)
+stopifnot(identical(get("z", m),"dummy"))
+## assignment will return the value but do nothing
+stopifnot(identical(assign("z","other", m), "other"),
+          identical(get("z", m),"dummy"))
+
+
+## this has to be last--Seems no way to unlock an environment!
+lockEnvironment(m)
+stopifnot(environmentIsLocked(m))
+
+rm(m)
+m <- new("myEnv")
+stopifnot(length(ls(m)) == 0)
+## used to contain the previous content
+
+
+## test of callSuper() to a hidden default method for initialize() (== initFields)
+TestClass <- setRefClass ("TestClass",
+     fields = list (text = "character"),
+     methods = list(
+       print = function ()  {cat(text)},
+       initialize = function(text = "", ...) callSuper(text = paste(text, ":", sep=""),...)
+  ))
+tt <- TestClass$new("hello world")
+stopifnot(identical(tt$text, "hello world:"))
+## now a subclass with another field & another layer of callSuper()
+TestClass2 <- setRefClass("TestClass2",
+        contains = "TestClass",
+        fields = list( version = "integer"),
+        methods = list(
+          initialize = function(..., version = 0L)
+              callSuper(..., version = version+1L))
+  )
+tt <- TestClass2$new("test", version = 1L)
+stopifnot(identical(tt$text, "test:"), identical(tt$version, as.integer(2)))
+tt <- TestClass2$new(version=3L) # default text
+stopifnot(identical(tt$text, ":"), identical(tt$version, as.integer(4)))
+
+
+## test some capabilities but read-only for .self
+.changeAllFields <- function(replacement) {
+    fields <- names( refClassDef fieldClasses)
+    for(field in fields)
+        eval(substitute(.self$FIELD <- replacement$FIELD,
+                        list(FIELD = field)))
+}
+
+mEditor$methods(change = .changeAllFields)
+xx <- mEditor$new(data = xMat)
+xx$edit(2, 2, 0)
+
+yy <- mEditor$new(data = xMat+1)
+yy$change(xx)
+stopifnot(identical(yy$data, xx$data), identical(yy$edits, xx$edits))
+
+## but don't allow assigment
+if(methods:::.hasCodeTools())
+        stopifnot(is(tryCatch(yy$.self$data <- xMat, error = function(e)e), "error"))
+
+## the locked binding of refObjectGenerator class should prevent modifying
+## methods, locking fields or setting accessor methods
+evr <- getRefClass("refObjectGenerator") # in methods
+stopifnot(is(tryCatch(evr$methods(foo = function()"..."), error = function(e)e), "error"),
+         is(tryCatch(evr$lock("def"), error = function(e)e), "error"),
+         is(tryCatch(evr$accessors("def"), error = function(e)e), "error"))
+
+##getRefClass() method and function should work with either
+## a class name or a class representation (bug report 14600)
+tg <- setRefClass("tg", fields = "a")
+t1 <- tg$new(a=1)
+tgg <- t1$getRefClass()
+tggg <- getRefClass("tg")
+stopifnot(identical(tgg$def, tggg$def),
+          identical(tg$def, tgg$def))
+## TODO:  the className returned by setRefClass should have
+## a package attribute, which would allow:
+##          identical(tg$className, tgg$className))
+
+## this used to fail in initFieldArgs() from partial matching "self"
+selfClass <- setRefClass("selfClass",
+        fields=list(
+            self="character", super="character", sub="character"
+        )
+    )
+
+stopifnot(identical(selfClass$new(self="B", super="A", sub="C")$self, "B"))
diff --git a/win32/deps/library/methods/tests/duplicateClass.R b/win32/deps/library/methods/tests/duplicateClass.R
new file mode 100644
index 0000000..e8f167c
--- /dev/null
+++ b/win32/deps/library/methods/tests/duplicateClass.R
@@ -0,0 +1,27 @@
+## Tests for handling classes with same name & different package slots
+## First:  Can we define the classes and get the separate definitions
+## from the appropriate namespace or from the package slot in class(x)?
+stopifnot(require(Matrix))
+
+## from: example(chol)
+sy2 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, NA,32,77))
+c2 <- chol(sy2)
+
+clM <- getClass("Cholesky")
+
+setClass("Cholesky", contains = "numeric", representation(size = "integer"))
+
+clG <- getClass("Cholesky", where = .GlobalEnv)
+
+stopifnot(identical(getClass("Cholesky", where = asNamespace("Matrix")),
+                    clM))
+
+stopifnot(identical(getClass(class(c2)), clM))
+
+stopifnot(identical(evalq(getClass("Cholesky"), asNamespace("Matrix")),
+                    clM))
+stopifnot(identical(getClass("Cholesky"), clG))
+
+## Second:  tests of methods defined for the same generic
+## (NOT YET!)
+
diff --git a/win32/deps/library/methods/tests/fieldAssignments.R b/win32/deps/library/methods/tests/fieldAssignments.R
new file mode 100644
index 0000000..c06987d
--- /dev/null
+++ b/win32/deps/library/methods/tests/fieldAssignments.R
@@ -0,0 +1,30 @@
+dt <- setRefClass("dt", fields = list(data = "environment", row.names = "character"))
+
+ev <- new.env()
+
+d1 <- dt$new(data = ev, row.names = letters)
+
+stopifnot(identical(d1$data, ev),
+          identical(d1$row.names, letters))
+
+# an invalid class should generate an error
+d2 <- tryCatch(dt$new(data = ev, row.names = 1:12), error = function(e)e)
+
+stopifnot(is(d2, "error"),
+          grepl("row.names", d2$message, fixed = TRUE),
+          grepl("character", d2$message, fixed = TRUE),
+          grepl("integer", d2$message, fixed = TRUE))
+
+# a simple subclass should be used, unchanged
+
+setClass("tagStrings", contains = "character",
+         representation(tag = "Date"))
+
+date1 <- as.Date("2010-01-15")
+
+t1 <- new("tagStrings", letters, tag = date1)
+
+d3 <- dt$new(data = ev, row.names = t1)
+
+stopifnot(identical(d3$row.names, t1))
+
diff --git a/win32/deps/library/methods/tests/mixinInitialize.R b/win32/deps/library/methods/tests/mixinInitialize.R
new file mode 100644
index 0000000..139724d
--- /dev/null
+++ b/win32/deps/library/methods/tests/mixinInitialize.R
@@ -0,0 +1,65 @@
+setClass("A", representation(a="numeric"))
+
+a1 <- new("A", a=1.5)
+m1 <- as.matrix(1)
+
+setClass("M", contains = "matrix", representation(fuzz = "numeric"))
+
+set.seed(113)
+f1 <- runif(3)
+
+stopifnot(identical(as(new("M", 1:12, nrow = 3, fuzz = f1), "matrix"),
+		    matrix(1:12, nrow=3)),
+	  identical(as(new("M", 1:12, 3, fuzz = f1), "matrix"),
+		    matrix(1:12, 3)),
+	  identical(as(new("M", 1:12, ncol = 3, fuzz = f1), "matrix"),
+		    matrix(1:12, ncol=3)))
+
+setClass("B", contains = c("matrix", "A"))
+
+stopifnot(## a new "B" element mixing two superclass objects
+	  identical(new("B", m1, a1)@a, a1 a),
+	  ## or not
+	  identical(as(new("B", m1),"matrix"), m1),
+	  ## or supplying a slot to override
+	  identical(new("B", matrix(m1, nrow = 2), a1, a=pi)@a, pi))
+
+## an extra level of inheritance
+setClass("C", contains = "B", representation(c = "character"))
+new("C", m1, c = "Testing")
+
+## verify that validity tests work (PR#14284)
+setValidity("B", function(object) {
+    if(all(is.na(object a) | (object a > 0)))
+      TRUE
+    else
+      "elements of slot \"a\" must be positive"
+})
+
+a2 <- new("A", a= c(NA,3, -1, 2))
+
+## from the SoDA package on CRAN
+muststop <- function(expr, silent = TRUE) {
+    tryExpr <- substitute(tryCatch(expr, error=function(cond)cond))
+    value <- eval.parent(tryExpr)
+    if(inherits(value, "error")) {
+        if(!silent)
+          message("muststop reports: ", value)
+        invisible(value)
+    }
+    else
+      stop(gettextf("The expression  %s should have thrown an error, but instead returned an object of class \"%s\"",
+           deparse(substitute(expr))[[1]], class(value)))
+}
+
+muststop(new("B", m1, a2))
+
+removeClass("B")
+removeClass("C")
+removeClass("M")
+
+## TODO:  make versions of above inheriting from "array" and "ts"
+
+removeClass("A")
+
+
diff --git a/win32/deps/library/methods/tests/namesAndSlots.R b/win32/deps/library/methods/tests/namesAndSlots.R
new file mode 100644
index 0000000..2091921
--- /dev/null
+++ b/win32/deps/library/methods/tests/namesAndSlots.R
@@ -0,0 +1,16 @@
+setClass("B", contains = "numeric")
+xx <- new("B", 1)
+stopifnot(is(tryCatch(names(xx) <- "A" , warning = function(e)e), "warning"))
+names(xx) <- "A" # after this should not warn
+stopifnot(is(tryCatch(names(xx) <- "B" , warning = function(e)e), "character"))
+setClass("A", representation(xx = "numeric"))
+a <- new("A", xx = 1)
+stopifnot(is(tryCatch(names(a) <- "A" , error = function(e)e), "error"))
+setClass("C", representation(xx = "numeric", names= "character"))
+c <- new("C", xx = 1, names = "A")
+c names <- "B"
+stopifnot(is(tryCatch(names(c) <- "A" , error = function(e)e), "error"))
+setClass("D", contains = "numeric", representation(names = "character"))
+d <- new("D", 1)
+names(d) <- "A"
+stopifnot(identical(d names, "A"))
diff --git a/win32/deps/library/methods/tests/nextWithDots.R b/win32/deps/library/methods/tests/nextWithDots.R
new file mode 100644
index 0000000..1a55f43
--- /dev/null
+++ b/win32/deps/library/methods/tests/nextWithDots.R
@@ -0,0 +1,20 @@
+setClass("A")
+setClass("B", contains = c("array", "A"))
+a = array(1:12, c(2,3,4))
+bb = new("B", a)
+a2 = array(8:1, rep(2,3))
+stopifnot(identical(initialize(bb, a2), new("B",a2)))
+
+withDots <- function(x, ...) names(list(...))
+
+setGeneric("withDots")
+
+setClass("C", representation(x="numeric", y="character"))
+
+setMethod("withDots", "C", function(x, ...)
+          callNextMethod()
+          )
+stopifnot(identical(withDots(1, a=1, b=2), withDots(new("C"), a=1, b=2)))
+removeClass("C"); removeClass("B"); removeClass("A")
+removeGeneric("withDots")
+rm(a, bb, a2)
diff --git a/win32/deps/library/methods/tests/refClassExample.R b/win32/deps/library/methods/tests/refClassExample.R
new file mode 100644
index 0000000..cb39354
--- /dev/null
+++ b/win32/deps/library/methods/tests/refClassExample.R
@@ -0,0 +1,51 @@
+mEditor <- setRefClass("matrixEditor",
+      fields = list( data = "matrix",
+        edits = "list"),
+      methods = list(
+     edit = function(i, j, value) {
+       ## the following string documents the edit method
+       'Replaces the range [i, j] of the
+        object by value.
+        '
+         backup <-
+             list(i, j, data[i,j])
+         data[i,j] <<- value
+         edits <<- c(edits, list(backup))
+         invisible(value)
+     },
+     undo = function() {
+       'Undoes the last edit() operation
+        and update the edits field accordingly.
+        '
+         prev <- edits
+         if(length(prev)) prev <- prev[[length(prev)]]
+         else stop("No more edits to undo")
+         edit(prev[[1]], prev[[2]], prev[[3]])
+         ## trim the edits list
+         length(edits) <<- length(edits) - 2
+         invisible(prev)
+     }
+     ))
+
+xMat <- xEdited <- matrix(as.double(1:12),4,3)
+xEdited[[2,2]] <- 0
+xx <- mEditor$new(data = xMat)
+xx$edit(2, 2, 0)
+stopifnot(identical(xx$data, xEdited))
+xEdited[[1,3]] <- -1
+xx$edit(1,3, -1)
+stopifnot(identical(xx$data, xEdited))
+xx$undo()
+xEdited[[1,3]] <- xMat[[1,3]]
+stopifnot(identical(xx$data, xEdited))
+xx$undo()
+stopifnot(identical(xx$data, xMat))
+
+## the tracing method
+xx$trace(edit, quote(value <- 0))
+xx$edit(2,2, -1) # traced should assign 0
+stopifnot(identical(xx$data, xEdited))
+xx$untrace(edit)
+xx$edit(1, 3, -1) # now it should use -1
+xEdited[[1,3]] <- -1
+stopifnot(identical(xx$data, xEdited))
diff --git a/win32/deps/library/methods/tests/testConditionalIs.R b/win32/deps/library/methods/tests/testConditionalIs.R
new file mode 100644
index 0000000..4e27f27
--- /dev/null
+++ b/win32/deps/library/methods/tests/testConditionalIs.R
@@ -0,0 +1,38 @@
+setClass("maybe")
+
+setClass("A", representation(x = "numeric"))
+
+setIs("A", "maybe",
+      test = function(object)length(object x) >= 1 && object x[[1]] > 0,
+      coerce = function(from)from,
+      replace = function(from, value)
+      stop("meaningless to replace the \"maybe\" part of an object"))
+
+aa <- new("A", x=1)
+
+setGeneric("ff", function(x)"default ff")
+## test that the setGeneric() call created the generic & default
+stopifnot(is(ff, "standardGeneric"),
+          identical(body(getMethod("ff","ANY")), "default ff"))
+
+ffMaybe <- function(x) "ff maybe method"
+setMethod("ff", "maybe", ffMaybe)
+
+aa2 <- new("A", x = -1) # condition not TRUE
+stopifnot(identical(ff(aa),  "default ff"),
+	  identical(ff(aa2), "default ff"))# failed in R 2.11.0
+
+## a method to test the condition
+setMethod("ff", "A",
+	  function(x) {
+	      if(is(x, "maybe"))
+		  ffMaybe(x)
+	      else
+		  callNextMethod()
+	  })
+stopifnot(identical(ff(aa), "ff maybe method"),
+          identical(ff(aa2), "default ff"))
+
+removeClass("A")
+removeClass("maybe")
+removeGeneric("ff")
diff --git a/win32/deps/library/methods/tests/testGroupGeneric.R b/win32/deps/library/methods/tests/testGroupGeneric.R
new file mode 100644
index 0000000..0baafc8
--- /dev/null
+++ b/win32/deps/library/methods/tests/testGroupGeneric.R
@@ -0,0 +1,23 @@
+## reset inherited methods of group members
+## (contributed by Martin Morgan, 2011-2-9)
+setClass("A", representation("numeric"))
+a <- new("A")
+
+setMethod("Logic", c("A", "A"), function(e1, e2) FALSE)
+res0 <- a & a                           # inherit &,A,A-method
+setMethod("Logic", c("A", "A"), function(e1, e2) TRUE)
+stopifnot(a & a)
+
+removeMethod("Logic", c("A", "A"))
+stopifnot(logical() == a & a)
+
+removeClass("A")
+
+### Find inherited group methods:
+stopifnot(require(Matrix))
+sm <- selectMethod("-", c("dgCMatrix", "numeric"))# direct match with "Arith"
+s2 <- selectMethod("-", c("dtCMatrix", "numeric"))# ambiguity match with "Arith"
+stopifnot(sm generic == "Arith",
+          s2 generic == "Arith")
+## was not ok in R 2.14.x
+
diff --git a/win32/deps/library/methods/tests/testIs.R b/win32/deps/library/methods/tests/testIs.R
new file mode 100644
index 0000000..912cf06
--- /dev/null
+++ b/win32/deps/library/methods/tests/testIs.R
@@ -0,0 +1,31 @@
+## test (non-conditional) explicit inheritance
+setClass("xy", representation(x="numeric", y="numeric"))
+
+setIs("xy", "complex",
+      coerce = function(from) complex(real = from x, imaginary = from y),
+      replace = function(from, value) {
+          from x <- Re(value)
+          from y <- Im(value)
+          from
+      })
+
+set.seed(124)
+x1 <- rnorm(10)
+y1 <- rnorm(10)
+cc <- complex(real = x1, imaginary=y1)
+xyc <- new("xy", x = x1, y = y1)
+stopifnot(identical(cc, as(xyc, "complex")))
+as(xyc, "complex") <- cc * 1i
+stopifnot(identical(xyc, new("xy", x = -y1, y = x1)))
+
+setGeneric("size", function(x)standardGeneric("size"))
+## check that generic for size() was created w/o a default method
+stopifnot(is(size, "standardGeneric"),
+          is.null(selectMethod("size", "ANY",optional=TRUE)))
+
+setMethod("size", "vector", function(x)length(x))
+
+## class "xy" should inherit the vector method through complex
+stopifnot(identical(size(xyc), length(x1)))
+removeClass("xy")
+removeGeneric("size")
diff --git a/win32/deps/library/mgcv/CITATION b/win32/deps/library/mgcv/CITATION
index 9693f74..fba8ae7 100644
--- a/win32/deps/library/mgcv/CITATION
+++ b/win32/deps/library/mgcv/CITATION
@@ -1,7 +1,21 @@
-citHeader("2004 for additive model method and basics of gamm; 2008 for
-generalized additive model method; 2006 for overview; 2003 for thin plate
-regression splines; 2000 is the original method, but no longer the default.")
+citHeader("2011 for generalized additive model method; 
+2004 for strictly additive GCV based model method and basics of gamm; 
+2006 for overview; 2003 for thin plate regression splines; 
+2000 is the original method, but no longer the default.")
 
+citEntry(
+ entry="Article",
+ title="Fast stable restricted maximum likelihood and marginal 
+likelihood estimation of semiparametric generalized linear models",
+ journal="Journal of the Royal Statistical Society (B)",
+ volume= "73",
+ number="1",
+ pages="3-36",
+ year="2011",
+ author="S. N. Wood",
+ textVersion="Wood, S.N. (2011) Fast stable restricted maximum likelihood 
+and marginal likelihood estimation of semiparametric generalized linear 
+models. Journal of the Royal Statistical Society (B) 73(1):3-36" )
 
 citEntry(
  entry="Article",
@@ -19,21 +33,6 @@ citEntry(
 )
 
 citEntry(
- entry="Article",
- title="Fast stable direct fitting and smoothness selection for generalized
- additive models",
- journal="Journal of the Royal Statistical Society (B)",
- volume= "70",
- number="3",
- pages="495-518",
- year="2008",
- author="S. N. Wood",
- textVersion="Wood, S.N. (2008) Fast stable direct fitting and smoothness 
- selection for generalized additive models. Journal of the Royal 
- Statistical Society (B) 70(3):495-518 " )
-
-
-citEntry(
 entry="Book",
 title="Generalized Additive Models: An Introduction with R",
 year="2006",
diff --git a/win32/deps/library/mgcv/DESCRIPTION b/win32/deps/library/mgcv/DESCRIPTION
index a8aa83d..eecc15b 100644
--- a/win32/deps/library/mgcv/DESCRIPTION
+++ b/win32/deps/library/mgcv/DESCRIPTION
@@ -1,18 +1,19 @@
-Package: mgcv
-Version: 1.5-5
-Author: Simon Wood <simon wood r-project org>
-Maintainer: Simon Wood <simon wood r-project org>
-Title: GAMs with GCV/AIC/REML smoothness estimation and GAMMs by PQL
-Description: Routines for GAMs and other generalized ridge regression
-        with multiple smoothing parameter selection by GCV, REML or
-        UBRE/AIC. Also GAMMs by REML or PQL. Includes a gam() function.
-Priority: recommended
-Depends: R (>= 2.3.0)
-Imports: graphics, stats, nlme
-Suggests: nlme (>= 3.1-64), splines
-LazyLoad: yes
-License: GPL (>= 2)
-Packaged: 2009-05-13 15:40:09 UTC; simon
-Repository: CRAN
-Date/Publication: 2009-05-15 11:26:39
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 13:09:13 UTC; windows
+Package: mgcv
+Version: 1.7-22
+Author: Simon Wood <simon wood r-project org>
+Maintainer: Simon Wood <simon wood r-project org>
+Title: Mixed GAM Computation Vehicle with GCV/AIC/REML smoothness
+        estimation
+Description: Routines for GAMs and other generalized ridge regression  
+             with multiple smoothing parameter selection by GCV, REML  
+             or UBRE/AIC. Also GAMMs. Includes a gam() function.
+Priority: recommended
+Depends: R (>= 2.14.0), stats, graphics
+Imports: nlme, methods, Matrix
+Suggests: nlme (>= 3.1-64), splines, Matrix, parallel
+LazyLoad: yes
+ByteCompile: yes
+License: GPL (>=2)
+Packaged: 2012-10-14 19:28:35 UTC; sw283
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:15:26 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/mgcv/Meta/Rd.rds b/win32/deps/library/mgcv/Meta/Rd.rds
index 1f1e097..b29fbc3 100644
Binary files a/win32/deps/library/mgcv/Meta/Rd.rds and b/win32/deps/library/mgcv/Meta/Rd.rds differ
diff --git a/win32/deps/library/mgcv/Meta/data.rds b/win32/deps/library/mgcv/Meta/data.rds
new file mode 100644
index 0000000..529b451
Binary files /dev/null and b/win32/deps/library/mgcv/Meta/data.rds differ
diff --git a/win32/deps/library/mgcv/Meta/hsearch.rds b/win32/deps/library/mgcv/Meta/hsearch.rds
index c7b63ff..ba50822 100644
Binary files a/win32/deps/library/mgcv/Meta/hsearch.rds and b/win32/deps/library/mgcv/Meta/hsearch.rds differ
diff --git a/win32/deps/library/mgcv/Meta/links.rds b/win32/deps/library/mgcv/Meta/links.rds
new file mode 100644
index 0000000..c28e7f9
Binary files /dev/null and b/win32/deps/library/mgcv/Meta/links.rds differ
diff --git a/win32/deps/library/mgcv/Meta/nsInfo.rds b/win32/deps/library/mgcv/Meta/nsInfo.rds
index 2b4ddb8..e4f99fe 100644
Binary files a/win32/deps/library/mgcv/Meta/nsInfo.rds and b/win32/deps/library/mgcv/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/mgcv/Meta/package.rds b/win32/deps/library/mgcv/Meta/package.rds
index 5d5a6a5..f54e468 100644
Binary files a/win32/deps/library/mgcv/Meta/package.rds and b/win32/deps/library/mgcv/Meta/package.rds differ
diff --git a/win32/deps/library/mgcv/NAMESPACE b/win32/deps/library/mgcv/NAMESPACE
index 61a9661..2fb2839 100644
--- a/win32/deps/library/mgcv/NAMESPACE
+++ b/win32/deps/library/mgcv/NAMESPACE
@@ -1,54 +1,81 @@
 useDynLib(mgcv, .registration = TRUE, .fixes = "C_")
 
-export(anova.gam, cSplineDes,
+export(anova.gam, bam, bam.update, concurvity, cSplineDes,
        exclude.too.far,extract.lme.cov, extract.lme.cov2,
        formXtViX, full.score, formula.gam,fixDependence,fix.family.link,
-       fix.family.var, fix.family.ls,   gam, gam2derivative, 
+       fix.family.var, fix.family.ls, fix.family.qf,fix.family.rd,   
+       fs.test,fs.boundary,gam, gam2derivative, 
        gam2objective,
        gamm, gam.check, gam.control,gam.fit3,
-       gam.fit, gam.outer, gamSim , influence.gam, 
-       interpret.gam, 
+       gam.fit, gam.outer,gam.vcomp, gamSim , influence.gam, 
+       in.out,inSide,interpret.gam, 
        gam.side,
        get.var,ldTweedie,
-       initial.sp,logLik.gam,
-       magic, magic.post.proc, mgcv, mgcv.control, model.matrix.gam, 
+       initial.sp,logLik.gam,ls.size,
+       magic, magic.post.proc, model.matrix.gam, 
         mono.con, mroot, negbin, new.name, 
        notExp,notExp2,notLog,notLog2,pcls,null.space.dimension, 
-       pdIdnot,pdTens,
-       place.knots, plot.gam, print.anova.gam,
+       pen.edf,pdIdnot,pdTens,
+       place.knots, plot.gam, polys.plot,print.anova.gam,
        print.gam,print.summary.gam,predict.gam,
        PredictMat,Predict.matrix,Predict.matrix2,
        Predict.matrix.cr.smooth,
+       Predict.matrix.duchon.spline,
        Predict.matrix.cs.smooth,
        Predict.matrix.cyclic.smooth,
        Predict.matrix.tensor.smooth,
        Predict.matrix.tprs.smooth,
        Predict.matrix.ts.smooth,
+       Predict.matrix.sos.smooth,
+       Predict.matrix.soap.film,
+       Predict.matrix.sf,
+       Predict.matrix.sw,
+       Predict.matrix.mrf.smooth,
        Predict.matrix.pspline.smooth,
-       residuals.gam, s,
+       Predict.matrix.random.effect,
+       qq.gam,
+       residuals.gam,rig,rTweedie, s,
+       slanczos,
        smoothCon,smooth.construct,smooth.construct2,
        smooth.construct.cc.smooth.spec,
        smooth.construct.cp.smooth.spec,
        smooth.construct.cr.smooth.spec,
        smooth.construct.cs.smooth.spec,
+       smooth.construct.ds.smooth.spec,
        smooth.construct.tensor.smooth.spec,
        smooth.construct.tp.smooth.spec,
        smooth.construct.ts.smooth.spec,
        smooth.construct.ps.smooth.spec,
+       smooth.construct.re.smooth.spec,
+       smooth.construct.mrf.smooth.spec,
+       smooth.construct.sos.smooth.spec,
+       smooth.construct.so.smooth.spec,
+       smooth.construct.sf.smooth.spec,
+       smooth.construct.sw.smooth.spec,   
        smooth.construct.ad.smooth.spec,
        summary.gam,sp.vcov,
-       te,tensor.prod.model.matrix,tensor.prod.penalties,
+       spasm.construct,spasm.sp,spasm.smooth,
+       t2,te,tensor.prod.model.matrix,tensor.prod.penalties,
        Tweedie,uniquecombs, vcov.gam, vis.gam)
 
 importFrom(grDevices,cm.colors,gray,heat.colors,terrain.colors,topo.colors)
-importFrom(graphics,axis,box,contour,hist,lines,mtext, par, persp,plot,points,polygon,strheight,strwidth,text)
-importFrom(stats,.checkMFClasses,.getXlevels, as.formula, anova,anova.glmlist,coef,cooks.distance,cor,
-           delete.response,family,fitted,formula,
-           gaussian,glm,influence,lm,logLik,median,model.frame,model.matrix,model.offset,na.pass,napredict,naresid,nlm,optim,
-           pchisq,pf,pnorm,pt,
-            predict,printCoefmat ,quantile,qqnorm, reformulate,residuals,rnorm,runif,termplot,terms,terms.formula, uniroot, 
-           var,vcov)
+importFrom(graphics,axis,box,contour,hist,lines,mtext, par, persp,plot,points,
+           polygon,strheight,strwidth,text)
+#importFrom(stats,.checkMFClasses,.getXlevels, as.formula, anova,anova.glmlist,
+#           coef,cooks.distance,cor,delete.response,family,fitted,formula,
+#           gaussian,glm,influence,lm,logLik,median,model.frame,model.matrix,
+#           model.offset,na.pass,napredict,naresid,nlm,optim,pchisq,pf,pnorm,pt,
+#           predict,printCoefmat ,quantile,qqnorm, reformulate,residuals,rnorm,
+#           runif,termplot,terms,terms.formula, uniroot, 
+#           var,vcov)
+
+importFrom(stats,anova,influence,cooks.distance,logLik,vcov,residuals,predict,
+           model.matrix)
 importFrom(nlme,Dim,corMatrix,logDet,pdConstruct,pdFactor,pdMatrix)
+#importFrom(Matrix,t,mean,colMeans,colSums,chol,solve,diag)
+import(Matrix)
+importFrom(methods,cbind2)
+
 S3method(anova, gam)
 S3method(influence, gam)
 S3method(cooks.distance, gam)
@@ -80,8 +107,6 @@ S3method(pdMatrix,pdIdnot)
 S3method(solve,pdIdnot)
 S3method(summary,pdIdnot)
 
-
-
 S3method(smooth.construct,ad.smooth.spec)
 S3method(smooth.construct,ps.smooth.spec)
 S3method(smooth.construct,cp.smooth.spec)
@@ -101,6 +126,11 @@ S3method(Predict.matrix,cyclic.smooth)
 S3method(Predict.matrix,tensor.smooth)
 S3method(Predict.matrix,tprs.smooth)
 
+S3method(spasm.construct,cus)
+S3method(spasm.sp,cus)
+S3method(spasm.smooth,cus)
 
-
-
+S3method(smooth2random,mgcv.smooth)
+S3method(smooth2random,fs.interaction)
+S3method(smooth2random,tensor.smooth)
+S3method(smooth2random,t2.smooth)
diff --git a/win32/deps/library/mgcv/R/mgcv b/win32/deps/library/mgcv/R/mgcv
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/mgcv/R/mgcv
+++ b/win32/deps/library/mgcv/R/mgcv
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/mgcv/R/mgcv.rdb b/win32/deps/library/mgcv/R/mgcv.rdb
index 64f4c8e..d6941c9 100644
Binary files a/win32/deps/library/mgcv/R/mgcv.rdb and b/win32/deps/library/mgcv/R/mgcv.rdb differ
diff --git a/win32/deps/library/mgcv/R/mgcv.rdx b/win32/deps/library/mgcv/R/mgcv.rdx
index 724efd2..f945ab8 100644
Binary files a/win32/deps/library/mgcv/R/mgcv.rdx and b/win32/deps/library/mgcv/R/mgcv.rdx differ
diff --git a/win32/deps/library/mgcv/data/columb.polys.rda b/win32/deps/library/mgcv/data/columb.polys.rda
new file mode 100644
index 0000000..e651c72
Binary files /dev/null and b/win32/deps/library/mgcv/data/columb.polys.rda differ
diff --git a/win32/deps/library/mgcv/data/columb.rda b/win32/deps/library/mgcv/data/columb.rda
new file mode 100644
index 0000000..cff102f
Binary files /dev/null and b/win32/deps/library/mgcv/data/columb.rda differ
diff --git a/win32/deps/library/mgcv/help/AnIndex b/win32/deps/library/mgcv/help/AnIndex
index 50f22e2..a38dbf3 100644
--- a/win32/deps/library/mgcv/help/AnIndex
+++ b/win32/deps/library/mgcv/help/AnIndex
@@ -1,24 +1,35 @@
 mgcv-package	mgcv-package
 adaptive.smooth	smooth.construct.ad.smooth.spec
 anova.gam	anova.gam
+bam	bam
+bam.update	bam.update
 choose.k	choose.k
 coef.pdIdnot	pdIdnot
 coef.pdTens	pdTens
+columb	columb
+columb.polys	columb
+concurvity	concurvity
 corMatrix.pdIdnot	pdIdnot
 cSplineDes	cSplineDes
 cubic.regression.spline	smooth.construct.cr.smooth.spec
 cyclic.cubic.spline	smooth.construct.cr.smooth.spec
 cyclic.p.spline	smooth.construct.ps.smooth.spec
 Dim.pdIdnot	pdIdnot
+Duchon.spline	smooth.construct.ds.smooth.spec
 exclude.too.far	exclude.too.far
 extract.lme.cov	extract.lme.cov
 extract.lme.cov2	extract.lme.cov
+factor.smooth.interaction	smooth.construct.fs.smooth.spec
 fix.family.link	fix.family.link
 fix.family.ls	fix.family.link
+fix.family.qf	fix.family.link
+fix.family.rd	fix.family.link
 fix.family.var	fix.family.link
 fixDependence	fixDependence
 formula.gam	formula.gam
 formXtViX	formXtViX
+fs.boundary	fs.test
+fs.test	fs.test
 full.score	full.score
 function.predictors	linear.functional.terms
 gam	gam
@@ -32,25 +43,30 @@ gam.outer	gam.outer
 gam.performance	gam.convergence
 gam.selection	gam.selection
 gam.side	gam.side
+gam.vcomp	gam.vcomp
 gam2derivative	gam2objective
 gam2objective	gam2objective
 gamm	gamm
 gamObject	gamObject
 gamSim	gamSim
 get.var	get.var
+in.out	in.out
 influence.gam	influence.gam
 initial.sp	initial.sp
+inSide	inSide
 interpret.gam	interpret.gam
 ldTweedie	ldTweedie
 linear.functional.terms	linear.functional.terms
 logDet.pdIdnot	pdIdnot
 logLik.gam	logLik.gam
+ls.size	ls.size
 magic	magic
 magic.post.proc	magic.post.proc
-mgcv	mgcv
-mgcv.control	mgcv.control
+mgcv	mgcv-package
+mgcv-FAQ	mgcv-FAQ
 model.matrix.gam	model.matrix.gam
 mono.con	mono.con
+mrf	smooth.construct.mrf.smooth.spec
 mroot	mroot
 negbin	negbin
 new.name	new.name
@@ -69,15 +85,26 @@ pdIdnot	pdIdnot
 pdMatrix.pdIdnot	pdIdnot
 pdMatrix.pdTens	pdTens
 pdTens	pdTens
+pen.edf	pen.edf
 persp.gam	vis.gam
 place.knots	place.knots
 plot.gam	plot.gam
+polys.plot	polys.plot
+predict.bam	predict.bam
 predict.gam	predict.gam
 Predict.matrix	Predict.matrix
 Predict.matrix.cr.smooth	Predict.matrix.cr.smooth
 Predict.matrix.cs.smooth	Predict.matrix.cr.smooth
 Predict.matrix.cyclic.smooth	Predict.matrix.cr.smooth
+Predict.matrix.duchon.spline	smooth.construct.ds.smooth.spec
+Predict.matrix.fs.interaction	smooth.construct.fs.smooth.spec
+Predict.matrix.mrf.smooth	smooth.construct.mrf.smooth.spec
 Predict.matrix.pspline.smooth	Predict.matrix.cr.smooth
+Predict.matrix.random.effect	smooth.construct.re.smooth.spec
+Predict.matrix.sf	Predict.matrix.soap.film
+Predict.matrix.soap.film	Predict.matrix.soap.film
+Predict.matrix.sos.smooth	smooth.construct.sos.smooth.spec
+Predict.matrix.sw	Predict.matrix.soap.film
 Predict.matrix.tensor.smooth	Predict.matrix.cr.smooth
 Predict.matrix.tprs.smooth	Predict.matrix.cr.smooth
 Predict.matrix.ts.smooth	Predict.matrix.cr.smooth
@@ -86,28 +113,47 @@ PredictMat	smoothCon
 print.anova.gam	anova.gam
 print.gam	print.gam
 print.summary.gam	summary.gam
+qq.gam	qq.gam
+random.effects	random.effects
 residuals.gam	residuals.gam
+rig	rig
+rTweedie	rTweedie
 s	s
 signal.regression	linear.functional.terms
+slanczos	slanczos
 smooth.construct	smooth.construct
 smooth.construct.ad.smooth.spec	smooth.construct.ad.smooth.spec
 smooth.construct.cc.smooth.spec	smooth.construct.cr.smooth.spec
 smooth.construct.cp.smooth.spec	smooth.construct.ps.smooth.spec
 smooth.construct.cr.smooth.spec	smooth.construct.cr.smooth.spec
 smooth.construct.cs.smooth.spec	smooth.construct.cr.smooth.spec
+smooth.construct.ds.smooth.spec	smooth.construct.ds.smooth.spec
+smooth.construct.fs.smooth.spec	smooth.construct.fs.smooth.spec
+smooth.construct.mrf.smooth.spec	smooth.construct.mrf.smooth.spec
 smooth.construct.ps.smooth.spec	smooth.construct.ps.smooth.spec
+smooth.construct.re.smooth.spec	smooth.construct.re.smooth.spec
+smooth.construct.sf.smooth.spec	smooth.construct.so.smooth.spec
+smooth.construct.so.smooth.spec	smooth.construct.so.smooth.spec
+smooth.construct.sos.smooth.spec	smooth.construct.sos.smooth.spec
+smooth.construct.sw.smooth.spec	smooth.construct.so.smooth.spec
 smooth.construct.tensor.smooth.spec	smooth.construct.tensor.smooth.spec
 smooth.construct.tp.smooth.spec	smooth.construct.tp.smooth.spec
 smooth.construct.ts.smooth.spec	smooth.construct.tp.smooth.spec
 smooth.construct2	smooth.construct
 smooth.terms	smooth.terms
 smoothCon	smoothCon
+soap	smooth.construct.so.smooth.spec
 solve.pdIdnot	pdIdnot
 sp.vcov	sp.vcov
+spasm.construct	spasm.construct
+spasm.smooth	spasm.construct
+spasm.sp	spasm.construct
+Spherical.Spline	smooth.construct.sos.smooth.spec
 step.gam	step.gam
 summary.gam	summary.gam
 summary.pdIdnot	pdIdnot
 summary.pdTens	pdTens
+t2	t2
 te	te
 tensor.prod.model.matrix	tensor.prod.model.matrix
 tensor.prod.penalties	tensor.prod.model.matrix
diff --git a/win32/deps/library/mgcv/help/aliases.rds b/win32/deps/library/mgcv/help/aliases.rds
new file mode 100644
index 0000000..e11c831
Binary files /dev/null and b/win32/deps/library/mgcv/help/aliases.rds differ
diff --git a/win32/deps/library/mgcv/help/mgcv.rdb b/win32/deps/library/mgcv/help/mgcv.rdb
new file mode 100644
index 0000000..cde3461
Binary files /dev/null and b/win32/deps/library/mgcv/help/mgcv.rdb differ
diff --git a/win32/deps/library/mgcv/help/mgcv.rdx b/win32/deps/library/mgcv/help/mgcv.rdx
new file mode 100644
index 0000000..d5990b2
Binary files /dev/null and b/win32/deps/library/mgcv/help/mgcv.rdx differ
diff --git a/win32/deps/library/mgcv/help/paths.rds b/win32/deps/library/mgcv/help/paths.rds
new file mode 100644
index 0000000..ba56a82
Binary files /dev/null and b/win32/deps/library/mgcv/help/paths.rds differ
diff --git a/win32/deps/library/mgcv/html/00Index.html b/win32/deps/library/mgcv/html/00Index.html
new file mode 100644
index 0000000..947bc7f
--- /dev/null
+++ b/win32/deps/library/mgcv/html/00Index.html
@@ -0,0 +1,467 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><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/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;mgcv&rsquo; version 1.7-22</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p 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="#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="#U">U</a>
+<a href="#V">V</a>
+</p>
+
+<table width="100%">
+<tr><td 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 width="25%"><a href="smooth.construct.ad.smooth.spec.html">adaptive.smooth</a></td>
+<td>Adaptive smooths in GAMs</td></tr>
+<tr><td 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 width="25%"><a href="bam.html">bam</a></td>
+<td>Generalized additive models for very large datasets</td></tr>
+<tr><td width="25%"><a href="bam.update.html">bam.update</a></td>
+<td>Update a strictly additive bam model for new data.</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="choose.k.html">choose.k</a></td>
+<td>Basis dimension choice for smooths</td></tr>
+<tr><td 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 width="25%"><a href="pdTens.html">coef.pdTens</a></td>
+<td>Functions implementing a pdMat class for tensor product smooths</td></tr>
+<tr><td width="25%"><a href="columb.html">columb</a></td>
+<td>Reduced version of Columbus OH crime data</td></tr>
+<tr><td width="25%"><a href="columb.html">columb.polys</a></td>
+<td>Reduced version of Columbus OH crime data</td></tr>
+<tr><td width="25%"><a href="concurvity.html">concurvity</a></td>
+<td>GAM concurvity measures</td></tr>
+<tr><td 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 width="25%"><a href="cSplineDes.html">cSplineDes</a></td>
+<td>Evaluate cyclic B spline basis</td></tr>
+<tr><td 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 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 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 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 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 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 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 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 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 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 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 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 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 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 width="25%"><a href="fixDependence.html">fixDependence</a></td>
+<td>Detect linear dependencies of one matrix on another</td></tr>
+<tr><td width="25%"><a href="formula.gam.html">formula.gam</a></td>
+<td>GAM formula</td></tr>
+<tr><td width="25%"><a href="formXtViX.html">formXtViX</a></td>
+<td>Form component of GAMM covariance matrix</td></tr>
+<tr><td width="25%"><a href="fs.test.html">fs.boundary</a></td>
+<td>FELSPLINE test function</td></tr>
+<tr><td width="25%"><a href="fs.test.html">fs.test</a></td>
+<td>FELSPLINE test function</td></tr>
+<tr><td width="25%"><a href="full.score.html">full.score</a></td>
+<td>GCV/UBRE score for use within nlm</td></tr>
+<tr><td 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 width="25%"><a href="gam.html">gam</a></td>
+<td>Generalized additive models with integrated smoothness estimation</td></tr>
+<tr><td width="25%"><a href="gam.check.html">gam.check</a></td>
+<td>Some diagnostics for a fitted gam model</td></tr>
+<tr><td width="25%"><a href="gam.control.html">gam.control</a></td>
+<td>Setting GAM fitting defaults</td></tr>
+<tr><td width="25%"><a href="gam.convergence.html">gam.convergence</a></td>
+<td>GAM convergence and performance issues</td></tr>
+<tr><td 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 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 width="25%"><a href="gam.models.html">gam.models</a></td>
+<td>Specifying generalized additive models</td></tr>
+<tr><td 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 width="25%"><a href="gam.convergence.html">gam.performance</a></td>
+<td>GAM convergence and performance issues</td></tr>
+<tr><td width="25%"><a href="gam.selection.html">gam.selection</a></td>
+<td>Generalized Additive Model Selection</td></tr>
+<tr><td width="25%"><a href="gam.side.html">gam.side</a></td>
+<td>Identifiability side conditions for a GAM</td></tr>
+<tr><td width="25%"><a href="gam.vcomp.html">gam.vcomp</a></td>
+<td>Report gam smoothness estimates as variance components</td></tr>
+<tr><td width="25%"><a href="gam2objective.html">gam2derivative</a></td>
+<td>Objective functions for GAM smoothing parameter estimation</td></tr>
+<tr><td width="25%"><a href="gam2objective.html">gam2objective</a></td>
+<td>Objective functions for GAM smoothing parameter estimation</td></tr>
+<tr><td width="25%"><a href="gamm.html">gamm</a></td>
+<td>Generalized Additive Mixed Models</td></tr>
+<tr><td width="25%"><a href="gamObject.html">gamObject</a></td>
+<td>Fitted gam object</td></tr>
+<tr><td width="25%"><a href="gamSim.html">gamSim</a></td>
+<td>Simulate example data for GAMs</td></tr>
+<tr><td 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>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td 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 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 width="25%"><a href="initial.sp.html">initial.sp</a></td>
+<td>Starting values for multiple smoothing parameter estimation</td></tr>
+<tr><td width="25%"><a href="inSide.html">inSide</a></td>
+<td>Are points inside boundary?</td></tr>
+<tr><td width="25%"><a href="interpret.gam.html">interpret.gam</a></td>
+<td>Interpret a GAM formula</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="ldTweedie.html">ldTweedie</a></td>
+<td>Log Tweedie density evaluation</td></tr>
+<tr><td 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 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 width="25%"><a href="logLik.gam.html">logLik.gam</a></td>
+<td>Extract the log likelihood for a fitted GAM</td></tr>
+<tr><td 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 width="25%"><a href="magic.html">magic</a></td>
+<td>Stable Multiple Smoothing Parameter Estimation by GCV or UBRE</td></tr>
+<tr><td width="25%"><a href="magic.post.proc.html">magic.post.proc</a></td>
+<td>Auxilliary information from magic fit</td></tr>
+<tr><td 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 width="25%"><a href="mgcv-FAQ.html">mgcv-FAQ</a></td>
+<td>Frequently Asked Questions for package mgcv</td></tr>
+<tr><td width="25%"><a href="model.matrix.gam.html">model.matrix.gam</a></td>
+<td>Extract model matrix from GAM fit</td></tr>
+<tr><td width="25%"><a href="mono.con.html">mono.con</a></td>
+<td>Monotonicity constraints for a cubic regression spline</td></tr>
+<tr><td width="25%"><a href="smooth.construct.mrf.smooth.spec.html">mrf</a></td>
+<td>Markov Random Field Smooths</td></tr>
+<tr><td width="25%"><a href="mroot.html">mroot</a></td>
+<td>Smallest square root of matrix</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="negbin.html">negbin</a></td>
+<td>GAM negative binomial family</td></tr>
+<tr><td 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 width="25%"><a href="notExp.html">notExp</a></td>
+<td>Functions for better-than-log positive parameterization</td></tr>
+<tr><td width="25%"><a href="notExp2.html">notExp2</a></td>
+<td>Alternative to log parameterization for variance components</td></tr>
+<tr><td width="25%"><a href="notExp.html">notLog</a></td>
+<td>Functions for better-than-log positive parameterization</td></tr>
+<tr><td width="25%"><a href="notExp2.html">notLog2</a></td>
+<td>Alternative to log parameterization for variance components</td></tr>
+<tr><td 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="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="smooth.construct.ps.smooth.spec.html">p.spline</a></td>
+<td>P-splines in GAMs</td></tr>
+<tr><td width="25%"><a href="pcls.html">pcls</a></td>
+<td>Penalized Constrained Least Squares Fitting</td></tr>
+<tr><td 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 width="25%"><a href="pdTens.html">pdConstruct.pdTens</a></td>
+<td>Functions implementing a pdMat class for tensor product smooths</td></tr>
+<tr><td 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 width="25%"><a href="pdTens.html">pdFactor.pdTens</a></td>
+<td>Functions implementing a pdMat class for tensor product smooths</td></tr>
+<tr><td width="25%"><a href="pdIdnot.html">pdIdnot</a></td>
+<td>Overflow proof pdMat class for multiples of the identity matrix</td></tr>
+<tr><td 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 width="25%"><a href="pdTens.html">pdMatrix.pdTens</a></td>
+<td>Functions implementing a pdMat class for tensor product smooths</td></tr>
+<tr><td width="25%"><a href="pdTens.html">pdTens</a></td>
+<td>Functions implementing a pdMat class for tensor product smooths</td></tr>
+<tr><td 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 width="25%"><a href="vis.gam.html">persp.gam</a></td>
+<td>Visualization of GAM objects</td></tr>
+<tr><td 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 width="25%"><a href="plot.gam.html">plot.gam</a></td>
+<td>Default GAM plotting</td></tr>
+<tr><td width="25%"><a href="polys.plot.html">polys.plot</a></td>
+<td>Plot geographic regions defined as polygons</td></tr>
+<tr><td width="25%"><a href="predict.bam.html">predict.bam</a></td>
+<td>Prediction from fitted Big Additive Model model</td></tr>
+<tr><td width="25%"><a href="predict.gam.html">predict.gam</a></td>
+<td>Prediction from fitted GAM model</td></tr>
+<tr><td width="25%"><a href="Predict.matrix.html">Predict.matrix</a></td>
+<td>Prediction methods for smooth terms in a GAM</td></tr>
+<tr><td width="25%"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.cr.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td width="25%"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.cs.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td width="25%"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.cyclic.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td 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 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 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 width="25%"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.pspline.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td 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 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 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 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 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 width="25%"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.tensor.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td width="25%"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.tprs.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td width="25%"><a href="Predict.matrix.cr.smooth.html">Predict.matrix.ts.smooth</a></td>
+<td>Predict matrix method functions</td></tr>
+<tr><td width="25%"><a href="Predict.matrix.html">Predict.matrix2</a></td>
+<td>Prediction methods for smooth terms in a GAM</td></tr>
+<tr><td width="25%"><a href="smoothCon.html">PredictMat</a></td>
+<td>Prediction/Construction wrapper functions for GAM smooth terms</td></tr>
+<tr><td width="25%"><a href="anova.gam.html">print.anova.gam</a></td>
+<td>Approximate hypothesis tests related to GAM fits</td></tr>
+<tr><td width="25%"><a href="print.gam.html">print.gam</a></td>
+<td>Print a Generalized Additive Model object.</td></tr>
+<tr><td 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 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 width="25%"><a href="random.effects.html">random.effects</a></td>
+<td>Random effects in GAMs</td></tr>
+<tr><td width="25%"><a href="residuals.gam.html">residuals.gam</a></td>
+<td>Generalized Additive Model residuals</td></tr>
+<tr><td width="25%"><a href="rig.html">rig</a></td>
+<td>Generate inverse Gaussian random deviates</td></tr>
+<tr><td 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 width="25%"><a href="s.html">s</a></td>
+<td>Defining smooths in GAM formulae</td></tr>
+<tr><td width="25%"><a href="linear.functional.terms.html">signal.regression</a></td>
+<td>Linear functionals of a smooth in GAMs</td></tr>
+<tr><td width="25%"><a href="slanczos.html">slanczos</a></td>
+<td>Compute truncated eigen decomposition of a symmetric matrix</td></tr>
+<tr><td width="25%"><a href="smooth.construct.html">smooth.construct</a></td>
+<td>Constructor functions for smooth terms in a GAM</td></tr>
+<tr><td 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 width="25%"><a href="smooth.construct.html">smooth.construct2</a></td>
+<td>Constructor functions for smooth terms in a GAM</td></tr>
+<tr><td width="25%"><a href="smooth.terms.html">smooth.terms</a></td>
+<td>Smooth terms in GAM</td></tr>
+<tr><td width="25%"><a href="smoothCon.html">smoothCon</a></td>
+<td>Prediction/Construction wrapper functions for GAM smooth terms</td></tr>
+<tr><td width="25%"><a href="smooth.construct.so.smooth.spec.html">soap</a></td>
+<td>Soap film smoother constructer</td></tr>
+<tr><td 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 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 width="25%"><a href="spasm.construct.html">spasm.construct</a></td>
+<td>Experimental sparse smoothers</td></tr>
+<tr><td width="25%"><a href="spasm.construct.html">spasm.smooth</a></td>
+<td>Experimental sparse smoothers</td></tr>
+<tr><td width="25%"><a href="spasm.construct.html">spasm.sp</a></td>
+<td>Experimental sparse smoothers</td></tr>
+<tr><td width="25%"><a href="smooth.construct.sos.smooth.spec.html">Spherical.Spline</a></td>
+<td>Splines on the sphere</td></tr>
+<tr><td width="25%"><a href="step.gam.html">step.gam</a></td>
+<td>Alternatives to step.gam</td></tr>
+<tr><td width="25%"><a href="summary.gam.html">summary.gam</a></td>
+<td>Summary for a GAM fit</td></tr>
+<tr><td 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 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 width="25%"><a href="t2.html">t2</a></td>
+<td>Define alternative tensor product smooths in GAM formulae</td></tr>
+<tr><td width="25%"><a href="te.html">te</a></td>
+<td>Define tensor product smooths in GAM formulae</td></tr>
+<tr><td 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 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 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 width="25%"><a href="Tweedie.html">Tweedie</a></td>
+<td>GAM Tweedie family</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="uniquecombs.html">uniquecombs</a></td>
+<td>find the unique rows in a matrix</td></tr>
+<tr><td 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 width="25%"><a href="vcov.gam.html">vcov.gam</a></td>
+<td>Extract parameter (estimator) covariance matrix from GAM fit</td></tr>
+<tr><td width="25%"><a href="vis.gam.html">vis.gam</a></td>
+<td>Visualization of GAM objects</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/mgcv/html/R.css b/win32/deps/library/mgcv/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/mgcv/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/mgcv/libs/i386/mgcv.dll b/win32/deps/library/mgcv/libs/i386/mgcv.dll
new file mode 100644
index 0000000..a9745b1
Binary files /dev/null and b/win32/deps/library/mgcv/libs/i386/mgcv.dll differ
diff --git a/win32/deps/library/nlme/CITATION b/win32/deps/library/nlme/CITATION
index e1d0e01..1942dcc 100644
--- a/win32/deps/library/nlme/CITATION
+++ b/win32/deps/library/nlme/CITATION
@@ -1,8 +1,7 @@
 citHeader("To cite package 'nlme' in publications use:")
 
-desc <- packageDescription("nlme")
-year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", desc$Date)
-vers <- paste("R package version", desc$Version)
+year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date, perl = TRUE)
+vers <- paste("R package version", meta$Version)
 
 citEntry(entry="Manual",
          title = "nlme: Linear and Nonlinear Mixed Effects Models",
@@ -10,12 +9,12 @@ citEntry(entry="Manual",
                              as.person("Douglas Bates"),
                              as.person("Saikat DebRoy"),
                              as.person("Deepayan Sarkar"),
-                             as.person("the R Core team")),
+                             person("R Core Team")),
          year = year,
          note = vers,
 
          textVersion =
-         paste("Jose Pinheiro, Douglas Bates, Saikat DebRoy, Deepayan Sarkar and the R Core team (",
+         paste("Jose Pinheiro, Douglas Bates, Saikat DebRoy, Deepayan Sarkar and the R Development Core Team (",
                year,
                "). nlme: Linear and Nonlinear Mixed Effects Models. ",
                vers, ".", sep=""))
diff --git a/win32/deps/library/nlme/DESCRIPTION b/win32/deps/library/nlme/DESCRIPTION
index 309515a..e15a68f 100644
--- a/win32/deps/library/nlme/DESCRIPTION
+++ b/win32/deps/library/nlme/DESCRIPTION
@@ -1,21 +1,28 @@
-Package: nlme
-Version: 3.1-93
-Date: 2009-08-16
-Priority: recommended
-Title: Linear and Nonlinear Mixed Effects Models
-Author: Jose Pinheiro <Jose Pinheiro pharma novartis com>, Douglas
-        Bates <bates stat wisc edu>, Saikat DebRoy
-        <saikat stat wisc edu>, Deepayan Sarkar
-        <Deepayan Sarkar R-project org>, the R Core team.
-Maintainer: R-core <R-core R-project org>
-Description: Fit and compare Gaussian linear and nonlinear
-        mixed-effects models.
-Depends: graphics, stats, R (>= 2.4.0)
-Imports: lattice
-LazyLoad: yes
-LazyData: yes
-License: GPL (>= 2)
-Packaged: 2009-08-16 11:31:19 UTC; ripley
-Repository: CRAN
-Date/Publication: 2009-08-16 15:26:54
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 13:06:01 UTC; windows
+Package: nlme
+Version: 3.1-105
+Date: 2012-09-24
+Priority: recommended
+Title: Linear and Nonlinear Mixed Effects Models
+Authors R: c(person("Jose", "Pinheiro", comment = "S version"),
+        person("Douglas", "Bates", comment = "up to 2007"),
+        person("Saikat", "DebRoy", comment = "up to 2002"),
+        person("Deepayan", "Sarkar", comment = "up to 2005"),
+        person("R-core", email = "R-core R-project org", role =
+        c("aut", "cre")))
+Author: Jose Pinheiro (S version),
+        Douglas Bates (up to 2007),
+        Saikat DebRoy (up to 2002),
+        Deepayan Sarkar (up to 2005),
+	the R Core team.
+Maintainer: R-core <R-core R-project org>
+Description: Fit and compare Gaussian linear and nonlinear mixed-effects models.
+Depends: graphics, stats, R (>= 2.13)
+Imports: lattice
+Suggests: Hmisc, MASS
+LazyLoad: yes
+LazyData: yes
+License: GPL (>= 2)
+BugReports: http://bugs.r-project.org
+Packaged: 2012-10-11 13:26:52 UTC; ripley
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:13:31 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/nlme/LICENCE b/win32/deps/library/nlme/LICENCE
index 1a9ecbd..95ec041 100644
--- a/win32/deps/library/nlme/LICENCE
+++ b/win32/deps/library/nlme/LICENCE
@@ -2,6 +2,6 @@ This software is distributed 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.
 
-A copy of the GNU General Public License is in file COPYING in the
+A copy of the GNU General Public License version 2 is in file GPL-2 in the
 sources of this package, and is also available at
 http://www.r-project.org/Licenses/
diff --git a/win32/deps/library/nlme/Meta/Rd.rds b/win32/deps/library/nlme/Meta/Rd.rds
index d6fb367..f0936e7 100644
Binary files a/win32/deps/library/nlme/Meta/Rd.rds and b/win32/deps/library/nlme/Meta/Rd.rds differ
diff --git a/win32/deps/library/nlme/Meta/data.rds b/win32/deps/library/nlme/Meta/data.rds
index ca7455e..66c8a0d 100644
Binary files a/win32/deps/library/nlme/Meta/data.rds and b/win32/deps/library/nlme/Meta/data.rds differ
diff --git a/win32/deps/library/nlme/Meta/hsearch.rds b/win32/deps/library/nlme/Meta/hsearch.rds
index 04c0964..0eb482a 100644
Binary files a/win32/deps/library/nlme/Meta/hsearch.rds and b/win32/deps/library/nlme/Meta/hsearch.rds differ
diff --git a/win32/deps/library/nlme/Meta/links.rds b/win32/deps/library/nlme/Meta/links.rds
new file mode 100644
index 0000000..6e93c1d
Binary files /dev/null and b/win32/deps/library/nlme/Meta/links.rds differ
diff --git a/win32/deps/library/nlme/Meta/nsInfo.rds b/win32/deps/library/nlme/Meta/nsInfo.rds
index 22a0783..61ea4db 100644
Binary files a/win32/deps/library/nlme/Meta/nsInfo.rds and b/win32/deps/library/nlme/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/nlme/Meta/package.rds b/win32/deps/library/nlme/Meta/package.rds
index c01ccd6..bb24719 100644
Binary files a/win32/deps/library/nlme/Meta/package.rds and b/win32/deps/library/nlme/Meta/package.rds differ
diff --git a/win32/deps/library/nlme/NAMESPACE b/win32/deps/library/nlme/NAMESPACE
index f721a1e..2f6643c 100644
--- a/win32/deps/library/nlme/NAMESPACE
+++ b/win32/deps/library/nlme/NAMESPACE
@@ -4,7 +4,7 @@ import(stats)
 importFrom(graphics, pairs, plot)
 
 export(ACF, allCoef, asOneFormula, asTable, augPred, balancedGrouped,
-       BIC, "coef<-", "coefficients<-", collapse, compareFits,
+       "coef<-", "coefficients<-", collapse, compareFits,
        comparePred, corAR1, corARMA, corCAR1, corCompSymm,
        corExp, corFactor, corGaus, corIdent, corLin, corMatrix,
        corNatural, corRatio, corSpatial, corSpher, corSymm,
@@ -72,12 +72,6 @@ S3method(asTable, groupedData)
 S3method(augPred, gls)
 S3method(augPred, lme)
 S3method(augPred, lmList)
-S3method(BIC, gls)
-S3method(BIC, lm)
-S3method(BIC, lme)
-S3method(BIC, lmList)
-S3method(BIC, logLik)
-S3method(BIC, nls)
 S3method(coef, corAR1)
 S3method(coef, corARMA)
 S3method(coef, corCAR1)
@@ -295,6 +289,9 @@ S3method(nlme, formula)
 S3method(nlme, nlsList)
 S3method(nlsList, formula)
 S3method(nlsList, selfStart)
+S3method(nobs, gls)
+S3method(nobs, gnls)
+S3method(nobs, lme)
 S3method(pairs, compareFits)
 S3method(pairs, lme)
 S3method(pairs, lmList)
diff --git a/win32/deps/library/nlme/R/nlme b/win32/deps/library/nlme/R/nlme
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/nlme/R/nlme
+++ b/win32/deps/library/nlme/R/nlme
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/nlme/R/nlme.rdb b/win32/deps/library/nlme/R/nlme.rdb
index 605af94..c83be7a 100644
Binary files a/win32/deps/library/nlme/R/nlme.rdb and b/win32/deps/library/nlme/R/nlme.rdb differ
diff --git a/win32/deps/library/nlme/R/nlme.rdx b/win32/deps/library/nlme/R/nlme.rdx
index ae6fb41..be04120 100644
Binary files a/win32/deps/library/nlme/R/nlme.rdx and b/win32/deps/library/nlme/R/nlme.rdx differ
diff --git a/win32/deps/library/nlme/data/Rdata.rdb b/win32/deps/library/nlme/data/Rdata.rdb
index 3b2ebc5..56116a0 100644
Binary files a/win32/deps/library/nlme/data/Rdata.rdb and b/win32/deps/library/nlme/data/Rdata.rdb differ
diff --git a/win32/deps/library/nlme/data/Rdata.rds b/win32/deps/library/nlme/data/Rdata.rds
index fe88293..2f9b167 100644
Binary files a/win32/deps/library/nlme/data/Rdata.rds and b/win32/deps/library/nlme/data/Rdata.rds differ
diff --git a/win32/deps/library/nlme/data/Rdata.rdx b/win32/deps/library/nlme/data/Rdata.rdx
index 7972fb1..5a1ba18 100644
Binary files a/win32/deps/library/nlme/data/Rdata.rdx and b/win32/deps/library/nlme/data/Rdata.rdx differ
diff --git a/win32/deps/library/nlme/help/AnIndex b/win32/deps/library/nlme/help/AnIndex
index 0c00949..7694b07 100644
--- a/win32/deps/library/nlme/help/AnIndex
+++ b/win32/deps/library/nlme/help/AnIndex
@@ -19,15 +19,6 @@ augPred.lme	augPred
 augPred.lmList	augPred
 balancedGrouped	balancedGrouped
 bdf	bdf
-BIC	BIC
-BIC.gls	BIC
-BIC.lm	BIC
-BIC.lme	BIC
-BIC.lmList	BIC
-BIC.logLik	BIC.logLik
-BIC.nlme	BIC
-BIC.nls	BIC
-BIC.nlsList	BIC
 BodyWeight	BodyWeight
 Cefamandole	Cefamandole
 coef.corAR1	coef.corStruct
diff --git a/win32/deps/library/nlme/help/aliases.rds b/win32/deps/library/nlme/help/aliases.rds
new file mode 100644
index 0000000..efe64b3
Binary files /dev/null and b/win32/deps/library/nlme/help/aliases.rds differ
diff --git a/win32/deps/library/nlme/help/nlme.rdb b/win32/deps/library/nlme/help/nlme.rdb
new file mode 100644
index 0000000..d4c4fce
Binary files /dev/null and b/win32/deps/library/nlme/help/nlme.rdb differ
diff --git a/win32/deps/library/nlme/help/nlme.rdx b/win32/deps/library/nlme/help/nlme.rdx
new file mode 100644
index 0000000..b042983
Binary files /dev/null and b/win32/deps/library/nlme/help/nlme.rdx differ
diff --git a/win32/deps/library/nlme/help/paths.rds b/win32/deps/library/nlme/help/paths.rds
new file mode 100644
index 0000000..7de0dee
Binary files /dev/null and b/win32/deps/library/nlme/help/paths.rds differ
diff --git a/win32/deps/library/nlme/html/00Index.html b/win32/deps/library/nlme/html/00Index.html
new file mode 100644
index 0000000..6845091
--- /dev/null
+++ b/win32/deps/library/nlme/html/00Index.html
@@ -0,0 +1,1230 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Linear and Nonlinear Mixed Effects Models</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Linear and Nonlinear Mixed Effects Models
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;nlme&rsquo; version 3.1-105</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p 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="#I">I</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 width="25%"><a href="ACF.html">ACF</a></td>
+<td>Autocorrelation Function</td></tr>
+<tr><td width="25%"><a href="ACF.gls.html">ACF.gls</a></td>
+<td>Autocorrelation Function for gls Residuals</td></tr>
+<tr><td width="25%"><a href="ACF.lme.html">ACF.lme</a></td>
+<td>Autocorrelation Function for lme Residuals</td></tr>
+<tr><td width="25%"><a href="Alfalfa.html">Alfalfa</a></td>
+<td>Split-Plot Experiment on Varieties of Alfalfa</td></tr>
+<tr><td width="25%"><a href="allCoef.html">allCoef</a></td>
+<td>Extract Coefficients from a Set of Objects</td></tr>
+<tr><td width="25%"><a href="anova.gls.html">anova.gls</a></td>
+<td>Compare Likelihoods of Fitted Objects</td></tr>
+<tr><td width="25%"><a href="anova.lme.html">anova.lme</a></td>
+<td>Compare Likelihoods of Fitted Objects</td></tr>
+<tr><td width="25%"><a href="groupedData.html">as.data.frame.groupedData</a></td>
+<td>Construct a groupedData Object</td></tr>
+<tr><td width="25%"><a href="as.matrix.corStruct.html">as.matrix.corStruct</a></td>
+<td>Matrix of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="as.matrix.pdMat.html">as.matrix.pdMat</a></td>
+<td>Matrix of a pdMat Object</td></tr>
+<tr><td width="25%"><a href="as.matrix.reStruct.html">as.matrix.reStruct</a></td>
+<td>Matrices of an reStruct Object</td></tr>
+<tr><td width="25%"><a href="asOneFormula.html">asOneFormula</a></td>
+<td>Combine Formulas of a Set of Objects</td></tr>
+<tr><td width="25%"><a href="Assay.html">Assay</a></td>
+<td>Bioassay on Cell Culture Plate</td></tr>
+<tr><td width="25%"><a href="asTable.html">asTable</a></td>
+<td>Convert groupedData to a matrix</td></tr>
+<tr><td width="25%"><a href="asTable.html">asTable.groupedData</a></td>
+<td>Convert groupedData to a matrix</td></tr>
+<tr><td width="25%"><a href="augPred.html">augPred</a></td>
+<td>Augmented Predictions</td></tr>
+<tr><td width="25%"><a href="augPred.html">augPred.gls</a></td>
+<td>Augmented Predictions</td></tr>
+<tr><td width="25%"><a href="augPred.html">augPred.lme</a></td>
+<td>Augmented Predictions</td></tr>
+<tr><td width="25%"><a href="augPred.html">augPred.lmList</a></td>
+<td>Augmented Predictions</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="balancedGrouped.html">balancedGrouped</a></td>
+<td>Create a groupedData object from a matrix</td></tr>
+<tr><td width="25%"><a href="bdf.html">bdf</a></td>
+<td>Language scores</td></tr>
+<tr><td width="25%"><a href="BodyWeight.html">BodyWeight</a></td>
+<td>Rat weight over time for different diets</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Cefamandole.html">Cefamandole</a></td>
+<td>Pharmacokinetics of Cefamandole</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef.corAR1</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="corARMA.html">coef.corARMA</a></td>
+<td>ARMA(p,q) Correlation Structure</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef.corARMAd</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef.corCAR1</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef.corCompSymm</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef.corHF</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef.corIdent</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef.corLin</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef.corNatural</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef.corSpatial</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef.corSpher</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef.corStruct</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef.corSymm</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.gnls.html">coef.gnls</a></td>
+<td>Extract gnls Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.lme.html">coef.lme</a></td>
+<td>Extract lme Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.lmList.html">coef.lmList</a></td>
+<td>Extract lmList Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.modelStruct.html">coef.modelStruct</a></td>
+<td>Extract modelStruct Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.pdMat.html">coef.pdBlocked</a></td>
+<td>pdMat Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.pdMat.html">coef.pdCompSymm</a></td>
+<td>pdMat Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.pdMat.html">coef.pdDiag</a></td>
+<td>pdMat Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.pdMat.html">coef.pdIdent</a></td>
+<td>pdMat Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.pdMat.html">coef.pdMat</a></td>
+<td>pdMat Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.pdMat.html">coef.pdNatural</a></td>
+<td>pdMat Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.pdMat.html">coef.pdSymm</a></td>
+<td>pdMat Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.reStruct.html">coef.reStruct</a></td>
+<td>reStruct Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef.summary.nlsList</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.varFunc.html">coef.varComb</a></td>
+<td>varFunc Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.varFunc.html">coef.varConstPower</a></td>
+<td>varFunc Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.varFunc.html">coef.varExp</a></td>
+<td>varFunc Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.varFunc.html">coef.varFixed</a></td>
+<td>varFunc Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.varFunc.html">coef.varFunc</a></td>
+<td>varFunc Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.varFunc.html">coef.varIdent</a></td>
+<td>varFunc Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.varFunc.html">coef.varPower</a></td>
+<td>varFunc Object Coefficients</td></tr>
+<tr><td width="25%"><a href="Coef.html">coef&lt;-</a></td>
+<td>Assign Values to Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef&lt;-.corAR1</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef&lt;-.corARMA</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef&lt;-.corCAR1</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef&lt;-.corCompSymm</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef&lt;-.corHF</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef&lt;-.corIdent</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef&lt;-.corLin</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef&lt;-.corNatural</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef&lt;-.corSpatial</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef&lt;-.corSpher</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef&lt;-.corStruct</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.corStruct.html">coef&lt;-.corSymm</a></td>
+<td>Coefficients of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="coef.modelStruct.html">coef&lt;-.modelStruct</a></td>
+<td>Extract modelStruct Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.pdMat.html">coef&lt;-.pdBlocked</a></td>
+<td>pdMat Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.pdMat.html">coef&lt;-.pdMat</a></td>
+<td>pdMat Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.reStruct.html">coef&lt;-.reStruct</a></td>
+<td>reStruct Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.varFunc.html">coef&lt;-.varComb</a></td>
+<td>varFunc Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.varFunc.html">coef&lt;-.varConstPower</a></td>
+<td>varFunc Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.varFunc.html">coef&lt;-.varExp</a></td>
+<td>varFunc Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.varFunc.html">coef&lt;-.varFixed</a></td>
+<td>varFunc Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.varFunc.html">coef&lt;-.varIdent</a></td>
+<td>varFunc Object Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.varFunc.html">coef&lt;-.varPower</a></td>
+<td>varFunc Object Coefficients</td></tr>
+<tr><td width="25%"><a href="Coef.html">coefficients&lt;-</a></td>
+<td>Assign Values to Coefficients</td></tr>
+<tr><td width="25%"><a href="collapse.html">collapse</a></td>
+<td>Collapse According to Groups</td></tr>
+<tr><td width="25%"><a href="collapse.groupedData.html">collapse.groupedData</a></td>
+<td>Collapse a groupedData Object</td></tr>
+<tr><td width="25%"><a href="compareFits.html">compareFits</a></td>
+<td>Compare Fitted Objects</td></tr>
+<tr><td width="25%"><a href="comparePred.html">comparePred</a></td>
+<td>Compare Predictions</td></tr>
+<tr><td width="25%"><a href="comparePred.html">comparePred.gls</a></td>
+<td>Compare Predictions</td></tr>
+<tr><td width="25%"><a href="comparePred.html">comparePred.lme</a></td>
+<td>Compare Predictions</td></tr>
+<tr><td width="25%"><a href="comparePred.html">comparePred.lmList</a></td>
+<td>Compare Predictions</td></tr>
+<tr><td width="25%"><a href="corAR1.html">corAR1</a></td>
+<td>AR(1) Correlation Structure</td></tr>
+<tr><td width="25%"><a href="corARMA.html">corARMA</a></td>
+<td>ARMA(p,q) Correlation Structure</td></tr>
+<tr><td width="25%"><a href="corCAR1.html">corCAR1</a></td>
+<td>Continuous AR(1) Correlation Structure</td></tr>
+<tr><td width="25%"><a href="corClasses.html">corClasses</a></td>
+<td>Correlation Structure Classes</td></tr>
+<tr><td width="25%"><a href="corCompSymm.html">corCompSymm</a></td>
+<td>Compound Symmetry Correlation Structure</td></tr>
+<tr><td width="25%"><a href="corExp.html">corExp</a></td>
+<td>Exponential Correlation Structure</td></tr>
+<tr><td width="25%"><a href="corFactor.html">corFactor</a></td>
+<td>Factor of a Correlation Matrix</td></tr>
+<tr><td width="25%"><a href="corFactor.corStruct.html">corFactor.compSymm</a></td>
+<td>Factor of a corStruct Object Matrix</td></tr>
+<tr><td width="25%"><a href="corFactor.corStruct.html">corFactor.corAR1</a></td>
+<td>Factor of a corStruct Object Matrix</td></tr>
+<tr><td width="25%"><a href="corFactor.corStruct.html">corFactor.corARMA</a></td>
+<td>Factor of a corStruct Object Matrix</td></tr>
+<tr><td width="25%"><a href="corFactor.corStruct.html">corFactor.corCAR1</a></td>
+<td>Factor of a corStruct Object Matrix</td></tr>
+<tr><td width="25%"><a href="corFactor.corStruct.html">corFactor.corNatural</a></td>
+<td>Factor of a corStruct Object Matrix</td></tr>
+<tr><td width="25%"><a href="corFactor.corStruct.html">corFactor.corSpatial</a></td>
+<td>Factor of a corStruct Object Matrix</td></tr>
+<tr><td width="25%"><a href="corFactor.corStruct.html">corFactor.corStruct</a></td>
+<td>Factor of a corStruct Object Matrix</td></tr>
+<tr><td width="25%"><a href="corFactor.corStruct.html">corFactor.corSymm</a></td>
+<td>Factor of a corStruct Object Matrix</td></tr>
+<tr><td width="25%"><a href="corGaus.html">corGaus</a></td>
+<td>Gaussian Correlation Structure</td></tr>
+<tr><td width="25%"><a href="corClasses.html">corIdent</a></td>
+<td>Correlation Structure Classes</td></tr>
+<tr><td width="25%"><a href="corLin.html">corLin</a></td>
+<td>Linear Correlation Structure</td></tr>
+<tr><td width="25%"><a href="corMatrix.html">corMatrix</a></td>
+<td>Extract Correlation Matrix</td></tr>
+<tr><td width="25%"><a href="corMatrix.corStruct.html">corMatrix.compSymm</a></td>
+<td>Matrix of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.corStruct.html">corMatrix.corAR1</a></td>
+<td>Matrix of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.corStruct.html">corMatrix.corARMA</a></td>
+<td>Matrix of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.corStruct.html">corMatrix.corCAR1</a></td>
+<td>Matrix of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.corStruct.html">corMatrix.corCompSymm</a></td>
+<td>Matrix of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.corStruct.html">corMatrix.corIdent</a></td>
+<td>Matrix of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.corStruct.html">corMatrix.corNatural</a></td>
+<td>Matrix of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.corStruct.html">corMatrix.corSpatial</a></td>
+<td>Matrix of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.corStruct.html">corMatrix.corStruct</a></td>
+<td>Matrix of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.corStruct.html">corMatrix.corSymm</a></td>
+<td>Matrix of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.pdMat.html">corMatrix.pdBlocked</a></td>
+<td>Extract Correlation Matrix from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.pdMat.html">corMatrix.pdCompSymm</a></td>
+<td>Extract Correlation Matrix from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.pdMat.html">corMatrix.pdDiag</a></td>
+<td>Extract Correlation Matrix from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.pdMat.html">corMatrix.pdIdent</a></td>
+<td>Extract Correlation Matrix from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.pdMat.html">corMatrix.pdMat</a></td>
+<td>Extract Correlation Matrix from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.pdMat.html">corMatrix.pdSymm</a></td>
+<td>Extract Correlation Matrix from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="corMatrix.reStruct.html">corMatrix.reStruct</a></td>
+<td>Extract Correlation Matrix from Components of an reStruct Object</td></tr>
+<tr><td width="25%"><a href="corNatural.html">corNatural</a></td>
+<td>General correlation in natural parameterization</td></tr>
+<tr><td width="25%"><a href="corRatio.html">corRatio</a></td>
+<td>Rational Quadratic Correlation Structure</td></tr>
+<tr><td width="25%"><a href="corSpatial.html">corSpatial</a></td>
+<td>Spatial Correlation Structure</td></tr>
+<tr><td width="25%"><a href="corSpher.html">corSpher</a></td>
+<td>Spherical Correlation Structure</td></tr>
+<tr><td width="25%"><a href="corSymm.html">corSymm</a></td>
+<td>General Correlation Structure</td></tr>
+<tr><td width="25%"><a href="Covariate.html">covariate&lt;-</a></td>
+<td>Assign Covariate Values</td></tr>
+<tr><td width="25%"><a href="Covariate.varFunc.html">covariate&lt;-.varFunc</a></td>
+<td>Assign varFunc Covariate</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Dialyzer.html">Dialyzer</a></td>
+<td>High-Flux Hemodialyzer</td></tr>
+<tr><td width="25%"><a href="Dim.html">Dim</a></td>
+<td>Extract Dimensions from an Object</td></tr>
+<tr><td width="25%"><a href="Dim.corSpatial.html">Dim.corSpatial</a></td>
+<td>Dimensions of a corSpatial Object</td></tr>
+<tr><td width="25%"><a href="Dim.corStruct.html">Dim.corStruct</a></td>
+<td>Dimensions of a corStruct Object</td></tr>
+<tr><td width="25%"><a href="Dim.html">Dim.default</a></td>
+<td>Extract Dimensions from an Object</td></tr>
+<tr><td width="25%"><a href="Dim.pdMat.html">Dim.pdCompSymm</a></td>
+<td>Dimensions of a pdMat Object</td></tr>
+<tr><td width="25%"><a href="Dim.pdMat.html">Dim.pdDiag</a></td>
+<td>Dimensions of a pdMat Object</td></tr>
+<tr><td width="25%"><a href="Dim.pdMat.html">Dim.pdIdent</a></td>
+<td>Dimensions of a pdMat Object</td></tr>
+<tr><td width="25%"><a href="Dim.pdMat.html">Dim.pdMat</a></td>
+<td>Dimensions of a pdMat Object</td></tr>
+<tr><td width="25%"><a href="Dim.pdMat.html">Dim.pdNatural</a></td>
+<td>Dimensions of a pdMat Object</td></tr>
+<tr><td width="25%"><a href="Dim.pdMat.html">Dim.pdSymm</a></td>
+<td>Dimensions of a pdMat Object</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Earthquake.html">Earthquake</a></td>
+<td>Earthquake Intensity</td></tr>
+<tr><td width="25%"><a href="ergoStool.html">ergoStool</a></td>
+<td>Ergometrics experiment with stool types</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Fatigue.html">Fatigue</a></td>
+<td>Cracks caused by metal fatigue</td></tr>
+<tr><td width="25%"><a href="fdHess.html">fdHess</a></td>
+<td>Finite difference Hessian</td></tr>
+<tr><td width="25%"><a href="fitted.glsStruct.html">fitted.glsStruct</a></td>
+<td>Calculate glsStruct Fitted Values</td></tr>
+<tr><td width="25%"><a href="fitted.gnlsStruct.html">fitted.gnlsStruct</a></td>
+<td>Calculate gnlsStruct Fitted Values</td></tr>
+<tr><td width="25%"><a href="fitted.lme.html">fitted.lme</a></td>
+<td>Extract lme Fitted Values</td></tr>
+<tr><td width="25%"><a href="fitted.lmeStruct.html">fitted.lmeStruct</a></td>
+<td>Calculate lmeStruct Fitted Values</td></tr>
+<tr><td width="25%"><a href="fitted.lmList.html">fitted.lmList</a></td>
+<td>Extract lmList Fitted Values</td></tr>
+<tr><td width="25%"><a href="fitted.nlmeStruct.html">fitted.nlmeStruct</a></td>
+<td>Calculate nlmeStruct Fitted Values</td></tr>
+<tr><td width="25%"><a href="fixed.effects.html">fixed.effects</a></td>
+<td>Extract Fixed Effects</td></tr>
+<tr><td width="25%"><a href="fixef.lmList.html">fixed.effects.lmList</a></td>
+<td>Extract lmList Fixed Effects</td></tr>
+<tr><td width="25%"><a href="fixed.effects.html">fixef</a></td>
+<td>Extract Fixed Effects</td></tr>
+<tr><td width="25%"><a href="fixef.lmList.html">fixef.lmList</a></td>
+<td>Extract lmList Fixed Effects</td></tr>
+<tr><td width="25%"><a href="formula.pdBlocked.html">formula.pdBlocked</a></td>
+<td>Extract pdBlocked Formula</td></tr>
+<tr><td width="25%"><a href="formula.pdMat.html">formula.pdMat</a></td>
+<td>Extract pdMat Formula</td></tr>
+<tr><td width="25%"><a href="formula.reStruct.html">formula.reStruct</a></td>
+<td>Extract reStruct Object Formula</td></tr>
+</table>
+
+<h2><a name="G">-- G --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="gapply.html">gapply</a></td>
+<td>Apply a Function by Groups</td></tr>
+<tr><td width="25%"><a href="Gasoline.html">Gasoline</a></td>
+<td>Refinery yield of gasoline</td></tr>
+<tr><td width="25%"><a href="getCovariate.html">getCovariate</a></td>
+<td>Extract Covariate from an Object</td></tr>
+<tr><td width="25%"><a href="getCovariate.corStruct.html">getCovariate.corSpatial</a></td>
+<td>Extract corStruct Object Covariate</td></tr>
+<tr><td width="25%"><a href="getCovariate.corStruct.html">getCovariate.corStruct</a></td>
+<td>Extract corStruct Object Covariate</td></tr>
+<tr><td width="25%"><a href="getCovariate.data.frame.html">getCovariate.data.frame</a></td>
+<td>Extract Data Frame Covariate</td></tr>
+<tr><td width="25%"><a href="getCovariate.varFunc.html">getCovariate.varFunc</a></td>
+<td>Extract varFunc Covariate</td></tr>
+<tr><td width="25%"><a href="getCovariateFormula.html">getCovariateFormula</a></td>
+<td>Extract Covariates Formula</td></tr>
+<tr><td width="25%"><a href="getData.html">getData</a></td>
+<td>Extract Data from an Object</td></tr>
+<tr><td width="25%"><a href="getData.gls.html">getData.gls</a></td>
+<td>Extract gls Object Data</td></tr>
+<tr><td width="25%"><a href="getData.gls.html">getData.gnls</a></td>
+<td>Extract gls Object Data</td></tr>
+<tr><td width="25%"><a href="getData.lme.html">getData.lme</a></td>
+<td>Extract lme Object Data</td></tr>
+<tr><td width="25%"><a href="getData.lmList.html">getData.lmList</a></td>
+<td>Extract lmList Object Data</td></tr>
+<tr><td width="25%"><a href="getData.lme.html">getData.nlme</a></td>
+<td>Extract lme Object Data</td></tr>
+<tr><td width="25%"><a href="getData.lme.html">getData.nls</a></td>
+<td>Extract lme Object Data</td></tr>
+<tr><td width="25%"><a href="getGroups.html">getGroups</a></td>
+<td>Extract Grouping Factors from an Object</td></tr>
+<tr><td width="25%"><a href="getGroups.corStruct.html">getGroups.corStruct</a></td>
+<td>Extract corStruct Groups</td></tr>
+<tr><td width="25%"><a href="getGroups.data.frame.html">getGroups.data.frame</a></td>
+<td>Extract Groups from a Data Frame</td></tr>
+<tr><td width="25%"><a href="getGroups.gls.html">getGroups.gls</a></td>
+<td>Extract gls Object Groups</td></tr>
+<tr><td width="25%"><a href="getGroups.lme.html">getGroups.lme</a></td>
+<td>Extract lme Object Groups</td></tr>
+<tr><td width="25%"><a href="getGroups.lmList.html">getGroups.lmList</a></td>
+<td>Extract lmList Object Groups</td></tr>
+<tr><td width="25%"><a href="getGroups.varFunc.html">getGroups.varFunc</a></td>
+<td>Extract varFunc Groups</td></tr>
+<tr><td width="25%"><a href="getGroupsFormula.html">getGroupsFormula</a></td>
+<td>Extract Grouping Formula</td></tr>
+<tr><td width="25%"><a href="getGroupsFormula.html">getGroupsFormula.default</a></td>
+<td>Extract Grouping Formula</td></tr>
+<tr><td width="25%"><a href="getGroupsFormula.html">getGroupsFormula.gls</a></td>
+<td>Extract Grouping Formula</td></tr>
+<tr><td width="25%"><a href="getGroupsFormula.html">getGroupsFormula.lme</a></td>
+<td>Extract Grouping Formula</td></tr>
+<tr><td width="25%"><a href="getGroupsFormula.html">getGroupsFormula.lmList</a></td>
+<td>Extract Grouping Formula</td></tr>
+<tr><td width="25%"><a href="getGroupsFormula.html">getGroupsFormula.reStruct</a></td>
+<td>Extract Grouping Formula</td></tr>
+<tr><td width="25%"><a href="getResponse.html">getResponse</a></td>
+<td>Extract Response Variable from an Object</td></tr>
+<tr><td width="25%"><a href="getResponse.html">getResponse.data.frame</a></td>
+<td>Extract Response Variable from an Object</td></tr>
+<tr><td width="25%"><a href="getResponseFormula.html">getResponseFormula</a></td>
+<td>Extract Formula Specifying Response Variable</td></tr>
+<tr><td width="25%"><a href="getVarCov.html">getVarCov</a></td>
+<td>Extract variance-covariance matrix</td></tr>
+<tr><td width="25%"><a href="getVarCov.html">getVarCov.gls</a></td>
+<td>Extract variance-covariance matrix</td></tr>
+<tr><td width="25%"><a href="getVarCov.html">getVarCov.lme</a></td>
+<td>Extract variance-covariance matrix</td></tr>
+<tr><td width="25%"><a href="gls.html">gls</a></td>
+<td>Fit Linear Model Using Generalized Least Squares</td></tr>
+<tr><td width="25%"><a href="glsControl.html">glsControl</a></td>
+<td>Control Values for gls Fit</td></tr>
+<tr><td width="25%"><a href="glsObject.html">glsObject</a></td>
+<td>Fitted gls Object</td></tr>
+<tr><td width="25%"><a href="glsStruct.html">glsStruct</a></td>
+<td>Generalized Least Squares Structure</td></tr>
+<tr><td width="25%"><a href="Glucose.html">Glucose</a></td>
+<td>Glucose levels over time</td></tr>
+<tr><td width="25%"><a href="Glucose2.html">Glucose2</a></td>
+<td>Glucose Levels Following Alcohol Ingestion</td></tr>
+<tr><td width="25%"><a href="gnls.html">gnls</a></td>
+<td>Fit Nonlinear Model Using Generalized Least Squares</td></tr>
+<tr><td width="25%"><a href="gnlsControl.html">gnlsControl</a></td>
+<td>Control Values for gnls Fit</td></tr>
+<tr><td width="25%"><a href="gnlsObject.html">gnlsObject</a></td>
+<td>Fitted gnls Object</td></tr>
+<tr><td width="25%"><a href="gnlsStruct.html">gnlsStruct</a></td>
+<td>Generalized Nonlinear Least Squares Structure</td></tr>
+<tr><td width="25%"><a href="groupedData.html">groupedData</a></td>
+<td>Construct a groupedData Object</td></tr>
+<tr><td width="25%"><a href="gsummary.html">gsummary</a></td>
+<td>Summarize by Groups</td></tr>
+<tr><td width="25%"><a href="Gun.html">Gun</a></td>
+<td>Methods for firing naval guns</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="IGF.html">IGF</a></td>
+<td>Radioimmunoassay of IGF-I Protein</td></tr>
+<tr><td width="25%"><a href="Initialize.html">Initialize</a></td>
+<td>Initialize Object</td></tr>
+<tr><td width="25%"><a href="Initialize.corStruct.html">Initialize.corAR1</a></td>
+<td>Initialize corStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.corStruct.html">Initialize.corARMA</a></td>
+<td>Initialize corStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.corStruct.html">Initialize.corCAR1</a></td>
+<td>Initialize corStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.corStruct.html">Initialize.corCompSymm</a></td>
+<td>Initialize corStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.corStruct.html">Initialize.corHF</a></td>
+<td>Initialize corStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.corStruct.html">Initialize.corIdent</a></td>
+<td>Initialize corStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.corStruct.html">Initialize.corLin</a></td>
+<td>Initialize corStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.corStruct.html">Initialize.corNatural</a></td>
+<td>Initialize corStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.corStruct.html">Initialize.corSpatial</a></td>
+<td>Initialize corStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.corStruct.html">Initialize.corSpher</a></td>
+<td>Initialize corStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.corStruct.html">Initialize.corStruct</a></td>
+<td>Initialize corStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.corStruct.html">Initialize.corSymm</a></td>
+<td>Initialize corStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.glsStruct.html">Initialize.glsStruct</a></td>
+<td>Initialize a glsStruct Object</td></tr>
+<tr><td width="25%"><a href="gnlsStruct.html">Initialize.gnlsStruct</a></td>
+<td>Generalized Nonlinear Least Squares Structure</td></tr>
+<tr><td width="25%"><a href="Initialize.lmeStruct.html">Initialize.lmeStruct</a></td>
+<td>Initialize an lmeStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.reStruct.html">Initialize.reStruct</a></td>
+<td>Initialize reStruct Object</td></tr>
+<tr><td width="25%"><a href="Initialize.varFunc.html">Initialize.varComb</a></td>
+<td>Initialize varFunc Object</td></tr>
+<tr><td width="25%"><a href="Initialize.varFunc.html">Initialize.varConstPower</a></td>
+<td>Initialize varFunc Object</td></tr>
+<tr><td width="25%"><a href="Initialize.varFunc.html">Initialize.varExp</a></td>
+<td>Initialize varFunc Object</td></tr>
+<tr><td width="25%"><a href="Initialize.varFunc.html">Initialize.varFixed</a></td>
+<td>Initialize varFunc Object</td></tr>
+<tr><td width="25%"><a href="Initialize.varFunc.html">Initialize.varFunc</a></td>
+<td>Initialize varFunc Object</td></tr>
+<tr><td width="25%"><a href="Initialize.varFunc.html">Initialize.varIdent</a></td>
+<td>Initialize varFunc Object</td></tr>
+<tr><td width="25%"><a href="Initialize.varFunc.html">Initialize.varPower</a></td>
+<td>Initialize varFunc Object</td></tr>
+<tr><td width="25%"><a href="intervals.html">intervals</a></td>
+<td>Confidence Intervals on Coefficients</td></tr>
+<tr><td width="25%"><a href="intervals.gls.html">intervals.gls</a></td>
+<td>Confidence Intervals on gls Parameters</td></tr>
+<tr><td width="25%"><a href="intervals.lme.html">intervals.lme</a></td>
+<td>Confidence Intervals on lme Parameters</td></tr>
+<tr><td width="25%"><a href="intervals.lmList.html">intervals.lmList</a></td>
+<td>Confidence Intervals on lmList Coefficients</td></tr>
+<tr><td width="25%"><a href="isBalanced.html">isBalanced</a></td>
+<td>Check a Design for Balance</td></tr>
+<tr><td width="25%"><a href="isBalanced.html">isBalanced.groupedData</a></td>
+<td>Check a Design for Balance</td></tr>
+<tr><td width="25%"><a href="isInitialized.html">isInitialized</a></td>
+<td>Check if Object is Initialized</td></tr>
+<tr><td width="25%"><a href="isInitialized.html">isInitialized.pdBlocked</a></td>
+<td>Check if Object is Initialized</td></tr>
+<tr><td width="25%"><a href="isInitialized.html">isInitialized.pdMat</a></td>
+<td>Check if Object is Initialized</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="LDEsysMat.html">LDEsysMat</a></td>
+<td>Generate system matrix for LDEs</td></tr>
+<tr><td width="25%"><a href="lme.html">lme</a></td>
+<td>Linear Mixed-Effects Models</td></tr>
+<tr><td width="25%"><a href="lme.html">lme.formula</a></td>
+<td>Linear Mixed-Effects Models</td></tr>
+<tr><td width="25%"><a href="lme.groupedData.html">lme.groupedData</a></td>
+<td>LME fit from groupedData Object</td></tr>
+<tr><td width="25%"><a href="lme.lmList.html">lme.lmList</a></td>
+<td>LME fit from lmList Object</td></tr>
+<tr><td width="25%"><a href="lmeControl.html">lmeControl</a></td>
+<td>Control Values for lme Fit</td></tr>
+<tr><td width="25%"><a href="lmeObject.html">lmeObject</a></td>
+<td>Fitted lme Object</td></tr>
+<tr><td width="25%"><a href="lmeScale.html">lmeScale</a></td>
+<td>Scale for lme Optimization</td></tr>
+<tr><td width="25%"><a href="lmeStruct.html">lmeStruct</a></td>
+<td>Linear Mixed-Effects Structure</td></tr>
+<tr><td width="25%"><a href="lmList.html">lmList</a></td>
+<td>List of lm Objects with a Common Model</td></tr>
+<tr><td width="25%"><a href="lmList.html">lmList.formula</a></td>
+<td>List of lm Objects with a Common Model</td></tr>
+<tr><td width="25%"><a href="lmList.groupedData.html">lmList.groupedData</a></td>
+<td>lmList Fit from a groupedData Object</td></tr>
+<tr><td width="25%"><a href="logDet.html">logDet</a></td>
+<td>Extract the Logarithm of the Determinant</td></tr>
+<tr><td width="25%"><a href="logDet.corStruct.html">logDet.corIdent</a></td>
+<td>Extract corStruct Log-Determinant</td></tr>
+<tr><td width="25%"><a href="logDet.corStruct.html">logDet.corStruct</a></td>
+<td>Extract corStruct Log-Determinant</td></tr>
+<tr><td width="25%"><a href="logDet.pdMat.html">logDet.pdBlocked</a></td>
+<td>Extract Log-Determinant from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="logDet.pdMat.html">logDet.pdCompSymm</a></td>
+<td>Extract Log-Determinant from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="logDet.pdMat.html">logDet.pdDiag</a></td>
+<td>Extract Log-Determinant from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="logDet.pdMat.html">logDet.pdIdent</a></td>
+<td>Extract Log-Determinant from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="logDet.pdMat.html">logDet.pdMat</a></td>
+<td>Extract Log-Determinant from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="logDet.pdMat.html">logDet.pdNatural</a></td>
+<td>Extract Log-Determinant from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="logDet.pdMat.html">logDet.pdSymm</a></td>
+<td>Extract Log-Determinant from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="logDet.reStruct.html">logDet.reStruct</a></td>
+<td>Extract reStruct Log-Determinants</td></tr>
+<tr><td width="25%"><a href="logLik.corStruct.html">logLik.corStruct</a></td>
+<td>Extract corStruct Log-Likelihood</td></tr>
+<tr><td width="25%"><a href="logLik.lme.html">logLik.gls</a></td>
+<td>Log-Likelihood of an lme Object</td></tr>
+<tr><td width="25%"><a href="logLik.glsStruct.html">logLik.glsStruct</a></td>
+<td>Log-Likelihood of a glsStruct Object</td></tr>
+<tr><td width="25%"><a href="logLik.gnls.html">logLik.gnls</a></td>
+<td>Log-Likelihood of a gnls Object</td></tr>
+<tr><td width="25%"><a href="logLik.gnlsStruct.html">logLik.gnlsStruct</a></td>
+<td>Log-Likelihood of a gnlsStruct Object</td></tr>
+<tr><td width="25%"><a href="logLik.lme.html">logLik.lme</a></td>
+<td>Log-Likelihood of an lme Object</td></tr>
+<tr><td width="25%"><a href="logLik.lmeStruct.html">logLik.lmeStruct</a></td>
+<td>Log-Likelihood of an lmeStruct Object</td></tr>
+<tr><td width="25%"><a href="logLik.lmeStruct.html">logLik.lmeStructInt</a></td>
+<td>Log-Likelihood of an lmeStruct Object</td></tr>
+<tr><td width="25%"><a href="logLik.lmList.html">logLik.lmList</a></td>
+<td>Log-Likelihood of an lmList Object</td></tr>
+<tr><td width="25%"><a href="logLik.reStruct.html">logLik.reStruct</a></td>
+<td>Calculate reStruct Log-Likelihood</td></tr>
+<tr><td width="25%"><a href="logLik.varFunc.html">logLik.varComb</a></td>
+<td>Extract varFunc logLik</td></tr>
+<tr><td width="25%"><a href="logLik.varFunc.html">logLik.varFunc</a></td>
+<td>Extract varFunc logLik</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Machines.html">Machines</a></td>
+<td>Productivity Scores for Machines and Workers</td></tr>
+<tr><td width="25%"><a href="MathAchieve.html">MathAchieve</a></td>
+<td>Mathematics achievement scores</td></tr>
+<tr><td width="25%"><a href="MathAchSchool.html">MathAchSchool</a></td>
+<td>School demographic data for MathAchieve</td></tr>
+<tr><td width="25%"><a href="Matrix.html">matrix&lt;-</a></td>
+<td>Assign Matrix Values</td></tr>
+<tr><td width="25%"><a href="Matrix.pdMat.html">matrix&lt;-.pdBlocked</a></td>
+<td>Assign Matrix to a pdMat Object</td></tr>
+<tr><td width="25%"><a href="Matrix.pdMat.html">matrix&lt;-.pdMat</a></td>
+<td>Assign Matrix to a pdMat Object</td></tr>
+<tr><td width="25%"><a href="Matrix.reStruct.html">matrix&lt;-.reStruct</a></td>
+<td>Assign reStruct Matrices</td></tr>
+<tr><td width="25%"><a href="Meat.html">Meat</a></td>
+<td>Tenderness of meat</td></tr>
+<tr><td width="25%"><a href="Milk.html">Milk</a></td>
+<td>Protein content of cows' milk</td></tr>
+<tr><td width="25%"><a href="model.matrix.reStruct.html">model.matrix.reStruct</a></td>
+<td>reStruct Model Matrix</td></tr>
+<tr><td width="25%"><a href="Muscle.html">Muscle</a></td>
+<td>Contraction of heart muscle sections</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Names.html">Names</a></td>
+<td>Names Associated with an Object</td></tr>
+<tr><td width="25%"><a href="Names.formula.html">Names.formula</a></td>
+<td>Extract Names from a formula</td></tr>
+<tr><td width="25%"><a href="Names.formula.html">Names.listForm</a></td>
+<td>Extract Names from a formula</td></tr>
+<tr><td width="25%"><a href="Names.pdBlocked.html">Names.pdBlocked</a></td>
+<td>Names of a pdBlocked Object</td></tr>
+<tr><td width="25%"><a href="Names.pdMat.html">Names.pdMat</a></td>
+<td>Names of a pdMat Object</td></tr>
+<tr><td width="25%"><a href="Names.reStruct.html">Names.reStruct</a></td>
+<td>Names of an reStruct Object</td></tr>
+<tr><td width="25%"><a href="Names.html">Names&lt;-</a></td>
+<td>Names Associated with an Object</td></tr>
+<tr><td width="25%"><a href="Names.pdBlocked.html">Names&lt;-.pdBlocked</a></td>
+<td>Names of a pdBlocked Object</td></tr>
+<tr><td width="25%"><a href="Names.pdMat.html">Names&lt;-.pdMat</a></td>
+<td>Names of a pdMat Object</td></tr>
+<tr><td width="25%"><a href="Names.reStruct.html">Names&lt;-.reStruct</a></td>
+<td>Names of an reStruct Object</td></tr>
+<tr><td width="25%"><a href="needUpdate.html">needUpdate</a></td>
+<td>Check if Update is Needed</td></tr>
+<tr><td width="25%"><a href="needUpdate.modelStruct.html">needUpdate.corStruct</a></td>
+<td>Check if a modelStruct Object Needs Updating</td></tr>
+<tr><td width="25%"><a href="needUpdate.html">needUpdate.default</a></td>
+<td>Check if Update is Needed</td></tr>
+<tr><td width="25%"><a href="needUpdate.modelStruct.html">needUpdate.modelStruct</a></td>
+<td>Check if a modelStruct Object Needs Updating</td></tr>
+<tr><td width="25%"><a href="needUpdate.modelStruct.html">needUpdate.reStruct</a></td>
+<td>Check if a modelStruct Object Needs Updating</td></tr>
+<tr><td width="25%"><a href="needUpdate.html">needUpdate.varComb</a></td>
+<td>Check if Update is Needed</td></tr>
+<tr><td width="25%"><a href="needUpdate.html">needUpdate.varIdent</a></td>
+<td>Check if Update is Needed</td></tr>
+<tr><td width="25%"><a href="groupedData.html">nfGroupedData</a></td>
+<td>Construct a groupedData Object</td></tr>
+<tr><td width="25%"><a href="Nitrendipene.html">Nitrendipene</a></td>
+<td>Assay of nitrendipene</td></tr>
+<tr><td width="25%"><a href="nlme.html">nlme</a></td>
+<td>Nonlinear Mixed-Effects Models</td></tr>
+<tr><td width="25%"><a href="nlme.html">nlme.formula</a></td>
+<td>Nonlinear Mixed-Effects Models</td></tr>
+<tr><td width="25%"><a href="nlme.nlsList.html">nlme.nlsList</a></td>
+<td>NLME fit from nlsList Object</td></tr>
+<tr><td width="25%"><a href="nlmeControl.html">nlmeControl</a></td>
+<td>Control Values for nlme Fit</td></tr>
+<tr><td width="25%"><a href="nlmeObject.html">nlmeObject</a></td>
+<td>Fitted nlme Object</td></tr>
+<tr><td width="25%"><a href="nlmeStruct.html">nlmeStruct</a></td>
+<td>Nonlinear Mixed-Effects Structure</td></tr>
+<tr><td width="25%"><a href="nlsList.html">nlsList</a></td>
+<td>List of nls Objects with a Common Model</td></tr>
+<tr><td width="25%"><a href="nlsList.html">nlsList.formula</a></td>
+<td>List of nls Objects with a Common Model</td></tr>
+<tr><td width="25%"><a href="nlsList.selfStart.html">nlsList.selfStart</a></td>
+<td>nlsList Fit from a selfStart Function</td></tr>
+<tr><td width="25%"><a href="groupedData.html">nmGroupedData</a></td>
+<td>Construct a groupedData Object</td></tr>
+</table>
+
+<h2><a name="O">-- O --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Oats.html">Oats</a></td>
+<td>Split-plot Experiment on Varieties of Oats</td></tr>
+<tr><td width="25%"><a href="Orthodont.html">Orthodont</a></td>
+<td>Growth curve data on an orthdontic measurement</td></tr>
+<tr><td width="25%"><a href="Ovary.html">Ovary</a></td>
+<td>Counts of Ovarian Follicles</td></tr>
+<tr><td width="25%"><a href="Oxboys.html">Oxboys</a></td>
+<td>Heights of Boys in Oxford</td></tr>
+<tr><td width="25%"><a href="Oxide.html">Oxide</a></td>
+<td>Variability in Semiconductor Manufacturing</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="pairs.compareFits.html">pairs.compareFits</a></td>
+<td>Pairs Plot of compareFits Object</td></tr>
+<tr><td width="25%"><a href="pairs.lme.html">pairs.lme</a></td>
+<td>Pairs Plot of an lme Object</td></tr>
+<tr><td width="25%"><a href="pairs.lmList.html">pairs.lmList</a></td>
+<td>Pairs Plot of an lmList Object</td></tr>
+<tr><td width="25%"><a href="PBG.html">PBG</a></td>
+<td>Effect of Phenylbiguanide on Blood Pressure</td></tr>
+<tr><td width="25%"><a href="pdBlocked.html">pdBlocked</a></td>
+<td>Positive-Definite Block Diagonal Matrix</td></tr>
+<tr><td width="25%"><a href="pdClasses.html">pdClasses</a></td>
+<td>Positive-Definite Matrix Classes</td></tr>
+<tr><td width="25%"><a href="pdCompSymm.html">pdCompSymm</a></td>
+<td>Positive-Definite Matrix with Compound Symmetry Structure</td></tr>
+<tr><td width="25%"><a href="pdConstruct.html">pdConstruct</a></td>
+<td>Construct pdMat Objects</td></tr>
+<tr><td width="25%"><a href="pdConstruct.pdBlocked.html">pdConstruct.pdBlocked</a></td>
+<td>Construct pdBlocked Objects</td></tr>
+<tr><td width="25%"><a href="pdConstruct.html">pdConstruct.pdCompSymm</a></td>
+<td>Construct pdMat Objects</td></tr>
+<tr><td width="25%"><a href="pdConstruct.html">pdConstruct.pdDiag</a></td>
+<td>Construct pdMat Objects</td></tr>
+<tr><td width="25%"><a href="pdConstruct.html">pdConstruct.pdIdent</a></td>
+<td>Construct pdMat Objects</td></tr>
+<tr><td width="25%"><a href="pdConstruct.html">pdConstruct.pdLogChol</a></td>
+<td>Construct pdMat Objects</td></tr>
+<tr><td width="25%"><a href="pdConstruct.html">pdConstruct.pdMat</a></td>
+<td>Construct pdMat Objects</td></tr>
+<tr><td width="25%"><a href="pdConstruct.html">pdConstruct.pdNatural</a></td>
+<td>Construct pdMat Objects</td></tr>
+<tr><td width="25%"><a href="pdConstruct.html">pdConstruct.pdSymm</a></td>
+<td>Construct pdMat Objects</td></tr>
+<tr><td width="25%"><a href="pdDiag.html">pdDiag</a></td>
+<td>Diagonal Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="pdFactor.html">pdFactor</a></td>
+<td>Square-Root Factor of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="pdFactor.html">pdFactor.pdBlocked</a></td>
+<td>Square-Root Factor of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="pdFactor.html">pdFactor.pdCompSymm</a></td>
+<td>Square-Root Factor of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="pdFactor.html">pdFactor.pdDiag</a></td>
+<td>Square-Root Factor of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="pdFactor.html">pdFactor.pdIdent</a></td>
+<td>Square-Root Factor of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="pdFactor.html">pdFactor.pdLogChol</a></td>
+<td>Square-Root Factor of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="pdFactor.html">pdFactor.pdMat</a></td>
+<td>Square-Root Factor of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="pdFactor.html">pdFactor.pdNatural</a></td>
+<td>Square-Root Factor of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="pdFactor.html">pdFactor.pdSymm</a></td>
+<td>Square-Root Factor of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="pdFactor.reStruct.html">pdFactor.reStruct</a></td>
+<td>Extract Square-Root Factor from Components of an reStruct Object</td></tr>
+<tr><td width="25%"><a href="pdIdent.html">pdIdent</a></td>
+<td>Multiple of the Identity Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="pdLogChol.html">pdLogChol</a></td>
+<td>General Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="pdMat.html">pdMat</a></td>
+<td>Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="pdMatrix.html">pdMatrix</a></td>
+<td>Extract Matrix or Square-Root Factor from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="pdMatrix.html">pdMatrix.pdBlocked</a></td>
+<td>Extract Matrix or Square-Root Factor from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="pdMatrix.html">pdMatrix.pdCompSymm</a></td>
+<td>Extract Matrix or Square-Root Factor from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="pdMatrix.html">pdMatrix.pdDiag</a></td>
+<td>Extract Matrix or Square-Root Factor from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="pdMatrix.html">pdMatrix.pdIdent</a></td>
+<td>Extract Matrix or Square-Root Factor from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="pdMatrix.html">pdMatrix.pdMat</a></td>
+<td>Extract Matrix or Square-Root Factor from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="pdMatrix.html">pdMatrix.pdNatural</a></td>
+<td>Extract Matrix or Square-Root Factor from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="pdMatrix.html">pdMatrix.pdSymm</a></td>
+<td>Extract Matrix or Square-Root Factor from a pdMat Object</td></tr>
+<tr><td width="25%"><a href="pdMatrix.reStruct.html">pdMatrix.reStruct</a></td>
+<td>Extract Matrix or Square-Root Factor from Components of an reStruct Object</td></tr>
+<tr><td width="25%"><a href="pdNatural.html">pdNatural</a></td>
+<td>General Positive-Definite Matrix in Natural Parametrization</td></tr>
+<tr><td width="25%"><a href="pdSymm.html">pdSymm</a></td>
+<td>General Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="Phenobarb.html">Phenobarb</a></td>
+<td>Phenobarbitol Kinetics</td></tr>
+<tr><td width="25%"><a href="phenoModel.html">phenoModel</a></td>
+<td>Model function for the Phenobarb data</td></tr>
+<tr><td width="25%"><a href="Pixel.html">Pixel</a></td>
+<td>X-ray pixel intensities over time</td></tr>
+<tr><td width="25%"><a href="plot.ACF.html">plot.ACF</a></td>
+<td>Plot an ACF Object</td></tr>
+<tr><td width="25%"><a href="plot.augPred.html">plot.augPred</a></td>
+<td>Plot an augPred Object</td></tr>
+<tr><td width="25%"><a href="plot.compareFits.html">plot.compareFits</a></td>
+<td>Plot a compareFits Object</td></tr>
+<tr><td width="25%"><a href="plot.gls.html">plot.gls</a></td>
+<td>Plot a gls Object</td></tr>
+<tr><td width="25%"><a href="plot.intervals.lmList.html">plot.intervals.lmList</a></td>
+<td>Plot lmList Confidence Intervals</td></tr>
+<tr><td width="25%"><a href="plot.lme.html">plot.lme</a></td>
+<td>Plot an lme or nls object</td></tr>
+<tr><td width="25%"><a href="plot.lmList.html">plot.lmList</a></td>
+<td>Plot an lmList Object</td></tr>
+<tr><td width="25%"><a href="plot.nffGroupedData.html">plot.nffGroupedData</a></td>
+<td>Plot an nffGroupedData Object</td></tr>
+<tr><td width="25%"><a href="plot.nfnGroupedData.html">plot.nfnGroupedData</a></td>
+<td>Plot an nfnGroupedData Object</td></tr>
+<tr><td width="25%"><a href="plot.lme.html">plot.nls</a></td>
+<td>Plot an lme or nls object</td></tr>
+<tr><td width="25%"><a href="plot.nmGroupedData.html">plot.nmGroupedData</a></td>
+<td>Plot an nmGroupedData Object</td></tr>
+<tr><td width="25%"><a href="pdMat.html">plot.pdMat</a></td>
+<td>Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="plot.ranef.lme.html">plot.ranef.lme</a></td>
+<td>Plot a ranef.lme Object</td></tr>
+<tr><td width="25%"><a href="plot.ranef.lmList.html">plot.ranef.lmList</a></td>
+<td>Plot a ranef.lmList Object</td></tr>
+<tr><td width="25%"><a href="simulate.lme.html">plot.simulate.lme</a></td>
+<td>Simulate Results from 'lme' Models</td></tr>
+<tr><td width="25%"><a href="plot.Variogram.html">plot.Variogram</a></td>
+<td>Plot a Variogram Object</td></tr>
+<tr><td width="25%"><a href="pooledSD.html">pooledSD</a></td>
+<td>Extract Pooled Standard Deviation</td></tr>
+<tr><td width="25%"><a href="predict.gls.html">predict.gls</a></td>
+<td>Predictions from a gls Object</td></tr>
+<tr><td width="25%"><a href="predict.gnls.html">predict.gnls</a></td>
+<td>Predictions from a gnls Object</td></tr>
+<tr><td width="25%"><a href="predict.lme.html">predict.lme</a></td>
+<td>Predictions from an lme Object</td></tr>
+<tr><td width="25%"><a href="predict.lmList.html">predict.lmList</a></td>
+<td>Predictions from an lmList Object</td></tr>
+<tr><td width="25%"><a href="predict.nlme.html">predict.nlme</a></td>
+<td>Predictions from an nlme Object</td></tr>
+<tr><td width="25%"><a href="anova.lme.html">print.anova.lme</a></td>
+<td>Compare Likelihoods of Fitted Objects</td></tr>
+<tr><td width="25%"><a href="compareFits.html">print.compareFits</a></td>
+<td>Compare Fitted Objects</td></tr>
+<tr><td width="25%"><a href="corNatural.html">print.corNatural</a></td>
+<td>General correlation in natural parameterization</td></tr>
+<tr><td width="25%"><a href="intervals.gls.html">print.intervals.gls</a></td>
+<td>Confidence Intervals on gls Parameters</td></tr>
+<tr><td width="25%"><a href="intervals.lme.html">print.intervals.lme</a></td>
+<td>Confidence Intervals on lme Parameters</td></tr>
+<tr><td width="25%"><a href="intervals.lmList.html">print.intervals.lmList</a></td>
+<td>Confidence Intervals on lmList Coefficients</td></tr>
+<tr><td width="25%"><a href="lmList.html">print.lmList</a></td>
+<td>List of lm Objects with a Common Model</td></tr>
+<tr><td width="25%"><a href="random.effects.html">print.ranef</a></td>
+<td>Extract Random Effects</td></tr>
+<tr><td width="25%"><a href="ranef.lme.html">print.ranef.lme</a></td>
+<td>Extract lme Random Effects</td></tr>
+<tr><td width="25%"><a href="reStruct.html">print.reStruct</a></td>
+<td>Random Effects Structure</td></tr>
+<tr><td width="25%"><a href="simulate.lme.html">print.simulate.lme</a></td>
+<td>Simulate Results from 'lme' Models</td></tr>
+<tr><td width="25%"><a href="print.summary.pdMat.html">print.summary.pdMat</a></td>
+<td>Print a summary.pdMat Object</td></tr>
+<tr><td width="25%"><a href="print.varFunc.html">print.varComb</a></td>
+<td>Print a varFunc Object</td></tr>
+<tr><td width="25%"><a href="VarCorr.html">print.VarCorr.lme</a></td>
+<td>Extract variance and correlation components</td></tr>
+<tr><td width="25%"><a href="getVarCov.html">print.VarCov</a></td>
+<td>Extract variance-covariance matrix</td></tr>
+<tr><td width="25%"><a href="print.varFunc.html">print.varFunc</a></td>
+<td>Print a varFunc Object</td></tr>
+</table>
+
+<h2><a name="Q">-- Q --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="qqnorm.gls.html">qqnorm.gls</a></td>
+<td>Normal Plot of Residuals from a gls Object</td></tr>
+<tr><td width="25%"><a href="qqnorm.lme.html">qqnorm.lm</a></td>
+<td>Normal Plot of Residuals or Random Effects from an lme Object</td></tr>
+<tr><td width="25%"><a href="qqnorm.lme.html">qqnorm.lme</a></td>
+<td>Normal Plot of Residuals or Random Effects from an lme Object</td></tr>
+<tr><td width="25%"><a href="qqnorm.lme.html">qqnorm.lmList</a></td>
+<td>Normal Plot of Residuals or Random Effects from an lme Object</td></tr>
+<tr><td width="25%"><a href="qqnorm.lme.html">qqnorm.nls</a></td>
+<td>Normal Plot of Residuals or Random Effects from an lme Object</td></tr>
+<tr><td width="25%"><a href="Quinidine.html">Quinidine</a></td>
+<td>Quinidine Kinetics</td></tr>
+<tr><td width="25%"><a href="quinModel.html">quinModel</a></td>
+<td>Model function for the Quinidine data</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Rail.html">Rail</a></td>
+<td>Evaluation of Stress in Railway Rails</td></tr>
+<tr><td width="25%"><a href="random.effects.html">random.effects</a></td>
+<td>Extract Random Effects</td></tr>
+<tr><td width="25%"><a href="ranef.lme.html">random.effects.lme</a></td>
+<td>Extract lme Random Effects</td></tr>
+<tr><td width="25%"><a href="ranef.lmList.html">random.effects.lmList</a></td>
+<td>Extract lmList Random Effects</td></tr>
+<tr><td width="25%"><a href="random.effects.html">ranef</a></td>
+<td>Extract Random Effects</td></tr>
+<tr><td width="25%"><a href="ranef.lme.html">ranef.lme</a></td>
+<td>Extract lme Random Effects</td></tr>
+<tr><td width="25%"><a href="ranef.lmList.html">ranef.lmList</a></td>
+<td>Extract lmList Random Effects</td></tr>
+<tr><td width="25%"><a href="RatPupWeight.html">RatPupWeight</a></td>
+<td>The weight of rat pups</td></tr>
+<tr><td width="25%"><a href="recalc.html">recalc</a></td>
+<td>Recalculate Condensed Linear Model Object</td></tr>
+<tr><td width="25%"><a href="recalc.corStruct.html">recalc.corAR1</a></td>
+<td>Recalculate for corStruct Object</td></tr>
+<tr><td width="25%"><a href="recalc.corStruct.html">recalc.corARMA</a></td>
+<td>Recalculate for corStruct Object</td></tr>
+<tr><td width="25%"><a href="recalc.corStruct.html">recalc.corCAR1</a></td>
+<td>Recalculate for corStruct Object</td></tr>
+<tr><td width="25%"><a href="recalc.corStruct.html">recalc.corCompSymm</a></td>
+<td>Recalculate for corStruct Object</td></tr>
+<tr><td width="25%"><a href="recalc.corStruct.html">recalc.corHF</a></td>
+<td>Recalculate for corStruct Object</td></tr>
+<tr><td width="25%"><a href="recalc.corStruct.html">recalc.corIdent</a></td>
+<td>Recalculate for corStruct Object</td></tr>
+<tr><td width="25%"><a href="recalc.corStruct.html">recalc.corNatural</a></td>
+<td>Recalculate for corStruct Object</td></tr>
+<tr><td width="25%"><a href="recalc.corStruct.html">recalc.corSpatial</a></td>
+<td>Recalculate for corStruct Object</td></tr>
+<tr><td width="25%"><a href="recalc.corStruct.html">recalc.corStruct</a></td>
+<td>Recalculate for corStruct Object</td></tr>
+<tr><td width="25%"><a href="recalc.corStruct.html">recalc.corSymm</a></td>
+<td>Recalculate for corStruct Object</td></tr>
+<tr><td width="25%"><a href="recalc.modelStruct.html">recalc.modelStruct</a></td>
+<td>Recalculate for a modelStruct Object</td></tr>
+<tr><td width="25%"><a href="recalc.reStruct.html">recalc.reStruct</a></td>
+<td>Recalculate for an reStruct Object</td></tr>
+<tr><td width="25%"><a href="recalc.varFunc.html">recalc.varFunc</a></td>
+<td>Recalculate for varFunc Object</td></tr>
+<tr><td width="25%"><a href="recalc.varFunc.html">recalc.varIdent</a></td>
+<td>Recalculate for varFunc Object</td></tr>
+<tr><td width="25%"><a href="Relaxin.html">Relaxin</a></td>
+<td>Assay for Relaxin</td></tr>
+<tr><td width="25%"><a href="Remifentanil.html">Remifentanil</a></td>
+<td>Pharmacokinetics of remifentanil</td></tr>
+<tr><td width="25%"><a href="residuals.gls.html">residuals.gls</a></td>
+<td>Extract gls Residuals</td></tr>
+<tr><td width="25%"><a href="residuals.glsStruct.html">residuals.glsStruct</a></td>
+<td>Calculate glsStruct Residuals</td></tr>
+<tr><td width="25%"><a href="residuals.gls.html">residuals.gnls</a></td>
+<td>Extract gls Residuals</td></tr>
+<tr><td width="25%"><a href="residuals.gnlsStruct.html">residuals.gnlsStruct</a></td>
+<td>Calculate gnlsStruct Residuals</td></tr>
+<tr><td width="25%"><a href="residuals.lme.html">residuals.lme</a></td>
+<td>Extract lme Residuals</td></tr>
+<tr><td width="25%"><a href="residuals.lmeStruct.html">residuals.lmeStruct</a></td>
+<td>Calculate lmeStruct Residuals</td></tr>
+<tr><td width="25%"><a href="residuals.lmList.html">residuals.lmList</a></td>
+<td>Extract lmList Residuals</td></tr>
+<tr><td width="25%"><a href="residuals.nlmeStruct.html">residuals.nlmeStruct</a></td>
+<td>Calculate nlmeStruct Residuals</td></tr>
+<tr><td width="25%"><a href="reStruct.html">reStruct</a></td>
+<td>Random Effects Structure</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="simulate.lme.html">simulate.lme</a></td>
+<td>Simulate Results from 'lme' Models</td></tr>
+<tr><td width="25%"><a href="solve.pdMat.html">solve.pdBlocked</a></td>
+<td>Calculate Inverse of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="solve.pdMat.html">solve.pdDiag</a></td>
+<td>Calculate Inverse of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="solve.pdMat.html">solve.pdIdent</a></td>
+<td>Calculate Inverse of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="solve.pdMat.html">solve.pdLogChol</a></td>
+<td>Calculate Inverse of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="solve.pdMat.html">solve.pdMat</a></td>
+<td>Calculate Inverse of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="solve.pdMat.html">solve.pdNatural</a></td>
+<td>Calculate Inverse of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="solve.pdMat.html">solve.pdSymm</a></td>
+<td>Calculate Inverse of a Positive-Definite Matrix</td></tr>
+<tr><td width="25%"><a href="solve.reStruct.html">solve.reStruct</a></td>
+<td>Apply Solve to an reStruct Object</td></tr>
+<tr><td width="25%"><a href="Soybean.html">Soybean</a></td>
+<td>Growth of soybean plants</td></tr>
+<tr><td width="25%"><a href="splitFormula.html">splitFormula</a></td>
+<td>Split a Formula</td></tr>
+<tr><td width="25%"><a href="Spruce.html">Spruce</a></td>
+<td>Growth of Spruce Trees</td></tr>
+<tr><td width="25%"><a href="summary.corStruct.html">summary.corAR1</a></td>
+<td>Summarize a corStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.corStruct.html">summary.corARMA</a></td>
+<td>Summarize a corStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.corStruct.html">summary.corCAR1</a></td>
+<td>Summarize a corStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.corStruct.html">summary.corCompSymm</a></td>
+<td>Summarize a corStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.corStruct.html">summary.corExp</a></td>
+<td>Summarize a corStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.corStruct.html">summary.corGaus</a></td>
+<td>Summarize a corStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.corStruct.html">summary.corIdent</a></td>
+<td>Summarize a corStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.corStruct.html">summary.corLin</a></td>
+<td>Summarize a corStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.corStruct.html">summary.corNatural</a></td>
+<td>Summarize a corStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.corStruct.html">summary.corRatio</a></td>
+<td>Summarize a corStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.corStruct.html">summary.corSpher</a></td>
+<td>Summarize a corStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.corStruct.html">summary.corStruct</a></td>
+<td>Summarize a corStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.corStruct.html">summary.corSymm</a></td>
+<td>Summarize a corStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.gls.html">summary.gls</a></td>
+<td>Summarize a gls Object</td></tr>
+<tr><td width="25%"><a href="summary.lme.html">summary.lme</a></td>
+<td>Summarize an lme Object</td></tr>
+<tr><td width="25%"><a href="summary.lmList.html">summary.lmList</a></td>
+<td>Summarize an lmList Object</td></tr>
+<tr><td width="25%"><a href="summary.modelStruct.html">summary.modelStruct</a></td>
+<td>Summarize a modelStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.nlsList.html">summary.nlsList</a></td>
+<td>Summarize an nlsList Object</td></tr>
+<tr><td width="25%"><a href="summary.pdMat.html">summary.pdBlocked</a></td>
+<td>Summarize a pdMat Object</td></tr>
+<tr><td width="25%"><a href="summary.pdMat.html">summary.pdCompSymm</a></td>
+<td>Summarize a pdMat Object</td></tr>
+<tr><td width="25%"><a href="summary.pdMat.html">summary.pdDiag</a></td>
+<td>Summarize a pdMat Object</td></tr>
+<tr><td width="25%"><a href="summary.pdMat.html">summary.pdIdent</a></td>
+<td>Summarize a pdMat Object</td></tr>
+<tr><td width="25%"><a href="summary.pdMat.html">summary.pdLogChol</a></td>
+<td>Summarize a pdMat Object</td></tr>
+<tr><td width="25%"><a href="summary.pdMat.html">summary.pdMat</a></td>
+<td>Summarize a pdMat Object</td></tr>
+<tr><td width="25%"><a href="summary.pdMat.html">summary.pdNatural</a></td>
+<td>Summarize a pdMat Object</td></tr>
+<tr><td width="25%"><a href="summary.pdMat.html">summary.pdSymm</a></td>
+<td>Summarize a pdMat Object</td></tr>
+<tr><td width="25%"><a href="summary.modelStruct.html">summary.reStruct</a></td>
+<td>Summarize a modelStruct Object</td></tr>
+<tr><td width="25%"><a href="summary.varFunc.html">summary.varComb</a></td>
+<td>Summarize varFunc Object</td></tr>
+<tr><td width="25%"><a href="summary.varFunc.html">summary.varConstPower</a></td>
+<td>Summarize varFunc Object</td></tr>
+<tr><td width="25%"><a href="VarCorr.html">summary.VarCorr.lme</a></td>
+<td>Extract variance and correlation components</td></tr>
+<tr><td width="25%"><a href="summary.varFunc.html">summary.varExp</a></td>
+<td>Summarize varFunc Object</td></tr>
+<tr><td width="25%"><a href="summary.varFunc.html">summary.varFixed</a></td>
+<td>Summarize varFunc Object</td></tr>
+<tr><td width="25%"><a href="summary.varFunc.html">summary.varFunc</a></td>
+<td>Summarize varFunc Object</td></tr>
+<tr><td width="25%"><a href="summary.varFunc.html">summary.varIdent</a></td>
+<td>Summarize varFunc Object</td></tr>
+<tr><td width="25%"><a href="summary.varFunc.html">summary.varPower</a></td>
+<td>Summarize varFunc Object</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Tetracycline1.html">Tetracycline1</a></td>
+<td>Pharmacokinetics of tetracycline</td></tr>
+<tr><td width="25%"><a href="Tetracycline2.html">Tetracycline2</a></td>
+<td>Pharmacokinetics of tetracycline</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="update.modelStruct.html">update.corStruct</a></td>
+<td>Update a modelStruct Object</td></tr>
+<tr><td width="25%"><a href="gls.html">update.gls</a></td>
+<td>Fit Linear Model Using Generalized Least Squares</td></tr>
+<tr><td width="25%"><a href="groupedData.html">update.groupedData</a></td>
+<td>Construct a groupedData Object</td></tr>
+<tr><td width="25%"><a href="lme.html">update.lme</a></td>
+<td>Linear Mixed-Effects Models</td></tr>
+<tr><td width="25%"><a href="lmList.html">update.lmList</a></td>
+<td>List of lm Objects with a Common Model</td></tr>
+<tr><td width="25%"><a href="update.modelStruct.html">update.modelStruct</a></td>
+<td>Update a modelStruct Object</td></tr>
+<tr><td width="25%"><a href="nlsList.html">update.nlsList</a></td>
+<td>List of nls Objects with a Common Model</td></tr>
+<tr><td width="25%"><a href="update.modelStruct.html">update.reStruct</a></td>
+<td>Update a modelStruct Object</td></tr>
+<tr><td width="25%"><a href="update.varFunc.html">update.varComb</a></td>
+<td>Update varFunc Object</td></tr>
+<tr><td width="25%"><a href="update.varFunc.html">update.varConstPower</a></td>
+<td>Update varFunc Object</td></tr>
+<tr><td width="25%"><a href="update.varFunc.html">update.varExp</a></td>
+<td>Update varFunc Object</td></tr>
+<tr><td width="25%"><a href="update.varFunc.html">update.varExpon</a></td>
+<td>Update varFunc Object</td></tr>
+<tr><td width="25%"><a href="update.varFunc.html">update.varFunc</a></td>
+<td>Update varFunc Object</td></tr>
+<tr><td width="25%"><a href="update.varFunc.html">update.varPower</a></td>
+<td>Update varFunc Object</td></tr>
+</table>
+
+<h2><a name="V">-- V --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="varClasses.html">varClasses</a></td>
+<td>Variance Function Classes</td></tr>
+<tr><td width="25%"><a href="varComb.html">varComb</a></td>
+<td>Combination of Variance Functions</td></tr>
+<tr><td width="25%"><a href="varConstPower.html">varConstPower</a></td>
+<td>Constant Plus Power Variance Function</td></tr>
+<tr><td width="25%"><a href="VarCorr.html">VarCorr</a></td>
+<td>Extract variance and correlation components</td></tr>
+<tr><td width="25%"><a href="VarCorr.html">VarCorr.lme</a></td>
+<td>Extract variance and correlation components</td></tr>
+<tr><td width="25%"><a href="VarCorr.html">VarCorr.pdBlocked</a></td>
+<td>Extract variance and correlation components</td></tr>
+<tr><td width="25%"><a href="VarCorr.html">VarCorr.pdMat</a></td>
+<td>Extract variance and correlation components</td></tr>
+<tr><td width="25%"><a href="varExp.html">varExp</a></td>
+<td>Exponential Variance Function</td></tr>
+<tr><td width="25%"><a href="varFixed.html">varFixed</a></td>
+<td>Fixed Variance Function</td></tr>
+<tr><td width="25%"><a href="varFunc.html">varFunc</a></td>
+<td>Variance Function Structure</td></tr>
+<tr><td width="25%"><a href="varIdent.html">varIdent</a></td>
+<td>Constant Variance Function</td></tr>
+<tr><td width="25%"><a href="Variogram.html">Variogram</a></td>
+<td>Calculate Semi-variogram</td></tr>
+<tr><td width="25%"><a href="Variogram.corExp.html">Variogram.corExp</a></td>
+<td>Calculate Semi-variogram for a corExp Object</td></tr>
+<tr><td width="25%"><a href="Variogram.corGaus.html">Variogram.corGaus</a></td>
+<td>Calculate Semi-variogram for a corGaus Object</td></tr>
+<tr><td width="25%"><a href="Variogram.corLin.html">Variogram.corLin</a></td>
+<td>Calculate Semi-variogram for a corLin Object</td></tr>
+<tr><td width="25%"><a href="Variogram.corRatio.html">Variogram.corRatio</a></td>
+<td>Calculate Semi-variogram for a corRatio Object</td></tr>
+<tr><td width="25%"><a href="Variogram.corSpatial.html">Variogram.corSpatial</a></td>
+<td>Calculate Semi-variogram for a corSpatial Object</td></tr>
+<tr><td width="25%"><a href="Variogram.corSpher.html">Variogram.corSpher</a></td>
+<td>Calculate Semi-variogram for a corSpher Object</td></tr>
+<tr><td width="25%"><a href="Variogram.default.html">Variogram.default</a></td>
+<td>Calculate Semi-variogram</td></tr>
+<tr><td width="25%"><a href="Variogram.gls.html">Variogram.gls</a></td>
+<td>Calculate Semi-variogram for Residuals from a gls Object</td></tr>
+<tr><td width="25%"><a href="Variogram.lme.html">Variogram.lme</a></td>
+<td>Calculate Semi-variogram for Residuals from an lme Object</td></tr>
+<tr><td width="25%"><a href="varPower.html">varPower</a></td>
+<td>Power Variance Function</td></tr>
+<tr><td width="25%"><a href="varWeights.html">varWeights</a></td>
+<td>Extract Variance Function Weights</td></tr>
+<tr><td width="25%"><a href="varWeights.glsStruct.html">varWeights.glsStruct</a></td>
+<td>Variance Weights for glsStruct Object</td></tr>
+<tr><td width="25%"><a href="varWeights.lmeStruct.html">varWeights.lmeStruct</a></td>
+<td>Variance Weights for lmeStruct Object</td></tr>
+<tr><td width="25%"><a href="varWeights.html">varWeights.varComb</a></td>
+<td>Extract Variance Function Weights</td></tr>
+<tr><td width="25%"><a href="varWeights.html">varWeights.varFunc</a></td>
+<td>Extract Variance Function Weights</td></tr>
+</table>
+
+<h2><a name="W">-- W --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Wafer.html">Wafer</a></td>
+<td>Modeling of Analog MOS Circuits</td></tr>
+<tr><td width="25%"><a href="Wheat.html">Wheat</a></td>
+<td>Yields by growing conditions</td></tr>
+<tr><td width="25%"><a href="Wheat2.html">Wheat2</a></td>
+<td>Wheat Yield Trials</td></tr>
+</table>
+
+<h2><a name="misc">-- misc --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="groupedData.html">[.groupedData</a></td>
+<td>Construct a groupedData Object</td></tr>
+<tr><td width="25%"><a href="Extract.pdMat.html">[.pdBlocked</a></td>
+<td>Subscript a pdMat Object</td></tr>
+<tr><td width="25%"><a href="Extract.pdMat.html">[.pdMat</a></td>
+<td>Subscript a pdMat Object</td></tr>
+<tr><td width="25%"><a href="reStruct.html">[.reStruct</a></td>
+<td>Random Effects Structure</td></tr>
+<tr><td width="25%"><a href="Extract.pdMat.html">[&lt;-.pdMat</a></td>
+<td>Subscript a pdMat Object</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/nlme/html/R.css b/win32/deps/library/nlme/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/nlme/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/nlme/libs/i386/nlme.dll b/win32/deps/library/nlme/libs/i386/nlme.dll
new file mode 100644
index 0000000..5d2cfba
Binary files /dev/null and b/win32/deps/library/nlme/libs/i386/nlme.dll differ
diff --git a/win32/deps/library/nlme/po/de/LC_MESSAGES/R-nlme.mo b/win32/deps/library/nlme/po/de/LC_MESSAGES/R-nlme.mo
new file mode 100644
index 0000000..260dbba
Binary files /dev/null and b/win32/deps/library/nlme/po/de/LC_MESSAGES/R-nlme.mo differ
diff --git a/win32/deps/library/nlme/po/de/LC_MESSAGES/nlme.mo b/win32/deps/library/nlme/po/de/LC_MESSAGES/nlme.mo
new file mode 100644
index 0000000..3e95d46
Binary files /dev/null and b/win32/deps/library/nlme/po/de/LC_MESSAGES/nlme.mo differ
diff --git a/win32/deps/library/nlme/po/en quot/LC_MESSAGES/R-nlme.mo b/win32/deps/library/nlme/po/en quot/LC_MESSAGES/R-nlme.mo
new file mode 100644
index 0000000..f7f8994
Binary files /dev/null and b/win32/deps/library/nlme/po/en quot/LC_MESSAGES/R-nlme.mo differ
diff --git a/win32/deps/library/nlme/po/en quot/LC_MESSAGES/nlme.mo b/win32/deps/library/nlme/po/en quot/LC_MESSAGES/nlme.mo
new file mode 100644
index 0000000..566ec7e
Binary files /dev/null and b/win32/deps/library/nlme/po/en quot/LC_MESSAGES/nlme.mo differ
diff --git a/win32/deps/library/nlme/po/fr/LC_MESSAGES/R-nlme.mo b/win32/deps/library/nlme/po/fr/LC_MESSAGES/R-nlme.mo
new file mode 100644
index 0000000..deba941
Binary files /dev/null and b/win32/deps/library/nlme/po/fr/LC_MESSAGES/R-nlme.mo differ
diff --git a/win32/deps/library/nlme/po/fr/LC_MESSAGES/nlme.mo b/win32/deps/library/nlme/po/fr/LC_MESSAGES/nlme.mo
new file mode 100644
index 0000000..be27d68
Binary files /dev/null and b/win32/deps/library/nlme/po/fr/LC_MESSAGES/nlme.mo differ
diff --git a/win32/deps/library/nlme/po/pl/LC_MESSAGES/R-nlme.mo b/win32/deps/library/nlme/po/pl/LC_MESSAGES/R-nlme.mo
new file mode 100644
index 0000000..4ac8326
Binary files /dev/null and b/win32/deps/library/nlme/po/pl/LC_MESSAGES/R-nlme.mo differ
diff --git a/win32/deps/library/nlme/po/pl/LC_MESSAGES/nlme.mo b/win32/deps/library/nlme/po/pl/LC_MESSAGES/nlme.mo
new file mode 100644
index 0000000..798857c
Binary files /dev/null and b/win32/deps/library/nlme/po/pl/LC_MESSAGES/nlme.mo differ
diff --git a/win32/deps/library/nlme/tests/anova.gls.R b/win32/deps/library/nlme/tests/anova.gls.R
new file mode 100644
index 0000000..b03c827
--- /dev/null
+++ b/win32/deps/library/nlme/tests/anova.gls.R
@@ -0,0 +1,22 @@
+## Example of scoping problem.
+## Originally from a report by Markus Jantti:
+## https://stat.ethz.ch/pipermail/r-help/2005-November/081382.html
+library(nlme)
+## 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))
+# variance changes with a power of the absolute fitted values?
+fm2 <- update(fm1, weights = varPower())
+anova(fm1, fm2)
+
+## now define a little function
+dummy <- function(obj) anova(obj[[1]], obj[[2]])
+dummy(list(fm1, fm2))
+## last failed < 3.1-66
+
+## PR#13567
+fm1Orth.gls <- gls(distance ~ Sex * I(age - 11), Orthodont,
+                   correlation = corSymm(form = ~ 1 | Subject),
+                   weights = varIdent(form = ~ 1 | age))
+anova(fm1Orth.gls, Terms = "Sex")
diff --git a/win32/deps/library/nlme/tests/augPred_lab.R b/win32/deps/library/nlme/tests/augPred_lab.R
new file mode 100644
index 0000000..2cc07af
--- /dev/null
+++ b/win32/deps/library/nlme/tests/augPred_lab.R
@@ -0,0 +1,14 @@
+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
diff --git a/win32/deps/library/nlme/tests/augPredmissing.R b/win32/deps/library/nlme/tests/augPredmissing.R
new file mode 100644
index 0000000..9dbaeb0
--- /dev/null
+++ b/win32/deps/library/nlme/tests/augPredmissing.R
@@ -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))
diff --git a/win32/deps/library/nlme/tests/coef.R b/win32/deps/library/nlme/tests/coef.R
new file mode 100644
index 0000000..19da9b6
--- /dev/null
+++ b/win32/deps/library/nlme/tests/coef.R
@@ -0,0 +1,14 @@
+## 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)
+str(vfi)
+coef(vfi)
+coef(vfi, unconstrained = FALSE, allCoef = TRUE)
+vfiCopy <- vfi        # copy of an initialized object
+length(vfiCopy)             # length is 2
+coef(vfiCopy) <- c(11,12)   # error in 3.1-84
+
+## error in 3.1-84
+gls.error  <- gls(distance ~ age, weights = vfi, data=Orthodont)
diff --git a/win32/deps/library/nlme/tests/contrMat.R b/win32/deps/library/nlme/tests/contrMat.R
new file mode 100644
index 0000000..42e8a3e
--- /dev/null
+++ b/win32/deps/library/nlme/tests/contrMat.R
@@ -0,0 +1,40 @@
+## problem reported by Christian Ritz on R-help, Tue, 20 Mar 2007 14:55:38
+
+## Dataset PestSci from package drc
+PestSci <-
+data.frame(CURVE = rep(1:5, each=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)
+
+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)
+
+## failed in contrMat in 3.1-78
diff --git a/win32/deps/library/nlme/tests/data.frame.R b/win32/deps/library/nlme/tests/data.frame.R
new file mode 100644
index 0000000..cef3fa9
--- /dev/null
+++ b/win32/deps/library/nlme/tests/data.frame.R
@@ -0,0 +1,4 @@
+library(nlme)
+subs<-rep(LETTERS[1:10],rep(3,10))
+resp<-rnorm(30)
+groupedData(resp~1|subs)
diff --git a/win32/deps/library/nlme/tests/deparse.R b/win32/deps/library/nlme/tests/deparse.R
new file mode 100644
index 0000000..3a01197
--- /dev/null
+++ b/win32/deps/library/nlme/tests/deparse.R
@@ -0,0 +1,171 @@
+# Tests to make sure that the deparse(as.vector(x)) construction is not
+# tripping us up again.
+
+library(nlme)
+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
+
+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
+
+## 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
diff --git a/win32/deps/library/nlme/tests/getData.R b/win32/deps/library/nlme/tests/getData.R
new file mode 100644
index 0000000..50b5583
--- /dev/null
+++ b/win32/deps/library/nlme/tests/getData.R
@@ -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))
diff --git a/win32/deps/library/nlme/tests/gls.R b/win32/deps/library/nlme/tests/gls.R
new file mode 100644
index 0000000..1ae924c
--- /dev/null
+++ b/win32/deps/library/nlme/tests/gls.R
@@ -0,0 +1,24 @@
+## 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)
+Variogram(fm1, form = ~ Time | Rat)[1:10,]
+## failed in 3.1-89
diff --git a/win32/deps/library/nlme/tests/lmList.R b/win32/deps/library/nlme/tests/lmList.R
new file mode 100644
index 0000000..fbb0c2a
--- /dev/null
+++ b/win32/deps/library/nlme/tests/lmList.R
@@ -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)
diff --git a/win32/deps/library/nlme/tests/lme.R b/win32/deps/library/nlme/tests/lme.R
new file mode 100644
index 0000000..d335692
--- /dev/null
+++ b/win32/deps/library/nlme/tests/lme.R
@@ -0,0 +1,37 @@
+library(nlme)
+fm1 <- lmList(Oxboys)
+fm1
+fm2 <- lme(fm1)
+fm2
+
+# bug report from Arne Mueller sanofi-aventis com
+mod <- distance ~ age + Sex
+fm3 <- lme(mod, Orthodont, random = ~ 1)
+predict(fm3, Orthodont)
+
+## bug report and fix from Dimitris Rizopoulos and Spencer Graves:
+## when 'returnObject = TRUE', do not stop() but give warning() on non-convergence:
+fm1 <- lme(distance ~ age, data = Orthodont,
+	   control = lmeControl(msMaxIter = 1, returnObject = TRUE))
+
+## based on bug report on R-help
+predict(fm3, Orthodont[1,])
+# failed in 3.1-88
+
+## 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)
diff --git a/win32/deps/library/nlme/tests/lme.Rout.save b/win32/deps/library/nlme/tests/lme.Rout.save
new file mode 100644
index 0000000..edfb703
--- /dev/null
+++ b/win32/deps/library/nlme/tests/lme.Rout.save
@@ -0,0 +1,146 @@
+
+R Under development (unstable) (2011-07-19 r56420)
+Copyright (C) 2011 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+Platform: x86_64-apple-darwin9.8.0/x86_64 (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)
+> fm1 <- lmList(Oxboys)
+> fm1
+Call:
+  Model: height ~ age | Subject 
+   Data: Oxboys 
+
+Coefficients:
+   (Intercept)      age
+10    130.2616 3.722915
+26    137.9927 5.588783
+25    139.2105 4.024081
+9     138.1369 6.009057
+2     142.8584 5.440176
+6     146.7908 3.963171
+7     146.1279 4.990050
+17    142.9777 8.611780
+16    147.5447 4.545196
+15    144.2759 7.124260
+8     148.2929 6.464712
+20    151.4707 4.374466
+1     148.1203 7.178151
+18    151.1804 5.957793
+5     151.4293 6.246128
+23    151.0645 7.185123
+11    150.0467 8.506082
+21    150.5210 7.497794
+3     155.6508 4.774669
+24    153.1404 6.764705
+22    154.5670 8.087514
+12    156.8106 7.015468
+13    156.0714 8.493806
+14    159.4738 8.670886
+19    164.5761 9.065620
+4     165.0724 9.360561
+
+Degrees of freedom: 234 total; 182 residual
+Residual standard error: 0.6598878
+> fm2 <- lme(fm1)
+> fm2
+Linear mixed-effects model fit by REML
+  Data: Oxboys 
+  Log-restricted-likelihood: -362.0455
+  Fixed: height ~ age 
+(Intercept)         age 
+ 149.371753    6.525469 
+
+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 
+> 
+> # bug report from Arne Mueller sanofi-aventis com
+> mod <- distance ~ age + Sex
+> fm3 <- lme(mod, Orthodont, random = ~ 1)
+> predict(fm3, Orthodont)
+     M01      M01      M01      M01      M02      M02      M02      M02 
+25.39237 26.71274 28.03311 29.35348 21.61052 22.93089 24.25126 25.57163 
+     M03      M03      M03      M03      M04      M04      M04      M04 
+22.36689 23.68726 25.00763 26.32800 24.41990 25.74027 27.06064 28.38101 
+     M05      M05      M05      M05      M06      M06      M06      M06 
+21.28636 22.60673 23.92710 25.24747 24.20379 25.52416 26.84453 28.16490 
+     M07      M07      M07      M07      M08      M08      M08      M08 
+21.93468 23.25505 24.57542 25.89579 22.04273 23.36310 24.68347 26.00384 
+     M09      M09      M09      M09      M10      M10      M10      M10 
+23.12326 24.44363 25.76400 27.08437 26.90511 28.22548 29.54585 30.86622 
+     M11      M11      M11      M11      M12      M12      M12      M12 
+21.82663 23.14700 24.46737 25.78774 22.36689 23.68726 25.00763 26.32800 
+     M13      M13      M13      M13      M14      M14      M14      M14 
+22.36689 23.68726 25.00763 26.32800 22.90715 24.22753 25.54790 26.86827 
+     M15      M15      M15      M15      M16      M16      M16      M16 
+23.77158 25.09195 26.41232 27.73269 21.28636 22.60673 23.92710 25.24747 
+     F01      F01      F01      F01      F02      F02      F02      F02 
+19.56700 20.88737 22.20774 23.52811 20.97168 22.29205 23.61243 24.93280 
+     F03      F03      F03      F03      F04      F04      F04      F04 
+21.62000 22.94037 24.26074 25.58111 22.59248 23.91285 25.23322 26.55359 
+     F05      F05      F05      F05      F06      F06      F06      F06 
+20.64753 21.96790 23.28827 24.60864 19.35089 20.67126 21.99163 23.31200 
+     F07      F07      F07      F07      F08      F08      F08      F08 
+20.97168 22.29205 23.61243 24.93280 21.29584 22.61621 23.93658 25.25695 
+     F09      F09      F09      F09      F10      F10      F10      F10 
+19.35089 20.67126 21.99163 23.31200 17.08178 18.40215 19.72252 21.04289 
+     F11      F11      F11      F11 
+23.88911 25.20948 26.52985 27.85022 
+attr(,"label")
+[1] "Predicted values (mm)"
+> 
+> ## bug report and fix from Dimitris Rizopoulos and Spencer Graves:
+> ## when 'returnObject = TRUE', do not stop() but give warning() on non-convergence:
+> fm1 <- lme(distance ~ age, data = Orthodont,
++ 	   control = lmeControl(msMaxIter = 1, returnObject = TRUE))
+Warning message:
+In lme.formula(distance ~ age, data = Orthodont, control = lmeControl(msMaxIter = 1,  :
+  nlminb problem, convergence error code = 1
+  message = iteration limit reached without convergence (10)
+> 
+> ## based on bug report on R-help
+> predict(fm3, Orthodont[1,])
+     M01 
+25.39237 
+attr(,"label")
+[1] "Predicted values (mm)"
+> # failed in 3.1-88
+> 
+> ## 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)
+> 
diff --git a/win32/deps/library/nlme/tests/missing.R b/win32/deps/library/nlme/tests/missing.R
new file mode 100644
index 0000000..a513cf7
--- /dev/null
+++ b/win32/deps/library/nlme/tests/missing.R
@@ -0,0 +1,26 @@
+library(nlme)
+
+options(digits=4) # avoid 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)
diff --git a/win32/deps/library/nlme/tests/missing.Rout.save b/win32/deps/library/nlme/tests/missing.Rout.save
new file mode 100644
index 0000000..1f0b47a
--- /dev/null
+++ b/win32/deps/library/nlme/tests/missing.Rout.save
@@ -0,0 +1,791 @@
+
+R version 2.6.0 Under development (unstable) (2007-06-13 r41937)
+Copyright (C) 2007 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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=4) # avoid 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 
+    NA 12.856 12.061 11.271 10.551  9.960  9.544  9.338  9.359  9.604 10.054 
+    12     13     14     15     16     17     18     19     20     21     22 
+10.673 11.410 12.205 12.995 13.715 14.307 14.722 14.928 14.907 14.662 14.212 
+    23     24     25     26     27     28     29     30     31     32     33 
+13.593 12.856 12.061 11.271 10.551  9.960  9.544 13.794 13.010 12.141 11.271 
+    34     35     36     37     38     39     40     41     42     43     44 
+10.485  9.861  9.459  9.319  9.454  9.852 10.473 11.256 12.125 12.995 13.781 
+    45     46     47     48     49     50     51     52     53     54     55 
+14.405 14.807 14.947 14.812 14.414 13.794 13.010 12.141 11.271 10.485  9.861 
+    56     57     58     59     60     61     62     63     64     65     66 
+ 9.459 13.904 13.098 12.188 11.271 10.448  9.807  9.419  9.325  9.535 10.026 
+    67     68     69     70     71     72     73     74     75     76     77 
+10.746 11.616 12.542 13.424 14.166 14.688 14.933 14.874 14.518 13.904 13.098 
+    78     79     80     81     82     83     84     85     86     87     88 
+12.188 11.271 10.448  9.807  9.419 13.593 12.856 12.061 11.271 10.551  9.960 
+    89     90     91     92     93     94     95     96     97     98     99 
+ 9.544  9.338  9.359  9.604 10.054 10.673 11.410 12.205 12.995 13.715 14.307 
+   100    101    102    103    104    105    106    107    108    109    110 
+14.722 14.928 14.907 14.662 14.212 13.593 12.856 12.061 11.271 10.551  9.960 
+   111    112    113    114    115    116    117    118    119    120    121 
+ 9.544 13.593 12.856 12.061 11.271 10.551  9.960  9.544  9.338  9.359  9.604 
+   122    123    124    125    126    127    128    129    130    131    132 
+10.054 10.673 11.410 12.205 12.995 13.715 14.307 14.722 14.928 14.907 14.662 
+   133    134    135    136    137    138    139    140    141    142    143 
+14.212 13.593 12.856 12.061 11.271 10.551  9.960  9.544 13.593 12.856 12.061 
+   144    145    146    147    148    149    150    151    152    153    154 
+11.271 10.551  9.960  9.544  9.338  9.359  9.604 10.054 10.673 11.410 12.205 
+   155    156    157    158    159    160    161    162    163    164    165 
+12.995 13.715 14.307 14.722 14.928 14.907 14.662 14.212 13.593 12.856 12.061 
+   166    167    168    169    170    171    172    173    174    175    176 
+11.271 10.551  9.960  9.544 13.794 13.010 12.141 11.271 10.485  9.861  9.459 
+   177    178    179    180    181    182    183    184    185    186    187 
+ 9.319  9.454  9.852 10.473 11.256 12.125 12.995 13.781 14.405 14.807 14.947 
+   188    189    190    191    192    193    194    195    196    197    198 
+14.812 14.414 13.794 13.010 12.141 11.271 10.485  9.861  9.459 13.418 12.726 
+   199    200    201    202    203    204    205    206    207    208    209 
+11.994 11.271 10.607 10.047  9.629  9.382  9.322  9.454  9.769 10.244 10.848 
+   210    211    212    213    214    215    216    217    218    219    220 
+11.540 12.272 12.995 13.659 14.219 14.637 14.884 14.944 14.812 14.498 14.022 
+   221    222    223    224    225    226    227    228    229    230    231 
+13.418 12.726 11.994 11.271 10.607 10.047  9.629 14.022 13.195 12.239 11.271 
+   232    233    234    235    236    237    238    239    240    241    242 
+10.407  9.751  9.382  9.345  9.645 10.244 11.072 12.027 12.995 13.859 14.515 
+   243    244    245    246    247    248    249    250    251    252    253 
+14.884 14.921 14.622 14.022 13.195 12.239 11.271 10.407  9.751  9.382 13.593 
+   254    255    256    257    258    259    260    261    262    263    264 
+12.856 12.061 11.271 10.551  9.960  9.544  9.338  9.359  9.604 10.054 10.673 
+   265    266    267    268    269    270    271    272    273    274    275 
+11.410 12.205 12.995 13.715 14.307 14.722 14.928     NA 14.662 14.212 13.593 
+   276    277    278    279    280    281    282    283    284    285    286 
+12.856 12.061 11.271 10.551  9.960  9.544 13.794 13.010 12.141 11.271 10.485 
+   287    288    289    290    291    292    293    294    295    296    297 
+ 9.861  9.459  9.319  9.454  9.852 10.473 11.256 12.125 12.995 13.781 14.405 
+   298    299    300    301    302    303    304    305    306    307    308 
+14.807 14.947 14.812 14.414 13.794 13.010 12.141 11.271 10.485  9.861  9.459 
+attr(,"label")
+[1] "Fitted values"
+> residuals(fm1)
+        1         2         3         4         5         6         7         8 
+       NA   2.14386   6.93937   4.72901   2.44882   0.04046   2.45603   4.66184 
+        9        10        11        12        13        14        15        16 
+  3.64122  10.39585  11.94560   4.32695   6.59002   4.79451   1.00487   4.28507 
+       17        18        19        20        21        22        23        24 
+ -0.30658   1.27786   2.07205   3.09266   3.33803   2.78828   0.40693  -0.85614 
+       25        26        27        28        29        30        31        32 
+ -0.06063   2.72901  -0.55118   1.04046   6.45603  -7.79359  -7.01022  -4.14099 
+       33        34        35        36        37        38        39        40 
+ -4.27099   5.51463   0.13897   3.54090  -0.31891  -2.45420  -3.85170  -2.47253 
+       41        42        43        44        45        46        47        48 
+ -3.25589  -6.12512  -4.99513  -6.78075  -5.40508  -8.80702 -10.94720  -9.81192 
+       49        50        51        52        53        54        55        56 
+ -6.41441  -2.79359  -0.01022  -2.14099  -5.27099  -3.48537  -3.86103  -4.45910 
+       57        58        59        60        61        62        63        64 
+ -0.90420  -2.09816  -2.18752  -5.27099  -2.44787  -3.80737  -0.41890  -0.32454 
+       65        66        67        68        69        70        71        72 
+  0.46546  -2.02612   3.25398   1.38377   1.45755   2.57570   5.83377   6.31217 
+       73        74        75        76        77        78        79        80 
+ 10.06742   8.12604   4.48168   8.09580   2.90184   8.81248   7.72901   9.55213 
+       81        82        83        84        85        86        87        88 
+  7.19263  14.58110  -4.59307  -3.85614  -5.06063  -5.27099  -3.55118  -3.95954 
+       89        90        91        92        93        94        95        96 
+ -8.54397  -8.33816  -8.35878  -4.60415  -4.05440  -7.67305  -6.40998  -9.20549 
+       97        98        99       100       101       102       103       104 
+ -6.99513  -5.71493  -8.30658  -9.72214  -8.92795  -6.90734  -3.66197  -0.21172 
+      105       106       107       108       109       110       111       112 
+ -5.59307  -3.85614  -2.06063  -4.27099  -3.55118  -3.95954   1.45603  -3.59307 
+      113       114       115       116       117       118       119       120 
+ -0.85614  -0.06063   5.72901  -1.55118   0.04046  -6.54397   2.66184   3.64122 
+      121       122       123       124       125       126       127       128 
+ -0.60415  -6.05440  -3.67305  -7.40998  -0.20549   1.00487  -1.71493   0.69342 
+      129       130       131       132       133       134       135       136 
+  2.27786   0.07205  -1.90734   3.33803   4.78828  -0.59307  -3.85614  -0.06063 
+      137       138       139       140       141       142       143       144 
+ -3.27099  -0.55118  -4.95954   4.45603   2.40693   4.14386   0.93937   5.72901 
+      145       146       147       148       149       150       151       152 
+  4.44882  -0.95954  -1.54397  -4.33816  -0.35878  -1.60415  -2.05440   2.32695 
+      153       154       155       156       157       158       159       160 
+  2.59002   0.79451   1.00487   0.28507  -3.30658   2.27786   6.07205   6.09266 
+      161       162       163       164       165       166       167       168 
+  6.33803   5.78828   3.40693   5.14386   9.93937  -1.27099   0.44882   1.04046 
+      169       170       171       172       173       174       175       176 
+  2.45603   4.20641  -0.01022   1.85901   0.72901   0.51463  -1.86103  -4.45910 
+      177       178       179       180       181       182       183       184 
+ -1.31891   0.54580   1.14830  -0.47253   0.74411  -2.12512  -3.99513  -1.78075 
+      185       186       187       188       189       190       191       192 
+ -0.40508   1.19298  -1.94720  -3.81192  -1.41441  -0.79359  -2.01022  -1.14099 
+      193       194       195       196       197       198       199       200 
+ -3.27099   3.51463  -5.86103  -2.45910  -0.41772  -3.72591   3.00630   3.72901 
+      201       202       203       204       205       206       207       208 
+  1.39298  -2.04705   0.37076  -3.38206  -0.32236  -1.45420   0.23140  -4.24413 
+      209       210       211       212       213       214       215       216 
+ -2.84839   1.45980  -0.27241  -0.99513   1.34090   6.78094  10.36312   6.11594 
+      217       218       219       220       221       222       223       224 
+  6.05624   9.18808   5.50248   5.97801   4.58228   7.27409   8.00630   7.72901 
+      225       226       227       228       229       230       231       232 
+  1.39298  -3.04706  -1.62924  -4.02199   0.80539  -0.23920  -1.27099  -3.40675 
+      233       234       235       236       237       238       239       240 
+  2.24927   0.61794  -1.34520   0.35541   4.75587   3.92850  -0.02691   6.00487 
+      241       242       243       244       245       246       247       248 
+  1.14063   1.48462   0.11594   2.07908  -0.62153   1.97801   1.80539  -1.23920 
+      249       250       251       252       253       254       255       256 
+ -1.27099  -3.40675  -5.75074  -1.38206  -2.59307   3.14386   2.93937   0.72901 
+      257       258       259       260       261       262       263       264 
+  0.44882  -3.95954   1.45603   2.66184   1.64122   6.39585   4.94560   0.32695 
+      265       266       267       268       269       270       271       272 
+ -4.40998   1.79451   7.00487   8.28507   8.69342   6.27786   6.07205        NA 
+      273       274       275       276       277       278       279       280 
+  7.33803   7.78828   3.40693   4.14386   4.93937   5.72901   3.44882   2.04046 
+      281       282       283       284       285       286       287       288 
+  1.45603  -4.79359  -5.01022  -4.14099  -3.27099  -2.48537  -3.86103  -2.45910 
+      289       290       291       292       293       294       295       296 
+ -1.31891   0.54580   0.14830   3.52747   1.74411  -4.12512  -4.99513  -5.78075 
+      297       298       299       300       301       302       303       304 
+ -5.40508   1.19298  -2.94720  -4.81192  -2.41441  -1.79359  -4.01022  -6.14099 
+      305       306       307       308 
+ -2.27099  -3.48537  -4.86103  -4.45910 
+attr(,"std")
+  [1]    NA 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+ [13] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+ [25] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+ [37] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+ [49] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+ [61] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+ [73] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+ [85] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+ [97] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[109] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[121] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[133] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[145] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[157] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[169] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[181] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[193] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[205] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[217] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[229] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[241] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[253] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[265] 4.581 4.581 4.581 4.581 4.581 4.581 4.581    NA 4.581 4.581 4.581 4.581
+[277] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[289] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+[301] 4.581 4.581 4.581 4.581 4.581 4.581 4.581 4.581
+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.1
+
+Correlation Structure: AR(1)
+ Formula: ~1 | Mare 
+ Parameter estimate(s):
+   Phi 
+0.7498 
+
+Coefficients:
+                    Value Std.Error t-value p-value
+(Intercept)        12.133    0.6574  18.456  0.0000
+sin(2 * pi * Time) -2.679    0.6436  -4.162  0.0000
+cos(2 * pi * Time) -0.862    0.6902  -1.249  0.2126
+
+ 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.38972 -0.75655 -0.01324  0.63960  3.18298 
+
+Residual standard error: 4.581 
+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   22.95   25.35
+2   24.30   26.69
+3   25.64   28.04
+4   26.98   29.38
+5   22.95   21.58
+6   24.30   22.92
+7   25.64   24.27
+8   26.98   25.61
+9   22.95   22.34
+10  24.30   23.68
+11  25.64   25.02
+12  26.98   26.36
+13  22.95   24.38
+14  24.30   25.72
+15  25.64   27.07
+16  26.98   28.41
+17  22.95   21.26
+18  24.30   22.60
+19  25.64   23.94
+20  26.98   25.29
+21  22.95   24.17
+22  24.30   25.51
+23  25.64   26.85
+24  26.98   28.19
+25  22.95   21.90
+26  24.30   23.25
+27  25.64   24.59
+28  26.98   25.93
+29  22.95   22.01
+30  24.30   23.35
+31  25.64   24.70
+32  26.98   26.04
+33  22.95   23.09
+34  24.30   24.43
+35  25.64   25.77
+36  26.98   27.12
+37  22.95   26.86
+38  24.30   28.20
+39  25.64   29.55
+40  26.98   30.89
+41  22.95   21.80
+42  24.30   23.14
+43  25.64   24.48
+44  26.98   25.82
+45  22.95   22.34
+46  24.30   23.68
+47  25.64   25.02
+48  26.98   26.36
+49  22.95   22.34
+50  24.30   23.68
+51  25.64   25.02
+52  26.98   26.36
+53  22.95   22.87
+54  24.30   24.22
+55  25.64   25.56
+56  26.98   26.90
+57  22.95   23.74
+58  24.30   25.08
+59  25.64   26.42
+60  26.98   27.76
+61  22.95   21.26
+62  24.30   22.60
+63  25.64   23.94
+64  26.98   25.29
+65  20.69   19.54
+66  22.03   20.89
+67  23.37   22.23
+68  24.71   23.57
+69  20.69   20.94
+70  22.03   22.29
+71  23.37   23.63
+72  24.71   24.97
+73  20.69   21.59
+74  22.03   22.93
+75  23.37   24.28
+76  24.71   25.62
+77  20.69   22.56
+78  22.03   23.90
+79  23.37   25.25
+80  24.71   26.59
+81  20.69   20.62
+82  22.03   21.96
+83  23.37   23.31
+84  24.71   24.65
+85  20.69   19.33
+86  22.03   20.67
+87  23.37   22.01
+88  24.71   23.36
+89  20.69   20.94
+90  22.03   22.29
+91  23.37   23.63
+92  24.71   24.97
+93  20.69   21.27
+94  22.03   22.61
+95  23.37   23.95
+96  24.71   25.30
+97  20.69   19.84
+98  22.03   21.18
+99  23.37   22.52
+100    NA      NA
+101    NA      NA
+102    NA      NA
+103 23.37   19.74
+104 24.71   21.08
+105 20.69   23.85
+106 22.03   25.20
+107 23.37   26.54
+108 24.71   27.88
+> fitted(fm2)
+  M01   M01   M01   M01   M02   M02   M02   M02   M03   M03   M03   M03   M04 
+25.35 26.69 28.04 29.38 21.58 22.92 24.27 25.61 22.34 23.68 25.02 26.36 24.38 
+  M04   M04   M04   M05   M05   M05   M05   M06   M06   M06   M06   M07   M07 
+25.72 27.07 28.41 21.26 22.60 23.94 25.29 24.17 25.51 26.85 28.19 21.90 23.25 
+  M07   M07   M08   M08   M08   M08   M09   M09   M09   M09   M10   M10   M10 
+24.59 25.93 22.01 23.35 24.70 26.04 23.09 24.43 25.77 27.12 26.86 28.20 29.55 
+  M10   M11   M11   M11   M11   M12   M12   M12   M12   M13   M13   M13   M13 
+30.89 21.80 23.14 24.48 25.82 22.34 23.68 25.02 26.36 22.34 23.68 25.02 26.36 
+  M14   M14   M14   M14   M15   M15   M15   M15   M16   M16   M16   M16   F01 
+22.87 24.22 25.56 26.90 23.74 25.08 26.42 27.76 21.26 22.60 23.94 25.29 19.54 
+  F01   F01   F01   F02   F02   F02   F02   F03   F03   F03   F03   F04   F04 
+20.89 22.23 23.57 20.94 22.29 23.63 24.97 21.59 22.93 24.28 25.62 22.56 23.90 
+  F04   F04   F05   F05   F05   F05   F06   F06   F06   F06   F07   F07   F07 
+25.25 26.59 20.62 21.96 23.31 24.65 19.33 20.67 22.01 23.36 20.94 22.29 23.63 
+  F07   F08   F08   F08   F08   F09   F09   F09  <NA>  <NA>  <NA>   F10   F10 
+24.97 21.27 22.61 23.95 25.30 19.84 21.18 22.52    NA    NA    NA 19.74 21.08 
+  F11   F11   F11   F11 
+23.85 25.20 26.54 27.88 
+attr(,"label")
+[1] "Fitted values (mm)"
+> residuals(fm2, 0:1)
+       fixed   Subject
+1    3.04531  0.648269
+2    0.70260 -1.694434
+3    3.35990  0.962862
+4    4.01719  1.620159
+5   -1.45469 -0.081112
+6   -1.79740 -0.423816
+7   -2.64010 -1.266519
+8   -0.48281  0.890777
+9    0.04531  0.664764
+10  -1.79740 -1.177940
+11  -1.64010 -1.020643
+12   0.51719  1.136654
+13   2.54531  1.117857
+14   3.20260  1.775153
+15   0.85990 -0.567550
+16   0.01719 -1.410254
+17  -2.95469 -1.257916
+18  -0.79740  0.899380
+19  -3.14010 -1.443323
+20  -0.98281  0.713973
+21   1.54531  0.333321
+22   1.20260 -0.009383
+23   1.35990  0.147914
+24   1.51719  0.305210
+25  -0.95469  0.095692
+26  -2.29740 -1.247012
+27  -1.14010 -0.089715
+28  -0.48281  0.567581
+29   1.04531  1.987960
+30  -2.79740 -1.854744
+31  -1.14010 -0.197447
+32  -1.48281 -0.540150
+33   0.04531 -0.089360
+34  -3.79740 -3.932063
+35   5.35990  5.225233
+36  -0.98281 -1.117470
+37   4.54531  0.640022
+38   3.70260 -0.202682
+39   5.35990  1.454615
+40   4.51719  0.611911
+41   0.04531  1.203424
+42  -1.29740 -0.139280
+43  -2.14010 -0.981983
+44  -1.98281 -0.824687
+45  -1.45469 -0.835236
+46  -0.79740 -0.177940
+47  -1.64010 -1.020643
+48   1.01719  1.636654
+49  -5.95469 -5.335236
+50   0.20260  0.822060
+51   0.35990  0.979357
+52   2.51719  3.136654
+53  -0.45469 -0.373896
+54   1.20260  1.283401
+55  -0.14010 -0.059303
+56  -0.98281 -0.902006
+57   0.04531 -0.735752
+58   0.20260 -0.578455
+59   0.35990 -0.421158
+60   3.01719  2.236138
+61  -0.95469  0.742084
+62  -2.79740 -1.100620
+63  -2.14010 -0.443323
+64  -1.98281 -0.286027
+65   0.31353  1.455942
+66  -2.02917 -0.886762
+67  -1.87187 -0.729465
+68  -1.71458 -0.572168
+69   0.31353  0.055426
+70  -0.52917 -0.787277
+71   0.62813  0.370020
+72   0.78542  0.527316
+73  -0.18647 -1.090965
+74   1.97083  1.066331
+75   1.12813  0.223628
+76   1.28542  0.380924
+77   2.81353  0.939447
+78   2.47083  0.596743
+79   1.62813 -0.245960
+80   1.78542 -0.088663
+81   0.81353  0.878622
+82   0.97083  1.035919
+83  -0.87187 -0.806785
+84  -1.21458 -1.149488
+85  -0.68647  0.671406
+86  -1.02917  0.328702
+87  -2.37187 -1.014001
+88  -2.21458 -0.856704
+89   0.81353  0.555426
+90   0.47083  0.212723
+91  -0.37187 -0.629980
+92   0.28542  0.027316
+93   2.31353  1.732230
+94   0.97083  0.389527
+95   0.12813 -0.453176
+96  -0.71458 -1.295880
+97  -0.68647  0.161483
+98  -1.02917 -0.181220
+99  -1.37187 -0.523924
+100       NA        NA
+101       NA        NA
+102       NA        NA
+103 -4.37187 -0.742221
+104 -5.21458 -1.584924
+105  3.81353  0.646663
+106  2.97083 -0.196040
+107  4.62813  1.461257
+108  3.28542  0.118553
+> 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
+  436.5 449.7 -213.3
+
+Random effects:
+ Formula: ~1 | Subject
+        (Intercept) Residual
+StdDev:       1.797    1.439
+
+Fixed effects: distance ~ age + Sex 
+             Value Std.Error DF t-value p-value
+(Intercept) 17.584    0.8503 77  20.679  0.0000
+age          0.671    0.0636 77  10.562  0.0000
+SexFemale   -2.268    0.7616 25  -2.978  0.0064
+ Correlation: 
+          (Intr) age   
+age       -0.822       
+SexFemale -0.357 -0.006
+
+Standardized Within-Group Residuals:
+     Min       Q1      Med       Q3      Max 
+-3.70787 -0.54714 -0.05637  0.46661  3.63142 
+
+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 
+     NA      NA      NA      NA      NA  7.0472 10.9577 14.0820 15.8940 16.7560 
+     11      12      13      14      15      16      17      18      19      20 
+ 0.1203  0.2977  0.7259  1.7085  3.7237  7.0472 10.9577 15.8940 16.7560  0.1203 
+     21      22      23      24      25      26      27      28      29      30 
+ 0.2977  0.7259  1.7085  3.7237  7.0472 10.9577 14.0820 15.8940 16.7560  0.1203 
+     31      32      33      34      35      36      37      38      39      40 
+ 0.2977  0.7259  1.7085  3.7237  7.0472 10.9577 14.0820 15.8940 16.7560  0.1203 
+     41      42      43      44      45      46      47      48      49      50 
+ 0.2977  0.7259  1.7085  3.7237  7.0472 10.9577 15.8940  0.1203  0.2977  0.7259 
+     51      52      53      54      55      56      57      58      59      60 
+ 1.7085  3.7237  7.0472 10.9577 14.0820 15.8940 16.7560  0.1203  0.2977  0.7259 
+     61      62      63      64      65      66      67      68      69      70 
+ 1.7085  3.7237  7.0472 10.9577 15.8940 16.7560  0.1203  0.2977  0.7259  1.7085 
+     71      72      73      74      75      76      77      78      79      80 
+ 3.7237  7.0472 10.9577 14.0820 15.8940 16.7560  0.1203  0.2977  0.7259  1.7085 
+     81      82      83      84      85      86      87      88      89      90 
+ 3.7237  7.0472 10.9577 14.0820 15.8940 16.7560  0.1203  0.2977  0.7259  1.7085 
+     91      92      93      94      95      96      97      98      99     100 
+ 3.7237  7.0472 10.9577 14.0820 15.8940 16.7560  0.1203  0.2977  0.7259  1.7085 
+    101     102     103     104     105     106     107     108     109     110 
+ 3.7237  7.0472 10.9577 14.0820 15.8940 16.7560  0.1203  0.2977  0.7259  1.7085 
+    111     112     113     114     115     116     117     118     119     120 
+ 3.7237  7.0472 10.9577 14.0820 15.8940 16.7560  0.1203  0.2977  0.7259  1.7085 
+    121     122     123     124     125     126     127     128     129     130 
+ 3.7237  7.0472 10.9577 14.0820 15.8940 16.7560  0.1203  0.2977  0.7259  1.7085 
+    131     132     133     134     135     136     137     138     139     140 
+ 3.7237  7.0472 10.9577 14.0820 15.8940 16.7560  0.1203  0.2977  0.7259  1.7085 
+    141     142     143     144     145     146     147     148     149     150 
+ 3.7237  7.0472 10.9577 14.0820 15.8940 16.7560  0.1203  0.2977  0.7259  1.7085 
+    151     152     153     154     155     156     157     158     159     160 
+ 3.7237  7.0472 10.9577 14.0820 15.8940 16.7560  0.1203  0.2617  0.6401  1.5171 
+    161     162     163     164     165     166     167     168     169     170 
+ 3.3548 10.4188 15.7056 17.1274  0.1203  0.2617  0.6401  1.5171  3.3548 10.4188 
+    171     172     173     174     175     176     177     178     179     180 
+15.7056 17.1274  0.1203  0.2617  0.6401  1.5171  3.3548 10.4188 15.7056 17.1274 
+    181     182     183     184     185     186     187     188     189     190 
+ 0.1203  0.2617  0.6401  1.5171  3.3548 10.4188 15.7056 17.1274  0.1203  0.2617 
+    191     192     193     194     195     196     197     198     199     200 
+ 0.6401  1.5171  3.3548 10.4188 15.7056 17.1274  0.1203  0.2617  0.6401  1.5171 
+    201     202     203     204     205     206     207     208     209     210 
+ 3.3548 10.4188 15.7056 17.1274  0.1203  0.2617  0.6401  1.5171  3.3548 10.4188 
+    211     212     213     214     215     216     217     218     219     220 
+15.7056 17.1274  0.1203  0.2617  0.6401  1.5171  3.3548 10.4188 15.7056 17.1274 
+    221     222     223     224     225     226     227     228     229     230 
+ 0.1203  0.2617  0.6401  1.5171  3.3548 10.4188 15.7056 17.1274  0.1203  0.2617 
+    231     232     233     234     235     236     237     238     239     240 
+ 0.6401  1.5171  3.3548 10.4188 15.7056 17.1274  0.1203  0.2617  0.6401  1.5171 
+    241     242     243     244     245     246     247     248     249     250 
+ 3.3548 10.4188 15.7056 17.1274  0.1203  0.2617  0.6401  1.5171  3.3548 10.4188 
+    251     252     253     254     255     256     257     258     259     260 
+15.7056 17.1274  0.1203  0.2617  0.6401  1.5171  3.3548 10.4188 15.7056 17.1274 
+    261     262     263     264     265     266     267     268     269     270 
+ 0.1203  0.2617  0.6401  1.5171  3.3548 10.4188 15.7056 17.1274  0.1203  0.2617 
+    271     272     273     274     275     276     277     278     279     280 
+ 0.6401  1.5171  3.3548 10.4188 15.7056 17.1274  0.1203  0.2617  0.6401  1.5171 
+    281     282     283     284     285     286     287     288     289     290 
+ 3.3548 10.4188 15.7056 17.1274  0.1370  0.3849  0.9316  2.1566  4.1212  8.1661 
+    291     292     293     294     295     296     297     298     299     300 
+14.4182 16.8967  0.1370  0.3849  0.9316  2.1566  4.1212  8.1661 14.4182 16.8967 
+    301     302     303     304     305     306     307     308     309     310 
+ 0.1370  0.3849  0.9316  2.1566  4.1212  8.1661 14.4182 16.8967  0.1370  0.3849 
+    311     312     313     314     315     316     317     318     319     320 
+ 0.9316  2.1566  4.1212  8.1661 14.4182 16.8967  0.1370  0.3849  0.9316  2.1566 
+    321     322     323     324     325     326     327     328     329     330 
+ 4.1212  8.1661 14.4182 16.8967  0.1370  0.3849  0.9316  2.1566  4.1212  8.1661 
+    331     332     333     334     335     336     337     338     339     340 
+14.4182 16.8967  0.1370  0.3849  0.9316  2.1566  4.1212  8.1661 14.4182 16.8967 
+    341     342     343     344     345     346     347     348     349     350 
+ 0.1370  0.3849  0.9316  2.1566  4.1212  8.1661 14.4182 16.8967  0.1370  0.3849 
+    351     352     353     354     355     356     357     358     359     360 
+ 0.9316  2.1566  4.1212  8.1661 14.4182 16.8967  0.1370  0.3849  0.9316  2.1566 
+    361     362     363     364     365     366     367     368     369     370 
+ 4.1212  8.1661 14.4182 16.8967  0.1370  0.3849  0.9316  2.1566  4.1212  8.1661 
+    371     372     373     374     375     376     377     378     379     380 
+14.4182 16.8967  0.1370  0.3849  0.9316  2.1566  4.1212  8.1661 14.4182 16.8967 
+    381     382     383     384     385     386     387     388     389     390 
+ 0.1370  0.3849  0.9316  2.1566  4.1212  8.1661 14.4182 16.8967  0.1370  0.3849 
+    391     392     393     394     395     396     397     398     399     400 
+ 0.9316  2.1566  4.1212  8.1661 14.4182 16.8967  0.1370  0.3849  0.9316  2.1566 
+    401     402     403     404     405     406     407     408     409     410 
+ 4.1212  8.1661 14.4182 16.8967  0.1370  0.3849  0.9316  2.1566  4.1212  8.1661 
+    411     412 
+14.4182 16.8967 
+attr(,"label")
+[1] "Fitted values (g)"
+> residuals(fm3)
+        1         2         3         4         5         6         7         8 
+       NA        NA        NA        NA        NA -0.817235 -2.247725 -0.732029 
+        9        10        11        12        13        14        15        16 
+ 0.447744  0.994846 -0.016267 -0.028703  0.052087  0.411533 -0.793662 -1.757235 
+       17        18        19        20        21        22        23        24 
+-1.457725  1.072744  0.990716 -0.012267 -0.006703 -0.058913  0.341533  0.086338 
+       25        26        27        28        29        30        31        32 
+-0.917235 -0.677725  3.997971  4.288544  5.054816 -0.015267  0.001297  0.118087 
+       33        34        35        36        37        38        39        40 
+-0.388467 -1.483662 -2.367235 -2.137725  1.007971 -1.233956 -2.751384 -0.019267 
+       41        42        43        44        45        46        47        48 
+-0.024703  0.122087  0.241533  1.046338 -1.037235 -1.047725  3.368344 -0.014267 
+       49        50        51        52        53        54        55        56 
+ 0.039297 -0.026913 -0.178467  0.146338 -1.447235 -1.527725 -0.352029  1.486844 
+       57        58        59        60        61        62        63        64 
+ 3.176316 -0.018267 -0.022703  0.041087 -0.258467  0.226338 -2.107235 -1.317725 
+       65        66        67        68        69        70        71        72 
+ 1.986044  0.968216 -0.017267 -0.024703  0.016087 -0.298467 -0.713662 -1.787235 
+       73        74        75        76        77        78        79        80 
+-1.147725 -1.232029  2.320214  2.924016  0.010733  0.040297 -0.024913 -0.048467 
+       81        82        83        84        85        86        87        88 
+ 0.526338  2.192765  1.192275  2.697971  0.031044  0.516316  0.007733  0.106297 
+       89        90        91        92        93        94        95        96 
+ 0.171087  0.071533  0.186338  0.352765 -0.887725  4.777971  1.117744 10.614016 
+       97        98        99       100       101       102       103       104 
+ 0.010733  0.081297  0.400087  0.731533  0.166338 -0.137235  1.532275  1.587971 
+      105       106       107       108       109       110       111       112 
+ 7.869344  4.734816  0.033733  0.059297  0.455087  0.121533  0.986338  3.662765 
+      113       114       115       116       117       118       119       120 
+-1.047725  1.427971 -0.936056  5.044016  0.018733  0.030297  0.206087  0.281533 
+      121       122       123       124       125       126       127       128 
+-0.263662 -0.027235  0.832275  1.747971  0.026874  0.685716  0.018733  0.091297 
+      129       130       131       132       133       134       135       136 
+ 0.368087  0.421533  0.316338  0.572765  1.522275  3.847971 -1.472256 13.515716 
+      137       138       139       140       141       142       143       144 
+ 0.024733  0.068297  0.073087 -0.098467 -0.213662 -0.257235 -1.007725  0.457971 
+      145       146       147       148       149       150       151       152 
+ 3.386044  5.816746  0.009733  0.057297  0.364087  0.571533  0.216338 -2.087235 
+      153       154       155       156       157       158       159       160 
+-0.037725 -0.062029  2.100244  5.614816 -0.073267 -0.125711 -0.367258 -0.533726 
+      161       162       163       164       165       166       167       168 
+-1.558134 -6.301675 -4.668445 -6.724066 -0.085267 -0.149711 -0.372091 -0.463729 
+      169       170       171       172       173       174       175       176 
+-1.639801 -3.690485 -5.392255 -6.039066 -0.076267 -0.115711 -0.279591 -0.742059 
+      177       178       179       180       181       182       183       184 
+-1.713134 -6.670485 -4.830585 -1.099896 -0.071267 -0.164711 -0.412591 -0.683726 
+      185       186       187       188       189       190       191       192 
+-2.000801 -4.430485 -5.120585 -6.215966 -0.081267 -0.140711 -0.368424 -0.858726 
+      193       194       195       196       197       198       199       200 
+-0.964801 -4.935482 -5.768915 -8.239066 -0.091267 -0.169711 -0.389091 -0.975392 
+      201       202       203       204       205       206       207       208 
+-2.293131 -5.588815 -9.433915 -8.544066 -0.079267 -0.116711 -0.234758 -0.757059 
+      209       210       211       212       213       214       215       216 
+-1.861468 -4.170485 -4.593885 -8.247396 -0.082267 -0.134711 -0.299924 -0.523059 
+      217       218       219       220       221       222       223       224 
+-1.073131 -1.912815 -6.732255 -5.495396 -0.050267 -0.053711 -0.039258  0.384608 
+      225       226       227       228       229       230       231       232 
+-0.389801 -2.275485 -0.005585  2.760904 -0.052267 -0.009711 -0.059591  0.496941 
+      233       234       235       236       237       238       239       240 
+-0.681468 -1.618815 -1.220585  5.515904 -0.043267 -0.037711 -0.298758  0.222941 
+      241       242       243       244       245       246       247       248 
+ 1.169199  1.237885  4.611115  4.274604 -0.021267 -0.063711 -0.148924 -0.312059 
+      249       250       251       252       253       254       255       256 
+-0.554801 -3.055485 -0.563915  0.059274 -0.052267 -0.029711 -0.204091 -0.073726 
+      257       258       259       260       261       262       263       264 
+-0.094801 -2.210485  3.701115 -1.465726 -0.057267 -0.052711  0.100742 -0.248729 
+      265       266       267       268       269       270       271       272 
+ 0.535199 -1.326815 -1.215585  1.967604  0.012733  0.041289  0.476909  0.662941 
+      273       274       275       276       277       278       279       280 
+ 0.181866  2.741185  0.084415 -2.352396 -0.039267 -0.006711  0.124742 -0.423729 
+      281       282       283       284       285       286       287       288 
+-0.303131 -2.313815  8.718415  1.790904 -0.027755 -0.001035  0.230048  0.183443 
+      289       290       291       292       293       294       295       296 
+-1.251166  1.372212 -1.734896  1.736669 -0.041962 -0.046535 -0.173286  0.363443 
+      297       298       299       300       301       302       303       304 
+-1.602836 -3.049448 -5.843196 -2.723331 -0.048962  0.228299  0.383381  0.865113 
+      305       306       307       308       309       310       311       312 
+ 1.728834 -0.749448 -3.086496 -0.013331 -0.048243  0.211799  0.143381  0.918443 
+      313       314       315       316       317       318       319       320 
+-0.162836 -2.132788 -3.981526  0.906639 -0.035662 -0.009535  0.990048  0.050113 
+      321       322       323       324       325       326       327       328 
+ 0.643834  0.973882  1.421804  1.211639 -0.027197  0.098465  0.375048  1.798443 
+      329       330       331       332       333       334       335       336 
+ 0.183834 -0.134448  1.665134  2.676639 -0.034019  0.029632  0.731714 -0.766557 
+      337       338       339       340       341       342       343       344 
+-1.119496 -1.321118  1.791804  2.176639 -0.060265 -0.013035 -0.186619  0.090110 
+      345       346       347       348       349       350       351       352 
+ 0.373834 -2.491118  1.726804  2.035039  0.011779  0.302132  0.640051  1.656773 
+      353       354       355       356       357       358       359       360 
+ 0.690504  3.487212  2.958504  1.000039  0.016797  0.209299  0.268381  0.988443 
+      361       362       363       364       365       366       367       368 
+-0.317836 -0.749448 -0.838196  3.963339 -0.012795  0.365465  0.526711  3.601773 
+      369       370       371       372       373       374       375       376 
+ 1.875504  0.805552  2.653504  0.920039  0.041505  0.495965  0.450048  1.471776 
+      377       378       379       380       381       382       383       384 
+ 1.072167 -2.976118  1.361804  4.645009  0.002185  0.070965  0.651711  1.898443 
+      385       386       387       388       389       390       391       392 
+ 0.388834 -0.004448  4.296804  1.058339  0.025744  0.388799  0.043381  1.355113 
+      393       394       395       396       397       398       399       400 
+ 0.388834 -0.382788  3.700134 -0.949991 -0.026529  0.071132  0.438381 -0.011557 
+      401       402       403       404       405       406       407       408 
+ 1.708834  0.637212 -2.183196  0.888339  0.009038  0.178799  0.546711  0.445110 
+      409       410       411       412 
+ 2.222164 -2.034448  1.993504  0.050039 
+attr(,"std")
+  [1]      NA      NA      NA      NA      NA 2.05137 3.02284 3.76791 4.19054
+ [10] 4.38951 0.05745 0.12737 0.27864 0.59092 1.17142 2.05137 3.02284 4.19054
+ [19] 4.38951 0.05745 0.12737 0.27864 0.59092 1.17142 2.05137 3.02284 3.76791
+ [28] 4.19054 4.38951 0.05745 0.12737 0.27864 0.59092 1.17142 2.05137 3.02284
+ [37] 3.76791 4.19054 4.38951 0.05745 0.12737 0.27864 0.59092 1.17142 2.05137
+ [46] 3.02284 4.19054 0.05745 0.12737 0.27864 0.59092 1.17142 2.05137 3.02284
+ [55] 3.76791 4.19054 4.38951 0.05745 0.12737 0.27864 0.59092 1.17142 2.05137
+ [64] 3.02284 4.19054 4.38951 0.05745 0.12737 0.27864 0.59092 1.17142 2.05137
+ [73] 3.02284 3.76791 4.19054 4.38951 0.05745 0.12737 0.27864 0.59092 1.17142
+ [82] 2.05137 3.02284 3.76791 4.19054 4.38951 0.05745 0.12737 0.27864 0.59092
+ [91] 1.17142 2.05137 3.02284 3.76791 4.19054 4.38951 0.05745 0.12737 0.27864
+[100] 0.59092 1.17142 2.05137 3.02284 3.76791 4.19054 4.38951 0.05745 0.12737
+[109] 0.27864 0.59092 1.17142 2.05137 3.02284 3.76791 4.19054 4.38951 0.05745
+[118] 0.12737 0.27864 0.59092 1.17142 2.05137 3.02284 3.76791 4.19054 4.38951
+[127] 0.05745 0.12737 0.27864 0.59092 1.17142 2.05137 3.02284 3.76791 4.19054
+[136] 4.38951 0.05745 0.12737 0.27864 0.59092 1.17142 2.05137 3.02284 3.76791
+[145] 4.19054 4.38951 0.05745 0.12737 0.27864 0.59092 1.17142 2.05137 3.02284
+[154] 3.76791 4.19054 4.38951 0.05745 0.11374 0.24949 0.53236 1.06887 2.89187
+[163] 4.14689 4.47486 0.05745 0.11374 0.24949 0.53236 1.06887 2.89187 4.14689
+[172] 4.47486 0.05745 0.11374 0.24949 0.53236 1.06887 2.89187 4.14689 4.47486
+[181] 0.05745 0.11374 0.24949 0.53236 1.06887 2.89187 4.14689 4.47486 0.05745
+[190] 0.11374 0.24949 0.53236 1.06887 2.89187 4.14689 4.47486 0.05745 0.11374
+[199] 0.24949 0.53236 1.06887 2.89187 4.14689 4.47486 0.05745 0.11374 0.24949
+[208] 0.53236 1.06887 2.89187 4.14689 4.47486 0.05745 0.11374 0.24949 0.53236
+[217] 1.06887 2.89187 4.14689 4.47486 0.05745 0.11374 0.24949 0.53236 1.06887
+[226] 2.89187 4.14689 4.47486 0.05745 0.11374 0.24949 0.53236 1.06887 2.89187
+[235] 4.14689 4.47486 0.05745 0.11374 0.24949 0.53236 1.06887 2.89187 4.14689
+[244] 4.47486 0.05745 0.11374 0.24949 0.53236 1.06887 2.89187 4.14689 4.47486
+[253] 0.05745 0.11374 0.24949 0.53236 1.06887 2.89187 4.14689 4.47486 0.05745
+[262] 0.11374 0.24949 0.53236 1.06887 2.89187 4.14689 4.47486 0.05745 0.11374
+[271] 0.24949 0.53236 1.06887 2.89187 4.14689 4.47486 0.05745 0.11374 0.24949
+[280] 0.53236 1.06887 2.89187 4.14689 4.47486 0.06440 0.15959 0.34691 0.72506
+[289] 1.28057 2.33481 3.84680 4.42186 0.06440 0.15959 0.34691 0.72506 1.28057
+[298] 2.33481 3.84680 4.42186 0.06440 0.15959 0.34691 0.72506 1.28057 2.33481
+[307] 3.84680 4.42186 0.06440 0.15959 0.34691 0.72506 1.28057 2.33481 3.84680
+[316] 4.42186 0.06440 0.15959 0.34691 0.72506 1.28057 2.33481 3.84680 4.42186
+[325] 0.06440 0.15959 0.34691 0.72506 1.28057 2.33481 3.84680 4.42186 0.06440
+[334] 0.15959 0.34691 0.72506 1.28057 2.33481 3.84680 4.42186 0.06440 0.15959
+[343] 0.34691 0.72506 1.28057 2.33481 3.84680 4.42186 0.06440 0.15959 0.34691
+[352] 0.72506 1.28057 2.33481 3.84680 4.42186 0.06440 0.15959 0.34691 0.72506
+[361] 1.28057 2.33481 3.84680 4.42186 0.06440 0.15959 0.34691 0.72506 1.28057
+[370] 2.33481 3.84680 4.42186 0.06440 0.15959 0.34691 0.72506 1.28057 2.33481
+[379] 3.84680 4.42186 0.06440 0.15959 0.34691 0.72506 1.28057 2.33481 3.84680
+[388] 4.42186 0.06440 0.15959 0.34691 0.72506 1.28057 2.33481 3.84680 4.42186
+[397] 0.06440 0.15959 0.34691 0.72506 1.28057 2.33481 3.84680 4.42186 0.06440
+[406] 0.15959 0.34691 0.72506 1.28057 2.33481 3.84680 4.42186
+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.3 1007 -488.6
+
+Variance function:
+ Structure: Power of variance covariate
+ Formula: ~fitted(.) 
+ Parameter estimates:
+ power 
+0.8783 
+
+Coefficients:
+     Value Std.Error t-value p-value
+Asym 17.38    0.5251   33.11       0
+xmid 51.93    0.5982   86.80       0
+scal  7.64    0.1415   53.96       0
+
+ Correlation: 
+     Asym  xmid 
+xmid 0.788      
+scal 0.488 0.842
+
+Standardized residuals:
+      Min        Q1       Med        Q3       Max 
+-2.306636 -0.654470 -0.001905  0.501223  4.967561 
+
+Residual standard error: 0.3692 
+Degrees of freedom: 407 total; 404 residual
+> 
diff --git a/win32/deps/library/nlme/tests/nlme.R b/win32/deps/library/nlme/tests/nlme.R
new file mode 100644
index 0000000..5c28a5b
--- /dev/null
+++ b/win32/deps/library/nlme/tests/nlme.R
@@ -0,0 +1,7 @@
+library(nlme)
+data(Loblolly)
+fm1 <- nlsList(SSasymp, Loblolly)
+fm1
+fm2 <- nlme(fm1, random = Asym ~ 1)
+fm2
+q()
diff --git a/win32/deps/library/nlme/tests/nlme.Rout.save b/win32/deps/library/nlme/tests/nlme.Rout.save
new file mode 100644
index 0000000..f388bad
--- /dev/null
+++ b/win32/deps/library/nlme/tests/nlme.Rout.save
@@ -0,0 +1,61 @@
+
+R : Copyright 2005, The R Foundation for Statistical Computing
+Version 2.2.0 Under development (unstable) (2005-05-11), ISBN 3-900051-07-0
+
+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 a HTML browser interface to help.
+Type 'q()' to quit R.
+
+> library(nlme)
+> data(Loblolly)
+> fm1 <- nlsList(SSasymp, Loblolly)
+> fm1
+Call:
+  Model: height ~ SSasymp(age, Asym, R0, lrc) | Seed 
+   Data: Loblolly 
+
+Coefficients:
+         Asym        R0       lrc
+329  94.12820 -8.250753 -3.217578
+327  94.94058 -7.757495 -3.229325
+325  89.88487 -8.759017 -3.086219
+307 110.69919 -8.169431 -3.390345
+331 111.00287 -8.462608 -3.397574
+311 109.98575 -8.558543 -3.362518
+315 101.05622 -8.443628 -3.232825
+321 127.13400 -7.679356 -3.575331
+319 101.08748 -8.502343 -3.214021
+301  95.66688 -9.078241 -3.116381
+323  95.55627 -9.665035 -3.092266
+309 113.51390 -7.595622 -3.352815
+303 105.71792 -8.906081 -3.222957
+305  99.17191 -9.916654 -3.084841
+
+Degrees of freedom: 84 total; 42 residual
+Residual standard error: 0.7003965
+> fm2 <- nlme(fm1, random = Asym ~ 1)
+> fm2
+Nonlinear mixed-effects model fit by maximum likelihood
+  Model: height ~ SSasymp(age, Asym, R0, lrc) 
+  Data: Loblolly 
+  Log-likelihood: -114.743
+  Fixed: list(Asym ~ 1, R0 ~ 1, lrc ~ 1) 
+      Asym         R0        lrc 
+101.448300  -8.627494  -3.233730 
+
+Random effects:
+ Formula: Asym ~ 1 | Seed
+            Asym  Residual
+StdDev: 3.650645 0.7188624
+
+Number of Observations: 84
+Number of Groups: 14 
+> q()
diff --git a/win32/deps/library/nlme/tests/predict.lme.R b/win32/deps/library/nlme/tests/predict.lme.R
new file mode 100644
index 0000000..d799fab
--- /dev/null
+++ b/win32/deps/library/nlme/tests/predict.lme.R
@@ -0,0 +1,8 @@
+## from PR#8905
+library(nlme)
+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]))
diff --git a/win32/deps/library/nlme/tests/ss2.rda b/win32/deps/library/nlme/tests/ss2.rda
new file mode 100644
index 0000000..46884b3
Binary files /dev/null and b/win32/deps/library/nlme/tests/ss2.rda differ
diff --git a/win32/deps/library/nlme/tests/update.R b/win32/deps/library/nlme/tests/update.R
new file mode 100644
index 0000000..0029736
--- /dev/null
+++ b/win32/deps/library/nlme/tests/update.R
@@ -0,0 +1,8 @@
+library(nlme)
+data(petrol, package = 'MASS')
+Petrol <- petrol
+Petrol[, 2:5] <- scale(Petrol[, 2:5], scale = F)
+pet3.lme <- lme(Y ~ SG + VP + V10 + EP,
+                random = ~ 1 | No, data = Petrol, method="ML")
+nform <- as.formula("Y ~ SG + VP + V10")
+update(pet3.lme, nform)
diff --git a/win32/deps/library/nlme/tests/updateLme.R b/win32/deps/library/nlme/tests/updateLme.R
new file mode 100644
index 0000000..cdec799
--- /dev/null
+++ b/win32/deps/library/nlme/tests/updateLme.R
@@ -0,0 +1,12 @@
+library(nlme)
+data(Assay)
+as1 <- lme(logDens~sample*dilut, data=Assay,
+           random=pdBlocked(list(
+                     pdIdent(~1),
+                     pdIdent(~sample-1),
+                     pdIdent(~dilut-1))))
+
+update(as1,random=pdCompSymm(~sample-1))
+update(as1,random=pdCompSymm(~sample-1))
+update(as1,random=pdCompSymm(~sample-1))
+update(as1,random=pdCompSymm(~sample-1))
diff --git a/win32/deps/library/nlme/tests/varIdent.R b/win32/deps/library/nlme/tests/varIdent.R
new file mode 100644
index 0000000..ef5532a
--- /dev/null
+++ b/win32/deps/library/nlme/tests/varIdent.R
@@ -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))
diff --git a/win32/deps/library/nnet/CITATION b/win32/deps/library/nnet/CITATION
index f6a6566..4fe884a 100644
--- a/win32/deps/library/nnet/CITATION
+++ b/win32/deps/library/nnet/CITATION
@@ -1,4 +1,4 @@
-citHeader("To cite the VR bundle (MASS, class, nnet, spatial) in publications use:")
+citHeader("To cite the nnet package in publications use:")
 
 citEntry(entry="Book",
          title = "Modern Applied Statistics with S",
diff --git a/win32/deps/library/nnet/DESCRIPTION b/win32/deps/library/nnet/DESCRIPTION
index f322cb8..674d16f 100644
--- a/win32/deps/library/nnet/DESCRIPTION
+++ b/win32/deps/library/nnet/DESCRIPTION
@@ -1,24 +1,19 @@
-Bundle: VR
-Contains: MASS class nnet spatial
-Priority: recommended
-Version: 7.2-48
-Date: 2009-07-29
-Depends: R (>= 2.5.0), grDevices, graphics, stats, utils
-Suggests: lattice, nlme, survival
-Author: S original by Venables & Ripley. R port by Brian Ripley
-        <ripley stats ox ac uk>, following earlier work by Kurt Hornik
-        and Albrecht Gebhardt.
-Maintainer: Brian Ripley <ripley stats ox ac uk>
-BundleDescription: Functions and datasets to support Venables and
-        Ripley, 'Modern Applied Statistics with S' (4th edition).
-License: GPL-2 | GPL-3
-URL: http://www.stats.ox.ac.uk/pub/MASS4/
-Packaged: 2009-07-31 13:56:57 UTC; ripley
-Repository: CRAN
-Date/Publication: 2009-08-05 11:20:53
-Package: nnet
-Description: Software for feed-forward neural networks with a single
-        hidden layer, and for multinomial log-linear models.
-Title: Feed-forward Neural Networks and Multinomial Log-Linear Models
-LazyLoad: yes
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 13:01:08 UTC; windows
+Package: nnet
+Priority: recommended
+Version: 7.3-5
+Date: 2012-10-11
+Depends: R (>= 2.5.0), stats, utils
+Suggests: MASS
+Authors R: c(person("Brian", "Ripley", role = c("aut", "cre", "cph"),
+        email = "ripley stats ox ac uk"))
+Author: Brian Ripley <ripley stats ox ac uk>.
+Maintainer: Brian Ripley <ripley stats ox ac uk>
+Description: Software for feed-forward neural networks with a single
+  hidden layer, and for multinomial log-linear models.
+Title: Feed-forward Neural Networks and Multinomial Log-Linear Models
+License: GPL-2 | GPL-3
+URL: http://www.stats.ox.ac.uk/pub/MASS4/
+LazyLoad: yes
+Packaged: 2012-10-11 13:01:30 UTC; ripley
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:15:19 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/nnet/LICENCE b/win32/deps/library/nnet/LICENCE
index e694c08..14b4e51 100644
--- a/win32/deps/library/nnet/LICENCE
+++ b/win32/deps/library/nnet/LICENCE
@@ -15,16 +15,7 @@ possible individual files also carry brief copyright notices.
 Copyrights
 ==========
 
-File MASS/R/profiles.R copyright (C) 1996 D. M. Bates and W. N. Venables.
-                       port to R by B. D. Ripley copyright (C) 1998
-                       corrections copyright (C) 2000,3,6 B. D. Ripley
-
-Our understanding is that the dataset files MASS/data/*.rda are not copyright.
-
-Files spatial/data/*.dat were generated or digitized by B. D. Ripley: no
-copyright is asserted.
-
-All other files are copyright (C) 1994-2007  W. N. Venables and
+All files are copyright (C) 1994-2009 W. N. Venables and
 B. D. Ripley. Those parts which were distributed with the first
 edition are also copyright (C) 1994 Springer-Verlag New York Inc, with
 all rights assigned to W. N. Venables and B. D. Ripley.
diff --git a/win32/deps/library/nnet/Meta/Rd.rds b/win32/deps/library/nnet/Meta/Rd.rds
index e525bbf..20c6e94 100644
Binary files a/win32/deps/library/nnet/Meta/Rd.rds and b/win32/deps/library/nnet/Meta/Rd.rds differ
diff --git a/win32/deps/library/nnet/Meta/hsearch.rds b/win32/deps/library/nnet/Meta/hsearch.rds
index 950b0b3..e478146 100644
Binary files a/win32/deps/library/nnet/Meta/hsearch.rds and b/win32/deps/library/nnet/Meta/hsearch.rds differ
diff --git a/win32/deps/library/nnet/Meta/links.rds b/win32/deps/library/nnet/Meta/links.rds
new file mode 100644
index 0000000..78773e1
Binary files /dev/null and b/win32/deps/library/nnet/Meta/links.rds differ
diff --git a/win32/deps/library/nnet/Meta/nsInfo.rds b/win32/deps/library/nnet/Meta/nsInfo.rds
index dbcf1fb..20a951f 100644
Binary files a/win32/deps/library/nnet/Meta/nsInfo.rds and b/win32/deps/library/nnet/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/nnet/Meta/package.rds b/win32/deps/library/nnet/Meta/package.rds
index 8478121..eb1b37a 100644
Binary files a/win32/deps/library/nnet/Meta/package.rds and b/win32/deps/library/nnet/Meta/package.rds differ
diff --git a/win32/deps/library/nnet/NEWS b/win32/deps/library/nnet/NEWS
index f4af050..c4639e4 100644
--- a/win32/deps/library/nnet/NEWS
+++ b/win32/deps/library/nnet/NEWS
@@ -19,6 +19,8 @@ This file documents software changes since the third edition.
 - added logLik() method for multinom.
 - summary() for multinom now defaults to correlation=FALSE.
 - nnet() reports on 'convergence'.
-- confint.multinom() works better with a non-default 'parm'
+- confint.multinom() works better with a non-default 'parm'.
 - multinom() and nnet(softmax=TRUE) give an explicit error message for
   one-category responses.
+- the loglik() method for multinom() returns an "nobs" attribute. 
+
diff --git a/win32/deps/library/nnet/R/nnet b/win32/deps/library/nnet/R/nnet
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/nnet/R/nnet
+++ b/win32/deps/library/nnet/R/nnet
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/nnet/R/nnet.rdb b/win32/deps/library/nnet/R/nnet.rdb
index 4807eea..35148b1 100644
Binary files a/win32/deps/library/nnet/R/nnet.rdb and b/win32/deps/library/nnet/R/nnet.rdb differ
diff --git a/win32/deps/library/nnet/R/nnet.rdx b/win32/deps/library/nnet/R/nnet.rdx
index 82b4e09..5b47560 100644
Binary files a/win32/deps/library/nnet/R/nnet.rdx and b/win32/deps/library/nnet/R/nnet.rdx differ
diff --git a/win32/deps/library/nnet/help/aliases.rds b/win32/deps/library/nnet/help/aliases.rds
new file mode 100644
index 0000000..9f198e1
Binary files /dev/null and b/win32/deps/library/nnet/help/aliases.rds differ
diff --git a/win32/deps/library/nnet/help/nnet.rdb b/win32/deps/library/nnet/help/nnet.rdb
new file mode 100644
index 0000000..5555d18
Binary files /dev/null and b/win32/deps/library/nnet/help/nnet.rdb differ
diff --git a/win32/deps/library/nnet/help/nnet.rdx b/win32/deps/library/nnet/help/nnet.rdx
new file mode 100644
index 0000000..e96960c
Binary files /dev/null and b/win32/deps/library/nnet/help/nnet.rdx differ
diff --git a/win32/deps/library/nnet/help/paths.rds b/win32/deps/library/nnet/help/paths.rds
new file mode 100644
index 0000000..2985a04
Binary files /dev/null and b/win32/deps/library/nnet/help/paths.rds differ
diff --git a/win32/deps/library/nnet/html/00Index.html b/win32/deps/library/nnet/html/00Index.html
new file mode 100644
index 0000000..72b7dfd
--- /dev/null
+++ b/win32/deps/library/nnet/html/00Index.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Feed-forward Neural Networks and Multinomial Log-Linear Models</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Feed-forward Neural Networks and Multinomial Log-Linear Models
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;nnet&rsquo; version 7.3-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 width="25%"><a href="nnet.html">add.net</a></td>
+<td>Fit Neural Networks</td></tr>
+<tr><td width="25%"><a href="multinom.html">add1.multinom</a></td>
+<td>Fit Multinomial Log-linear Models</td></tr>
+<tr><td width="25%"><a href="multinom.html">anova.multinom</a></td>
+<td>Fit Multinomial Log-linear Models</td></tr>
+<tr><td width="25%"><a href="class.ind.html">class.ind</a></td>
+<td>Generates Class Indicator Matrix from a Factor</td></tr>
+<tr><td width="25%"><a href="multinom.html">coef.multinom</a></td>
+<td>Fit Multinomial Log-linear Models</td></tr>
+<tr><td width="25%"><a href="nnet.html">coef.nnet</a></td>
+<td>Fit Neural Networks</td></tr>
+<tr><td width="25%"><a href="multinom.html">drop1.multinom</a></td>
+<td>Fit Multinomial Log-linear Models</td></tr>
+<tr><td width="25%"><a href="nnet.html">eval.nn</a></td>
+<td>Fit Neural Networks</td></tr>
+<tr><td width="25%"><a href="multinom.html">extractAIC.multinom</a></td>
+<td>Fit Multinomial Log-linear Models</td></tr>
+<tr><td width="25%"><a href="multinom.html">logLik.multinom</a></td>
+<td>Fit Multinomial Log-linear Models</td></tr>
+<tr><td width="25%"><a href="multinom.html">model.frame.multinom</a></td>
+<td>Fit Multinomial Log-linear Models</td></tr>
+<tr><td width="25%"><a href="multinom.html">multinom</a></td>
+<td>Fit Multinomial Log-linear Models</td></tr>
+<tr><td width="25%"><a href="nnet.html">nnet</a></td>
+<td>Fit Neural Networks</td></tr>
+<tr><td width="25%"><a href="nnet.html">nnet.default</a></td>
+<td>Fit Neural Networks</td></tr>
+<tr><td width="25%"><a href="nnet.html">nnet.formula</a></td>
+<td>Fit Neural Networks</td></tr>
+<tr><td width="25%"><a href="nnet.Hess.html">nnetHess</a></td>
+<td>Evaluates Hessian for a Neural Network</td></tr>
+<tr><td width="25%"><a href="nnet.html">norm.net</a></td>
+<td>Fit Neural Networks</td></tr>
+<tr><td width="25%"><a href="multinom.html">predict.multinom</a></td>
+<td>Fit Multinomial Log-linear Models</td></tr>
+<tr><td width="25%"><a href="predict.nnet.html">predict.nnet</a></td>
+<td>Predict New Examples by a Trained Neural Net</td></tr>
+<tr><td width="25%"><a href="multinom.html">print.multinom</a></td>
+<td>Fit Multinomial Log-linear Models</td></tr>
+<tr><td width="25%"><a href="nnet.html">print.nnet</a></td>
+<td>Fit Neural Networks</td></tr>
+<tr><td width="25%"><a href="multinom.html">print.summary.multinom</a></td>
+<td>Fit Multinomial Log-linear Models</td></tr>
+<tr><td width="25%"><a href="nnet.html">print.summary.nnet</a></td>
+<td>Fit Neural Networks</td></tr>
+<tr><td width="25%"><a href="multinom.html">summary.multinom</a></td>
+<td>Fit Multinomial Log-linear Models</td></tr>
+<tr><td width="25%"><a href="nnet.html">summary.nnet</a></td>
+<td>Fit Neural Networks</td></tr>
+<tr><td width="25%"><a href="multinom.html">vcov.multinom</a></td>
+<td>Fit Multinomial Log-linear Models</td></tr>
+<tr><td width="25%"><a href="which.is.max.html">which.is.max</a></td>
+<td>Find Maximum Position in Vector</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/nnet/html/R.css b/win32/deps/library/nnet/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/nnet/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/nnet/libs/i386/nnet.dll b/win32/deps/library/nnet/libs/i386/nnet.dll
new file mode 100644
index 0000000..d4a195e
Binary files /dev/null and b/win32/deps/library/nnet/libs/i386/nnet.dll differ
diff --git a/win32/deps/library/nnet/po/de/LC_MESSAGES/R-nnet.mo b/win32/deps/library/nnet/po/de/LC_MESSAGES/R-nnet.mo
new file mode 100644
index 0000000..e5a5798
Binary files /dev/null and b/win32/deps/library/nnet/po/de/LC_MESSAGES/R-nnet.mo differ
diff --git a/win32/deps/library/nnet/po/en quot/LC_MESSAGES/R-nnet.mo b/win32/deps/library/nnet/po/en quot/LC_MESSAGES/R-nnet.mo
new file mode 100644
index 0000000..aedf00a
Binary files /dev/null and b/win32/deps/library/nnet/po/en quot/LC_MESSAGES/R-nnet.mo differ
diff --git a/win32/deps/library/nnet/po/fr/LC_MESSAGES/R-nnet.mo b/win32/deps/library/nnet/po/fr/LC_MESSAGES/R-nnet.mo
new file mode 100644
index 0000000..8e4a0cb
Binary files /dev/null and b/win32/deps/library/nnet/po/fr/LC_MESSAGES/R-nnet.mo differ
diff --git a/win32/deps/library/nnet/po/pl/LC_MESSAGES/R-nnet.mo b/win32/deps/library/nnet/po/pl/LC_MESSAGES/R-nnet.mo
new file mode 100644
index 0000000..da211c3
Binary files /dev/null and b/win32/deps/library/nnet/po/pl/LC_MESSAGES/R-nnet.mo differ
diff --git a/win32/deps/library/parallel/DESCRIPTION b/win32/deps/library/parallel/DESCRIPTION
new file mode 100644
index 0000000..8aa7624
--- /dev/null
+++ b/win32/deps/library/parallel/DESCRIPTION
@@ -0,0 +1,12 @@
+Package: parallel
+Version: 2.15.2
+Priority: base
+Title: Support for Parallel computation in R
+Author: R Core Team
+Maintainer: R Core Team <R-core r-project org>
+Description: Support for parallel computation, including by forking
+   (taken from package multicore), by sockets (taken from package snow)
+   and random-number generation.
+License: Part of R 2.15.2
+Enhances: snow
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:08:04 UTC; windows
diff --git a/win32/deps/library/parallel/INDEX b/win32/deps/library/parallel/INDEX
new file mode 100644
index 0000000..d9f5a7d
--- /dev/null
+++ b/win32/deps/library/parallel/INDEX
@@ -0,0 +1,8 @@
+clusterApply            Apply Operations using Clusters
+detectCores             Detect the Number of CPU Cores
+makeCluster             Create a Parallel Socket Cluster
+mclapply                Serial versions of 'mclapply', 'mcmapply' and
+                        'pvec'
+nextRNGStream           Implementation of Pierre L'Ecuyer's RngStreams
+parallel-package        Support for Parallel Computation
+splitIndices            Divide Tasks for Distribution in a Cluster
diff --git a/win32/deps/library/parallel/Meta/Rd.rds b/win32/deps/library/parallel/Meta/Rd.rds
new file mode 100644
index 0000000..bcce235
Binary files /dev/null and b/win32/deps/library/parallel/Meta/Rd.rds differ
diff --git a/win32/deps/library/parallel/Meta/hsearch.rds b/win32/deps/library/parallel/Meta/hsearch.rds
new file mode 100644
index 0000000..d9000b7
Binary files /dev/null and b/win32/deps/library/parallel/Meta/hsearch.rds differ
diff --git a/win32/deps/library/parallel/Meta/links.rds b/win32/deps/library/parallel/Meta/links.rds
new file mode 100644
index 0000000..a56c6c6
Binary files /dev/null and b/win32/deps/library/parallel/Meta/links.rds differ
diff --git a/win32/deps/library/parallel/Meta/nsInfo.rds b/win32/deps/library/parallel/Meta/nsInfo.rds
new file mode 100644
index 0000000..69b64e8
Binary files /dev/null and b/win32/deps/library/parallel/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/parallel/Meta/package.rds b/win32/deps/library/parallel/Meta/package.rds
new file mode 100644
index 0000000..33a4e52
Binary files /dev/null and b/win32/deps/library/parallel/Meta/package.rds differ
diff --git a/win32/deps/library/parallel/Meta/vignette.rds b/win32/deps/library/parallel/Meta/vignette.rds
new file mode 100644
index 0000000..132c5aa
Binary files /dev/null and b/win32/deps/library/parallel/Meta/vignette.rds differ
diff --git a/win32/deps/library/parallel/NAMESPACE b/win32/deps/library/parallel/NAMESPACE
new file mode 100644
index 0000000..dc8806c
--- /dev/null
+++ b/win32/deps/library/parallel/NAMESPACE
@@ -0,0 +1,44 @@
+## Namespace for package 'parallel'
+useDynLib("parallel", .registration = TRUE, .fixes = "C_")
+
+export(nextRNGStream, nextRNGSubStream, clusterSetRNGStream)
+
+if(tools:::.OStype() == "unix") {
+    export(mccollect, mcparallel, mc.reset.stream)
+}
+
+export(clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
+       clusterExport, clusterMap, clusterSplit, detectCores,
+       makeCluster, makeForkCluster, makePSOCKcluster, mclapply,
+       mcmapply, parApply, parCapply, parLapply, parLapplyLB,
+       parRapply, parSapply, parSapplyLB, pvec, setDefaultCluster,
+       splitIndices, stopCluster)
+
+S3method(print, SOCKcluster)
+S3method(print, SOCKnode)
+S3method(print, SOCK0node)
+S3method("[", cluster)
+S3method(closeNode, SOCKnode)
+S3method(closeNode, SOCK0node)
+S3method(closeNode, default)
+S3method(recvData, SOCKnode)
+S3method(recvData, SOCK0node)
+S3method(recvOneData, SOCKcluster)
+S3method(sendData, SOCKnode)
+S3method(sendData, SOCK0node)
+S3method(stopCluster, default)
+
+## To support snow clusters
+S3method(closeNode, NWSnode)
+S3method(recvData, MPInode)
+S3method(recvData, NWSnode)
+S3method(recvData, PVMnode)
+S3method(recvOneData, MPIcluster)
+S3method(recvOneData, NWScluster)
+S3method(recvOneData, PVMcluster)
+S3method(sendData, MPInode)
+S3method(sendData, NWSnode)
+S3method(sendData, PVMnode)
+S3method(stopCluster, MPIcluster)
+S3method(stopCluster, NWScluster)
+S3method(stopCluster, spawnedMPIcluster)
diff --git a/win32/deps/library/parallel/R/parallel b/win32/deps/library/parallel/R/parallel
new file mode 100644
index 0000000..ac8cebe
--- /dev/null
+++ b/win32/deps/library/parallel/R/parallel
@@ -0,0 +1,9 @@
+local({
+    info <- loadingNamespaceInfo()
+    ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
+    if (is.null(ns))
+        stop("cannot find namespace environment");
+    barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
+    dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
+    lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
+})
diff --git a/win32/deps/library/parallel/R/parallel.rdb b/win32/deps/library/parallel/R/parallel.rdb
new file mode 100644
index 0000000..19c080e
Binary files /dev/null and b/win32/deps/library/parallel/R/parallel.rdb differ
diff --git a/win32/deps/library/parallel/R/parallel.rdx b/win32/deps/library/parallel/R/parallel.rdx
new file mode 100644
index 0000000..62e1342
Binary files /dev/null and b/win32/deps/library/parallel/R/parallel.rdx differ
diff --git a/win32/deps/library/parallel/doc/index.html b/win32/deps/library/parallel/doc/index.html
new file mode 100644
index 0000000..7e9613c
--- /dev/null
+++ b/win32/deps/library/parallel/doc/index.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Vignettes</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
+<img class="toplogo" src="/doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="/doc/html/index.html"><img src="/doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div>
+<h2>Vignettes from package 'parallel'</h2>
+<table width="100%">
+<col width="22%">
+<col width="2%">
+<col width="50%">
+<col width="8%">
+<col width="8%">
+<col width="8%">
+<tr><td align="right" valign="top"><a href="../../../library/parallel/doc/parallel.pdf">parallel::parallel</a></td>
+<td></td><td valign="top">Package 'parallel'</td>
+<td valign="top"><a href="../../../library/parallel/doc/parallel.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/parallel/doc/parallel.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/parallel/doc/parallel.R">R code</a></td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/parallel/doc/parallel.R b/win32/deps/library/parallel/doc/parallel.R
new file mode 100644
index 0000000..894e4bb
--- /dev/null
+++ b/win32/deps/library/parallel/doc/parallel.R
@@ -0,0 +1,224 @@
+### R code from vignette source 'parallel.Rnw'
+
+###################################################
+### code chunk number 1: parallel.Rnw:468-469 (eval = FALSE)
+###################################################
+## library(parallel)
+
+
+###################################################
+### code chunk number 2: parallel.Rnw:494-501 (eval = FALSE)
+###################################################
+## library(boot)
+## cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
+## cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
+## cd4.boot <- boot(cd4, corr, R = 999, sim = "parametric",
+##                  ran.gen = cd4.rg, mle = cd4.mle)
+## boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+##         conf = 0.9, h = atanh, hinv = tanh)
+
+
+###################################################
+### code chunk number 3: parallel.Rnw:506-516 (eval = FALSE)
+###################################################
+## cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
+## cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
+## run1 <- function(...) boot(cd4, corr, R = 500, sim = "parametric",
+##                            ran.gen = cd4.rg, mle = cd4.mle)
+## mc <- 2 # set as appropriate for your hardware
+## ## To make this reproducible:
+## set.seed(123, "L'Ecuyer")
+## cd4.boot <- do.call(c, mclapply(seq_len(mc), run1) )
+## boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+##         conf = 0.9, h = atanh, hinv = tanh)
+
+
+###################################################
+### code chunk number 4: parallel.Rnw:521-522 (eval = FALSE)
+###################################################
+## do.call(c, lapply(seq_len(mc), run1))
+
+
+###################################################
+### code chunk number 5: parallel.Rnw:526-541 (eval = FALSE)
+###################################################
+## 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)
+## ## make this reproducible
+## clusterSetRNGStream(cl, 123)
+## library(boot) # needed for c() method on master
+## cd4.boot <- do.call(c, parLapply(cl, seq_len(mc), run1) )
+## boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+##         conf = 0.9, h = atanh, hinv = tanh)
+## stopCluster(cl)
+
+
+###################################################
+### code chunk number 6: parallel.Rnw:551-564 (eval = FALSE)
+###################################################
+## cl <- makeCluster(mc)
+## cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
+## cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
+## clusterExport(cl, c("cd4.rg", "cd4.mle"))
+## junk <- clusterEvalQ(cl, library(boot)) # discard result
+## clusterSetRNGStream(cl, 123)
+## res <- clusterEvalQ(cl, boot(cd4, corr, R = 500,
+##                     sim = "parametric", ran.gen = cd4.rg, mle = cd4.mle))
+## library(boot) # needed for c() method on master
+## cd4.boot <- do.call(c, res)
+## boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+##         conf = 0.9, h = atanh, hinv = tanh)
+## stopCluster(cl)
+
+
+###################################################
+### code chunk number 7: parallel.Rnw:569-583 (eval = FALSE)
+###################################################
+## R <- 999; M <- 999 ## we would like at least 999 each
+## cd4.nest <- boot(cd4, nested.corr, R=R, stype="w", t0=corr(cd4), M=M)
+## ## nested.corr is a function in package boot
+## op <- par(pty = "s", xaxs = "i", yaxs = "i")
+## qqplot((1:R)/(R+1), cd4.nest$t[, 2], pch = ".", asp = 1,
+##         xlab = "nominal", ylab = "estimated")
+## abline(a = 0, b = 1, col = "grey")
+## abline(h = 0.05, col = "grey")
+## abline(h = 0.95, col = "grey")
+## par(op)
+## 
+## nominal <- (1:R)/(R+1)
+## actual <- cd4.nest$t[, 2]
+## 100*nominal[c(sum(actual <= 0.05), sum(actual < 0.95))]
+
+
+###################################################
+### code chunk number 8: parallel.Rnw:588-596 (eval = FALSE)
+###################################################
+## mc <- 9
+## R <- 999; M <- 999; RR <- floor(R/mc)
+## run2 <- function(...)
+##     cd4.nest <- boot(cd4, nested.corr, R=RR, stype="w", t0=corr(cd4), M=M)
+## cd4.nest <- do.call(c, mclapply(seq_len(mc), run2, mc.cores = mc) )
+## nominal <- (1:R)/(R+1)
+## actual <- cd4.nest$t[, 2]
+## 100*nominal[c(sum(actual <= 0.05), sum(actual < 0.95))]
+
+
+###################################################
+### code chunk number 9: parallel.Rnw:610-621 (eval = FALSE)
+###################################################
+## library(spatial)
+## towns <- ppinit("towns.dat")
+## tget <- function(x, r=3.5) sum(dist(cbind(x$x, x$y)) < r)
+## t0 <- tget(towns)
+## R <- 1000
+## c <- seq(0, 1, 0.1)
+## ## res[1] = 0
+## res <- c(0, sapply(c[-1], function(c)
+##     mean(replicate(R, tget(Strauss(69, c=c, r=3.5))))))
+## plot(c, res, type="l", ylab="E t")
+## abline(h=t0, col="grey")
+
+
+###################################################
+### code chunk number 10: parallel.Rnw:625-634 (eval = FALSE)
+###################################################
+## run3 <- function(c) {
+##     library(spatial)
+##     towns <- ppinit("towns.dat") # has side effects
+##     mean(replicate(R, tget(Strauss(69, c=c, r=3.5))))
+## }
+## cl <- makeCluster(10, methods = FALSE)
+## clusterExport(cl, c("R", "towns", "tget"))
+## res <- c(0, parSapply(cl, c[-1], run3)) # 10 tasks
+## stopCluster(cl)
+
+
+###################################################
+### code chunk number 11: parallel.Rnw:638-642 (eval = FALSE)
+###################################################
+## cl <- makeForkCluster(10)  # fork after the variables have been set up
+## run4 <- function(c)  mean(replicate(R, tget(Strauss(69, c=c, r=3.5))))
+## res <- c(0, parSapply(cl, c[-1], run4))
+## stopCluster(cl)
+
+
+###################################################
+### code chunk number 12: parallel.Rnw:645-647 (eval = FALSE)
+###################################################
+## run4 <- function(c)  mean(replicate(R, tget(Strauss(69, c=c, r=3.5))))
+## res <- c(0, unlist(mclapply(c[-1], run4, mc.cores = 10)))
+
+
+###################################################
+### code chunk number 13: parallel.Rnw:678-712 (eval = FALSE)
+###################################################
+## pkgs <- "<names of packages to be installed>"
+## M <- 20 # number of parallel installs
+## M <- min(M, length(pkgs))
+## library(parallel)
+## unlink("install_log")
+## cl <- makeCluster(M, outfile = "install_log")
+## clusterExport(cl, c("tars", "fakes", "gcc")) # variables needed by do_one
+## 
+## ## set up available via a call to available.packages() for
+## ## repositories containing all the packages involved and all their
+## ## dependencies.
+## DL <- utils:::.make_dependency_list(pkgs, available, recursive = TRUE)
+## DL <- lapply(DL, function(x) x[x %in% pkgs])
+## lens <- sapply(DL, length)
+## ready <- names(DL[lens == 0L])
+## done <- character() # packages already installed
+## n <- length(ready)
+## submit <- function(node, pkg)
+##     parallel:::sendCall(cl[[node]], do_one, list(pkg), tag = pkg)
+## for (i in 1:min(n, M)) submit(i, ready[i])
+## DL <- DL[!names(DL) %in% ready[1:min(n, M)]]
+## av <- if(n < M) (n+1L):M else integer() # available workers
+## while(length(done) < length(pkgs)) {
+##     d <- parallel:::recvOneResult(cl)
+##     av <- c(av, d$node)
+##     done <- c(done, d$tag)
+##     OK <- unlist(lapply(DL, function(x) all(x %in% done) ))
+##     if (!any(OK)) next
+##     p <- names(DL)[OK]
+##     m <- min(length(p), length(av)) # >= 1
+##     for (i in 1:m) submit(av[i], p[i])
+##     av <- av[-(1:m)]
+##     DL <- DL[!names(DL) %in% p[1:m]]
+## }
+
+
+###################################################
+### code chunk number 14: parallel.Rnw:725-742 (eval = FALSE)
+###################################################
+##     fn <- function(r) statistic(data, i[r, ], ...)
+##     RR <- sum(R)
+##     res <- if (ncpus > 1L && (have_mc || have_snow)) {
+##         if (have_mc) {
+##             parallel::mclapply(seq_len(RR), fn, mc.cores = ncpus)
+##         } else if (have_snow) {
+##             list(...) # evaluate any promises
+##             if (is.null(cl)) {
+##                 cl <- parallel::makePSOCKcluster(rep("localhost", ncpus))
+##                 if(RNGkind()[1L] == "L'Ecuyer-CMRG")
+##                     parallel::clusterSetRNGStream(cl)
+##                 res <- parallel::parLapply(cl, seq_len(RR), fn)
+##                 parallel::stopCluster(cl)
+##                 res
+##             } else parallel::parLapply(cl, seq_len(RR), fn)
+##         }
+##     } else lapply(seq_len(RR), fn)
+
+
+###################################################
+### code chunk number 15: parallel.Rnw:745-746 (eval = FALSE)
+###################################################
+##             list(...) # evaluate any promises
+
+
diff --git a/win32/deps/library/parallel/doc/parallel.Rnw b/win32/deps/library/parallel/doc/parallel.Rnw
new file mode 100644
index 0000000..66a3edf
--- /dev/null
+++ b/win32/deps/library/parallel/doc/parallel.Rnw
@@ -0,0 +1,803 @@
+\documentclass[a4paper]{article}
+
+\usepackage{Rd, parskip, amsmath, enumerate}
+\usepackage[round]{natbib}
+\usepackage{hyperref}
+\usepackage{color}
+\definecolor{Blue}{rgb}{0,0,0.8}
+\hypersetup{%
+colorlinks,%
+plainpages=true,%
+linkcolor=black,%
+citecolor=black,%
+urlcolor=Blue,%
+pdfstartview={XYZ null null 1},% 100%
+pdfview={XYZ null null null},%
+pdfpagemode=UseNone,% for no outline
+pdfauthor={R Core},%
+pdftitle={Package `parallel'}% Could also have pdfusetitle
+}
+
+%\VignetteIndexEntry{Package 'parallel'}
+%\VignettePackage{parallel}
+
+
+\title{Package `parallel'}
+\author{R-core}
+
+
+\begin{document}
+
+\maketitle
+
+\section{Introduction}
+
+Package \pkg{parallel} was first included in \R{} 2.14.0.  It builds
+on the work done for CRAN packages \CRANpkg{multicore} \citep{multicore}
+and \CRANpkg{snow} \citep{snow} and provides drop-in replacements for most
+of the functionality of those packages, with integrated handling of
+random-number generation.
+
+Parallelism can be done in computation at many different levels: this
+package is principally concerned with `coarse-grained
+parallelization'.  At the lowest level, modern CPUs can do several
+basic operations simultaneously (e.g.{} integer and floating-point
+arithmetic), and several implementations of external BLAS libraries
+use multiple threads to do parts of basic vector/matrix operations in
+parallel.  Several contributed \R{} packages use multiple threads at C
+level \emph{via} OpenMP or pthreads.
+
+This package handles running much larger chunks of computations in
+parallel.  A typical example is to evaluate the same \R{} function on
+many different sets of data: often simulated data as in bootstrap
+computations (or with `data' being the random-number stream).  The
+crucial point is that these chunks of computation are unrelated and do
+not need to communicate in any way.  It is often the case that the
+chunks take approximately the same length of time.  The basic
+computational model is
+\begin{enumerate}[(a)]
+\item Start up $M$ `worker' processes, and do any initialization
+  needed on the workers.
+\item Send any data required for each task to the workers.
+\item Split the task into $M$ roughly equally-sized chunks, and send
+  the chunks (including the \R{} code needed) to the workers.
+\item Wait for all the workers to complete their tasks, and ask them
+  for their results.
+\item Repeat steps (b--d) for any further tasks.
+\item Shut down the worker processes.
+\end{enumerate}
+Amongst the initializations which may be needed are to load packages
+and initialize the random-number stream.
+
+There are implementations of this model in the functions
+\code{mclapply} and \code{parLapply} as near-drop-in replacements for
+\code{lapply}.
+
+A slightly different model is to split the task into $M_1 > M$ chunks,
+send the first $M$ chunks to the workers, then repeatedly wait for any
+worker to complete and send it the next remaining task: see the
+section on `load balancing'.
+
+In principle the workers could be implemented by threads\footnote{only
+  `in principle' since the \R{} interpreter is not thread-safe.} or
+lightweight processes, but in the current implementation they are full
+processes.  They can be created in one of three ways:
+\begin{enumerate}
+\item \emph{Via} \code{system("Rscript")} or similar to launch a new
+  process on the current machine or a similar machine with an identical
+  \R{} installation.  This then needs a way to communicate between
+  master and worker processes, which is usually done \emph{via}
+  sockets.
+
+  This should be available on all \R{} platforms, although it is
+  conceivable that zealous security measures could block the
+  inter-process communication \emph{via} sockets.  Users of Windows
+  and Mac OS X may expect pop-up dialog boxes from the firewall asking
+  if an \R{} process should accept incoming connections.
+
+  Following \CRANpkg{snow}, a pool of worker processes listening
+  \emph{via} sockets for commands from the master is called a
+  `cluster' of nodes.
+
+\item \emph{Via} forking.  \emph{Fork} is a
+  concept\footnote{\url{http://en.wikipedia.org/wiki/Fork_(operating_system)}}
+  from POSIX operating systems, and should be available on all \R{}
+  platforms except Windows.  This creates a new \R{} process by taking
+  a complete copy of the master process, including the workspace and
+  state of the random-number stream.  However, the copy will (in any
+  reasonable OS) share memory pages with the master until modified so
+  forking is very fast.
+
+  The use of forking was pioneered by package \CRANpkg{multicore}.
+
+  Note that as it does share the complete process, it also shares any
+  GUI elements, for example an \R{} console and on-screen devices.
+  This can cause havoc.\footnote{Some precautions are taken on Mac OS
+    X: for example the event loops for \command{R.app} and the
+    \code{quartz} device are inhibited in the child.  This information
+    is available at C level in the \code{Rboolean} variable
+    \code{R\_isForkedChild}.}
+
+  There needs to be a way to communicate between master and worker.
+  Once again there are several possibilities since master and workers
+  share memory. In \CRANpkg{multicore} the initial fork sends an \R{}
+  expression to be evaluated to the worker, and the master process
+  opens a pipe for reading that is used by the worker to return the
+  results.  Both that and creating a cluster of nodes communicating
+  \emph{via} sockets are supported in package \pkg{parallel}.
+
+\item Using OS-level facilities to set up a means to send tasks to
+  other members of a group of machines.  There are several ways to do
+  that, and for example package \CRANpkg{snow} can make use of MPI
+  (`message passing interface') using \R{} package \CRANpkg{Rmpi}.
+  Communication overheads can dominate computation times in this
+  approach, so it is most often used on tightly-coupled networks of
+  computers with high-speed interconnects.
+
+  CRAN packages following this approach include \CRANpkg{GridR} (using
+  Condor or Globus) and \CRANpkg{Rsge} (using SGE, currently called
+  `Oracle Grid Engine').
+
+  It will not be considered further in this vignette, but those parts
+  of \pkg{parallel} which provide \CRANpkg{snow}-like functions will
+  accept \CRANpkg{snow} clusters including MPI clusters.
+\end{enumerate}
+
+The landscape of parallel computing has changed with the advent of
+shared-memory computers with multiple (and often many) CPU cores.
+Until the late 2000's parallel computing was mainly done on clusters
+of large numbers of single- or dual-CPU computers: nowadays even
+laptops have two or four cores, and servers with 8 or more cores are
+commonplace.  It is such hardware that package \pkg{parallel} is
+designed to exploit.  It can also be used with several computers
+running the same version of \R{} connected by (reasonable-speed)
+ethernet: the computers need not be running the same OS.
+
+Note that all these methods of communication use
+\code{serialize}/\code{unserialize} to send \R{} objects between
+processes.  This has limits (typically hundreds of millions of
+elements) which a well-designed parallelized algorithm should not
+approach.
+
+%<<>>=
+%library(parallel)
+%@
+
+\section{Numbers of CPUs/cores}
+
+In setting up parallel computations it can be helpful to have some
+idea of the number of CPUs or cores available, but this is a rather
+slippery concept.  Nowadays almost all physical CPUs contain two or
+more cores that run more-or-less independently (they may share parts
+of the cache memory, and they do share access to RAM).  However, on
+some processors these cores may themselves be able to run multiple
+tasks simultaneously, and some OSes (e.g.{} Windows) have the concept
+of \emph{logical} CPUs which may exceed the number of cores.
+
+Note that all a program can possibly determine is the total number of
+CPUs and/or cores available.  This is not necessarily the same as the
+number of CPUs available \emph{to the current user} which may well be
+restricted by system policies on multi-user systems.  Nor does it give
+much idea of a reasonable number of CPUs to use for the current task:
+the user may be running many \R{} processes simultaneously, and those
+processes may themselves be using multiple threads through a
+multi-threaded BLAS, compiled code using OpenMP or other low-level
+forms of parallelism.  We have even seen instances of
+\CRANpkg{multicore}'s \code{mclapply} being called
+recursively,\footnote{\code{parallel::mclapply} detects this and runs
+  nested calls serially.} generating $2n + n^2$ processes on a machine
+estimated to have $n = 16$ cores.
+
+But in so far as it is a useful guideline, function
+\code{detectCores()} tries to determine the number of CPU cores in the
+machine on which \R{} is running: it has ways to do so on all known
+current \R{} platforms.  What exactly it measures is OS-specific: we
+try where possible to report the number of physical cores available.
+
+On Windows the default is to report the number of logical CPUs.  On
+modern hardware (e.g.{} Intel \emph{Core i7}) the latter may not be
+unreasonable as hyper-threading does give a significant extra
+throughput.  What \code{detectCores(logical = FALSE)} reports is
+OS-version-dependent: on recent versions of Windows it reports the
+number of physical cores but on older versions it might report the
+number of physical CPU packages.
+
+\section{Analogues of apply functions}
+
+By far the most common direct applications of packages \CRANpkg{multicore}
+and \CRANpkg{snow} have been to provide parallelized replacements of
+\code{lapply}, \code{sapply}, \code{apply} and related functions.
+
+As analogues of \code{lapply} there are
+\begin{verbatim}
+parLapply(cl, x, FUN, ...)
+mclapply(X, FUN, ..., mc.cores)
+\end{verbatim}
+where \code{mclapply} is not available\footnote{except as a stub
+  which simply calls \code{lapply}.} on Windows and has further
+arguments discussed on its help page.  They differ slightly in
+philosophy: \code{mclapply} sets up a pool of \code{mc.cores} workers
+just for this computation, whereas \code{parLapply} uses a less
+ephemeral pool specified by the object \code{cl} created by a call to
+\code{makeCluster} (which \emph{inter alia} specifies the size of the
+pool).  So the workflow is
+\begin{verbatim}
+cl <- makeCluster(<size of pool>)
+# one or more parLapply calls
+stopCluster(cl)
+\end{verbatim}
+% we could arrange to stop a cluster when cl is gc-ed
+
+For matrices there are the rarely used \code{parApply} and
+\code{parCapply} functions, and the more commonly used
+\code{parRapply}, a parallel row \code{apply} for a matrix.
+
+\section{SNOW Clusters}
+
+The package contains a slightly revised copy of much of \CRANpkg{snow},
+and the functions it contains can also be used with clusters created
+by \CRANpkg{snow} (provided the package is on the search path).
+
+Two functions are provided to create SNOW clusters,
+\code{makePSOCKcluster} (a streamlined version of
+\code{snow::makeSOCKcluster}) and (except on Windows)
+\code{makeForkCluster}.  They differ only in the way they spawn worker
+processes: \code{makePSOCKcluster} uses \code{Rscript} to launch
+further copies of \R{} (on the same host or optionally elsewhere)
+whereas \code{makeForkCluster} forks the workers on the current host
+(which thus inherit the environment of the current session).
+
+These functions would normally be called \emph{via} \code{makeCluster}.
+
+Both \code{stdout()} and \code{stderr()} of the workers are
+redirected, by default being discarded but they can be logged using
+the \code{outfile} option.  Note that the previous sentence refers to
+the \emph{connections} of those names, not the C-level file handles.
+Thus properly written \R{} packages using \code{Rprintf} will have
+their output redirected, but not direct C-level output.
+
+A default cluster can be registered by a call to
+\code{setDefaultCluster()}: this is then used whenever one of the
+higher-level functions such as \code{parApply} is called without an
+explicit cluster.  A little care is needed when repeatedly re-using a
+pool of workers, as their workspaces will accumulate objects from past
+usage, and packages may get added to the search path.
+
+If clusters are to be created on a host other than the current machine
+(\samp{localhost}), \code{makeCluster} may need to be be given more
+information in the shape of extra arguments.
+\begin{itemize}
+  \item If the worker machines are not set up in exactly the same way
+    as the master (for example if they are of a different
+    architecture), use \code{homogeneous = FALSE} and perhaps set
+    \code{rscript} to the full path to \command{Rscript} on the workers.
+  \item The worker machines need to know how to communicate with the
+    master: normally this can be done using the hostname found by
+    \code{Sys.info()}, but on private networks this need not be the
+    case and \code{master} may need to be supplied as a name or IP
+    address, e.g. \code{master = "192.168.1.111"}.
+  \item By default \command{ssh} is used to launch R on the workers.
+    If it is known by some other name, use e.g.{}
+    \code{rshcmd = "plink.exe"} for a Windows box using PUTTY.
+    SSH should be set
+    up to use silent authentication: setups which require a password
+    to be supplied may or may not work.
+  \item Socket communication is done over port 10187: site policies
+    might require some other port to be used, in which case set
+    argument \code{port} or environment variable \env{R\_PARALLEL\_PORT}.
+\end{itemize}
+
+\section{Forking}
+
+Except on Windows, the package contains a copy of \CRANpkg{multicore}:
+there a few names with the added prefix \code{mc}, e.g.{}
+\code{mccollect} and \code{mcparallel}.  (Package \CRANpkg{multicore} used
+these names, but also the versions without the prefix which are too
+easily masked: e.g.{} package \CRANpkg{lattice} has a function
+\code{parallel}.)
+
+The low-level functions from \CRANpkg{multicore} are provided but not
+exported from the namespace.
+
+There are high-level functions \code{mclapply} and \code{pvec}: unlike
+the versions in \CRANpkg{multicore} these default to 2 cores, but this can
+be controlled by setting \code{options("mc.cores")}, and that takes
+its default from environment variable \code{MC\_CORES} when the
+package is loaded.  (Setting this to \code{1} inhibits parallel
+operation: there are stub versions of these functions on Windows which
+force \code{mc.cores = 1}.)
+
+As from \R{} 2.15.0, \code{mcmapply} and \code{mcMap} provide
+analogues of \code{mapply} and \code{Map}.
+
+Note the earlier comments about using forking in a GUI environment.
+
+The parent and forked \R{} processes share the per-session temporary
+directory \code{tempdir()}, which can be a problem as a lot of code
+has assumed it is private to the \R{} process.  Further, prior to \R{}
+2.14.1 it was possibly for \code{tempfile} in two processes to select
+the same filename in that temporary directory, and do it sufficiently
+simultaneously that neither saw it as being in use.
+
+The forked workers share file handles with the master: this means that
+any output from the worker should go to the same place as
+\file{stdout} and \file{stderr} of the master process.  (This does not
+work reliably on all OSes: problems have also been noted when forking
+a session that is processing batch input from \file{stdin}.)  Setting
+argument \code{mc.silent = TRUE} silences \file{stdout} for the child:
+\file{stderr} is not affected.
+
+Sharing file handles also impacts graphics devices as forked workers
+inherit all open graphics devices of the parent: they should not
+attempt to make use of them.
+
+
+\section{Random-number generation}
+
+Some care is needed with parallel computation using (pseudo-)random
+numbers: the processes/threads which run separate parts of the
+computation need to run independent (and preferably reproducible)
+random-number streams.  One way to avoid any difficulties is (where
+possible) to do all the randomization in the master process: this is
+done where possible in package \CRANpkg{boot} (version 1.3-1 and later).
+
+When an \R{} process is started up it takes the random-number seed
+from the object \code{.Random.seed} in a saved workspace or constructs
+one from the clock time and process ID when random-number generation
+is first used (see the help on \code{RNG}).  Thus worker processes
+might get the same seed because a workspace containing
+\code{.Random.seed} was restored or the random number generator has
+been used before forking: otherwise these get a non-reproducible seed
+(but with very high probability a different seed for each worker).
+
+The alternative is to set separate seeds for each worker process in
+some reproducible way from the seed in the master process.  This is
+generally plenty safe enough, but there have been worries that the
+random-number streams in the workers might somehow get into step.  One
+approach is to take the seeds a long way apart in the random-number
+stream: note that random numbers taken a long (fixed) distance apart
+in a single stream are not necessarily (and often are not) as
+independent as those taken a short distance apart.  Yet another idea
+(as used by e.g.{} \pkg{JAGS}) is to use different random-number
+generators for each separate run/process.
+
+Package \pkg{parallel} contains an implementation of the ideas of
+\citet{lecuyer.2002}: this uses a single RNG and make \emph{streams}
+with seeds $2^{127}$ steps apart in the random number stream (which
+has period approximately $2^{191}$).  This is based on the generator
+of \citet{lecuyer.1999}; the reason for choosing that
+generator\footnote{apart from the commonality of authors!} is that it
+has a fairly long period with a small seed (6 integers), and unlike
+\R{}'s default \code{"Mersenne-Twister"} RNG, it is simple to advance
+the seed by a fixed number of steps.  The generator is the combination
+of two:
+\begin{eqnarray*}
+  x_n &=& 1403580 \times x_{n-2} - 810728 \times x_{n-3} \mod{(2^{32} - 209)}\\
+  y_n &=& 527612 \times y_{n-1} - 1370589 \times y_{n-3} \mod{(2^{32} - 22853)}\\
+  z_n &=& (x_n - y_n) \mod{4294967087}\\
+  u_n &=& z_n/4294967088\ \mbox{unless $z_n = 0$}
+\end{eqnarray*}
+The `seed' then consists of $(x_n, x_{n-1}, x_{n-2}, y_n, y_{n-1},
+y_{n-2})$, and the recursion for each of $x_n$ and $y_n$ can have
+pre-computed coefficients for $k$ steps ahead.  For $k = 2^{127}$, the
+seed is advanced by $k$ steps by \R{} call
+\code{.Random.seed <- nextRNGStream(.Random.seed)}.
+
+% use \verb to get consistent quote mapping.
+The \citet{lecuyer.1999} generator is available in \R{} as from
+version 2.14.0 \emph{via} \verb|RNGkind("L'Ecuyer-CMRG")|.  Thus using
+the ideas of \citet{lecuyer.2002} is as simple as
+\begin{verbatim}
+RNGkind("L'Ecuyer-CMRG")
+set.seed(<something>)
+## start M workers
+s <- .Random.seed
+for (i in 1:M) {
+    s <- nextRNGStream(s)
+    # send s to worker i as .Random.seed
+}
+\end{verbatim}
+and this is is implemented for SNOW clusters in function
+\code{clusterSetRNGStream}, and as part of \code{mcparallel} and
+\code{mclapply} (by default).
+
+Apart from \emph{streams} ($2^{127}$ steps apart), there is the concept of
+\emph{sub-streams} starting from seeds $2^{76}$ steps apart.  Function
+\code{nextRNGSubStream} advances to the next substream.
+
+A direct \R{} interface to the (clunkier) original C implementation is
+available in CRAN package \CRANpkg{rlecuyer} \citep{rlecuyer}.  That works
+with named streams, each of which have three 6-element seeds
+associated with them.  This can easily be emulated in \R{} by storing
+\code{.Random.seed} at suitable times.  There is another interface
+using S4 classes in package \CRANpkg{rstream} \citep{rstream}.
+
+\section{Load balancing}
+
+The introduction mentioned a different strategy which dynamically
+allocates tasks to workers: this is sometimes known as `load
+balancing' and is implemented in \code{mclapply(mc.preschedule =
+  FALSE)}, \code{clusterApplyLB} and wrappers such as
+\code{parLapplyLB} and \code{clusterMap(.scheduling = "dynamic")}.
+
+Load balancing is potentially advantageous when the tasks take quite
+dissimilar amounts of computation time, or where the nodes are of
+disparate capabilities.  But some \emph{caveats} are in order:
+\begin{enumerate}[(a)]
+\item Random number streams are allocated to nodes, so if the tasks
+  involve random numbers they are likely to be non-repeatable (as the
+  allocation of tasks to nodes depends on the workloads of the nodes).
+  It would however take only slightly more work to allocate a stream to
+  each task.
+\item More care is needed is allocating the tasks.  If 1000 tasks need
+  to be allocated to 10 nodes, the standard approach send chunks of
+  100 tasks to each of the nodes.  The load-balancing approach sends
+  tasks one at a time to a node, and the communication overhead may be
+  high.  So it makes sense to have substantially more tasks than
+  nodes, but not by a factor of 100 (and maybe not by 10).
+\end{enumerate}
+
+\section{Portability considerations}
+
+People wanting to provide parallel facilities in their code need to
+decide how hard they want to try to be portable and efficient: no
+approach works optimally on all platforms.
+
+Using \code{mclapply} is usually the simplest approach, but will run
+serial versions of the code on Windows.  This may suffice where
+parallel computation is only required for use on a single multi-core
+Unix-alike server---for \code{mclapply} can only run on a single
+shared-memory system.  There is fallback to serial use when needed, by
+setting \code{mc.cores = 1}.
+
+Using \code{parLapply} will work everywhere that socket communication
+works, and can be used, for example, to harness all the CPU cores in a
+lab of machines that are not otherwise in use.  But socket
+communication may be blocked even when using a single machine and is
+quite likely to be blocked between machines in a lab.  There is not
+currently any fallback to serial use, nor could there easily be (as
+the workers start with a different \R{} environment from the one
+current on the master).
+
+An example of providing access to both approaches as well as serial
+code is package \CRANpkg{boot}, version \code{1.3-3} or later.
+
+\section{Extended examples}
+
+\SweaveOpts{eval=FALSE}
+<<hide=TRUE>>=
+library(parallel)
+@
+
+Probably the most common use of coarse-grained parallelization in
+statistics is to do multiple simulation runs, for example to do large
+numbers of bootstrap replicates or several runs of an MCMC simulation.
+We show an example of each.
+
+Note that some of the examples will only work serially on Windows and
+some actually are computer-intensive.
+
+\subsection{Bootstrapping}
+
+Package \CRANpkg{boot} \citep{boot} is support software for the monograph
+by \citet{Davison.Hinkley.97}.  Bootstrapping is often used as an
+example of easy parallelization, and some methods of producing
+confidence intervals require many thousands of bootstrap samples.
+As from version \code{1.3-1} the package itself has parallel support
+within its main functions, but we illustrate how to use the original
+(serial) functions in parallel computations.
+
+We consider two examples using the \code{cd4} dataset from package
+\CRANpkg{boot} where the interest is in the correlation between before and
+after measurements.  The first is a straight simulation, often called
+a \emph{parametric bootstrap}.  The non-parallel form is
+<<>>=
+library(boot)
+cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
+cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
+cd4.boot <- boot(cd4, corr, R = 999, sim = "parametric",
+                 ran.gen = cd4.rg, mle = cd4.mle)
+boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+        conf = 0.9, h = atanh, hinv = tanh)
+@
+
+To do this with \code{mclapply} we need to break this into separate
+runs, and we will illustrate two runs of 500 simulations each:
+<<>>=
+cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
+cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
+run1 <- function(...) boot(cd4, corr, R = 500, sim = "parametric",
+                           ran.gen = cd4.rg, mle = cd4.mle)
+mc <- 2 # set as appropriate for your hardware
+## To make this reproducible:
+set.seed(123, "L'Ecuyer")
+cd4.boot <- do.call(c, mclapply(seq_len(mc), run1) )
+boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+        conf = 0.9, h = atanh, hinv = tanh)
+@
+There are many ways to program things like this: often the neatest is
+to encapsulate the computation in a function, so this is the parallel
+form of
+<<eval=FALSE>>=
+do.call(c, lapply(seq_len(mc), run1))
+@
+
+To run this with \code{parLapply} we could take a similar approach by
+<<>>=
+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)
+## make this reproducible
+clusterSetRNGStream(cl, 123)
+library(boot) # needed for c() method on master
+cd4.boot <- do.call(c, parLapply(cl, seq_len(mc), run1) )
+boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+        conf = 0.9, h = atanh, hinv = tanh)
+stopCluster(cl)
+@
+Note that whereas with \code{mclapply} all the packages and objects
+we use are automatically available on the workers, this is not in
+general\footnote{it is with clusters set up with
+  \code{makeForkCluster}.} the case with the \code{parLapply}
+approach.  There is often a delicate choice of where to do the
+computations: for example we could compute \code{cd4.mle} on the
+workers (as above) or on the master and send the value to the
+workers. We illustrate the latter by the following code
+<<>>=
+cl <- makeCluster(mc)
+cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
+cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
+clusterExport(cl, c("cd4.rg", "cd4.mle"))
+junk <- clusterEvalQ(cl, library(boot)) # discard result
+clusterSetRNGStream(cl, 123)
+res <- clusterEvalQ(cl, boot(cd4, corr, R = 500,
+                    sim = "parametric", ran.gen = cd4.rg, mle = cd4.mle))
+library(boot) # needed for c() method on master
+cd4.boot <- do.call(c, res)
+boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+        conf = 0.9, h = atanh, hinv = tanh)
+stopCluster(cl)
+@
+
+Running the double bootstrap on the same problem is far more
+computer-intensive.  The standard version is
+<<fig=TRUE>>=
+R <- 999; M <- 999 ## we would like at least 999 each
+cd4.nest <- boot(cd4, nested.corr, R=R, stype="w", t0=corr(cd4), M=M)
+## nested.corr is a function in package boot
+op <- par(pty = "s", xaxs = "i", yaxs = "i")
+qqplot((1:R)/(R+1), cd4.nest$t[, 2], pch = ".", asp = 1,
+        xlab = "nominal", ylab = "estimated")
+abline(a = 0, b = 1, col = "grey")
+abline(h = 0.05, col = "grey")
+abline(h = 0.95, col = "grey")
+par(op)
+
+nominal <- (1:R)/(R+1)
+actual <- cd4.nest$t[, 2]
+100*nominal[c(sum(actual <= 0.05), sum(actual < 0.95))]
+@
+which took about 55 secs on one core of an 8-core Linux server.
+
+Using \code{mclapply} we could use
+<<eval=FALSE>>=
+mc <- 9
+R <- 999; M <- 999; RR <- floor(R/mc)
+run2 <- function(...)
+    cd4.nest <- boot(cd4, nested.corr, R=RR, stype="w", t0=corr(cd4), M=M)
+cd4.nest <- do.call(c, mclapply(seq_len(mc), run2, mc.cores = mc) )
+nominal <- (1:R)/(R+1)
+actual <- cd4.nest$t[, 2]
+100*nominal[c(sum(actual <= 0.05), sum(actual < 0.95))]
+@
+which ran in 11 secs (elapsed) using all of that server.
+
+\subsection{MCMC runs}
+
+\citet{Ripley.88} discusses the maximum-likelihood estimation of the
+Strauss process, which is done by solving a moment equation
+\[
+E_c T = t
+\]
+where $T$ is the number of $R$-close pairs and $t$ is the observed
+value, $30$ in the following example.  A serial approach to the
+initial exploration might be
+<<>>=
+library(spatial)
+towns <- ppinit("towns.dat")
+tget <- function(x, r=3.5) sum(dist(cbind(x$x, x$y)) < r)
+t0 <- tget(towns)
+R <- 1000
+c <- seq(0, 1, 0.1)
+## res[1] = 0
+res <- c(0, sapply(c[-1], function(c)
+    mean(replicate(R, tget(Strauss(69, c=c, r=3.5))))))
+plot(c, res, type="l", ylab="E t")
+abline(h=t0, col="grey")
+@
+which takes about 20 seconds today, but many hours when first done
+in 1985.  A parallel version might be
+<<>>=
+run3 <- function(c) {
+    library(spatial)
+    towns <- ppinit("towns.dat") # has side effects
+    mean(replicate(R, tget(Strauss(69, c=c, r=3.5))))
+}
+cl <- makeCluster(10, methods = FALSE)
+clusterExport(cl, c("R", "towns", "tget"))
+res <- c(0, parSapply(cl, c[-1], run3)) # 10 tasks
+stopCluster(cl)
+@
+which took about 4.5 secs, plus 2 secs to set up the cluster.  Using a
+fork cluster (not on Windows) makes the startup much faster and setup easier:
+<<eval=FALSE>>=
+cl <- makeForkCluster(10)  # fork after the variables have been set up
+run4 <- function(c)  mean(replicate(R, tget(Strauss(69, c=c, r=3.5))))
+res <- c(0, parSapply(cl, c[-1], run4))
+stopCluster(cl)
+@
+As one might expect, the \code{mclapply} version is slightly simpler:
+<<eval=FALSE>>=
+run4 <- function(c)  mean(replicate(R, tget(Strauss(69, c=c, r=3.5))))
+res <- c(0, unlist(mclapply(c[-1], run4, mc.cores = 10)))
+@
+If you do not have as many as 10 cores, you might want to consider
+load-balancing in a task like this as the time taken per simulation
+does vary with \code{c}.  This can be done using
+\code{mclapply(mc.preschedule = FALSE)} or \code{parSapplyLB}.  The
+disadvantage is that the results would not be reproducible (which does
+not matter here).
+
+\subsection{Package installation}
+
+With over 4000 \R{} packages available, it is often helpful to do a
+comprehensive install in parallel. We provide facilities to do so in
+\code{install.packages} \emph{via} a parallel \command{make}, but that
+approach may not be suitable.\footnote{A parallel \command{make} might
+  not be available, and we have seen a couple of instances of package
+  installation not working correctly when run from \command{make}.}
+Some of the tasks take many times longer than others, and we do not
+know in advance which these are.
+
+We illustrate an approach using package \pkg{parallel} which is used
+on part of the CRAN check farm.  Suppose that there is a function
+\code{do\_one(pkg)} which installs a single package and then returns.
+Then the task is to run \code{do\_one} on as many of the \code{M}
+workers as possible whilst ensuring that all of the direct and
+indirect dependencies of \code{pkg} are installed before \code{pkg}
+itself.  As the installation of a single package can block several
+others, we do need to allow the number of installs running
+simultaneously to vary: the following code achieves that, but needs to
+use low-level functions to do so.
+
+<<eval=FALSE>>=
+pkgs <- "<names of packages to be installed>"
+M <- 20 # number of parallel installs
+M <- min(M, length(pkgs))
+library(parallel)
+unlink("install_log")
+cl <- makeCluster(M, outfile = "install_log")
+clusterExport(cl, c("tars", "fakes", "gcc")) # variables needed by do_one
+
+## set up available via a call to available.packages() for
+## repositories containing all the packages involved and all their
+## dependencies.
+DL <- utils:::.make_dependency_list(pkgs, available, recursive = TRUE)
+DL <- lapply(DL, function(x) x[x %in% pkgs])
+lens <- sapply(DL, length)
+ready <- names(DL[lens == 0L])
+done <- character() # packages already installed
+n <- length(ready)
+submit <- function(node, pkg)
+    parallel:::sendCall(cl[[node]], do_one, list(pkg), tag = pkg)
+for (i in 1:min(n, M)) submit(i, ready[i])
+DL <- DL[!names(DL) %in% ready[1:min(n, M)]]
+av <- if(n < M) (n+1L):M else integer() # available workers
+while(length(done) < length(pkgs)) {
+    d <- parallel:::recvOneResult(cl)
+    av <- c(av, d$node)
+    done <- c(done, d$tag)
+    OK <- unlist(lapply(DL, function(x) all(x %in% done) ))
+    if (!any(OK)) next
+    p <- names(DL)[OK]
+    m <- min(length(p), length(av)) # >= 1
+    for (i in 1:m) submit(av[i], p[i])
+    av <- av[-(1:m)]
+    DL <- DL[!names(DL) %in% p[1:m]]
+}
+@
+
+\subsection{Passing \code{...}}
+
+The semantics of \code{...} do not fit well with parallel operation,
+since lazy evaluation may be delayed until the tasks have been sent to
+the workers.  This is no problem in the forking approach, as the
+information needed for lazy evaluation will be present in the forked workers.
+
+For \pkg{snow}-like clusters the trick is to ensure that \code{...}
+has any promises forced whilst the information is still available.
+This is how \CRANpkg{boot} does it:
+<<eval=FALSE>>=
+    fn <- function(r) statistic(data, i[r, ], ...)
+    RR <- sum(R)
+    res <- if (ncpus > 1L && (have_mc || have_snow)) {
+        if (have_mc) {
+            parallel::mclapply(seq_len(RR), fn, mc.cores = ncpus)
+        } else if (have_snow) {
+            list(...) # evaluate any promises
+            if (is.null(cl)) {
+                cl <- parallel::makePSOCKcluster(rep("localhost", ncpus))
+                if(RNGkind()[1L] == "L'Ecuyer-CMRG")
+                    parallel::clusterSetRNGStream(cl)
+                res <- parallel::parLapply(cl, seq_len(RR), fn)
+                parallel::stopCluster(cl)
+                res
+            } else parallel::parLapply(cl, seq_len(RR), fn)
+        }
+    } else lapply(seq_len(RR), fn)
+@
+Note that \code{...} is an argument to \code{boot}, and so after
+<<eval=FALSE>>=
+            list(...) # evaluate any promises
+@
+it refers to objects within the evaluation frame of \code{boot} and
+hence the environment of \code{fn} which will therefore be sent to the
+workers along with \code{fn}.
+
+\section{Differences from earlier versions}
+
+The support of parallel RNG differs from \CRANpkg{snow}: \CRANpkg{multicore}
+had no support.
+
+\subsection{Differences from multicore}
+
+\CRANpkg{multicore} had quite elaborate code to inhibit the Aqua event
+loop for \command{R.app} and the event loop for the \code{quartz}
+graphics device.  This has been replaced by recording a flag in the
+\R{} executable for a child process.
+
+The version of \code{detectCores} here is biased towards the number of
+physical CPUs.  This was occasioned by serious problems on Sparc Solaris
+where \CRANpkg{multicore} defaulted to a silly number of processes.
+
+Functions \code{fork} and \code{kill} have \code{mc} prefixes and are
+not exported.  This avoids confusion with other packages (such as
+package \CRANpkg{fork}), and note that \code{mckill} is not as general as
+\code{tools::pskill}.
+
+Aliased functions \code{collect} and \code{parallel} are no longer provided.
+
+\subsection{Differences from snow}
+
+\CRANpkg{snow} set a timeout that exceeded the maximum value required by
+POSIX, and did not provide a means to set the timeout on the workers.
+This resulted in process interlocks on Solaris.
+
+\code{makeCluster} creates MPI or NWS clusters by calling \CRANpkg{snow}.
+
+\code{makePSOCKcluster} has been streamlined, as package \pkg{parallel} is in
+a known location on all systems, and \command{Rscript} is these days
+always available.  Logging of workers is set up to append to the file,
+so multiple processes can be logged.
+
+\code{parSapply} has been brought into line with \code{sapply}.
+
+\code{clusterMap()} gains \code{SIMPLIFY} and \code{USE.NAMES}
+arguments to make it a parallel version of \code{mapply} and \code{Map}.
+
+The timing interface has not been copied.
+
+\bibliographystyle{jss}
+\bibliography{parallel}
+
+\end{document}
+
+%%% Local Variables:
+%%% mode: latex
+%%% TeX-master: t
+%%% End:
diff --git a/win32/deps/library/parallel/doc/parallel.pdf b/win32/deps/library/parallel/doc/parallel.pdf
new file mode 100644
index 0000000..f320578
Binary files /dev/null and b/win32/deps/library/parallel/doc/parallel.pdf differ
diff --git a/win32/deps/library/parallel/help/AnIndex b/win32/deps/library/parallel/help/AnIndex
new file mode 100644
index 0000000..73c8864
--- /dev/null
+++ b/win32/deps/library/parallel/help/AnIndex
@@ -0,0 +1,31 @@
+parallel-package	parallel-package
+clusterApply	clusterApply
+clusterApplyLB	clusterApply
+clusterCall	clusterApply
+clusterEvalQ	clusterApply
+clusterExport	clusterApply
+clusterMap	clusterApply
+clusterSetRNGStream	RngStream
+clusterSplit	clusterApply
+detectCores	detectCores
+makeCluster	makeCluster
+makeForkCluster	makeCluster
+makePSOCKcluster	makeCluster
+mc.reset.stream	RngStream
+mclapply	mcdummies
+mcMap	mcdummies
+mcmapply	mcdummies
+nextRNGStream	RngStream
+nextRNGSubStream	RngStream
+parallel	parallel-package
+parApply	clusterApply
+parCapply	clusterApply
+parLapply	clusterApply
+parLapplyLB	clusterApply
+parRapply	clusterApply
+parSapply	clusterApply
+parSapplyLB	clusterApply
+pvec	mcdummies
+setDefaultCluster	makeCluster
+splitIndices	splitIndices
+stopCluster	makeCluster
diff --git a/win32/deps/library/parallel/help/aliases.rds b/win32/deps/library/parallel/help/aliases.rds
new file mode 100644
index 0000000..ae25520
Binary files /dev/null and b/win32/deps/library/parallel/help/aliases.rds differ
diff --git a/win32/deps/library/parallel/help/parallel.rdb b/win32/deps/library/parallel/help/parallel.rdb
new file mode 100644
index 0000000..5a898cf
Binary files /dev/null and b/win32/deps/library/parallel/help/parallel.rdb differ
diff --git a/win32/deps/library/parallel/help/parallel.rdx b/win32/deps/library/parallel/help/parallel.rdx
new file mode 100644
index 0000000..f74bb92
Binary files /dev/null and b/win32/deps/library/parallel/help/parallel.rdx differ
diff --git a/win32/deps/library/parallel/help/paths.rds b/win32/deps/library/parallel/help/paths.rds
new file mode 100644
index 0000000..d177900
Binary files /dev/null and b/win32/deps/library/parallel/help/paths.rds differ
diff --git a/win32/deps/library/parallel/html/00Index.html b/win32/deps/library/parallel/html/00Index.html
new file mode 100644
index 0000000..2f202ea
--- /dev/null
+++ b/win32/deps/library/parallel/html/00Index.html
@@ -0,0 +1,86 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Support for Parallel computation in 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> Support for Parallel computation in R
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;parallel&rsquo; version 2.15.2</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../doc/index.html">Overview of user guides and package vignettes</a>; browse <a href="../doc">directory</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td width="25%"><a href="parallel-package.html">parallel-package</a></td>
+<td>Support for Parallel Computation</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">clusterApply</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">clusterApplyLB</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">clusterCall</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">clusterEvalQ</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">clusterExport</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">clusterMap</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="RngStream.html">clusterSetRNGStream</a></td>
+<td>Implementation of Pierre L'Ecuyer's RngStreams</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">clusterSplit</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="detectCores.html">detectCores</a></td>
+<td>Detect the Number of CPU Cores</td></tr>
+<tr><td width="25%"><a href="makeCluster.html">makeCluster</a></td>
+<td>Create a Parallel Socket Cluster</td></tr>
+<tr><td width="25%"><a href="makeCluster.html">makeForkCluster</a></td>
+<td>Create a Parallel Socket Cluster</td></tr>
+<tr><td width="25%"><a href="makeCluster.html">makePSOCKcluster</a></td>
+<td>Create a Parallel Socket Cluster</td></tr>
+<tr><td width="25%"><a href="RngStream.html">mc.reset.stream</a></td>
+<td>Implementation of Pierre L'Ecuyer's RngStreams</td></tr>
+<tr><td width="25%"><a href="mcdummies.html">mclapply</a></td>
+<td>Serial versions of 'mclapply', 'mcmapply' and 'pvec'</td></tr>
+<tr><td width="25%"><a href="mcdummies.html">mcMap</a></td>
+<td>Serial versions of 'mclapply', 'mcmapply' and 'pvec'</td></tr>
+<tr><td width="25%"><a href="mcdummies.html">mcmapply</a></td>
+<td>Serial versions of 'mclapply', 'mcmapply' and 'pvec'</td></tr>
+<tr><td width="25%"><a href="RngStream.html">nextRNGStream</a></td>
+<td>Implementation of Pierre L'Ecuyer's RngStreams</td></tr>
+<tr><td width="25%"><a href="RngStream.html">nextRNGSubStream</a></td>
+<td>Implementation of Pierre L'Ecuyer's RngStreams</td></tr>
+<tr><td width="25%"><a href="parallel-package.html">parallel</a></td>
+<td>Support for Parallel Computation</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">parApply</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">parCapply</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">parLapply</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">parLapplyLB</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">parRapply</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">parSapply</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="clusterApply.html">parSapplyLB</a></td>
+<td>Apply Operations using Clusters</td></tr>
+<tr><td width="25%"><a href="mcdummies.html">pvec</a></td>
+<td>Serial versions of 'mclapply', 'mcmapply' and 'pvec'</td></tr>
+<tr><td width="25%"><a href="makeCluster.html">setDefaultCluster</a></td>
+<td>Create a Parallel Socket Cluster</td></tr>
+<tr><td width="25%"><a href="splitIndices.html">splitIndices</a></td>
+<td>Divide Tasks for Distribution in a Cluster</td></tr>
+<tr><td width="25%"><a href="makeCluster.html">stopCluster</a></td>
+<td>Create a Parallel Socket Cluster</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/parallel/html/R.css b/win32/deps/library/parallel/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/parallel/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/parallel/libs/i386/parallel.dll b/win32/deps/library/parallel/libs/i386/parallel.dll
new file mode 100644
index 0000000..5eecf2b
Binary files /dev/null and b/win32/deps/library/parallel/libs/i386/parallel.dll differ
diff --git a/win32/deps/library/parallel/po/da/LC_MESSAGES/R-parallel.mo b/win32/deps/library/parallel/po/da/LC_MESSAGES/R-parallel.mo
new file mode 100644
index 0000000..2ce98a5
Binary files /dev/null and b/win32/deps/library/parallel/po/da/LC_MESSAGES/R-parallel.mo differ
diff --git a/win32/deps/library/parallel/po/da/LC_MESSAGES/parallel.mo b/win32/deps/library/parallel/po/da/LC_MESSAGES/parallel.mo
new file mode 100644
index 0000000..4357c09
Binary files /dev/null and b/win32/deps/library/parallel/po/da/LC_MESSAGES/parallel.mo differ
diff --git a/win32/deps/library/parallel/po/de/LC_MESSAGES/R-parallel.mo b/win32/deps/library/parallel/po/de/LC_MESSAGES/R-parallel.mo
new file mode 100644
index 0000000..70b7cae
Binary files /dev/null and b/win32/deps/library/parallel/po/de/LC_MESSAGES/R-parallel.mo differ
diff --git a/win32/deps/library/parallel/po/de/LC_MESSAGES/parallel.mo b/win32/deps/library/parallel/po/de/LC_MESSAGES/parallel.mo
new file mode 100644
index 0000000..4be6904
Binary files /dev/null and b/win32/deps/library/parallel/po/de/LC_MESSAGES/parallel.mo differ
diff --git a/win32/deps/library/parallel/po/en quot/LC_MESSAGES/R-parallel.mo b/win32/deps/library/parallel/po/en quot/LC_MESSAGES/R-parallel.mo
new file mode 100644
index 0000000..d043446
Binary files /dev/null and b/win32/deps/library/parallel/po/en quot/LC_MESSAGES/R-parallel.mo differ
diff --git a/win32/deps/library/parallel/po/en quot/LC_MESSAGES/parallel.mo b/win32/deps/library/parallel/po/en quot/LC_MESSAGES/parallel.mo
new file mode 100644
index 0000000..65ac5a3
Binary files /dev/null and b/win32/deps/library/parallel/po/en quot/LC_MESSAGES/parallel.mo differ
diff --git a/win32/deps/library/parallel/po/fr/LC_MESSAGES/R-parallel.mo b/win32/deps/library/parallel/po/fr/LC_MESSAGES/R-parallel.mo
new file mode 100644
index 0000000..9352ac0
Binary files /dev/null and b/win32/deps/library/parallel/po/fr/LC_MESSAGES/R-parallel.mo differ
diff --git a/win32/deps/library/parallel/po/fr/LC_MESSAGES/parallel.mo b/win32/deps/library/parallel/po/fr/LC_MESSAGES/parallel.mo
new file mode 100644
index 0000000..fd2b3cb
Binary files /dev/null and b/win32/deps/library/parallel/po/fr/LC_MESSAGES/parallel.mo differ
diff --git a/win32/deps/library/parallel/po/ko/LC_MESSAGES/R-parallel.mo b/win32/deps/library/parallel/po/ko/LC_MESSAGES/R-parallel.mo
new file mode 100644
index 0000000..f4c3e63
Binary files /dev/null and b/win32/deps/library/parallel/po/ko/LC_MESSAGES/R-parallel.mo differ
diff --git a/win32/deps/library/parallel/po/ko/LC_MESSAGES/parallel.mo b/win32/deps/library/parallel/po/ko/LC_MESSAGES/parallel.mo
new file mode 100644
index 0000000..058de45
Binary files /dev/null and b/win32/deps/library/parallel/po/ko/LC_MESSAGES/parallel.mo differ
diff --git a/win32/deps/library/parallel/po/pl/LC_MESSAGES/R-parallel.mo b/win32/deps/library/parallel/po/pl/LC_MESSAGES/R-parallel.mo
new file mode 100644
index 0000000..e373722
Binary files /dev/null and b/win32/deps/library/parallel/po/pl/LC_MESSAGES/R-parallel.mo differ
diff --git a/win32/deps/library/parallel/po/pl/LC_MESSAGES/parallel.mo b/win32/deps/library/parallel/po/pl/LC_MESSAGES/parallel.mo
new file mode 100644
index 0000000..307a06d
Binary files /dev/null and b/win32/deps/library/parallel/po/pl/LC_MESSAGES/parallel.mo differ
diff --git a/win32/deps/library/parallel/po/ru/LC_MESSAGES/R-parallel.mo b/win32/deps/library/parallel/po/ru/LC_MESSAGES/R-parallel.mo
new file mode 100644
index 0000000..6073494
Binary files /dev/null and b/win32/deps/library/parallel/po/ru/LC_MESSAGES/R-parallel.mo differ
diff --git a/win32/deps/library/parallel/po/ru/LC_MESSAGES/parallel.mo b/win32/deps/library/parallel/po/ru/LC_MESSAGES/parallel.mo
new file mode 100644
index 0000000..872e1f1
Binary files /dev/null and b/win32/deps/library/parallel/po/ru/LC_MESSAGES/parallel.mo differ
diff --git a/win32/deps/library/parallel/po/zh_CN/LC_MESSAGES/R-parallel.mo b/win32/deps/library/parallel/po/zh_CN/LC_MESSAGES/R-parallel.mo
new file mode 100644
index 0000000..ba35ec1
Binary files /dev/null and b/win32/deps/library/parallel/po/zh_CN/LC_MESSAGES/R-parallel.mo differ
diff --git a/win32/deps/library/parallel/po/zh_CN/LC_MESSAGES/parallel.mo b/win32/deps/library/parallel/po/zh_CN/LC_MESSAGES/parallel.mo
new file mode 100644
index 0000000..f736bc5
Binary files /dev/null and b/win32/deps/library/parallel/po/zh_CN/LC_MESSAGES/parallel.mo differ
diff --git a/win32/deps/library/parallel/tests/Master.R b/win32/deps/library/parallel/tests/Master.R
new file mode 100644
index 0000000..0c4f524
--- /dev/null
+++ b/win32/deps/library/parallel/tests/Master.R
@@ -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))
+
diff --git a/win32/deps/library/parallel/tests/multicore1.RR b/win32/deps/library/parallel/tests/multicore1.RR
new file mode 100644
index 0000000..9b614f0
--- /dev/null
+++ b/win32/deps/library/parallel/tests/multicore1.RR
@@ -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.
diff --git a/win32/deps/library/parallel/tests/multicore2.RR b/win32/deps/library/parallel/tests/multicore2.RR
new file mode 100644
index 0000000..6a5c977
--- /dev/null
+++ b/win32/deps/library/parallel/tests/multicore2.RR
@@ -0,0 +1,14 @@
+library(parallel)
+
+library(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)
diff --git a/win32/deps/library/parallel/tests/multicore2.Rout.save b/win32/deps/library/parallel/tests/multicore2.Rout.save
new file mode 100644
index 0000000..83faebe
--- /dev/null
+++ b/win32/deps/library/parallel/tests/multicore2.Rout.save
@@ -0,0 +1,49 @@
+
+R Under development (unstable) (2011-08-04 r56618)
+Copyright (C) 2011 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+Platform: i386-apple-darwin9.8.0/i386 (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.
+
+  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.
+
+> library(parallel)
+> 
+> library(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)
+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.4610,  0.8577 )   ( 0.4617,  0.8577 )   ( 0.4959,  0.8690 )  
+Calculations on Transformed Scale;  Intervals on Original Scale
+> 
+> proc.time()
+   user  system elapsed 
+  1.838   0.278   9.055 
diff --git a/win32/deps/library/parallel/tests/multicore3.RR b/win32/deps/library/parallel/tests/multicore3.RR
new file mode 100644
index 0000000..b6faf1a
--- /dev/null
+++ b/win32/deps/library/parallel/tests/multicore3.RR
@@ -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))
diff --git a/win32/deps/library/parallel/tests/snow1.RR b/win32/deps/library/parallel/tests/snow1.RR
new file mode 100644
index 0000000..bd37abc
--- /dev/null
+++ b/win32/deps/library/parallel/tests/snow1.RR
@@ -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)
+
+
+## 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))
+library(boot)
+cd4.boot <- do.call(c, res)
+boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+        conf = 0.9, h = atanh, hinv = tanh)
+stopCluster(cl)
+
+
diff --git a/win32/deps/library/parallel/tests/snow2.RR b/win32/deps/library/parallel/tests/snow2.RR
new file mode 100644
index 0000000..f3d60a3
--- /dev/null
+++ b/win32/deps/library/parallel/tests/snow2.RR
@@ -0,0 +1,19 @@
+## reproducible examples.
+
+library(parallel)
+
+library(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))
+boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+        conf = 0.9, h = atanh, hinv = tanh)
+stopCluster(cl)
+
diff --git a/win32/deps/library/parallel/tests/snow2.Rout.save b/win32/deps/library/parallel/tests/snow2.Rout.save
new file mode 100644
index 0000000..3cf15bb
--- /dev/null
+++ b/win32/deps/library/parallel/tests/snow2.Rout.save
@@ -0,0 +1,54 @@
+
+R Under development (unstable) (2011-08-04 r56618)
+Copyright (C) 2011 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+Platform: i386-apple-darwin9.8.0/i386 (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.
+
+  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.
+
+> ## reproducible examples.
+> 
+> library(parallel)
+> 
+> library(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))
+> boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
++         conf = 0.9, h = atanh, hinv = tanh)
+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.4631,  0.8583 )   ( 0.4679,  0.8578 )   ( 0.4957,  0.8671 )  
+Calculations on Transformed Scale;  Intervals on Original Scale
+> stopCluster(cl)
+> 
+> 
+> proc.time()
+   user  system elapsed 
+  1.092   0.164   4.819 
diff --git a/win32/deps/library/rpart/DESCRIPTION b/win32/deps/library/rpart/DESCRIPTION
index 7e0d394..1347cf1 100644
--- a/win32/deps/library/rpart/DESCRIPTION
+++ b/win32/deps/library/rpart/DESCRIPTION
@@ -1,21 +1,26 @@
-Package: rpart
-Priority: recommended
-Version: 3.1-45
-Date: 2009-07-28
-DateNote: March 2002 version of rpart
-Author: Terry M Therneau and Beth Atkinson <atkinson mayo edu>. R port
-        by Brian Ripley.
-Maintainer: Brian Ripley <ripley stats ox ac uk>
-Description: Recursive partitioning and regression trees
-Title: Recursive Partitioning
-Depends: R (>= 2.7.0), graphics, stats, grDevices
-Suggests: survival
-License: GPL-2 | file LICENCE
-LazyLoad: yes
-LazyData: yes
-URL:
-        http://mayoresearch.mayo.edu/mayo/research/biostat/splusfunctions.cfm
-Packaged: 2009-07-28 12:36:05 UTC; ripley
-Repository: CRAN
-Date/Publication: 2009-08-05 11:22:00
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 13:10:55 UTC; windows
+Package: rpart
+Priority: recommended
+Version: 3.1-55
+Date: 2012-10-07
+DateNote: March 2002 version of rpart
+Authors R: c(person("Terry", "Therneau", role = "aut", email =
+        "therneau mayo edu"), person("Beth", "Atkinson", role = "aut",
+        email = "atkinson mayo edu"), person("Brian", "Ripley", role =
+        c("aut", "trl", "cre"), email = "ripley stats ox ac uk",
+        comment = "author of R port"))
+Description: Recursive partitioning and regression trees
+Title: Recursive Partitioning
+Depends: R (>= 2.14.0), graphics, stats, grDevices
+Suggests: survival
+License: GPL-2 | GPL-3
+LazyData: yes
+Author: Terry Therneau [aut], Beth Atkinson [aut], Brian Ripley [aut,
+        trl, cre] (author of R port)
+Maintainer: Brian Ripley <ripley stats ox ac uk>
+Note: Maintainers are not available to give advice on using a package
+        they did not author.
+Packaged: 2012-10-12 06:33:35 UTC; ripley
+Repository: CRAN
+Date/Publication: 2012-10-07 09:32:08
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:15:07 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/rpart/Meta/Rd.rds b/win32/deps/library/rpart/Meta/Rd.rds
index b750851..478c900 100644
Binary files a/win32/deps/library/rpart/Meta/Rd.rds and b/win32/deps/library/rpart/Meta/Rd.rds differ
diff --git a/win32/deps/library/rpart/Meta/data.rds b/win32/deps/library/rpart/Meta/data.rds
index ae74c90..be68bb7 100644
Binary files a/win32/deps/library/rpart/Meta/data.rds and b/win32/deps/library/rpart/Meta/data.rds differ
diff --git a/win32/deps/library/rpart/Meta/hsearch.rds b/win32/deps/library/rpart/Meta/hsearch.rds
index 188382f..8ff041e 100644
Binary files a/win32/deps/library/rpart/Meta/hsearch.rds and b/win32/deps/library/rpart/Meta/hsearch.rds differ
diff --git a/win32/deps/library/rpart/Meta/links.rds b/win32/deps/library/rpart/Meta/links.rds
new file mode 100644
index 0000000..56e9723
Binary files /dev/null and b/win32/deps/library/rpart/Meta/links.rds differ
diff --git a/win32/deps/library/rpart/Meta/nsInfo.rds b/win32/deps/library/rpart/Meta/nsInfo.rds
index cedaff5..554fdc4 100644
Binary files a/win32/deps/library/rpart/Meta/nsInfo.rds and b/win32/deps/library/rpart/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/rpart/Meta/package.rds b/win32/deps/library/rpart/Meta/package.rds
index dfa68b7..4994dc9 100644
Binary files a/win32/deps/library/rpart/Meta/package.rds and b/win32/deps/library/rpart/Meta/package.rds differ
diff --git a/win32/deps/library/rpart/R/rpart b/win32/deps/library/rpart/R/rpart
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/rpart/R/rpart
+++ b/win32/deps/library/rpart/R/rpart
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/rpart/R/rpart.rdb b/win32/deps/library/rpart/R/rpart.rdb
index 0c6a850..28b47ac 100644
Binary files a/win32/deps/library/rpart/R/rpart.rdb and b/win32/deps/library/rpart/R/rpart.rdb differ
diff --git a/win32/deps/library/rpart/R/rpart.rdx b/win32/deps/library/rpart/R/rpart.rdx
index 7878a16..fae7a3a 100644
Binary files a/win32/deps/library/rpart/R/rpart.rdx and b/win32/deps/library/rpart/R/rpart.rdx differ
diff --git a/win32/deps/library/rpart/data/Rdata.rdb b/win32/deps/library/rpart/data/Rdata.rdb
index 927541c..495c942 100644
Binary files a/win32/deps/library/rpart/data/Rdata.rdb and b/win32/deps/library/rpart/data/Rdata.rdb differ
diff --git a/win32/deps/library/rpart/data/Rdata.rds b/win32/deps/library/rpart/data/Rdata.rds
index 035fba8..1ac116c 100644
Binary files a/win32/deps/library/rpart/data/Rdata.rds and b/win32/deps/library/rpart/data/Rdata.rds differ
diff --git a/win32/deps/library/rpart/data/Rdata.rdx b/win32/deps/library/rpart/data/Rdata.rdx
index a1484e7..facb6ce 100644
Binary files a/win32/deps/library/rpart/data/Rdata.rdx and b/win32/deps/library/rpart/data/Rdata.rdx differ
diff --git a/win32/deps/library/rpart/help/AnIndex b/win32/deps/library/rpart/help/AnIndex
index c8d9883..07f60c2 100644
--- a/win32/deps/library/rpart/help/AnIndex
+++ b/win32/deps/library/rpart/help/AnIndex
@@ -21,7 +21,6 @@ rpart	rpart
 rpart.control	rpart.control
 rpart.matrix	rpart-internal
 rpart.object	rpart.object
-rpartcallback	rpart
 rpconvert	rpconvert
 rsq.rpart	rsq.rpart
 snip.rpart	snip.rpart
diff --git a/win32/deps/library/rpart/help/aliases.rds b/win32/deps/library/rpart/help/aliases.rds
new file mode 100644
index 0000000..b527b56
Binary files /dev/null and b/win32/deps/library/rpart/help/aliases.rds differ
diff --git a/win32/deps/library/rpart/help/paths.rds b/win32/deps/library/rpart/help/paths.rds
new file mode 100644
index 0000000..ac2cfd7
Binary files /dev/null and b/win32/deps/library/rpart/help/paths.rds differ
diff --git a/win32/deps/library/rpart/help/rpart.rdb b/win32/deps/library/rpart/help/rpart.rdb
new file mode 100644
index 0000000..870460a
Binary files /dev/null and b/win32/deps/library/rpart/help/rpart.rdb differ
diff --git a/win32/deps/library/rpart/help/rpart.rdx b/win32/deps/library/rpart/help/rpart.rdx
new file mode 100644
index 0000000..598f7f3
Binary files /dev/null and b/win32/deps/library/rpart/help/rpart.rdx differ
diff --git a/win32/deps/library/rpart/html/00Index.html b/win32/deps/library/rpart/html/00Index.html
new file mode 100644
index 0000000..72a23e6
--- /dev/null
+++ b/win32/deps/library/rpart/html/00Index.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Recursive Partitioning</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
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;rpart&rsquo; version 3.1-55</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td width="25%"><a href="car.test.frame.html">car.test.frame</a></td>
+<td>Automobile Data from 'Consumer Reports' 1990</td></tr>
+<tr><td width="25%"><a href="cu.summary.html">cu.summary</a></td>
+<td>Automobile Data from 'Consumer Reports' 1990</td></tr>
+<tr><td width="25%"><a href="kyphosis.html">kyphosis</a></td>
+<td>Data on Children who have had Corrective Spinal Surgery</td></tr>
+<tr><td width="25%"><a href="labels.rpart.html">labels.rpart</a></td>
+<td>Create Split Labels For an Rpart Object</td></tr>
+<tr><td width="25%"><a href="meanvar.rpart.html">meanvar</a></td>
+<td>Mean-Variance Plot for an Rpart Object</td></tr>
+<tr><td width="25%"><a href="meanvar.rpart.html">meanvar.rpart</a></td>
+<td>Mean-Variance Plot for an Rpart Object</td></tr>
+<tr><td width="25%"><a href="na.rpart.html">na.rpart</a></td>
+<td>Handles Missing Values in an Rpart Object</td></tr>
+<tr><td 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 width="25%"><a href="plot.rpart.html">plot.rpart</a></td>
+<td>Plot an Rpart Object</td></tr>
+<tr><td width="25%"><a href="plotcp.html">plotcp</a></td>
+<td>Plot a Complexity Parameter Table for an Rpart Fit</td></tr>
+<tr><td width="25%"><a href="post.rpart.html">post</a></td>
+<td>PostScript Presentation Plot of an Rpart Object</td></tr>
+<tr><td width="25%"><a href="post.rpart.html">post.rpart</a></td>
+<td>PostScript Presentation Plot of an Rpart Object</td></tr>
+<tr><td width="25%"><a href="predict.rpart.html">predict.rpart</a></td>
+<td>Predictions from a Fitted Rpart Object</td></tr>
+<tr><td width="25%"><a href="print.rpart.html">print.rpart</a></td>
+<td>Print an Rpart Object</td></tr>
+<tr><td width="25%"><a href="printcp.html">printcp</a></td>
+<td>Displays CP table for Fitted Rpart Object</td></tr>
+<tr><td width="25%"><a href="prune.rpart.html">prune</a></td>
+<td>Cost-complexity Pruning of an Rpart Object</td></tr>
+<tr><td width="25%"><a href="prune.rpart.html">prune.rpart</a></td>
+<td>Cost-complexity Pruning of an Rpart Object</td></tr>
+<tr><td width="25%"><a href="residuals.rpart.html">residuals.rpart</a></td>
+<td>Residuals From a Fitted Rpart Object</td></tr>
+<tr><td width="25%"><a href="rpart.html">rpart</a></td>
+<td>Recursive Partitioning and Regression Trees</td></tr>
+<tr><td width="25%"><a href="rpart.control.html">rpart.control</a></td>
+<td>Control for Rpart Models</td></tr>
+<tr><td width="25%"><a href="rpart.object.html">rpart.object</a></td>
+<td>Recursive Partitioning and Regression Trees Object</td></tr>
+<tr><td width="25%"><a href="rpconvert.html">rpconvert</a></td>
+<td>Update an rpart object</td></tr>
+<tr><td 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 width="25%"><a href="snip.rpart.html">snip.rpart</a></td>
+<td>Snip Subtrees of an Rpart Object</td></tr>
+<tr><td width="25%"><a href="solder.html">solder</a></td>
+<td>Soldering of Components on Printed-Circuit Boards</td></tr>
+<tr><td width="25%"><a href="summary.rpart.html">summary.rpart</a></td>
+<td>Summarize a Fitted Rpart Object</td></tr>
+<tr><td width="25%"><a href="text.rpart.html">text.rpart</a></td>
+<td>Place Text on a Dendrogram</td></tr>
+<tr><td width="25%"><a href="xpred.rpart.html">xpred.rpart</a></td>
+<td>Return Cross-Validated Predictions</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/rpart/html/R.css b/win32/deps/library/rpart/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/rpart/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/rpart/libs/i386/rpart.dll b/win32/deps/library/rpart/libs/i386/rpart.dll
new file mode 100644
index 0000000..a6628ba
Binary files /dev/null and b/win32/deps/library/rpart/libs/i386/rpart.dll differ
diff --git a/win32/deps/library/rpart/po/de/LC_MESSAGES/R-rpart.mo b/win32/deps/library/rpart/po/de/LC_MESSAGES/R-rpart.mo
new file mode 100644
index 0000000..4e3a8e4
Binary files /dev/null and b/win32/deps/library/rpart/po/de/LC_MESSAGES/R-rpart.mo differ
diff --git a/win32/deps/library/rpart/po/de/LC_MESSAGES/rpart.mo b/win32/deps/library/rpart/po/de/LC_MESSAGES/rpart.mo
new file mode 100644
index 0000000..dd785c4
Binary files /dev/null and b/win32/deps/library/rpart/po/de/LC_MESSAGES/rpart.mo differ
diff --git a/win32/deps/library/rpart/po/en quot/LC_MESSAGES/R-rpart.mo b/win32/deps/library/rpart/po/en quot/LC_MESSAGES/R-rpart.mo
new file mode 100644
index 0000000..efdb3c5
Binary files /dev/null and b/win32/deps/library/rpart/po/en quot/LC_MESSAGES/R-rpart.mo differ
diff --git a/win32/deps/library/rpart/po/en quot/LC_MESSAGES/rpart.mo b/win32/deps/library/rpart/po/en quot/LC_MESSAGES/rpart.mo
new file mode 100644
index 0000000..f023189
Binary files /dev/null and b/win32/deps/library/rpart/po/en quot/LC_MESSAGES/rpart.mo differ
diff --git a/win32/deps/library/rpart/po/fr/LC_MESSAGES/R-rpart.mo b/win32/deps/library/rpart/po/fr/LC_MESSAGES/R-rpart.mo
new file mode 100644
index 0000000..1382894
Binary files /dev/null and b/win32/deps/library/rpart/po/fr/LC_MESSAGES/R-rpart.mo differ
diff --git a/win32/deps/library/rpart/po/fr/LC_MESSAGES/rpart.mo b/win32/deps/library/rpart/po/fr/LC_MESSAGES/rpart.mo
new file mode 100644
index 0000000..4a477f1
Binary files /dev/null and b/win32/deps/library/rpart/po/fr/LC_MESSAGES/rpart.mo differ
diff --git a/win32/deps/library/rpart/po/pl/LC_MESSAGES/R-rpart.mo b/win32/deps/library/rpart/po/pl/LC_MESSAGES/R-rpart.mo
new file mode 100644
index 0000000..870230c
Binary files /dev/null and b/win32/deps/library/rpart/po/pl/LC_MESSAGES/R-rpart.mo differ
diff --git a/win32/deps/library/rpart/po/pl/LC_MESSAGES/rpart.mo b/win32/deps/library/rpart/po/pl/LC_MESSAGES/rpart.mo
new file mode 100644
index 0000000..842ea94
Binary files /dev/null and b/win32/deps/library/rpart/po/pl/LC_MESSAGES/rpart.mo differ
diff --git a/win32/deps/library/rpart/po/ru/LC_MESSAGES/R-rpart.mo b/win32/deps/library/rpart/po/ru/LC_MESSAGES/R-rpart.mo
new file mode 100644
index 0000000..e268fa9
Binary files /dev/null and b/win32/deps/library/rpart/po/ru/LC_MESSAGES/R-rpart.mo differ
diff --git a/win32/deps/library/rpart/po/ru/LC_MESSAGES/rpart.mo b/win32/deps/library/rpart/po/ru/LC_MESSAGES/rpart.mo
new file mode 100644
index 0000000..24d62b9
Binary files /dev/null and b/win32/deps/library/rpart/po/ru/LC_MESSAGES/rpart.mo differ
diff --git a/win32/deps/library/rpart/tests/Examples/rpart-Ex.Rout.save b/win32/deps/library/rpart/tests/Examples/rpart-Ex.Rout.save
new file mode 100644
index 0000000..ed23444
--- /dev/null
+++ b/win32/deps/library/rpart/tests/Examples/rpart-Ex.Rout.save
@@ -0,0 +1,971 @@
+
+R version 2.13.0 Under development (unstable) (2010-10-15 r53335)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+Platform: i386-apple-darwin9.8.0/i386 (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.
+
+  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')
+> 
+> assign(".oldSearch", 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
+
+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("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)
+> plot(fit, compress=TRUE)
+> text(fit, use.n=TRUE)
+> 
+> 
+> 
+> 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(.65,.35), split='information'))
+> fit3 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis,
++               control=rpart.control(cp=.05))
+> par(mfrow=c(1,2))
+> 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)
+> summary(fit)
+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.000000 0.2155872
+3 0.01000000      4 0.7647059 1.058824 0.2200975
+
+Node number 1: 81 observations,    complexity param=0.1764706
+  predicted class=absent   expected loss=0.2098765
+    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
+    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
+    class counts:     8    11
+   probabilities: 0.421 0.579 
+
+Node number 4: 29 observations
+  predicted class=absent   expected loss=0
+    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
+    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
+    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
+    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
+    class counts:    12     2
+   probabilities: 0.857 0.143 
+
+Node number 23: 7 observations
+  predicted class=present  expected loss=0.4285714
+    class counts:     3     4
+   probabilities: 0.429 0.571 
+
+> 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)
+> plot(fit, compress=TRUE)
+> text(fit, use.n=TRUE)
+> 
+> 
+> 
+> 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]
+1     2    8   11 0.4210526 0.5789474
+2     1   12    2 0.8571429 0.1428571
+3     2    8   11 0.4210526 0.5789474
+4     2    8   11 0.4210526 0.5789474
+5     1   29    0 1.0000000 0.0000000
+6     1   29    0 1.0000000 0.0000000
+7     1   29    0 1.0000000 0.0000000
+8     1   29    0 1.0000000 0.0000000
+9     1   29    0 1.0000000 0.0000000
+10    2    3    4 0.4285714 0.5714286
+11    2    3    4 0.4285714 0.5714286
+12    1   29    0 1.0000000 0.0000000
+13    2    8   11 0.4210526 0.5789474
+14    1   12    0 1.0000000 0.0000000
+15    1   29    0 1.0000000 0.0000000
+16    1   29    0 1.0000000 0.0000000
+17    1   29    0 1.0000000 0.0000000
+18    1   12    2 0.8571429 0.1428571
+19    1   29    0 1.0000000 0.0000000
+20    1   12    0 1.0000000 0.0000000
+21    1   29    0 1.0000000 0.0000000
+22    2    8   11 0.4210526 0.5789474
+23    2    3    4 0.4285714 0.5714286
+24    2    8   11 0.4210526 0.5789474
+25    2    8   11 0.4210526 0.5789474
+26    1   12    0 1.0000000 0.0000000
+27    2    8   11 0.4210526 0.5789474
+28    2    3    4 0.4285714 0.5714286
+29    1   29    0 1.0000000 0.0000000
+30    1   29    0 1.0000000 0.0000000
+31    1   29    0 1.0000000 0.0000000
+32    1   12    2 0.8571429 0.1428571
+33    1   12    2 0.8571429 0.1428571
+34    1   29    0 1.0000000 0.0000000
+35    1   12    2 0.8571429 0.1428571
+36    1   29    0 1.0000000 0.0000000
+37    1   12    0 1.0000000 0.0000000
+38    2    8   11 0.4210526 0.5789474
+39    1   12    0 1.0000000 0.0000000
+40    2    3    4 0.4285714 0.5714286
+41    2    8   11 0.4210526 0.5789474
+42    1   12    0 1.0000000 0.0000000
+43    2    8   11 0.4210526 0.5789474
+44    2    8   11 0.4210526 0.5789474
+45    1   29    0 1.0000000 0.0000000
+46    1   12    2 0.8571429 0.1428571
+47    1   29    0 1.0000000 0.0000000
+48    1   12    2 0.8571429 0.1428571
+49    2    8   11 0.4210526 0.5789474
+50    1   12    2 0.8571429 0.1428571
+51    2    3    4 0.4285714 0.5714286
+52    1   29    0 1.0000000 0.0000000
+53    2    8   11 0.4210526 0.5789474
+54    1   29    0 1.0000000 0.0000000
+55    1   29    0 1.0000000 0.0000000
+56    1   29    0 1.0000000 0.0000000
+57    1   12    0 1.0000000 0.0000000
+58    2    8   11 0.4210526 0.5789474
+59    1   12    0 1.0000000 0.0000000
+60    2    3    4 0.4285714 0.5714286
+61    2    8   11 0.4210526 0.5789474
+62    2    8   11 0.4210526 0.5789474
+63    2    8   11 0.4210526 0.5789474
+64    1   29    0 1.0000000 0.0000000
+65    1   29    0 1.0000000 0.0000000
+66    1   12    0 1.0000000 0.0000000
+67    1   29    0 1.0000000 0.0000000
+68    1   12    2 0.8571429 0.1428571
+69    1   12    0 1.0000000 0.0000000
+70    1   29    0 1.0000000 0.0000000
+71    1   12    2 0.8571429 0.1428571
+72    1   12    2 0.8571429 0.1428571
+73    1   29    0 1.0000000 0.0000000
+74    1   12    2 0.8571429 0.1428571
+75    1   29    0 1.0000000 0.0000000
+76    1   29    0 1.0000000 0.0000000
+77    1   12    2 0.8571429 0.1428571
+78    1   12    0 1.0000000 0.0000000
+79    1   12    2 0.8571429 0.1428571
+80    2    8   11 0.4210526 0.5789474
+81    1   12    0 1.0000000 0.0000000
+> 
+> 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=.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("summary.rpart")
+> ### * summary.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: summary.rpart
+> ### Title: Summarize a Fitted Rpart Object
+> ### Aliases: summary.rpart
+> ### Keywords: tree
+> 
+> ### ** 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
+
+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("text.rpart")
+> ### * text.rpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: text.rpart
+> ### Title: Place Text on a Dendrogram
+> ### Aliases: text.rpart
+> ### Keywords: tree
+> 
+> ### ** Examples
+> 
+> freen.tr <- rpart(y ~ ., freeny)
+> plot(freen.tr)
+> text(freen.tr, use.n=TRUE, all=TRUE)
+> 
+> 
+> 
+> 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>
+> ###
+> cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  1.27 0.053 1.327 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
diff --git a/win32/deps/library/rpart/tests/backticks.R b/win32/deps/library/rpart/tests/backticks.R
new file mode 100644
index 0000000..b7e93e3
--- /dev/null
+++ b/win32/deps/library/rpart/tests/backticks.R
@@ -0,0 +1,7 @@
+## allow backticks in rpart.matrix: see
+## https://stat.ethz.ch/pipermail/r-help/2012-May/314081.html
+
+library(rpart)
+Iris <- iris
+names(Iris) <- sub(".", " ", names(iris), fixed=TRUE)
+rpart(Species ~ `Sepal Length`, data = Iris)
diff --git a/win32/deps/library/rpart/tests/data.stagec b/win32/deps/library/rpart/tests/data.stagec
new file mode 100644
index 0000000..1a06a9d
--- /dev/null
+++ b/win32/deps/library/rpart/tests/data.stagec
@@ -0,0 +1,146 @@
+  6.130047    0   64     2  10.26     2     4     1
+  9.374401    0   62     1     NA     3     8     3
+  5.240246    1   59     2   9.99     3     7     1
+  3.162217    1   62     2   3.57     2     4     1
+  1.908282    1   64     2  22.56     4     8     2
+  4.848733    0   69     1   6.14     3     7     1
+  5.790554    0   75     2  13.69     2    NA     2
+  7.304585    0   71     2     NA     3     7     3
+  3.655030    1   73     2  11.77     3     6     1
+ 15.87132     0   64     2  27.27     3     7     2
+  6.299794    0   65     2  19.34     3     7     2
+  2.910335    1   58     2  14.82     4     8     2
+  1.527720    1   70     2  10.22     3     8     1
+ 14.46132     0   67     2  15.66     2     6     2
+  4.238193    1   66     2  17.79     3     7     2
+  1.738535    1   74     2  11.11     3     8     1
+  5.004791    0   70     2  11.44     2     5     1
+ 13.17727     0   57     2  14.78     2     4     2
+ 10.87200     0   63     2  54.93     3     8     2
+ 12.98015     0   65     2  24.58     3     7     2
+ 11.37303     0   62     2  27.79     2     5     2
+  2.647501    1   72     2  14.86     3     6     2
+  9.812457    0   64     1  10.51     2     5     1
+  3.411362    1   67    NA  14.22     2     6     2
+  7.638603    1   64     2  15.28     2     5     2
+  4.799452    1   70     2  16.91     3     6     2
+  3.674195    1   58     1  17.87     3     7     2
+ 13.89185     0   57     2  12.13     3     6     1
+  4.881587    1   54     1  17.25     2     5     2
+ 15.92060     0   61     1  16.53     3     7     2
+  2.850102    1   68     2  17.49     2     4     2
+  9.273100    0   64     1   3.85     3     6     3
+  6.510609    0   70     1   7.88     2     6     1
+  1.686516    0   64     2  16.64     2     5     2
+  6.932238    0   66     2  13.19     3     7     2
+  5.492128    0   61     2   9.42     2     5     1
+  5.719370    0   70     2  22.79     2     5     2
+  4.076659    1   63     2  11.37     2     6     1
+  0.3066393   1   59     2   3.77     3     6     3
+  1.095140    1   66     1  13.76     3     6     2
+  7.783710    0   53     2  14.52     2     5     2
+  2.023271    1   62     2   7.55     3     7     1
+  7.301847    0   69     2   8.46     2     5     1
+ 13.54688     0   63     2   7.66     3     7     1
+ 11.71800     0   61     2   8.40     2     5     1
+  8.657084    0   70     1   4.43     1     3     1
+  3.356605    0   61     2  10.37     3     7     1
+  6.275154    0   62     2  10.82     2     6     1
+ 10.61738     0   55     2   7.81     2     5     1
+  9.253935    0   61     2  11.23     2     5     1
+  7.906913    0   63     2  13.99     3     6     2
+  4.936345    0   67     2   6.41     2     5     1
+ 13.40725     0   59     2  16.05     2     5     2
+ 17.69199     0   58     2  22.97     3     6     2
+  1.026694    1   61     1   2.40     4    10     1
+  0.2546201   1   47     2  11.92     4    10     1
+ 13.07049     0   65     2     NA     3     6     2
+ 16.70088     0   56     2   5.29     1     3     1
+  4.479124    0   63     2   5.75     2     5     1
+  3.438740    1   69     1   7.64     3     8     3
+  2.376454    1   50     1  16.81     3     7     2
+  6.784394    0   70     2  29.56     2     5     2
+  2.997946    1   55     1  13.35     3     6     3
+ 10.36276     0   55     2   8.10     2     5     1
+ 11.77002     0   62     1  12.62     2     5     1
+  8.049281    1   66     2  14.14     2     5     2
+  5.664613    0   71     1  10.16     2     6     1
+  6.053388    0   63     2  17.21     2     5     2
+  5.201916    0   54     2  11.35     2     6     1
+  6.228610    0   65     2  11.35     2     5     1
+ 11.36481     0   59     2   7.61     2     5     1
+  6.986995    1   61     2  20.82     3     6     2
+  6.464065    0   65     1  12.93     3     7     1
+  0.5366188   1   57     1  21.75     3     7     2
+  6.067077    0   69     2   8.58     2     6     1
+  5.111567    1   53     1  14.94     3     7     2
+  3.660506    1   48     2  17.16     3     7     2
+ 12.16974     0   57     2  23.62     3     8     2
+  7.707049    1   63     2  16.06     3     9     2
+  7.028062    0   52     2   7.15     2     7     1
+  7.230663    1   57     2  13.21     3     8     2
+  4.350444    1   62     2  11.35     3     6     1
+  6.694045    0   54     2   8.11     2     4     1
+  6.765229    1   67     2  11.18     3     7     1
+  5.185489    1   65     2  24.84     3     7     2
+  8.662559    0   67     2   7.67     3     6     1
+ 10.79808     0   72     1   6.68     2    NA     1
+  2.614647    1   66     2  15.23     3     8     2
+ 10.87474     0   72     2   6.80     2     5     1
+  5.637234    1   60     2  14.58     3     7     2
+ 10.09993     0   70     2  13.17     2     6     2
+  7.208761    0   63     1   9.76     2     5     1
+ 10.17659     0   64     1   7.61     2    NA     1
+  7.718001    1   62     2  38.05     3     7     2
+  2.696783    1   61     1  13.87     3     6     2
+  1.949349    1   64     2  21.20     3     7     2
+  3.630390    0   64     1  17.96     3     7     2
+  8.229979    0   68     2  27.14     3     9     2
+  9.174537    0   62     1   6.74     2     5     1
+  6.121834    0   69     2  11.21     3     8     1
+  8.698151    0   59     2  20.22     3     6     2
+  7.411362    1   66     1  15.35     3     8     2
+  1.645448    1   53     1  16.79     3     9     2
+  8.353182    0   59     2   8.76     2     6     1
+  4.717317    1   58     2  13.23     2     6     2
+  5.746748    0   61     2  34.01     2     7     2
+  3.156741    1   65    NA  14.68     3     8     2
+  4.944558    0   67     1  17.95     3     8     2
+  3.449692    1   57     1  23.34     3     8     2
+  0.9883642   1   55     2  10.25     3     7     3
+  5.445585    1   57     2     NA     3     8     3
+  4.654346    0   57     1  15.10     3     7     2
+  6.264202    0   68     1  26.55     2     6     2
+  6.967830    0   67     2   7.78     2     6     1
+  1.522245    1   60     1     NA     4     9     3
+  7.055441    0   63     2  21.20     3     7     2
+  6.045174    0   69     2   7.93     3     6     1
+  3.843942    0   54     2  10.58     3     8     1
+  6.516084    0   66     2   5.92     2     5     1
+  3.112936    0   59     2   5.08     3     7     1
+  6.795345    0   62     2  13.10     3     8     2
+  6.669404    0   73     1  41.31     3     8     2
+  5.749486    1   65     2  11.29     3     7     1
+  1.516769    1   67     2  14.02     3     7     2
+  5.169062    0   75     2  12.46     3     7     1
+  1.253935    1   70     2  13.69     3     8     2
+  6.160164    0   59     2  12.06     2     5     1
+  6.480492    0   73     2  13.01     3     6     1
+  1.163586    1   66     2  13.21     2     6     2
+  5.697467    0   66     2  10.43     3     5     1
+  3.397672    1   65     2     NA     3     7     3
+  5.629021    0   66     1  13.33     2     5     2
+  5.971252    0   66     2  37.49     3     7     2
+  5.119781    0   59     2  11.69     3     7     1
+  6.004106    0   52     2   9.90     2     4     1
+  5.368925    0   68     2  13.01     2     5     1
+  2.431211    0   63     2   4.81     3     8     1
+  4.235455    0   67     2  14.71     2     5     2
+  5.541409    0   59     1   9.01     2     5     1
+  5.363449    0   57     1  10.90     3     6     1
+  8.180698    0   62     2  10.72     3     7     1
+ 10.20123     0   63     2   5.14     2     5     1
+  2.450376    1   73     2  46.92     4     9     2
+  7.898699    0   68     2     NA     2     5     3
+  5.634496    0   51     2   9.59     3     6     1
+  2.058863    1   56     2   9.01     3     7     1
diff --git a/win32/deps/library/rpart/tests/rpartco.R b/win32/deps/library/rpart/tests/rpartco.R
new file mode 100644
index 0000000..1272cd2
--- /dev/null
+++ b/win32/deps/library/rpart/tests/rpartco.R
@@ -0,0 +1,6 @@
+## needs to be examimed for overlaps: formerly overlapped near Type=c
+pdf("rpartco-test.pdf")
+library(rpart)
+fit <- rpart(Price ~ Mileage + Type + Country, cu.summary)
+plot(fit, compress=TRUE, branch=0)
+text(fit, xpd = NA, cex = 0.7)
diff --git a/win32/deps/library/rpart/tests/surv_test.R b/win32/deps/library/rpart/tests/surv_test.R
new file mode 100644
index 0000000..837f957
--- /dev/null
+++ b/win32/deps/library/rpart/tests/surv_test.R
@@ -0,0 +1,9 @@
+## example from coxph: gave error in rpart 3.1-31
+## due to missing drop = FALSE
+test1 <- list(time=  c(4, 3,1,1,2,2,3),
+               status=c(1,NA,1,0,1,1,0),
+               x=     c(0, 2,1,1,1,0,0),
+               sex=   c(0, 0,0,0,1,1,1))
+library(survival)
+library(rpart)
+rpart(Surv(time, status) ~ x + sex, test1)
diff --git a/win32/deps/library/rpart/tests/testall.R b/win32/deps/library/rpart/tests/testall.R
new file mode 100644
index 0000000..7433306
--- /dev/null
+++ b/win32/deps/library/rpart/tests/testall.R
@@ -0,0 +1,330 @@
+# Any necessary setup
+library(rpart)
+library(survival)
+options(na.action="na.omit")
+options(digits=4) # to match earlier output
+RNGversion("1.6.2")
+set.seed(1234)
+#
+# Read the data
+#
+#   Time to progression in years
+#   status  1=progressed, 0= censored
+#   age
+#   early endocrine therapy   1=no 2=yes
+#   % of cells in g2 phase, from flow cytometry
+#   tumor grade (Farrow) 1,2,3,4
+#   Gleason score (competing grading system)
+#   ploidy
+
+stagec <- read.table('data.stagec',  col.names=c("pgtime", "pgstat", "age",
+			"eet", "g2", "grade", "gleason", "ploidy"))
+stagec$ploidy <- factor(stagec$ploidy, levels=1:3,
+				labels=c("diploid", "tetraploid", "aneuploid"))
+
+cox0 <- coxph(Surv(pgtime, pgstat) ~ 1, stagec)
+cox1 <- coxph(Surv(pgtime, pgstat) ~ age + eet + g2 + grade + ploidy, stagec)
+cox1
+
+fit1 <- rpart(Surv(pgtime, pgstat) ~ age + eet + g2+grade+gleason +ploidy,
+		stagec, control=rpart.control(usesurrogate=0, cp=0),
+		method='poisson')
+fit1
+summary(fit1)
+
+fit2 <- rpart(cox0$residual ~ age + eet + g2+grade+gleason +ploidy,
+		stagec)
+fit2
+summary(fit2)
+
+#
+# In 6/2001 rpart.exp changed to fix a bug.  A side effect was reexamination
+#  of one definition: the old version didn't count person-years after the
+#  last death in computing the rescaling, the new one does.  One could argue
+#  about which is better.  To match the old output, we modify the data.
+tdata <- stagec
+tdata$pgtime <- pmin(tdata$pgtime, max(tdata$pgtime[tdata$pgstat==1]))
+
+fit3 <- rpart(Surv(pgtime, pgstat) ~ age + eet + g2+grade+gleason +ploidy,
+		tdata, control=rpart.control(usesurrogate=1, cp=.001))
+
+summary(fit3)
+
+#
+# In order to compare the x-vals estimates of the mainline and S versions,
+#  it is necessary that we use stratified xval sets (like the mainline
+#  does).
+
+mystate <- data.frame(state.x77, region=factor(state.region))
+names(mystate) <- c("population","income" , "illiteracy","life" ,
+       "murder", "hs.grad", "frost",     "area",      "region")
+
+xvals <- 1:nrow(mystate)
+xvals[order(mystate$income)] <- rep(1:10, length=nrow(mystate))
+
+fit4 <- rpart(income ~ population + region + illiteracy +life + murder +
+			hs.grad + frost , mystate,
+		   control=rpart.control(minsplit=10, xval=xvals))
+
+summary(fit4)
+
+
+#
+# Check out xpred.rpart
+#
+meany <- mean(mystate$income)
+xpr <- xpred.rpart(fit4, xval=xvals)
+xpr2 <- (xpr - mystate$income)^2
+risk0 <- mean((mystate$income - meany)^2)
+xpmean <- as.vector(apply(xpr2, 2, mean))   #kill the names
+all.equal(xpmean/risk0, as.vector(fit4$cptable[,'xerror']))
+
+xpstd <- as.vector(apply((sweep(xpr2, 2, xpmean))^2, 2, sum))
+xpstd <- sqrt(xpstd)/(50*risk0)
+all.equal(xpstd, as.vector(fit4$cptable[,'xstd']))
+
+#
+# recreate subset #3 of the xval
+#
+tfit4 <- rpart(income ~ population + region + illiteracy +life + murder +
+			hs.grad + frost , mystate,  subset=(xvals!=3),
+		   control=rpart.control(minsplit=10, xval=0))
+tpred <- predict(tfit4, mystate[xvals==3,])
+all.equal(tpred, xpr[xvals==3,ncol(xpr)])
+
+# How much does this differ from the "real" formula, more complex,
+#   found on page 309 of Breiman et al. ?
+#xtemp <- (xpr2/outer(rep(1,50),xpmean)) -  ((mystate$income - meany)^2)/risk0
+#real.se<- xpmean* sqrt(apply(xtemp^2,2,sum))/(risk0*50)
+
+fit5 <- rpart(factor(pgstat) ~  age + eet + g2+grade+gleason +ploidy,
+	  stagec)
+
+fit5
+
+fit6 <- rpart(factor(pgstat) ~  age + eet + g2+grade+gleason +ploidy,
+		stagec, parm=list(prior=c(.5,.5)))
+summary(fit6)
+#
+# Fit a classification model to the car data.
+#  Now, since Reliability is an ordered category, this model doesn't
+# make a lot of statistical sense, but it does test out some
+# areas of the code that nothing else does
+#
+
+carfit <- rpart(Reliability ~ Price + Country + Mileage + Type,
+		   method='class', data=cu.summary)
+
+summary(carfit)
+#
+# Simplest weight test: treble the weights
+#
+#  By using the unshrunken estimates the weights will nearly cancel
+#   out:  frame$wt, frame$dev, frame$yval2, and improvement will all
+#   be threefold larger, other things will be the same.
+# The improvement is the splits matrix, column 3, rows with n>0.  Other
+#   rows are surrogate splits.
+
+tempc <- rpart.control(maxsurrogate=0, cp=0, xval=0)
+fit1 <- rpart(Surv(pgtime, pgstat) ~ age + eet + g2+grade+gleason +ploidy,
+                stagec, control=tempc,
+                method='poisson', parms=list(shrink=0))
+wts <- rep(3, nrow(stagec))
+fit1b <- rpart(Surv(pgtime, pgstat) ~ age + eet + g2+grade+gleason +ploidy,
+                stagec, control= tempc, parms=list(shrink=0),
+                method='poisson', weights=wts)
+fit1b$frame$wt   <- fit1b$frame$wt/3
+fit1b$frame$dev  <- fit1b$frame$dev/3
+fit1b$frame$yval2[,2] <- fit1b$frame$yval2[,2]/3
+fit1b$splits[,3] <- fit1b$splits[,3]/3
+all.equal(fit1[-3], fit1b[-3])   #all but the "call"
+
+#
+# Compare a pair of multiply weighted fits
+#  In this one, the lengths of where and y won't match
+# I have to set minsplit to the smallest possible, because otherwise
+#  the replicated data set will sometimes have enough "n" to split, but
+#  the weighted one won't.  Use of CP keeps the degenerate splits
+#  (n=2, several covariates with exactly the same improvement) at bay.
+# For larger trees, the weighted split will sometimes have fewer
+#  surrogates, because of the "at least two obs" rule.
+#
+set.seed(1234)
+wts <- sample(1:5, nrow(stagec), replace=TRUE)
+temp <- rep(1:nrow(stagec), wts)             #row replicates
+xgrp <- rep(1:10, length=146)[order(runif(146))]
+xgrp2<- rep(xgrp, wts)
+#  Direct: replicate rows in the data set, and use unweighted
+fit2 <- rpart(Surv(pgtime, pgstat) ~ age + eet + g2+grade+gleason +ploidy,
+	      control=rpart.control(minsplit=2, xval=xgrp2, cp=.025),
+	      data=stagec[temp,], method='poisson')
+#  Weighted
+fit2b<- rpart(Surv(pgtime, pgstat) ~ age + eet + g2+grade+gleason +ploidy,
+	      control=rpart.control(minsplit=2, xval=xgrp, cp=.025),
+	      data=stagec, method='poisson', weight=wts)
+
+all.equal(fit2$frame[-2],  fit2b$frame[-2])  # the "n" component won't match
+all.equal(fit2$cptable,    fit2b$cptable)
+# next two depend on how ties are resolved, so platform-dependent
+# all.equal(fit2$splits[,-1],fit2b$splits[,-1]) #fails
+# all.equal(fit2$splits[-24,-1],fit2b$splits[-24,-1]) #ok
+all.equal(fit2$csplit,    fit2b$csplit)
+# Line 24 is a surrogate split in a group whose 2 smallest ages are
+#  47 and 48.  The weighted fit won't split there because it wants to
+#  send at least 2 obs to the left; the replicate fit thinks that there
+#  are several 47's.
+
+
+
+
+
+#
+# Test weights in a regression problem
+#
+
+xgrp <- rep(1:10,5)
+fit4 <- rpart(income ~ population + region + illiteracy +life + murder +
+                        hs.grad + frost , mystate,
+                   control=rpart.control(minsplit=10, xval=xgrp))
+wts <- rep(3, nrow(mystate))
+fit4b <-  rpart(income ~ population + region + illiteracy +life + murder +
+                        hs.grad + frost , mystate,
+                   control=rpart.control(minsplit=10, xval=xgrp), weights=wts)
+fit4b$frame$wt   <- fit4b$frame$wt/3
+fit4b$frame$dev  <- fit4b$frame$dev/3
+fit4b$cptable[,5] <- fit4b$cptable[,5] * sqrt(3)
+temp <- c('frame', 'where', 'splits', 'csplit', 'cptable')
+all.equal(fit4[temp], fit4b[temp])
+
+
+# Next is a very simple case, but worth keeping
+dummy <- data.frame(y=1:10, x1=c(10:4, 1:3), x2=c(1,3,5,7,9,2,4,6,8,0))
+
+xx1 <- rpart(y ~ x1 + x2, dummy, minsplit=4, xval=0)
+xx2 <- rpart(y ~ x1 + x2, dummy, weights=rep(2,10), minsplit=4, xval=0)
+
+all.equal(xx1$frame$dev, c(82.5, 10, 2, .5, 10, .5, 2))
+all.equal(xx2$frame$dev, c(82.5, 10, 2, .5, 10, .5, 2)*2)
+summary(xx2)
+
+
+# Now for a set of non-equal weights
+#  We need to set maxcompete=3 because there just happens to be, in one
+#  of the lower nodes, an exact tie between variables "life" and "murder".
+#  Round off error causes fit5 to choose one and fit5b the other.
+# Later -- cut it back to maxdepth=3 for the same reason (a tie).
+#
+nn <- nrow(mystate)
+wts <- sample(1:5, nn, replace=TRUE)
+temp <- rep(1:nn, wts)             #row replicates
+xgrp <- rep(1:10, length=nn)[order(runif(nn))]
+xgrp2<- rep(xgrp, wts)
+tempc <- rpart.control(minsplit=2, xval=xgrp2, maxsurrogate=0,
+		       maxcompete=3, maxdepth=3)
+#  Direct: replicate rows in the data set, and use unweighted
+fit5 <-  rpart(income ~ population + region + illiteracy +life + murder +
+                        hs.grad + frost , data=mystate[temp,], control=tempc)
+#  Weighted
+tempc <- rpart.control(minsplit=2, xval=xgrp, maxsurrogate=0,
+		       maxcompete=3, maxdepth=3)
+fit5b <-  rpart(income ~ population + region + illiteracy +life + murder +
+                        hs.grad + frost , data=mystate, control=tempc,
+                        weights=wts)
+all.equal(fit5$frame[-2],  fit5b$frame[-2])  # the "n" component won't match
+all.equal(fit5$cptable,    fit5b$cptable)
+all.equal(fit5$splits[,-1],fit5b$splits[,-1])
+all.equal(fit5$csplit,    fit5b$csplit)
+#
+# The treble test for classification trees
+#
+#
+xgrp <- rep(1:10,length=nrow(cu.summary))
+carfit <- rpart(Country ~ Reliability + Price + Mileage + Type,
+		 method='class', data=cu.summary,
+		 control=rpart.control(xval=xgrp))
+
+carfit2 <- rpart(Country ~ Reliability + Price + Mileage + Type,
+		 method='class', data=cu.summary,
+		 weight=rep(3,nrow(cu.summary)),
+		 control=rpart.control(xval=xgrp))
+
+all.equal(carfit$frame$wt,    carfit2$frame$wt/3)
+all.equal(carfit$frame$dev,   carfit2$frame$dev/3)
+all.equal(carfit$frame[,5:7], carfit2$frame[,5:7])
+all.equal(carfit$frame$yval2[,12:21], carfit2$frame$yval2[,12:21])
+all.equal(carfit[c('where', 'csplit')],
+	  carfit2[c('where', 'csplit')])
+xx <- carfit2$splits
+xx[,'improve'] <- xx[,'improve'] / ifelse(xx[,5]> 0,1,3) # surrogate?
+all.equal(xx, carfit$splits)
+all.equal(as.vector(carfit$cptable),
+	  as.vector(carfit2$cptable%*% diag(c(1,1,1,1,sqrt(3)))))
+
+summary(carfit2)
+
+#
+# Treble test for class trees with 2 outcomes
+#
+fit1 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis,
+               control=rpart.control(maxsurrogate=0, cp=0, xval=0),
+               parms=list(prior=c(.7,.3),
+                          loss=matrix(c(0,1,2,0),nrow=2,ncol=2)))
+wts <- rep(3, nrow(kyphosis))
+fit1b <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis,
+                control=rpart.control(maxsurrogate=0, cp=0, xval=0),
+	       weights=wts,
+               parms=list(prior=c(.7,.3),
+                          loss=matrix(c(0,1,2,0),nrow=2,ncol=2)))
+fit1b$frame$wt   <- fit1b$frame$wt/3
+fit1b$frame$dev  <- fit1b$frame$dev/3
+fit1b$frame$yval2[,2:3] <- fit1b$frame$yval2[,2:3]/3
+fit1b$splits[,3] <- fit1b$splits[,3]/3
+all.equal(fit1[-3], fit1b[-3])   #all but the "call"
+
+# Now for a set of non-equal weights
+nn <- nrow(kyphosis)
+wts <- sample(1:5, nn, replace=TRUE)
+temp <- rep(1:nn, wts)             #row replicates
+xgrp <- rep(1:10, length=nn)[order(runif(nn))]
+xgrp2<- rep(xgrp, wts)
+tempc <- rpart.control(minsplit=2, xval=xgrp2, maxsurrogate=0)
+#  Direct: replicate rows in the data set, and use unweighted
+fit2 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis[temp,],
+               control=tempc,
+               parms=list(prior=c(.7,.3),
+                          loss=matrix(c(0,1,2,0),nrow=2,ncol=2)))
+#  Weighted
+tempc <- rpart.control(minsplit=2, xval=xgrp, maxsurrogate=0)
+fit2b <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis,
+               control=tempc, weights=wts,
+               parms=list(prior=c(.7,.3),
+                          loss=matrix(c(0,1,2,0),nrow=2,ncol=2)))
+
+# all.equal(fit2$frame[-2],  fit2b$frame[-2])  # the "n" component won't match
+all.equal(fit2$cptable,    fit2b$cptable)
+# all.equal(fit2$splits[,-1],fit2b$splits[,-1]) #fails
+all.equal(fit2$csplit,    fit2b$csplit)
+
+
+#
+# Check out using costs
+#
+fit1 <- rpart(Surv(time, status) ~ age + sex + ph.ecog + ph.karno + pat.karno
+	      + meal.cal + wt.loss, data=lung,
+	      maxdepth=1, maxcompete=6, xval=0)
+
+fit2 <- rpart(Surv(time, status) ~ age + sex + ph.ecog + ph.karno + pat.karno
+	      + meal.cal + wt.loss, data=lung,
+	      maxdepth=1, maxcompete=6, xval=0, cost=(1+ 1:7/10))
+
+temp1 <- fit1$splits[1:7,]
+temp2 <- fit2$splits[1:7,]
+temp3 <- c('age', 'sex', 'ph.ecog', 'ph.karno', 'pat.karno', 'meal.cal',
+	   'wt.loss')
+indx1 <- match(temp3, dimnames(temp1)[[1]])
+indx2 <- match(temp3, dimnames(temp2)[[1]])
+all.equal(temp1[indx1,1], temp2[indx2,1])             #same n's ?
+all.equal(temp1[indx1,3], temp2[indx2,3]*(1+ 1:7/10)) #scaled importance
+
+
+q()
diff --git a/win32/deps/library/rpart/tests/testall.Rout.save b/win32/deps/library/rpart/tests/testall.Rout.save
new file mode 100644
index 0000000..d431ad7
--- /dev/null
+++ b/win32/deps/library/rpart/tests/testall.Rout.save
@@ -0,0 +1,1506 @@
+
+R version 2.13.0 Under development (unstable) (2011-03-05 r54672)
+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.
+
+> # Any necessary setup
+> library(rpart)
+> library(survival)
+Loading required package: splines
+> options(na.action="na.omit")
+> options(digits=4) # to match earlier output
+> RNGversion("1.6.2")
+Warning message:
+In RNGkind("Marsaglia-Multicarry", "Buggy Kinderman-Ramage") :
+  Buggy version of Kinderman-Ramage generator used
+> set.seed(1234)
+> #
+> # Read the data
+> #
+> #   Time to progression in years
+> #   status  1=progressed, 0= censored
+> #   age
+> #   early endocrine therapy   1=no 2=yes
+> #   % of cells in g2 phase, from flow cytometry
+> #   tumor grade (Farrow) 1,2,3,4
+> #   Gleason score (competing grading system)
+> #   ploidy
+> 
+> stagec <- read.table('data.stagec',  col.names=c("pgtime", "pgstat", "age",
++ 			"eet", "g2", "grade", "gleason", "ploidy"))
+> stagec$ploidy <- factor(stagec$ploidy, levels=1:3,
++ 				labels=c("diploid", "tetraploid", "aneuploid"))
+> 
+> cox0 <- coxph(Surv(pgtime, pgstat) ~ 1, stagec)
+> cox1 <- coxph(Surv(pgtime, pgstat) ~ age + eet + g2 + grade + ploidy, stagec)
+> cox1
+Call:
+coxph(formula = Surv(pgtime, pgstat) ~ age + eet + g2 + grade + 
+    ploidy, data = stagec)
+
+
+                    coef exp(coef) se(coef)      z       p
+age              -0.0173     0.983   0.0287 -0.604 5.5e-01
+eet               0.0704     1.073   0.3730  0.189 8.5e-01
+g2               -0.0527     0.949   0.0267 -1.973 4.9e-02
+grade             1.7289     5.634   0.3369  5.132 2.9e-07
+ploidytetraploid  1.0444     2.842   0.4225  2.472 1.3e-02
+ploidyaneuploid   1.1490     3.155   0.6611  1.738 8.2e-02
+
+Likelihood ratio test=48.6  on 6 df, p=8.92e-09  n= 137, number of events= 49 
+   (9 observations deleted due to missingness)
+> 
+> fit1 <- rpart(Surv(pgtime, pgstat) ~ age + eet + g2+grade+gleason +ploidy,
++ 		stagec, control=rpart.control(usesurrogate=0, cp=0),
++ 		method='poisson')
+> fit1
+n= 146 
+
+node), split, n, deviance, yval
+      * denotes terminal node
+
+  1) root 146 193.500 0.058500  
+    2) grade< 2.5 61  46.090 0.021290  
+      4) g2< 11.36 33   9.325 0.007180  
+        8) g2>=6.545 26   1.847 0.004466 *
+        9) g2< 6.545 7   5.904 0.027880 *
+      5) g2>=11.36 27  27.940 0.044910  
+       10) g2>=14.37 15  12.460 0.030970 *
+       11) g2< 14.37 12  13.730 0.067920 *
+    3) grade>=2.5 85 122.600 0.094370  
+      6) age>=56.5 75 104.300 0.082810  
+       12) g2>=22.77 12  14.840 0.039570 *
+       13) g2< 22.77 57  75.780 0.100200  
+         26) gleason< 7.5 41  55.530 0.076840  
+           52) g2< 13.47 23  26.750 0.050850  
+            104) g2>=11.52 7   5.309 0.030860 *
+            105) g2< 11.52 16  20.210 0.063860 *
+           53) g2>=13.47 18  25.300 0.112100 *
+         27) gleason>=7.5 16  15.170 0.163900 *
+      7) age< 56.5 10  11.780 0.197100 *
+> summary(fit1)
+Call:
+rpart(formula = Surv(pgtime, pgstat) ~ age + eet + g2 + grade + 
+    gleason + ploidy, data = stagec, method = "poisson", control = rpart.control(usesurrogate = 0, 
+    cp = 0))
+  n= 146 
+
+        CP nsplit rel error xerror    xstd
+1 0.128138      0    1.0000 1.0187 0.06276
+2 0.052155      1    0.8719 0.9510 0.07306
+3 0.045615      3    0.7676 1.0155 0.08505
+4 0.026271      4    0.7219 1.0083 0.08603
+5 0.017966      5    0.6957 0.9905 0.09158
+6 0.009059      6    0.6777 1.0184 0.09407
+7 0.008132      7    0.6686 1.0107 0.09306
+8 0.006384      8    0.6605 1.0154 0.09288
+9 0.000000      9    0.6541 1.0033 0.09034
+
+Node number 1: 146 observations,    complexity param=0.1281
+  events=54,  estimated rate=0.0585 , mean deviance=1.325 
+  left son=2 (61 obs) right son=3 (85 obs)
+  Primary splits:
+      grade   < 2.5   to the left,  improve=24.840, (0 missing)
+      gleason < 5.5   to the left,  improve=21.620, (3 missing)
+      ploidy  splits as  LRR,       improve=13.000, (0 missing)
+      g2      < 13.2  to the left,  improve=11.440, (7 missing)
+      age     < 53.5  to the right, improve= 2.482, (0 missing)
+  Surrogate splits:
+      gleason < 5.5   to the left,  agree=0.863, adj=0.672, (0 split)
+      ploidy  splits as  LRR,       agree=0.644, adj=0.148, (0 split)
+      g2      < 9.945 to the left,  agree=0.630, adj=0.115, (0 split)
+      age     < 66.5  to the right, agree=0.589, adj=0.016, (0 split)
+
+Node number 2: 61 observations,    complexity param=0.04562
+  events=9,  estimated rate=0.02129 , mean deviance=0.7556 
+  left son=4 (33 obs) right son=5 (27 obs), 1 observation remains
+  Primary splits:
+      g2      < 11.36 to the left,  improve=8.9660, (1 missing)
+      ploidy  splits as  LRL,       improve=7.4650, (0 missing)
+      age     < 68.5  to the right, improve=3.9540, (0 missing)
+      gleason < 5.5   to the left,  improve=1.8060, (3 missing)
+      eet     < 1.5   to the left,  improve=0.5441, (1 missing)
+  Surrogate splits:
+      ploidy splits as  LR-,       agree=0.917, adj=0.815, (0 split)
+      age    < 65.5  to the left,  agree=0.617, adj=0.148, (0 split)
+
+Node number 3: 85 observations,    complexity param=0.05215
+  events=45,  estimated rate=0.09437 , mean deviance=1.442 
+  left son=6 (75 obs) right son=7 (10 obs)
+  Primary splits:
+      age     < 56.5  to the right, improve=7.3330, (0 missing)
+      g2      < 22.76 to the right, improve=6.8130, (6 missing)
+      gleason < 8.5   to the left,  improve=4.8430, (0 missing)
+      ploidy  splits as  LLR,       improve=1.7270, (0 missing)
+      eet     < 1.5   to the right, improve=0.9572, (1 missing)
+
+Node number 4: 33 observations,    complexity param=0.008132
+  events=1,  estimated rate=0.00718 , mean deviance=0.2826 
+  left son=8 (26 obs) right son=9 (7 obs)
+  Primary splits:
+      g2      < 6.545 to the right, improve=3.1310, (0 missing)
+      age     < 62.5  to the right, improve=1.3530, (0 missing)
+      eet     < 1.5   to the left,  improve=0.6605, (0 missing)
+      gleason < 5.5   to the right, improve=0.4880, (2 missing)
+  Surrogate splits:
+      grade < 1.5   to the right, agree=0.848, adj=0.286, (0 split)
+
+Node number 5: 27 observations,    complexity param=0.009059
+  events=8,  estimated rate=0.04491 , mean deviance=1.035 
+  left son=10 (15 obs) right son=11 (12 obs)
+  Primary splits:
+      g2      < 14.37 to the right, improve=1.818, (0 missing)
+      gleason < 5.5   to the left,  improve=1.698, (1 missing)
+      age     < 62.5  to the left,  improve=1.137, (0 missing)
+  Surrogate splits:
+      ploidy  splits as  RL-,       agree=0.741, adj=0.417, (0 split)
+      age     < 65    to the left,  agree=0.630, adj=0.167, (0 split)
+      gleason < 5.5   to the left,  agree=0.630, adj=0.167, (0 split)
+
+Node number 6: 75 observations,    complexity param=0.05215
+  events=37,  estimated rate=0.08281 , mean deviance=1.391 
+  left son=12 (12 obs) right son=13 (57 obs), 6 observations remain
+  Primary splits:
+      g2      < 22.76 to the right, improve=4.8340, (6 missing)
+      gleason < 7.5   to the left,  improve=4.0830, (0 missing)
+      age     < 69.5  to the left,  improve=2.7450, (0 missing)
+      ploidy  splits as  LRR,       improve=0.7867, (0 missing)
+      eet     < 1.5   to the right, improve=0.1978, (1 missing)
+
+Node number 7: 10 observations
+  events=8,  estimated rate=0.1971 , mean deviance=1.178 
+
+Node number 8: 26 observations
+  events=0,  estimated rate=0.004466 , mean deviance=0.07105 
+
+Node number 9: 7 observations
+  events=1,  estimated rate=0.02788 , mean deviance=0.8435 
+
+Node number 10: 15 observations
+  events=3,  estimated rate=0.03097 , mean deviance=0.8305 
+
+Node number 11: 12 observations
+  events=5,  estimated rate=0.06792 , mean deviance=1.144 
+
+Node number 12: 12 observations
+  events=4,  estimated rate=0.03957 , mean deviance=1.236 
+
+Node number 13: 57 observations,    complexity param=0.02627
+  events=30,  estimated rate=0.1002 , mean deviance=1.33 
+  left son=26 (41 obs) right son=27 (16 obs)
+  Primary splits:
+      gleason < 7.5   to the left,  improve=5.37200, (0 missing)
+      g2      < 13.2  to the left,  improve=4.45500, (0 missing)
+      ploidy  splits as  LRR,       improve=3.48400, (0 missing)
+      age     < 69.5  to the left,  improve=3.14300, (0 missing)
+      eet     < 1.5   to the left,  improve=0.04885, (1 missing)
+  Surrogate splits:
+      grade < 3.5   to the left,  agree=0.772, adj=0.187, (0 split)
+
+Node number 26: 41 observations,    complexity param=0.01797
+  events=18,  estimated rate=0.07684 , mean deviance=1.354 
+  left son=52 (23 obs) right son=53 (18 obs)
+  Primary splits:
+      g2      < 13.48 to the left,  improve=3.55300, (0 missing)
+      ploidy  splits as  LRR,       improve=3.04200, (0 missing)
+      age     < 65.5  to the left,  improve=0.67910, (0 missing)
+      eet     < 1.5   to the left,  improve=0.09085, (0 missing)
+      gleason < 6.5   to the right, improve=0.01940, (0 missing)
+  Surrogate splits:
+      ploidy splits as  LRL,       agree=0.976, adj=0.944, (0 split)
+      eet    < 1.5   to the right, agree=0.634, adj=0.167, (0 split)
+      age    < 58.5  to the right, agree=0.585, adj=0.056, (0 split)
+
+Node number 27: 16 observations
+  events=12,  estimated rate=0.1639 , mean deviance=0.9483 
+
+Node number 52: 23 observations,    complexity param=0.006384
+  events=7,  estimated rate=0.05085 , mean deviance=1.163 
+  left son=104 (7 obs) right son=105 (16 obs)
+  Primary splits:
+      g2      < 11.52 to the right, improve=1.40500, (0 missing)
+      age     < 62.5  to the right, improve=1.24800, (0 missing)
+      gleason < 6.5   to the left,  improve=0.01894, (0 missing)
+  Surrogate splits:
+      age    < 71    to the right, agree=0.826, adj=0.429, (0 split)
+      ploidy splits as  RLR,       agree=0.739, adj=0.143, (0 split)
+
+Node number 53: 18 observations
+  events=11,  estimated rate=0.1121 , mean deviance=1.405 
+
+Node number 104: 7 observations
+  events=1,  estimated rate=0.03086 , mean deviance=0.7585 
+
+Node number 105: 16 observations
+  events=6,  estimated rate=0.06386 , mean deviance=1.263 
+
+> 
+> fit2 <- rpart(cox0$residual ~ age + eet + g2+grade+gleason +ploidy,
++ 		stagec)
+> fit2
+n= 146 
+
+node), split, n, deviance, yval
+      * denotes terminal node
+
+ 1) root 146 53.420 -4.563e-17  
+   2) grade< 2.5 61 11.330 -2.892e-01  
+     4) g2< 13.19 40  3.270 -4.119e-01 *
+     5) g2>=13.19 21  6.314 -5.547e-02  
+      10) g2>=14.62 14  3.098 -1.913e-01 *
+      11) g2< 14.62 7  2.440  2.163e-01 *
+   3) grade>=2.5 85 33.320  2.075e-01  
+     6) age>=56.5 75 29.090  1.526e-01  
+      12) gleason< 7.5 50 18.400  5.706e-02  
+        24) g2< 13.47 25  7.725 -4.713e-02 *
+        25) g2>=13.47 25 10.140  1.612e-01  
+          50) g2>=17.91 14  4.903 -6.099e-02 *
+          51) g2< 17.91 11  3.662  4.441e-01 *
+      13) gleason>=7.5 25  9.318  3.436e-01  
+        26) g2>=17 9  3.753  7.496e-02 *
+        27) g2< 17 16  4.551  4.946e-01 *
+     7) age< 56.5 10  2.304  6.199e-01 *
+> summary(fit2)
+Call:
+rpart(formula = cox0$residual ~ age + eet + g2 + grade + gleason + 
+    ploidy, data = stagec)
+  n= 146 
+
+       CP nsplit rel error xerror    xstd
+1 0.16404      0    1.0000 1.0192 0.05787
+2 0.03608      1    0.8360 0.8708 0.06720
+3 0.03275      2    0.7999 1.0292 0.08526
+4 0.02561      3    0.7671 1.0005 0.08657
+5 0.01979      4    0.7415 1.0497 0.09136
+6 0.01899      6    0.7019 1.0494 0.09154
+7 0.01452      7    0.6830 1.0499 0.09209
+8 0.01000      8    0.6684 1.0801 0.09695
+
+Node number 1: 146 observations,    complexity param=0.164
+  mean=-4.563e-17, MSE=0.3659 
+  left son=2 (61 obs) right son=3 (85 obs)
+  Primary splits:
+      grade   < 2.5   to the left,  improve=0.16400, (0 missing)
+      gleason < 5.5   to the left,  improve=0.13570, (3 missing)
+      ploidy  splits as  LRR,       improve=0.09188, (0 missing)
+      g2      < 13.2  to the left,  improve=0.08482, (7 missing)
+      age     < 58.5  to the right, improve=0.01991, (0 missing)
+  Surrogate splits:
+      gleason < 5.5   to the left,  agree=0.863, adj=0.672, (0 split)
+      ploidy  splits as  LRR,       agree=0.644, adj=0.148, (0 split)
+      g2      < 9.945 to the left,  agree=0.630, adj=0.115, (0 split)
+      age     < 66.5  to the right, agree=0.589, adj=0.016, (0 split)
+
+Node number 2: 61 observations,    complexity param=0.03275
+  mean=-0.2892, MSE=0.1858 
+  left son=4 (40 obs) right son=5 (21 obs)
+  Primary splits:
+      g2      < 13.19 to the left,  improve=0.14990, (1 missing)
+      ploidy  splits as  LRL,       improve=0.13360, (0 missing)
+      gleason < 5.5   to the left,  improve=0.03917, (3 missing)
+      age     < 68.5  to the right, improve=0.03753, (0 missing)
+      eet     < 1.5   to the left,  improve=0.01233, (1 missing)
+  Surrogate splits:
+      ploidy splits as  LR-, agree=0.983, adj=0.952, (0 split)
+
+Node number 3: 85 observations,    complexity param=0.03608
+  mean=0.2075, MSE=0.392 
+  left son=6 (75 obs) right son=7 (10 obs)
+  Primary splits:
+      age     < 56.5  to the right, improve=0.05784, (0 missing)
+      g2      < 23.48 to the right, improve=0.05207, (6 missing)
+      gleason < 8.5   to the left,  improve=0.04485, (0 missing)
+      ploidy  splits as  LRR,       improve=0.02537, (0 missing)
+      eet     < 1.5   to the right, improve=0.00724, (1 missing)
+
+Node number 4: 40 observations
+  mean=-0.4119, MSE=0.08176 
+
+Node number 5: 21 observations,    complexity param=0.01452
+  mean=-0.05547, MSE=0.3007 
+  left son=10 (14 obs) right son=11 (7 obs)
+  Primary splits:
+      g2  < 14.62 to the right, improve=0.12280, (0 missing)
+      age < 63.5  to the left,  improve=0.05198, (0 missing)
+
+Node number 6: 75 observations,    complexity param=0.02561
+  mean=0.1526, MSE=0.3879 
+  left son=12 (50 obs) right son=13 (25 obs)
+  Primary splits:
+      gleason < 7.5   to the left,  improve=0.0470300, (0 missing)
+      g2      < 23.48 to the right, improve=0.0439100, (6 missing)
+      age     < 69.5  to the left,  improve=0.0255400, (0 missing)
+      ploidy  splits as  LRR,       improve=0.0191000, (0 missing)
+      eet     < 1.5   to the right, improve=0.0009644, (1 missing)
+  Surrogate splits:
+      grade < 3.5   to the left,  agree=0.733, adj=0.2, (0 split)
+
+Node number 7: 10 observations
+  mean=0.6199, MSE=0.2304 
+
+Node number 10: 14 observations
+  mean=-0.1913, MSE=0.2213 
+
+Node number 11: 7 observations
+  mean=0.2163, MSE=0.3486 
+
+Node number 12: 50 observations,    complexity param=0.01979
+  mean=0.05706, MSE=0.3681 
+  left son=24 (25 obs) right son=25 (25 obs)
+  Primary splits:
+      g2      < 13.48 to the left,  improve=4.238e-02, (3 missing)
+      ploidy  splits as  LRR,       improve=3.143e-02, (0 missing)
+      age     < 62.5  to the right, improve=1.709e-02, (0 missing)
+      gleason < 6.5   to the left,  improve=5.610e-04, (0 missing)
+      eet     < 1.5   to the right, improve=6.361e-05, (0 missing)
+  Surrogate splits:
+      ploidy  splits as  LRL,       agree=0.979, adj=0.957, (3 split)
+      age     < 66.5  to the right, agree=0.596, adj=0.174, (0 split)
+      eet     < 1.5   to the right, agree=0.553, adj=0.087, (0 split)
+      gleason < 6.5   to the left,  agree=0.553, adj=0.087, (0 split)
+
+Node number 13: 25 observations,    complexity param=0.01899
+  mean=0.3436, MSE=0.3727 
+  left son=26 (9 obs) right son=27 (16 obs)
+  Primary splits:
+      g2     < 17    to the right, improve=1.562e-01, (3 missing)
+      age    < 61.5  to the right, improve=5.841e-02, (0 missing)
+      ploidy splits as  RLR,       improve=1.562e-02, (0 missing)
+      eet    < 1.5   to the right, improve=2.882e-05, (1 missing)
+  Surrogate splits:
+      age < 57.5  to the left,  agree=0.682, adj=0.125, (3 split)
+
+Node number 24: 25 observations
+  mean=-0.04713, MSE=0.309 
+
+Node number 25: 25 observations,    complexity param=0.01979
+  mean=0.1612, MSE=0.4055 
+  left son=50 (14 obs) right son=51 (11 obs)
+  Primary splits:
+      g2      < 17.92 to the right, improve=0.1271000, (1 missing)
+      eet     < 1.5   to the right, improve=0.0309400, (0 missing)
+      age     < 64.5  to the left,  improve=0.0241800, (0 missing)
+      gleason < 6.5   to the right, improve=0.0003038, (0 missing)
+  Surrogate splits:
+      age     < 65.5  to the left,  agree=0.708, adj=0.364, (1 split)
+      eet     < 1.5   to the right, agree=0.667, adj=0.273, (0 split)
+      gleason < 6.5   to the right, agree=0.625, adj=0.182, (0 split)
+
+Node number 26: 9 observations
+  mean=0.07496, MSE=0.417 
+
+Node number 27: 16 observations
+  mean=0.4946, MSE=0.2844 
+
+Node number 50: 14 observations
+  mean=-0.06099, MSE=0.3502 
+
+Node number 51: 11 observations
+  mean=0.4441, MSE=0.3329 
+
+> 
+> #
+> # In 6/2001 rpart.exp changed to fix a bug.  A side effect was reexamination
+> #  of one definition: the old version didn't count person-years after the
+> #  last death in computing the rescaling, the new one does.  One could argue
+> #  about which is better.  To match the old output, we modify the data.
+> tdata <- stagec
+> tdata$pgtime <- pmin(tdata$pgtime, max(tdata$pgtime[tdata$pgstat==1]))
+> 
+> fit3 <- rpart(Surv(pgtime, pgstat) ~ age + eet + g2+grade+gleason +ploidy,
++ 		tdata, control=rpart.control(usesurrogate=1, cp=.001))
+> 
+> summary(fit3)
+Call:
+rpart(formula = Surv(pgtime, pgstat) ~ age + eet + g2 + grade + 
+    gleason + ploidy, data = tdata, control = rpart.control(usesurrogate = 1, 
+    cp = 0.001))
+  n= 146 
+
+         CP nsplit rel error xerror    xstd
+1  0.129126      0    1.0000 1.0078 0.07351
+2  0.041689      1    0.8709 0.9179 0.07705
+3  0.028803      2    0.8292 1.0148 0.09182
+4  0.017195      3    0.8004 1.0591 0.10192
+5  0.015181      4    0.7832 1.0864 0.10375
+6  0.013514      5    0.7680 1.0813 0.10384
+7  0.012706      6    0.7545 1.0803 0.10404
+8  0.009607      8    0.7291 1.0820 0.10423
+9  0.008959      9    0.7195 1.0904 0.10545
+10 0.001000     10    0.7105 1.0802 0.10404
+
+Node number 1: 146 observations,    complexity param=0.1291
+  events=54,  estimated rate=1 , mean deviance=1.338 
+  left son=2 (61 obs) right son=3 (85 obs)
+  Primary splits:
+      grade   < 2.5   to the left,  improve=25.270, (0 missing)
+      gleason < 5.5   to the left,  improve=21.630, (3 missing)
+      ploidy  splits as  LRR,       improve=14.020, (0 missing)
+      g2      < 13.2  to the left,  improve=12.580, (7 missing)
+      age     < 58.5  to the right, improve= 2.796, (0 missing)
+  Surrogate splits:
+      gleason < 5.5   to the left,  agree=0.863, adj=0.672, (0 split)
+      ploidy  splits as  LRR,       agree=0.644, adj=0.148, (0 split)
+      g2      < 9.945 to the left,  agree=0.630, adj=0.115, (0 split)
+      age     < 66.5  to the right, agree=0.589, adj=0.016, (0 split)
+
+Node number 2: 61 observations,    complexity param=0.04169
+  events=9,  estimated rate=0.3617 , mean deviance=0.7373 
+  left son=4 (33 obs) right son=5 (28 obs)
+  Primary splits:
+      g2      < 11.36 to the left,  improve=9.0400, (1 missing)
+      ploidy  splits as  LRL,       improve=7.6600, (0 missing)
+      age     < 68.5  to the right, improve=4.1550, (0 missing)
+      gleason < 5.5   to the left,  improve=1.6610, (3 missing)
+      eet     < 1.5   to the left,  improve=0.6096, (1 missing)
+  Surrogate splits:
+      ploidy splits as  LR-,       agree=0.917, adj=0.815, (0 split)
+      age    < 65.5  to the left,  agree=0.617, adj=0.148, (1 split)
+
+Node number 3: 85 observations,    complexity param=0.0288
+  events=45,  estimated rate=1.623 , mean deviance=1.472 
+  left son=6 (75 obs) right son=7 (10 obs)
+  Primary splits:
+      age     < 56.5  to the right, improve=6.3660, (0 missing)
+      g2      < 23.48 to the right, improve=4.6720, (6 missing)
+      gleason < 8.5   to the left,  improve=4.2320, (0 missing)
+      ploidy  splits as  LRR,       improve=1.5970, (0 missing)
+      eet     < 1.5   to the right, improve=0.8234, (1 missing)
+
+Node number 4: 33 observations,    complexity param=0.008959
+  events=1,  estimated rate=0.122 , mean deviance=0.2767 
+  left son=8 (26 obs) right son=9 (7 obs)
+  Primary splits:
+      g2      < 6.545 to the right, improve=3.2920, (0 missing)
+      age     < 62.5  to the right, improve=1.4220, (0 missing)
+      eet     < 1.5   to the left,  improve=0.6913, (0 missing)
+      gleason < 5.5   to the right, improve=0.5440, (2 missing)
+  Surrogate splits:
+      grade < 1.5   to the right, agree=0.848, adj=0.286, (0 split)
+
+Node number 5: 28 observations,    complexity param=0.01351
+  events=8,  estimated rate=0.7341 , mean deviance=0.9894 
+  left son=10 (19 obs) right son=11 (8 obs), 1 observation remains
+  Primary splits:
+      gleason < 5.5   to the left,  improve=2.129, (1 missing)
+      age     < 67.5  to the right, improve=1.667, (0 missing)
+      g2      < 14.37 to the right, improve=1.397, (1 missing)
+
+Node number 6: 75 observations,    complexity param=0.0172
+  events=37,  estimated rate=1.432 , mean deviance=1.386 
+  left son=12 (50 obs) right son=13 (25 obs)
+  Primary splits:
+      gleason < 7.5   to the left,  improve=3.4240, (0 missing)
+      g2      < 23.48 to the right, improve=3.3370, (6 missing)
+      age     < 69.5  to the left,  improve=2.2340, (0 missing)
+      ploidy  splits as  LRR,       improve=1.1470, (0 missing)
+      eet     < 1.5   to the right, improve=0.1427, (1 missing)
+  Surrogate splits:
+      grade < 3.5   to the left,  agree=0.733, adj=0.2, (0 split)
+
+Node number 7: 10 observations
+  events=8,  estimated rate=3.198 , mean deviance=1.552 
+
+Node number 8: 26 observations
+  events=0,  estimated rate=0.07451 , mean deviance=0.07119 
+
+Node number 9: 7 observations
+  events=1,  estimated rate=0.5041 , mean deviance=0.7898 
+
+Node number 10: 19 observations
+  events=4,  estimated rate=0.5521 , mean deviance=0.7319 
+
+Node number 11: 8 observations
+  events=4,  estimated rate=1.314 , mean deviance=1.395 
+
+Node number 12: 50 observations,    complexity param=0.01271
+  events=21,  estimated rate=1.149 , mean deviance=1.33 
+  left son=24 (25 obs) right son=25 (25 obs)
+  Primary splits:
+      g2      < 13.48 to the left,  improve=1.94600, (3 missing)
+      ploidy  splits as  LRR,       improve=1.49100, (0 missing)
+      age     < 62.5  to the right, improve=0.80830, (0 missing)
+      gleason < 6.5   to the left,  improve=0.02956, (0 missing)
+      eet     < 1.5   to the right, improve=0.01135, (0 missing)
+  Surrogate splits:
+      ploidy  splits as  LRL,       agree=0.979, adj=0.957, (3 split)
+      age     < 66.5  to the right, agree=0.596, adj=0.174, (0 split)
+      eet     < 1.5   to the right, agree=0.553, adj=0.087, (0 split)
+      gleason < 6.5   to the left,  agree=0.553, adj=0.087, (0 split)
+
+Node number 13: 25 observations,    complexity param=0.01518
+  events=16,  estimated rate=2.028 , mean deviance=1.365 
+  left son=26 (10 obs) right son=27 (15 obs)
+  Primary splits:
+      g2     < 15.29 to the right, improve=3.92900, (3 missing)
+      age    < 68.5  to the left,  improve=1.34300, (0 missing)
+      ploidy splits as  RLR,       improve=0.83660, (0 missing)
+      eet    < 1.5   to the right, improve=0.00105, (1 missing)
+  Surrogate splits:
+      ploidy  splits as  RLR,       agree=0.727, adj=0.4, (3 split)
+      gleason < 8.5   to the right, agree=0.636, adj=0.2, (0 split)
+      age     < 57.5  to the left,  agree=0.591, adj=0.1, (0 split)
+      eet     < 1.5   to the left,  agree=0.591, adj=0.1, (0 split)
+
+Node number 24: 25 observations,    complexity param=0.009607
+  events=8,  estimated rate=0.8817 , mean deviance=1.164 
+  left son=48 (8 obs) right son=49 (17 obs)
+  Primary splits:
+      g2      < 11.52 to the right, improve=1.19200, (2 missing)
+      age     < 65.5  to the right, improve=1.16600, (0 missing)
+      gleason < 6.5   to the left,  improve=0.06199, (0 missing)
+  Surrogate splits:
+      age    < 70    to the right, agree=0.826, adj=0.429, (2 split)
+      ploidy splits as  RLR,       agree=0.739, adj=0.143, (0 split)
+
+Node number 25: 25 observations,    complexity param=0.01271
+  events=13,  estimated rate=1.408 , mean deviance=1.442 
+  left son=50 (14 obs) right son=51 (11 obs)
+  Primary splits:
+      g2      < 17.92 to the right, improve=3.122000, (1 missing)
+      eet     < 1.5   to the right, improve=1.212000, (0 missing)
+      age     < 64.5  to the left,  improve=0.633000, (0 missing)
+      gleason < 6.5   to the right, improve=0.001267, (0 missing)
+  Surrogate splits:
+      age     < 65.5  to the left,  agree=0.708, adj=0.364, (1 split)
+      eet     < 1.5   to the right, agree=0.667, adj=0.273, (0 split)
+      gleason < 6.5   to the right, agree=0.625, adj=0.182, (0 split)
+
+Node number 26: 10 observations
+  events=5,  estimated rate=1.214 , mean deviance=1.181 
+
+Node number 27: 15 observations
+  events=11,  estimated rate=2.702 , mean deviance=1.291 
+
+Node number 48: 8 observations
+  events=1,  estimated rate=0.4749 , mean deviance=0.6646 
+
+Node number 49: 17 observations
+  events=7,  estimated rate=1.144 , mean deviance=1.289 
+
+Node number 50: 14 observations
+  events=5,  estimated rate=0.8795 , mean deviance=1.337 
+
+Node number 51: 11 observations
+  events=8,  estimated rate=2.183 , mean deviance=1.246 
+
+> 
+> #
+> # In order to compare the x-vals estimates of the mainline and S versions,
+> #  it is necessary that we use stratified xval sets (like the mainline
+> #  does).
+> 
+> mystate <- data.frame(state.x77, region=factor(state.region))
+> names(mystate) <- c("population","income" , "illiteracy","life" ,
++        "murder", "hs.grad", "frost",     "area",      "region")
+> 
+> xvals <- 1:nrow(mystate)
+> xvals[order(mystate$income)] <- rep(1:10, length=nrow(mystate))
+> 
+> fit4 <- rpart(income ~ population + region + illiteracy +life + murder +
++ 			hs.grad + frost , mystate,
++ 		   control=rpart.control(minsplit=10, xval=xvals))
+> 
+> summary(fit4)
+Call:
+rpart(formula = income ~ population + region + illiteracy + life + 
+    murder + hs.grad + frost, data = mystate, control = rpart.control(minsplit = 10, 
+    xval = xvals))
+  n= 50 
+
+       CP nsplit rel error xerror   xstd
+1 0.42831      0    1.0000 1.0157 0.2265
+2 0.13514      1    0.5717 0.5948 0.1747
+3 0.06458      2    0.4365 0.7005 0.1802
+4 0.05485      3    0.3720 0.8606 0.2299
+5 0.05346      4    0.3171 0.8494 0.2297
+6 0.02479      5    0.2637 0.8289 0.2644
+7 0.01940      6    0.2389 0.8196 0.2641
+8 0.01394      7    0.2195 0.8196 0.2641
+9 0.01000      8    0.2055 0.8117 0.2640
+
+Node number 1: 50 observations,    complexity param=0.4283
+  mean=4436, MSE=3.7e+05 
+  left son=2 (10 obs) right son=3 (40 obs)
+  Primary splits:
+      hs.grad    < 44.3  to the left,  improve=0.4283, (0 missing)
+      illiteracy < 1.55  to the right, improve=0.3249, (0 missing)
+      region     splits as  RLRR,      improve=0.2285, (0 missing)
+      murder     < 11.55 to the right, improve=0.2012, (0 missing)
+      life       < 68.9  to the left,  improve=0.1672, (0 missing)
+  Surrogate splits:
+      illiteracy < 1.55  to the right, agree=0.90, adj=0.5, (0 split)
+      life       < 69.26 to the left,  agree=0.90, adj=0.5, (0 split)
+      region     splits as  RLRR,      agree=0.88, adj=0.4, (0 split)
+      murder     < 11.55 to the right, agree=0.88, adj=0.4, (0 split)
+      frost      < 81    to the left,  agree=0.82, adj=0.1, (0 split)
+
+Node number 2: 10 observations,    complexity param=0.0194
+  mean=3640, MSE=6.688e+04 
+  left son=4 (7 obs) right son=5 (3 obs)
+  Primary splits:
+      population < 3990  to the left,  improve=0.53670, (0 missing)
+      frost      < 55    to the left,  improve=0.30250, (0 missing)
+      illiteracy < 2.2   to the right, improve=0.29240, (0 missing)
+      hs.grad    < 40.8  to the right, improve=0.14540, (0 missing)
+      murder     < 12.85 to the left,  improve=0.08289, (0 missing)
+
+Node number 3: 40 observations,    complexity param=0.1351
+  mean=4635, MSE=2.477e+05 
+  left son=6 (34 obs) right son=7 (6 obs)
+  Primary splits:
+      life       < 70.26 to the right, improve=0.25230, (0 missing)
+      murder     < 10    to the left,  improve=0.16790, (0 missing)
+      hs.grad    < 60.95 to the left,  improve=0.12350, (0 missing)
+      illiteracy < 0.75  to the left,  improve=0.11520, (0 missing)
+      population < 659   to the right, improve=0.08106, (0 missing)
+  Surrogate splits:
+      population < 613.5 to the right, agree=0.875, adj=0.167, (0 split)
+      murder     < 11.2  to the left,  agree=0.875, adj=0.167, (0 split)
+      hs.grad    < 64.55 to the left,  agree=0.875, adj=0.167, (0 split)
+
+Node number 4: 7 observations
+  mean=3516, MSE=3.844e+04 
+
+Node number 5: 3 observations
+  mean=3929, MSE=1.361e+04 
+
+Node number 6: 34 observations,    complexity param=0.06458
+  mean=4530, MSE=1.69e+05 
+  left son=12 (12 obs) right son=13 (22 obs)
+  Primary splits:
+      population < 1374  to the left,  improve=0.20790, (0 missing)
+      life       < 70.41 to the left,  improve=0.19010, (0 missing)
+      frost      < 33.5  to the right, improve=0.10930, (0 missing)
+      illiteracy < 0.75  to the left,  improve=0.08942, (0 missing)
+      hs.grad    < 59.7  to the left,  improve=0.06429, (0 missing)
+  Surrogate splits:
+      frost      < 152   to the right, agree=0.794, adj=0.417, (0 split)
+      life       < 70.41 to the left,  agree=0.735, adj=0.250, (0 split)
+      murder     < 2     to the left,  agree=0.706, adj=0.167, (0 split)
+      region     splits as  RRRL,      agree=0.676, adj=0.083, (0 split)
+      illiteracy < 1.85  to the right, agree=0.676, adj=0.083, (0 split)
+
+Node number 7: 6 observations
+  mean=5230, MSE=2.768e+05 
+
+Node number 12: 12 observations,    complexity param=0.05485
+  mean=4276, MSE=1.942e+05 
+  left son=24 (3 obs) right son=25 (9 obs)
+  Primary splits:
+      population < 994.5 to the right, improve=0.4355, (0 missing)
+      life       < 71.89 to the left,  improve=0.2955, (0 missing)
+      frost      < 172.5 to the left,  improve=0.2333, (0 missing)
+      illiteracy < 0.75  to the left,  improve=0.1965, (0 missing)
+      murder     < 2.55  to the right, improve=0.1847, (0 missing)
+  Surrogate splits:
+      life < 70.47 to the left,  agree=0.833, adj=0.333, (0 split)
+
+Node number 13: 22 observations,    complexity param=0.05346
+  mean=4668, MSE=1.01e+05 
+  left son=26 (4 obs) right son=27 (18 obs)
+  Primary splits:
+      hs.grad    < 52.05 to the left,  improve=0.44500, (0 missing)
+      region     splits as  RLLR,      improve=0.35050, (0 missing)
+      life       < 71.56 to the left,  improve=0.12220, (0 missing)
+      murder     < 5.65  to the right, improve=0.10520, (0 missing)
+      population < 2980  to the left,  improve=0.06276, (0 missing)
+  Surrogate splits:
+      region splits as  RLRR, agree=0.864, adj=0.25, (0 split)
+
+Node number 24: 3 observations
+  mean=3772, MSE=3.261e+04 
+
+Node number 25: 9 observations
+  mean=4444, MSE=1.353e+05 
+
+Node number 26: 4 observations
+  mean=4218, MSE=2.77e+04 
+
+Node number 27: 18 observations,    complexity param=0.02479
+  mean=4768, MSE=6.236e+04 
+  left son=54 (8 obs) right son=55 (10 obs)
+  Primary splits:
+      region     splits as  RRLR,      improve=0.4086, (0 missing)
+      illiteracy < 1     to the left,  improve=0.3653, (0 missing)
+      murder     < 3.05  to the left,  improve=0.1805, (0 missing)
+      hs.grad    < 52.75 to the right, improve=0.1507, (0 missing)
+      population < 2412  to the left,  improve=0.1427, (0 missing)
+  Surrogate splits:
+      illiteracy < 1     to the left,  agree=0.833, adj=0.625, (0 split)
+      frost      < 108.5 to the right, agree=0.833, adj=0.625, (0 split)
+      life       < 72.31 to the right, agree=0.778, adj=0.500, (0 split)
+      murder     < 3.05  to the left,  agree=0.778, adj=0.500, (0 split)
+      hs.grad    < 59.95 to the left,  agree=0.667, adj=0.250, (0 split)
+
+Node number 54: 8 observations
+  mean=4590, MSE=1.009e+04 
+
+Node number 55: 10 observations,    complexity param=0.01394
+  mean=4911, MSE=5.832e+04 
+  left son=110 (7 obs) right son=111 (3 obs)
+  Primary splits:
+      frost      < 109   to the left,  improve=0.4423, (0 missing)
+      population < 2820  to the left,  improve=0.3546, (0 missing)
+      hs.grad    < 57.05 to the right, improve=0.3103, (0 missing)
+      region     splits as  RL-L,      improve=0.2564, (0 missing)
+      illiteracy < 1.2   to the right, improve=0.1921, (0 missing)
+  Surrogate splits:
+      life < 71.94 to the left,  agree=0.8, adj=0.333, (0 split)
+
+Node number 110: 7 observations
+  mean=4806, MSE=2.969e+04 
+
+Node number 111: 3 observations
+  mean=5156, MSE=3.914e+04 
+
+> 
+> 
+> #
+> # Check out xpred.rpart
+> #
+> meany <- mean(mystate$income)
+> xpr <- xpred.rpart(fit4, xval=xvals)
+> xpr2 <- (xpr - mystate$income)^2
+> risk0 <- mean((mystate$income - meany)^2)
+> xpmean <- as.vector(apply(xpr2, 2, mean))   #kill the names
+> all.equal(xpmean/risk0, as.vector(fit4$cptable[,'xerror']))
+[1] TRUE
+> 
+> xpstd <- as.vector(apply((sweep(xpr2, 2, xpmean))^2, 2, sum))
+> xpstd <- sqrt(xpstd)/(50*risk0)
+> all.equal(xpstd, as.vector(fit4$cptable[,'xstd']))
+[1] TRUE
+> 
+> #
+> # recreate subset #3 of the xval
+> #
+> tfit4 <- rpart(income ~ population + region + illiteracy +life + murder +
++ 			hs.grad + frost , mystate,  subset=(xvals!=3),
++ 		   control=rpart.control(minsplit=10, xval=0))
+> tpred <- predict(tfit4, mystate[xvals==3,])
+> all.equal(tpred, xpr[xvals==3,ncol(xpr)])
+[1] TRUE
+> 
+> # How much does this differ from the "real" formula, more complex,
+> #   found on page 309 of Breiman et al. ?
+> #xtemp <- (xpr2/outer(rep(1,50),xpmean)) -  ((mystate$income - meany)^2)/risk0
+> #real.se<- xpmean* sqrt(apply(xtemp^2,2,sum))/(risk0*50)
+> 
+> fit5 <- rpart(factor(pgstat) ~  age + eet + g2+grade+gleason +ploidy,
++ 	  stagec)
+> 
+> fit5
+n= 146 
+
+node), split, n, loss, yval, (yprob)
+      * denotes terminal node
+
+ 1) root 146 54 0 (0.6301 0.3699)  
+   2) grade< 2.5 61  9 0 (0.8525 0.1475) *
+   3) grade>=2.5 85 40 1 (0.4706 0.5294)  
+     6) g2< 13.2 40 17 0 (0.5750 0.4250)  
+      12) ploidy=diploid,tetraploid 31 11 0 (0.6452 0.3548)  
+        24) g2>=11.84 7  1 0 (0.8571 0.1429) *
+        25) g2< 11.84 24 10 0 (0.5833 0.4167)  
+          50) g2< 11 17  5 0 (0.7059 0.2941) *
+          51) g2>=11 7  2 1 (0.2857 0.7143) *
+      13) ploidy=aneuploid 9  3 1 (0.3333 0.6667) *
+     7) g2>=13.2 45 17 1 (0.3778 0.6222)  
+      14) g2>=17.91 22  8 0 (0.6364 0.3636)  
+        28) age>=62.5 15  4 0 (0.7333 0.2667) *
+        29) age< 62.5 7  3 1 (0.4286 0.5714) *
+      15) g2< 17.91 23  3 1 (0.1304 0.8696) *
+> 
+> fit6 <- rpart(factor(pgstat) ~  age + eet + g2+grade+gleason +ploidy,
++ 		stagec, parm=list(prior=c(.5,.5)))
+> summary(fit6)
+Call:
+rpart(formula = factor(pgstat) ~ age + eet + g2 + grade + gleason + 
+    ploidy, data = stagec, parms = list(prior = c(0.5, 0.5)))
+  n= 146 
+
+       CP nsplit rel error xerror    xstd
+1 0.39855      0    1.0000 1.1630 0.08486
+2 0.02335      1    0.6014 0.6341 0.07357
+3 0.02275      3    0.5548 0.7822 0.08197
+4 0.01892      5    0.5093 0.8007 0.08284
+5 0.01530      7    0.4714 0.8780 0.08508
+6 0.01000      9    0.4408 0.8422 0.08610
+
+Node number 1: 146 observations,    complexity param=0.3986
+  predicted class=0  expected loss=0.5
+    class counts:    92    54
+   probabilities: 0.500 0.500 
+  left son=2 (61 obs) right son=3 (85 obs)
+  Primary splits:
+      grade   < 2.5   to the left,  improve=12.490, (0 missing)
+      gleason < 5.5   to the left,  improve=10.510, (3 missing)
+      ploidy  splits as  LRR,       improve= 9.018, (0 missing)
+      g2      < 13.2  to the left,  improve= 8.281, (7 missing)
+      age     < 58.5  to the right, improve= 1.520, (0 missing)
+  Surrogate splits:
+      gleason < 5.5   to the left,  agree=0.863, adj=0.672, (0 split)
+      ploidy  splits as  LRR,       agree=0.644, adj=0.148, (0 split)
+      g2      < 9.945 to the left,  agree=0.630, adj=0.115, (0 split)
+      age     < 66.5  to the right, agree=0.589, adj=0.016, (0 split)
+
+Node number 2: 61 observations,    complexity param=0.0153
+  predicted class=0  expected loss=0.1995
+    class counts:    52     9
+   probabilities: 0.772 0.228 
+  left son=4 (33 obs) right son=5 (28 obs)
+  Primary splits:
+      g2      < 11.36 to the left,  improve=3.5470, (1 missing)
+      ploidy  splits as  LRL,       improve=3.2970, (0 missing)
+      age     < 68.5  to the right, improve=1.2020, (0 missing)
+      gleason < 5.5   to the left,  improve=0.6474, (3 missing)
+      eet     < 1.5   to the left,  improve=0.1910, (1 missing)
+  Surrogate splits:
+      ploidy splits as  LR-,       agree=0.917, adj=0.815, (0 split)
+      age    < 65.5  to the left,  agree=0.617, adj=0.148, (1 split)
+
+Node number 3: 85 observations,    complexity param=0.02335
+  predicted class=1  expected loss=0.3734
+    class counts:    40    45
+   probabilities: 0.343 0.657 
+  left son=6 (40 obs) right son=7 (45 obs)
+  Primary splits:
+      g2      < 13.2  to the left,  improve=1.96800, (6 missing)
+      ploidy  splits as  LRR,       improve=1.84100, (0 missing)
+      age     < 56.5  to the right, improve=1.32300, (0 missing)
+      gleason < 8.5   to the left,  improve=1.26900, (0 missing)
+      eet     < 1.5   to the right, improve=0.09632, (1 missing)
+  Surrogate splits:
+      ploidy  splits as  LRL,       agree=0.962, adj=0.914, (6 split)
+      age     < 68.5  to the right, agree=0.608, adj=0.114, (0 split)
+      gleason < 6.5   to the left,  agree=0.582, adj=0.057, (0 split)
+
+Node number 4: 33 observations
+  predicted class=0  expected loss=0.04097
+    class counts:    32     1
+   probabilities: 0.949 0.051 
+
+Node number 5: 28 observations,    complexity param=0.0153
+  predicted class=0  expected loss=0.3862
+    class counts:    20     8
+   probabilities: 0.595 0.405 
+  left son=10 (20 obs) right son=11 (8 obs)
+  Primary splits:
+      gleason < 5.5   to the left,  improve=1.1580, (1 missing)
+      age     < 67.5  to the right, improve=1.1420, (0 missing)
+      g2      < 14.37 to the right, improve=0.8086, (1 missing)
+
+Node number 6: 40 observations,    complexity param=0.02335
+  predicted class=1  expected loss=0.4563
+    class counts:    23    17
+   probabilities: 0.443 0.557 
+  left son=12 (7 obs) right son=13 (33 obs)
+  Primary splits:
+      g2      < 11.84 to the right, improve=1.42400, (5 missing)
+      ploidy  splits as  LLR,       improve=1.31000, (0 missing)
+      gleason < 7.5   to the left,  improve=0.86340, (0 missing)
+      age     < 61.5  to the right, improve=0.57940, (0 missing)
+      eet     < 1.5   to the left,  improve=0.05363, (0 missing)
+  Surrogate splits:
+      ploidy splits as  RLR, agree=0.857, adj=0.286, (5 split)
+
+Node number 7: 45 observations,    complexity param=0.02275
+  predicted class=1  expected loss=0.2998
+    class counts:    17    28
+   probabilities: 0.263 0.737 
+  left son=14 (22 obs) right son=15 (23 obs)
+  Primary splits:
+      g2      < 17.91 to the right, improve=4.07900, (1 missing)
+      age     < 62.5  to the right, improve=0.66100, (0 missing)
+      gleason < 7.5   to the left,  improve=0.16170, (0 missing)
+      eet     < 1.5   to the right, improve=0.09922, (1 missing)
+  Surrogate splits:
+      age     < 61.5  to the right, agree=0.614, adj=0.190, (1 split)
+      eet     < 1.5   to the right, agree=0.591, adj=0.143, (0 split)
+      grade   < 3.5   to the right, agree=0.545, adj=0.048, (0 split)
+      gleason < 6.5   to the right, agree=0.545, adj=0.048, (0 split)
+
+Node number 10: 20 observations
+  predicted class=0  expected loss=0.2704
+    class counts:    16     4
+   probabilities: 0.701 0.299 
+
+Node number 11: 8 observations
+  predicted class=1  expected loss=0.3967
+    class counts:     4     4
+   probabilities: 0.370 0.630 
+
+Node number 12: 7 observations
+  predicted class=0  expected loss=0.1931
+    class counts:     6     1
+   probabilities: 0.779 0.221 
+
+Node number 13: 33 observations,    complexity param=0.01892
+  predicted class=1  expected loss=0.4088
+    class counts:    17    16
+   probabilities: 0.384 0.616 
+  left son=26 (25 obs) right son=27 (8 obs)
+  Primary splits:
+      g2      < 11    to the left,  improve=1.06300, (5 missing)
+      ploidy  splits as  L-R,       improve=0.73950, (0 missing)
+      gleason < 6.5   to the left,  improve=0.57220, (0 missing)
+      age     < 62.5  to the right, improve=0.13320, (0 missing)
+      eet     < 1.5   to the left,  improve=0.05492, (0 missing)
+  Surrogate splits:
+      age < 70.5  to the left,  agree=0.821, adj=0.286, (5 split)
+
+Node number 14: 22 observations,    complexity param=0.02275
+  predicted class=0  expected loss=0.4916
+    class counts:    14     8
+   probabilities: 0.507 0.493 
+  left son=28 (15 obs) right son=29 (7 obs)
+  Primary splits:
+      age     < 62.5  to the right, improve=0.976400, (0 missing)
+      g2      < 23.48 to the right, improve=0.284300, (1 missing)
+      gleason < 7.5   to the left,  improve=0.003765, (0 missing)
+  Surrogate splits:
+      gleason < 6.5   to the right, agree=0.773, adj=0.286, (0 split)
+
+Node number 15: 23 observations
+  predicted class=1  expected loss=0.1035
+    class counts:     3    20
+   probabilities: 0.081 0.919 
+
+Node number 26: 25 observations,    complexity param=0.01892
+  predicted class=1  expected loss=0.4443
+    class counts:    14    11
+   probabilities: 0.428 0.572 
+  left son=52 (17 obs) right son=53 (8 obs)
+  Primary splits:
+      ploidy  splits as  L-R,       improve=2.157000, (0 missing)
+      gleason < 6.5   to the left,  improve=1.972000, (0 missing)
+      age     < 61.5  to the right, improve=0.971800, (0 missing)
+      g2      < 7.65  to the right, improve=0.404500, (4 missing)
+      eet     < 1.5   to the left,  improve=0.002614, (0 missing)
+  Surrogate splits:
+      eet < 1.5   to the right, agree=0.72, adj=0.125, (0 split)
+      g2  < 4.33  to the right, agree=0.72, adj=0.125, (0 split)
+
+Node number 27: 8 observations
+  predicted class=1  expected loss=0.2976
+    class counts:     3     5
+   probabilities: 0.260 0.740 
+
+Node number 28: 15 observations
+  predicted class=0  expected loss=0.3605
+    class counts:    11     4
+   probabilities: 0.617 0.383 
+
+Node number 29: 7 observations
+  predicted class=1  expected loss=0.3401
+    class counts:     3     4
+   probabilities: 0.306 0.694 
+
+Node number 52: 17 observations
+  predicted class=0  expected loss=0.3976
+    class counts:    12     5
+   probabilities: 0.585 0.415 
+
+Node number 53: 8 observations
+  predicted class=1  expected loss=0.1984
+    class counts:     2     6
+   probabilities: 0.164 0.836 
+
+> #
+> # Fit a classification model to the car data.
+> #  Now, since Reliability is an ordered category, this model doesn't
+> # make a lot of statistical sense, but it does test out some
+> # areas of the code that nothing else does
+> #
+> 
+> carfit <- rpart(Reliability ~ Price + Country + Mileage + Type,
++ 		   method='class', data=cu.summary)
+> 
+> summary(carfit)
+Call:
+rpart(formula = Reliability ~ Price + Country + Mileage + Type, 
+    data = cu.summary, method = "class")
+  n=85 (32 observations deleted due to missingness)
+
+       CP nsplit rel error xerror    xstd
+1 0.30508      0    1.0000 1.0000 0.07200
+2 0.08475      1    0.6949 0.6949 0.07808
+3 0.05085      2    0.6102 0.7119 0.07813
+4 0.03390      3    0.5593 0.7119 0.07813
+5 0.01000      4    0.5254 0.7119 0.07813
+
+Node number 1: 85 observations,    complexity param=0.3051
+  predicted class=average      expected loss=0.6941
+    class counts:    18    12    26     8    21
+   probabilities: 0.212 0.141 0.306 0.094 0.247 
+  left son=2 (58 obs) right son=3 (27 obs)
+  Primary splits:
+      Country splits as  ---LRRLLLL, improve=15.220, (0 missing)
+      Type    splits as  RLLRLL,     improve= 4.288, (0 missing)
+      Price   < 11970 to the right,  improve= 3.200, (0 missing)
+      Mileage < 24.5  to the left,   improve= 2.476, (36 missing)
+
+Node number 2: 58 observations,    complexity param=0.08475
+  predicted class=average      expected loss=0.6034
+    class counts:    18    12    23     5     0
+   probabilities: 0.310 0.207 0.397 0.086 0.000 
+  left son=4 (9 obs) right son=5 (49 obs)
+  Primary splits:
+      Type    splits as  RRRRLR,     improve=3.187, (0 missing)
+      Price   < 11230 to the left,   improve=2.564, (0 missing)
+      Mileage < 24.5  to the left,   improve=1.802, (30 missing)
+      Country splits as  ---L--RLRL, improve=1.329, (0 missing)
+
+Node number 3: 27 observations
+  predicted class=Much better  expected loss=0.2222
+    class counts:     0     0     3     3    21
+   probabilities: 0.000 0.000 0.111 0.111 0.778 
+
+Node number 4: 9 observations
+  predicted class=Much worse   expected loss=0.2222
+    class counts:     7     0     2     0     0
+   probabilities: 0.778 0.000 0.222 0.000 0.000 
+
+Node number 5: 49 observations,    complexity param=0.05085
+  predicted class=average      expected loss=0.5714
+    class counts:    11    12    21     5     0
+   probabilities: 0.224 0.245 0.429 0.102 0.000 
+  left son=10 (27 obs) right son=11 (22 obs)
+  Primary splits:
+      Type    splits as  RLLR-L,     improve=2.880, (0 missing)
+      Mileage < 24.5  to the left,   improve=2.500, (25 missing)
+      Price   < 11470 to the right,  improve=2.424, (0 missing)
+      Country splits as  ---R--LRLR, improve=1.027, (0 missing)
+  Surrogate splits:
+      Price   < 11470 to the right,  agree=0.898, adj=0.773, (0 split)
+      Country splits as  ---R--RRRL, agree=0.755, adj=0.455, (0 split)
+
+Node number 10: 27 observations
+  predicted class=average      expected loss=0.4074
+    class counts:     7     4    16     0     0
+   probabilities: 0.259 0.148 0.593 0.000 0.000 
+
+Node number 11: 22 observations,    complexity param=0.0339
+  predicted class=worse        expected loss=0.6364
+    class counts:     4     8     5     5     0
+   probabilities: 0.182 0.364 0.227 0.227 0.000 
+  left son=22 (14 obs) right son=23 (8 obs)
+  Primary splits:
+      Country splits as  ---R--LRRL, improve=1.5190, (0 missing)
+      Price   < 8646  to the left,   improve=1.2720, (0 missing)
+      Type    splits as  L--R--,     improve=0.1909, (0 missing)
+  Surrogate splits:
+      Price < 13970 to the left,  agree=0.864, adj=0.625, (0 split)
+
+Node number 22: 14 observations
+  predicted class=worse        expected loss=0.5714
+    class counts:     4     6     1     3     0
+   probabilities: 0.286 0.429 0.071 0.214 0.000 
+
+Node number 23: 8 observations
+  predicted class=average      expected loss=0.5
+    class counts:     0     2     4     2     0
+   probabilities: 0.000 0.250 0.500 0.250 0.000 
+
+> #
+> # Simplest weight test: treble the weights
+> #
+> #  By using the unshrunken estimates the weights will nearly cancel
+> #   out:  frame$wt, frame$dev, frame$yval2, and improvement will all
+> #   be threefold larger, other things will be the same.
+> # The improvement is the splits matrix, column 3, rows with n>0.  Other
+> #   rows are surrogate splits.
+> 
+> tempc <- rpart.control(maxsurrogate=0, cp=0, xval=0)
+> fit1 <- rpart(Surv(pgtime, pgstat) ~ age + eet + g2+grade+gleason +ploidy,
++                 stagec, control=tempc,
++                 method='poisson', parms=list(shrink=0))
+> wts <- rep(3, nrow(stagec))
+> fit1b <- rpart(Surv(pgtime, pgstat) ~ age + eet + g2+grade+gleason +ploidy,
++                 stagec, control= tempc, parms=list(shrink=0),
++                 method='poisson', weights=wts)
+> fit1b$frame$wt   <- fit1b$frame$wt/3
+> fit1b$frame$dev  <- fit1b$frame$dev/3
+> fit1b$frame$yval2[,2] <- fit1b$frame$yval2[,2]/3
+> fit1b$splits[,3] <- fit1b$splits[,3]/3
+> all.equal(fit1[-3], fit1b[-3])   #all but the "call"
+[1] TRUE
+> 
+> #
+> # Compare a pair of multiply weighted fits
+> #  In this one, the lengths of where and y won't match
+> # I have to set minsplit to the smallest possible, because otherwise
+> #  the replicated data set will sometimes have enough "n" to split, but
+> #  the weighted one won't.  Use of CP keeps the degenerate splits
+> #  (n=2, several covariates with exactly the same improvement) at bay.
+> # For larger trees, the weighted split will sometimes have fewer
+> #  surrogates, because of the "at least two obs" rule.
+> #
+> set.seed(1234)
+> wts <- sample(1:5, nrow(stagec), replace=TRUE)
+> temp <- rep(1:nrow(stagec), wts)             #row replicates
+> xgrp <- rep(1:10, length=146)[order(runif(146))]
+> xgrp2<- rep(xgrp, wts)
+> #  Direct: replicate rows in the data set, and use unweighted
+> fit2 <- rpart(Surv(pgtime, pgstat) ~ age + eet + g2+grade+gleason +ploidy,
++ 	      control=rpart.control(minsplit=2, xval=xgrp2, cp=.025),
++ 	      data=stagec[temp,], method='poisson')
+> #  Weighted
+> fit2b<- rpart(Surv(pgtime, pgstat) ~ age + eet + g2+grade+gleason +ploidy,
++ 	      control=rpart.control(minsplit=2, xval=xgrp, cp=.025),
++ 	      data=stagec, method='poisson', weight=wts)
+> 
+> all.equal(fit2$frame[-2],  fit2b$frame[-2])  # the "n" component won't match
+[1] "Component 7: Mean relative difference: 0.5"
+> all.equal(fit2$cptable,    fit2b$cptable)
+[1] TRUE
+> # next two depend on how ties are resolved, so platform-dependent
+> # all.equal(fit2$splits[,-1],fit2b$splits[,-1]) #fails
+> # all.equal(fit2$splits[-24,-1],fit2b$splits[-24,-1]) #ok
+> all.equal(fit2$csplit,    fit2b$csplit)
+[1] TRUE
+> # Line 24 is a surrogate split in a group whose 2 smallest ages are
+> #  47 and 48.  The weighted fit won't split there because it wants to
+> #  send at least 2 obs to the left; the replicate fit thinks that there
+> #  are several 47's.
+> 
+> 
+> 
+> 
+> 
+> #
+> # Test weights in a regression problem
+> #
+> 
+> xgrp <- rep(1:10,5)
+> fit4 <- rpart(income ~ population + region + illiteracy +life + murder +
++                         hs.grad + frost , mystate,
++                    control=rpart.control(minsplit=10, xval=xgrp))
+> wts <- rep(3, nrow(mystate))
+> fit4b <-  rpart(income ~ population + region + illiteracy +life + murder +
++                         hs.grad + frost , mystate,
++                    control=rpart.control(minsplit=10, xval=xgrp), weights=wts)
+> fit4b$frame$wt   <- fit4b$frame$wt/3
+> fit4b$frame$dev  <- fit4b$frame$dev/3
+> fit4b$cptable[,5] <- fit4b$cptable[,5] * sqrt(3)
+> temp <- c('frame', 'where', 'splits', 'csplit', 'cptable')
+> all.equal(fit4[temp], fit4b[temp])
+[1] TRUE
+> 
+> 
+> # Next is a very simple case, but worth keeping
+> dummy <- data.frame(y=1:10, x1=c(10:4, 1:3), x2=c(1,3,5,7,9,2,4,6,8,0))
+> 
+> xx1 <- rpart(y ~ x1 + x2, dummy, minsplit=4, xval=0)
+> xx2 <- rpart(y ~ x1 + x2, dummy, weights=rep(2,10), minsplit=4, xval=0)
+> 
+> all.equal(xx1$frame$dev, c(82.5, 10, 2, .5, 10, .5, 2))
+[1] TRUE
+> all.equal(xx2$frame$dev, c(82.5, 10, 2, .5, 10, .5, 2)*2)
+[1] TRUE
+> summary(xx2)
+Call:
+rpart(formula = y ~ x1 + x2, data = dummy, weights = rep(2, 10), 
+    minsplit = 4, xval = 0)
+  n= 10 
+
+       CP nsplit rel error
+1 0.75758      0   1.00000
+2 0.09091      1   0.24242
+3 0.01000      3   0.06061
+
+Node number 1: 10 observations,    complexity param=0.7576
+  mean=5.5, MSE=8.25 
+  left son=2 (5 obs) right son=3 (5 obs)
+  Primary splits:
+      x1 < 5.5 to the right, improve=0.7576, (0 missing)
+      x2 < 0.5 to the right, improve=0.2727, (0 missing)
+  Surrogate splits:
+      x2 < 2.5 to the right, agree=0.6, adj=0.2, (0 split)
+
+Node number 2: 5 observations,    complexity param=0.09091
+  mean=3, MSE=2 
+  left son=4 (3 obs) right son=5 (2 obs)
+  Primary splits:
+      x1 < 7.5 to the right, improve=0.75, (0 missing)
+      x2 < 4   to the left,  improve=0.75, (0 missing)
+  Surrogate splits:
+      x2 < 6   to the left,  agree=1, adj=1, (0 split)
+
+Node number 3: 5 observations,    complexity param=0.09091
+  mean=8, MSE=2 
+  left son=6 (2 obs) right son=7 (3 obs)
+  Primary splits:
+      x1 < 3.5 to the right, improve=0.75, (0 missing)
+      x2 < 1   to the right, improve=0.50, (0 missing)
+  Surrogate splits:
+      x2 < 5   to the left,  agree=0.8, adj=0.5, (0 split)
+
+Node number 4: 3 observations
+  mean=2, MSE=0.6667 
+
+Node number 5: 2 observations
+  mean=4.5, MSE=0.25 
+
+Node number 6: 2 observations
+  mean=6.5, MSE=0.25 
+
+Node number 7: 3 observations
+  mean=9, MSE=0.6667 
+
+> 
+> 
+> # Now for a set of non-equal weights
+> #  We need to set maxcompete=3 because there just happens to be, in one
+> #  of the lower nodes, an exact tie between variables "life" and "murder".
+> #  Round off error causes fit5 to choose one and fit5b the other.
+> # Later -- cut it back to maxdepth=3 for the same reason (a tie).
+> #
+> nn <- nrow(mystate)
+> wts <- sample(1:5, nn, replace=TRUE)
+> temp <- rep(1:nn, wts)             #row replicates
+> xgrp <- rep(1:10, length=nn)[order(runif(nn))]
+> xgrp2<- rep(xgrp, wts)
+> tempc <- rpart.control(minsplit=2, xval=xgrp2, maxsurrogate=0,
++ 		       maxcompete=3, maxdepth=3)
+> #  Direct: replicate rows in the data set, and use unweighted
+> fit5 <-  rpart(income ~ population + region + illiteracy +life + murder +
++                         hs.grad + frost , data=mystate[temp,], control=tempc)
+> #  Weighted
+> tempc <- rpart.control(minsplit=2, xval=xgrp, maxsurrogate=0,
++ 		       maxcompete=3, maxdepth=3)
+> fit5b <-  rpart(income ~ population + region + illiteracy +life + murder +
++                         hs.grad + frost , data=mystate, control=tempc,
++                         weights=wts)
+> all.equal(fit5$frame[-2],  fit5b$frame[-2])  # the "n" component won't match
+[1] TRUE
+> all.equal(fit5$cptable,    fit5b$cptable)
+[1] TRUE
+> all.equal(fit5$splits[,-1],fit5b$splits[,-1])
+[1] TRUE
+> all.equal(fit5$csplit,    fit5b$csplit)
+[1] TRUE
+> #
+> # The treble test for classification trees
+> #
+> #
+> xgrp <- rep(1:10,length=nrow(cu.summary))
+> carfit <- rpart(Country ~ Reliability + Price + Mileage + Type,
++ 		 method='class', data=cu.summary,
++ 		 control=rpart.control(xval=xgrp))
+> 
+> carfit2 <- rpart(Country ~ Reliability + Price + Mileage + Type,
++ 		 method='class', data=cu.summary,
++ 		 weight=rep(3,nrow(cu.summary)),
++ 		 control=rpart.control(xval=xgrp))
+> 
+> all.equal(carfit$frame$wt,    carfit2$frame$wt/3)
+[1] TRUE
+> all.equal(carfit$frame$dev,   carfit2$frame$dev/3)
+[1] TRUE
+> all.equal(carfit$frame[,5:7], carfit2$frame[,5:7])
+[1] TRUE
+> all.equal(carfit$frame$yval2[,12:21], carfit2$frame$yval2[,12:21])
+[1] TRUE
+> all.equal(carfit[c('where', 'csplit')],
++ 	  carfit2[c('where', 'csplit')])
+[1] TRUE
+> xx <- carfit2$splits
+> xx[,'improve'] <- xx[,'improve'] / ifelse(xx[,5]> 0,1,3) # surrogate?
+> all.equal(xx, carfit$splits)
+[1] TRUE
+> all.equal(as.vector(carfit$cptable),
++ 	  as.vector(carfit2$cptable%*% diag(c(1,1,1,1,sqrt(3)))))
+[1] TRUE
+> 
+> summary(carfit2)
+Call:
+rpart(formula = Country ~ Reliability + Price + Mileage + Type, 
+    data = cu.summary, weights = rep(3, nrow(cu.summary)), method = "class", 
+    control = rpart.control(xval = xgrp))
+  n= 117 
+
+       CP nsplit rel error xerror    xstd
+1 0.23529      0    1.0000 1.0000 0.04531
+2 0.02941      1    0.7647 0.8088 0.04584
+3 0.02206      3    0.7059 0.9118 0.04584
+4 0.01000      5    0.6618 0.9559 0.04563
+
+Node number 1: 117 observations,    complexity param=0.2353
+  predicted class=USA        expected loss=0.5812
+    class counts:     3     3     6    33    93    27    15     9    15   147
+   probabilities: 0.009 0.009 0.017 0.094 0.265 0.077 0.043 0.026 0.043 0.419 
+  left son=2 (33 obs) right son=3 (84 obs)
+  Primary splits:
+      Reliability splits as  RRRLL,     improve=44.780, (32 missing)
+      Type        splits as  LRRLRR,    improve=11.250, (0 missing)
+      Price       < 6923  to the left,  improve=10.450, (0 missing)
+      Mileage     < 22.5  to the right, improve= 6.084, (57 missing)
+  Surrogate splits:
+      Type  splits as  RRRLRR,    agree=0.706, adj=0.138, (32 split)
+      Price < 6665  to the left,  agree=0.682, adj=0.069, (0 split)
+
+Node number 2: 33 observations,    complexity param=0.02206
+  predicted class=Japan      expected loss=0.4545
+    class counts:     3     0     0     3    54    27     3     3     0     6
+   probabilities: 0.030 0.000 0.000 0.030 0.545 0.273 0.030 0.030 0.000 0.061 
+  left son=4 (9 obs) right son=5 (24 obs)
+  Primary splits:
+      Price       < 13200 to the right, improve=7.621, (0 missing)
+      Type        splits as  R-LRLL,    improve=5.621, (0 missing)
+      Reliability splits as  RRRRL,     improve=5.406, (4 missing)
+      Mileage     < 23.5  to the left,  improve=3.916, (9 missing)
+  Surrogate splits:
+      Type splits as  R-LRLL, agree=0.879, adj=0.556, (0 split)
+
+Node number 3: 84 observations,    complexity param=0.02941
+  predicted class=USA        expected loss=0.4405
+    class counts:     0     3     6    30    39     0    12     6    15   141
+   probabilities: 0.000 0.012 0.024 0.119 0.155 0.000 0.048 0.024 0.060 0.560 
+  left son=6 (30 obs) right son=7 (54 obs)
+  Primary splits:
+      Price       < 16670 to the right, improve=10.400, (0 missing)
+      Type        splits as  RRRLRR,    improve= 6.026, (0 missing)
+      Mileage     < 22.5  to the right, improve= 3.133, (48 missing)
+      Reliability splits as  RLLLL,     improve= 2.195, (28 missing)
+  Surrogate splits:
+      Type splits as  RLLRRR, agree=0.714, adj=0.2, (0 split)
+
+Node number 4: 9 observations
+  predicted class=Japan      expected loss=0.1111
+    class counts:     0     0     0     3    24     0     0     0     0     0
+   probabilities: 0.000 0.000 0.000 0.111 0.889 0.000 0.000 0.000 0.000 0.000 
+
+Node number 5: 24 observations,    complexity param=0.02206
+  predicted class=Japan      expected loss=0.5833
+    class counts:     3     0     0     0    30    27     3     3     0     6
+   probabilities: 0.042 0.000 0.000 0.000 0.417 0.375 0.042 0.042 0.000 0.083 
+  left son=10 (7 obs) right son=11 (17 obs)
+  Primary splits:
+      Price   < 7038  to the left,  improve=4.836, (0 missing)
+      Type    splits as  R--LR-,    improve=1.967, (0 missing)
+      Mileage < 30.5  to the right, improve=1.717, (6 missing)
+
+Node number 6: 30 observations,    complexity param=0.02941
+  predicted class=USA        expected loss=0.6333
+    class counts:     0     3     3    24    12     0     0     0    15    33
+   probabilities: 0.000 0.033 0.033 0.267 0.133 0.000 0.000 0.000 0.167 0.367 
+  left son=12 (10 obs) right son=13 (20 obs)
+  Primary splits:
+      Type        splits as  LRR-L-,    improve=6.6000, (0 missing)
+      Price       < 30510 to the right, improve=5.3740, (0 missing)
+      Reliability splits as  RRLLL,     improve=0.3333, (12 missing)
+  Surrogate splits:
+      Price < 19420 to the left,  agree=0.767, adj=0.3, (0 split)
+
+Node number 7: 54 observations
+  predicted class=USA        expected loss=0.3333
+    class counts:     0     0     3     6    27     0    12     6     0   108
+   probabilities: 0.000 0.000 0.019 0.037 0.167 0.000 0.074 0.037 0.000 0.667 
+
+Node number 10: 7 observations
+  predicted class=Japan      expected loss=0.2857
+    class counts:     0     0     0     0    15     3     3     0     0     0
+   probabilities: 0.000 0.000 0.000 0.000 0.714 0.143 0.143 0.000 0.000 0.000 
+
+Node number 11: 17 observations
+  predicted class=Japan/USA  expected loss=0.5294
+    class counts:     3     0     0     0    15    24     0     3     0     6
+   probabilities: 0.059 0.000 0.000 0.000 0.294 0.471 0.000 0.059 0.000 0.118 
+
+Node number 12: 10 observations
+  predicted class=Germany    expected loss=0.5
+    class counts:     0     0     0    15     3     0     0     0     9     3
+   probabilities: 0.000 0.000 0.000 0.500 0.100 0.000 0.000 0.000 0.300 0.100 
+
+Node number 13: 20 observations
+  predicted class=USA        expected loss=0.5
+    class counts:     0     3     3     9     9     0     0     0     6    30
+   probabilities: 0.000 0.050 0.050 0.150 0.150 0.000 0.000 0.000 0.100 0.500 
+
+> 
+> #
+> # Treble test for class trees with 2 outcomes
+> #
+> fit1 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis,
++                control=rpart.control(maxsurrogate=0, cp=0, xval=0),
++                parms=list(prior=c(.7,.3),
++                           loss=matrix(c(0,1,2,0),nrow=2,ncol=2)))
+> wts <- rep(3, nrow(kyphosis))
+> fit1b <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis,
++                 control=rpart.control(maxsurrogate=0, cp=0, xval=0),
++ 	       weights=wts,
++                parms=list(prior=c(.7,.3),
++                           loss=matrix(c(0,1,2,0),nrow=2,ncol=2)))
+> fit1b$frame$wt   <- fit1b$frame$wt/3
+> fit1b$frame$dev  <- fit1b$frame$dev/3
+> fit1b$frame$yval2[,2:3] <- fit1b$frame$yval2[,2:3]/3
+> fit1b$splits[,3] <- fit1b$splits[,3]/3
+> all.equal(fit1[-3], fit1b[-3])   #all but the "call"
+[1] TRUE
+> 
+> # Now for a set of non-equal weights
+> nn <- nrow(kyphosis)
+> wts <- sample(1:5, nn, replace=TRUE)
+> temp <- rep(1:nn, wts)             #row replicates
+> xgrp <- rep(1:10, length=nn)[order(runif(nn))]
+> xgrp2<- rep(xgrp, wts)
+> tempc <- rpart.control(minsplit=2, xval=xgrp2, maxsurrogate=0)
+> #  Direct: replicate rows in the data set, and use unweighted
+> fit2 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis[temp,],
++                control=tempc,
++                parms=list(prior=c(.7,.3),
++                           loss=matrix(c(0,1,2,0),nrow=2,ncol=2)))
+> #  Weighted
+> tempc <- rpart.control(minsplit=2, xval=xgrp, maxsurrogate=0)
+> fit2b <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis,
++                control=tempc, weights=wts,
++                parms=list(prior=c(.7,.3),
++                           loss=matrix(c(0,1,2,0),nrow=2,ncol=2)))
+> 
+> # all.equal(fit2$frame[-2],  fit2b$frame[-2])  # the "n" component won't match
+> all.equal(fit2$cptable,    fit2b$cptable)
+[1] TRUE
+> # all.equal(fit2$splits[,-1],fit2b$splits[,-1]) #fails
+> all.equal(fit2$csplit,    fit2b$csplit)
+[1] TRUE
+> 
+> 
+> #
+> # Check out using costs
+> #
+> fit1 <- rpart(Surv(time, status) ~ age + sex + ph.ecog + ph.karno + pat.karno
++ 	      + meal.cal + wt.loss, data=lung,
++ 	      maxdepth=1, maxcompete=6, xval=0)
+> 
+> fit2 <- rpart(Surv(time, status) ~ age + sex + ph.ecog + ph.karno + pat.karno
++ 	      + meal.cal + wt.loss, data=lung,
++ 	      maxdepth=1, maxcompete=6, xval=0, cost=(1+ 1:7/10))
+> 
+> temp1 <- fit1$splits[1:7,]
+> temp2 <- fit2$splits[1:7,]
+> temp3 <- c('age', 'sex', 'ph.ecog', 'ph.karno', 'pat.karno', 'meal.cal',
++ 	   'wt.loss')
+> indx1 <- match(temp3, dimnames(temp1)[[1]])
+> indx2 <- match(temp3, dimnames(temp2)[[1]])
+> all.equal(temp1[indx1,1], temp2[indx2,1])             #same n's ?
+[1] TRUE
+> all.equal(temp1[indx1,3], temp2[indx2,3]*(1+ 1:7/10)) #scaled importance
+[1] TRUE
+> 
+> 
+> q()
diff --git a/win32/deps/library/rpart/tests/usersplits.R b/win32/deps/library/rpart/tests/usersplits.R
new file mode 100644
index 0000000..b93928b
--- /dev/null
+++ b/win32/deps/library/rpart/tests/usersplits.R
@@ -0,0 +1,167 @@
+# Any necessary setup
+library(rpart)
+options(na.action="na.omit")
+options(digits=4) # to match earlier output
+set.seed(1234)
+
+mystate <- data.frame(state.x77, region=factor(state.region))
+names(mystate) <- c("population","income" , "illiteracy","life" ,
+       "murder", "hs.grad", "frost",     "area",      "region")
+#
+# Test out the "user mode" functions, with an anova variant
+#
+
+# The 'evaluation' function.  Called once per node.
+#  Produce a label (1 or more elements long) for labeling each node,
+#  and a deviance.  The latter is
+#	- of length 1
+#       - equal to 0 if the node is "pure" in some sense (unsplittable)
+#       - does not need to be a deviance: any measure that gets larger
+#            as the node is less acceptable is fine.
+#       - the measure underlies cost-complexity pruning, however
+temp1 <- function(y, wt, parms) {
+    wmean <- sum(y*wt)/sum(wt)
+    rss <- sum(wt*(y-wmean)^2)
+    list(label= wmean, deviance=rss)
+    }
+
+# The split function, where most of the work occurs.
+#   Called once per split variable per node.
+# If continuous=T
+#   The actual x variable is ordered
+#   y is supplied in the sort order of x, with no missings,
+#   return two vectors of length (n-1):
+#      goodness = goodness of the split, larger numbers are better.
+#                 0 = couldn't find any worthwhile split
+#        the ith value of goodness evaluates splitting obs 1:i vs (i+1):n
+#      direction= -1 = send "y< cutpoint" to the left side of the tree
+#                  1 = send "y< cutpoint" to the right
+#         this is not a big deal, but making larger "mean y's" move towards
+#         the right of the tree, as we do here, seems to make it easier to
+#         read
+# If continuos=F, x is a set of integers defining the groups for an
+#   unordered predictor.  In this case:
+#       direction = a vector of length m= "# groups".  It asserts that the
+#           best split can be found by lining the groups up in this order
+#           and going from left to right, so that only m-1 splits need to
+#           be evaluated rather than 2^(m-1)
+#       goodness = m-1 values, as before.
+#
+# The reason for returning a vector of goodness is that the C routine
+#   enforces the "minbucket" constraint. It selects the best return value
+#   that is not too close to an edge.
+temp2 <- function(y, wt, x, parms, continuous) {
+    # Center y
+    n <- length(y)
+    y <- y- sum(y*wt)/sum(wt)
+
+    if (continuous) {
+	# continuous x variable
+	temp <- cumsum(y*wt)[-n]
+
+	left.wt  <- cumsum(wt)[-n]
+	right.wt <- sum(wt) - left.wt
+	lmean <- temp/left.wt
+	rmean <- -temp/right.wt
+	goodness <- (left.wt*lmean^2 + right.wt*rmean^2)/sum(wt*y^2)
+	list(goodness= goodness, direction=sign(lmean))
+	}
+    else {
+	# Categorical X variable
+	ux <- sort(unique(x))
+	wtsum <- tapply(wt, x, sum)
+	ysum  <- tapply(y*wt, x, sum)
+	means <- ysum/wtsum
+
+	# For anova splits, we can order the categories by their means
+	#  then use the same code as for a non-categorical
+	ord <- order(means)
+	n <- length(ord)
+	temp <- cumsum(ysum[ord])[-n]
+	left.wt  <- cumsum(wtsum[ord])[-n]
+	right.wt <- sum(wt) - left.wt
+	lmean <- temp/left.wt
+	rmean <- -temp/right.wt
+	list(goodness= (left.wt*lmean^2 + right.wt*rmean^2)/sum(wt*y^2),
+	     direction = ux[ord])
+	}
+    }
+
+# The init function:
+#   fix up y to deal with offsets
+#   return a dummy parms list
+#   numresp is the number of values produced by the eval routine's "label"
+#   numy is the number of columns for y
+#   summary is a function used to print one line in summary.rpart
+# In general, this function would also check for bad data, see rpart.poisson
+#   for instace.
+temp3 <- function(y, offset, parms, wt) {
+    if (!is.null(offset)) y <- y-offset
+    list(y=y, parms=0, numresp=1, numy=1,
+	      summary= function(yval, dev, wt, ylevel, digits ) {
+		  paste("  mean=", format(signif(yval, digits)),
+			", MSE=" , format(signif(dev/wt, digits)),
+			sep='')
+	     })
+    }
+
+
+alist <- list(eval=temp1, split=temp2, init=temp3)
+
+fit0 <- rpart(income ~population +illiteracy  + murder + hs.grad,
+	     mystate, control=rpart.control(minsplit=10, xval=0),
+	     method=alist)
+
+
+fit1 <- rpart(income ~population +illiteracy  + murder + hs.grad + region,
+	     mystate, control=rpart.control(minsplit=10, xval=0),
+	     method=alist)
+
+fit2 <- rpart(income ~population +illiteracy + murder + hs.grad + region,
+	     mystate, control=rpart.control(minsplit=10, xval=0),
+	      method='anova')
+
+# Other than their call statement, and a longer "functions" component in
+#  fit1, fit1 and fit2 should be identical.
+all.equal(fit1$frame, fit2$frame)
+all.equal(fit1$splits, fit2$splits)
+all.equal(fit1$csplit, fit2$csplit)
+all.equal(fit1$where, fit2$where)
+all.equal(fit1$cptable, fit2$cptable)
+
+# Now try xpred on it
+xvtemp <- rep(1:5, length=50)
+xp1 <- xpred.rpart(fit1, xval=xvtemp)
+xp2 <- xpred.rpart(fit2, xval=xvtemp)
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+aeq(xp1, xp2)
+
+fit3 <- rpart(income ~population +illiteracy + murder + hs.grad + region,
+	     mystate, control=rpart.control(minsplit=10, xval=xvtemp),
+	      method='anova')
+zz <- apply((mystate$income - xp1)^2,2, sum)
+aeq(zz/fit1$frame$dev[1], fit3$cptable[,4])  #reproduce xerror
+
+zz2 <- sweep((mystate$income-xp1)^2,2, zz/nrow(xp1))
+zz2 <- sqrt(apply(zz2^2, 2, sum))/ fit1$frame$dev[1]
+aeq(zz2, fit3$cptable[,5])          #reproduce se(xerror)
+
+#
+# Now try timing it on a multiplied data set (100 copies of mystate)
+#
+temp <- rbind(mystate, mystate, mystate, mystate)
+temp <- rbind(temp, temp, temp, temp, temp)
+temp <- rbind(temp, temp, temp, temp, temp)
+t1 <-  system.time(rpart(income ~population +illiteracy  + murder +
+		       hs.grad + region +
+		life + area, temp,  control=rpart.control(minsplit=10, xval=0),
+	     method=alist))
+t2 <- system.time(rpart(income ~population +illiteracy  + murder +
+		      hs.grad + region +
+		life + area, temp,  control=rpart.control(minsplit=10, xval=0),
+	     method='anova'))
+cat("Timing ratio = ", round(t1[3]/t2[3], 1), "\n")
+
+rm(temp)
+
+q()
diff --git a/win32/deps/library/rpart/tests/usersplits.Rout.save b/win32/deps/library/rpart/tests/usersplits.Rout.save
new file mode 100644
index 0000000..fbe665a
--- /dev/null
+++ b/win32/deps/library/rpart/tests/usersplits.Rout.save
@@ -0,0 +1,193 @@
+
+R : Copyright 2006, The R Foundation for Statistical Computing
+Version 2.3.0 beta (2006-04-12 r37734)
+ISBN 3-900051-07-0
+
+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.
+
+> # Any necessary setup
+> library(rpart)
+> options(na.action="na.omit")
+> options(digits=4) # to match earlier output
+> set.seed(1234)
+> 
+> mystate <- data.frame(state.x77, region=factor(state.region))
+> names(mystate) <- c("population","income" , "illiteracy","life" ,
++        "murder", "hs.grad", "frost",     "area",      "region")
+> #
+> # Test out the "user mode" functions, with an anova variant
+> #
+> 
+> # The 'evaluation' function.  Called once per node.
+> #  Produce a label (1 or more elements long) for labeling each node,
+> #  and a deviance.  The latter is
+> #	- of length 1
+> #       - equal to 0 if the node is "pure" in some sense (unsplittable)
+> #       - does not need to be a deviance: any measure that gets larger
+> #            as the node is less acceptable is fine.
+> #       - the measure underlies cost-complexity pruning, however
+> temp1 <- function(y, wt, parms) {
++     wmean <- sum(y*wt)/sum(wt)
++     rss <- sum(wt*(y-wmean)^2)
++     list(label= wmean, deviance=rss)
++     }
+> 
+> # The split function, where most of the work occurs.
+> #   Called once per split variable per node.
+> # If continuous=T
+> #   The actual x variable is ordered
+> #   y is supplied in the sort order of x, with no missings,
+> #   return two vectors of length (n-1):
+> #      goodness = goodness of the split, larger numbers are better.
+> #                 0 = couldn't find any worthwhile split
+> #        the ith value of goodness evaluates splitting obs 1:i vs (i+1):n
+> #      direction= -1 = send "y< cutpoint" to the left side of the tree
+> #                  1 = send "y< cutpoint" to the right
+> #         this is not a big deal, but making larger "mean y's" move towards
+> #         the right of the tree, as we do here, seems to make it easier to
+> #         read
+> # If continuos=F, x is a set of integers defining the groups for an
+> #   unordered predictor.  In this case:
+> #       direction = a vector of length m= "# groups".  It asserts that the
+> #           best split can be found by lining the groups up in this order
+> #           and going from left to right, so that only m-1 splits need to
+> #           be evaluated rather than 2^(m-1)
+> #       goodness = m-1 values, as before.
+> #
+> # The reason for returning a vector of goodness is that the C routine
+> #   enforces the "minbucket" constraint. It selects the best return value
+> #   that is not too close to an edge.
+> temp2 <- function(y, wt, x, parms, continuous) {
++     # Center y
++     n <- length(y)
++     y <- y- sum(y*wt)/sum(wt)
++ 
++     if (continuous) {
++ 	# continuous x variable
++ 	temp <- cumsum(y*wt)[-n]
++ 
++ 	left.wt  <- cumsum(wt)[-n]
++ 	right.wt <- sum(wt) - left.wt
++ 	lmean <- temp/left.wt
++ 	rmean <- -temp/right.wt
++ 	goodness <- (left.wt*lmean^2 + right.wt*rmean^2)/sum(wt*y^2)
++ 	list(goodness= goodness, direction=sign(lmean))
++ 	}
++     else {
++ 	# Categorical X variable
++ 	ux <- sort(unique(x))
++ 	wtsum <- tapply(wt, x, sum)
++ 	ysum  <- tapply(y*wt, x, sum)
++ 	means <- ysum/wtsum
++ 
++ 	# For anova splits, we can order the categories by their means
++ 	#  then use the same code as for a non-categorical
++ 	ord <- order(means)
++ 	n <- length(ord)
++ 	temp <- cumsum(ysum[ord])[-n]
++ 	left.wt  <- cumsum(wtsum[ord])[-n]
++ 	right.wt <- sum(wt) - left.wt
++ 	lmean <- temp/left.wt
++ 	rmean <- -temp/right.wt
++ 	list(goodness= (left.wt*lmean^2 + right.wt*rmean^2)/sum(wt*y^2),
++ 	     direction = ux[ord])
++ 	}
++     }
+> 
+> # The init function:
+> #   fix up y to deal with offsets
+> #   return a dummy parms list
+> #   numresp is the number of values produced by the eval routine's "label"
+> #   numy is the number of columns for y
+> #   summary is a function used to print one line in summary.rpart
+> # In general, this function would also check for bad data, see rpart.poisson
+> #   for instace.
+> temp3 <- function(y, offset, parms, wt) {
++     if (!is.null(offset)) y <- y-offset
++     list(y=y, parms=0, numresp=1, numy=1,
++ 	      summary= function(yval, dev, wt, ylevel, digits ) {
++ 		  paste("  mean=", format(signif(yval, digits)),
++ 			", MSE=" , format(signif(dev/wt, digits)),
++ 			sep='')
++ 	     })
++     }
+> 
+> 
+> alist <- list(eval=temp1, split=temp2, init=temp3)
+> 
+> fit0 <- rpart(income ~population +illiteracy  + murder + hs.grad,
++ 	     mystate, control=rpart.control(minsplit=10, xval=0),
++ 	     method=alist)
+> 
+> 
+> fit1 <- rpart(income ~population +illiteracy  + murder + hs.grad + region,
++ 	     mystate, control=rpart.control(minsplit=10, xval=0),
++ 	     method=alist)
+> 
+> fit2 <- rpart(income ~population +illiteracy + murder + hs.grad + region,
++ 	     mystate, control=rpart.control(minsplit=10, xval=0),
++ 	      method='anova')
+> 
+> # Other than their call statement, and a longer "functions" component in
+> #  fit1, fit1 and fit2 should be identical.
+> all.equal(fit1$frame, fit2$frame)
+[1] TRUE
+> all.equal(fit1$splits, fit2$splits)
+[1] TRUE
+> all.equal(fit1$csplit, fit2$csplit)
+[1] TRUE
+> all.equal(fit1$where, fit2$where)
+[1] TRUE
+> all.equal(fit1$cptable, fit2$cptable)
+[1] TRUE
+> 
+> # Now try xpred on it
+> xvtemp <- rep(1:5, length=50)
+> xp1 <- xpred.rpart(fit1, xval=xvtemp)
+> xp2 <- xpred.rpart(fit2, xval=xvtemp)
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> aeq(xp1, xp2)
+[1] TRUE
+> 
+> fit3 <- rpart(income ~population +illiteracy + murder + hs.grad + region,
++ 	     mystate, control=rpart.control(minsplit=10, xval=xvtemp),
++ 	      method='anova')
+> zz <- apply((mystate$income - xp1)^2,2, sum)
+> aeq(zz/fit1$frame$dev[1], fit3$cptable[,4])  #reproduce xerror
+[1] TRUE
+> 
+> zz2 <- sweep((mystate$income-xp1)^2,2, zz/nrow(xp1))
+> zz2 <- sqrt(apply(zz2^2, 2, sum))/ fit1$frame$dev[1]
+> aeq(zz2, fit3$cptable[,5])          #reproduce se(xerror)
+[1] TRUE
+> 
+> #
+> # Now try timing it on a multiplied data set (100 copies of mystate)
+> #
+> temp <- rbind(mystate, mystate, mystate, mystate)
+> temp <- rbind(temp, temp, temp, temp, temp)
+> temp <- rbind(temp, temp, temp, temp, temp)
+> t1 <-  system.time(rpart(income ~population +illiteracy  + murder +
++ 		       hs.grad + region +
++ 		life + area, temp,  control=rpart.control(minsplit=10, xval=0),
++ 	     method=alist))
+> t2 <- system.time(rpart(income ~population +illiteracy  + murder +
++ 		      hs.grad + region +
++ 		life + area, temp,  control=rpart.control(minsplit=10, xval=0),
++ 	     method='anova'))
+> cat("Timing ratio = ", round(t1[3]/t2[3], 1), "\n")
+Timing ratio =  5.9 
+> 
+> rm(temp)
+> 
+> q()
diff --git a/win32/deps/library/spam/0NEWS b/win32/deps/library/spam/0NEWS
new file mode 100644
index 0000000..e8df599
--- /dev/null
+++ b/win32/deps/library/spam/0NEWS
@@ -0,0 +1,404 @@
+			Dear Emacs, please make this -*-Text-*- mode!
+
+
+	**************************************************
+	*						 *
+	*	    SPAM VERSION 0.21  			 *
+	*						 *
+	**************************************************
+
+    o 	New functions bandwidth, permutation, mle[.nomean][.spam],
+    	neg2loglikelihood[.spam].    		
+
+    o	Renamed adiag.spam to bdiag.spam.
+
+    o	Cleaned up argument naming with the rmvnorm.* 
+    	suite.
+
+    o   Varios Fortran code, R code and help file 
+    	improvements.
+	
+
+	**************************************************
+	*						 *
+	*	    SPAM VERSION 0.20  			 *
+	*						 *
+	**************************************************
+
+                CHANGES IN R VERSION 0.20-3
+    
+    o	Resolved dependency issues.
+
+                CHANGES IN R VERSION 0.20-1,2
+    
+    o	Minor changes to pass the CRAN test.
+
+
+                CHANGES IN R VERSION 0.20-0
+    
+    o	New demos, test functions, datasets.
+
+    o	Method t for spam.chol.NgPeyton.
+
+    o	Method Math2 now with signature digits="ANY". 	
+
+    o	Update in rmvnorm.canonical, can take a Cholesky structure
+    	as argument. 
+
+    o   New functionality for a sparse times a full matrix 
+    	multiplication.
+
+    o	Minor ajustment in memory allocation of chol.	
+
+
+	**************************************************
+	*						 *
+	*	    SPAM VERSION 0.15  			 *
+	*						 *
+	**************************************************
+
+                CHANGES IN R VERSION 0.15-6
+    
+    o   Minor change in Fortran routines to accomodate some Intel 
+    	compilers (pointed out by Tim Hoar).
+
+
+                CHANGES IN R VERSION 0.15-5
+
+    o   New function adiag.spam, creation of block diagonal sparse
+    	matrices. No method though.
+
+    o	New functions rmvnorm.spam, rmvnorm.canonical and
+    	rmvnorm.prec to draw multivariate normals.
+
+    o	New function apply.spam, similar functionality as apply.		
+
+    o   drop is implemented now when subsetting a sparse matrix 
+    	with a binary matrix.
+
+    o   Major overhaul to nearest.dist: zeros are not included.
+	Old parameters are kept for backwards compatibility.
+
+    o	Orders/complexities of major algorithms are now described 
+	in the help 'complexity'. 
+
+    o   Using packageStartupMessage in .onAttach.
+
+    o   Code clean up and help improvements. Changes reflecting the
+    	change to UZH.
+
+    o	Bugfix in assinging via a nx2 matrix.
+ 
+
+		
+                CHANGES IN R VERSION 0.15-4
+
+    o	Changes in help files. Minor code improvements.
+   
+    o   New function powerboost.
+	 
+    o	Changes to if(getRversion() >= "x.y"), required for R 2.10.
+
+   
+
+                CHANGES IN R VERSION 0.15-3
+
+    o	Several bug fixes in the demos due to the changes in 
+	the previous versions.	
+
+    o	Several minior changes in the help files to compile with
+	the new help parser and to correct for typos.
+
+    o	Added the demos into the tests directory. Additionally,
+	tests contains now the proper Rout.saves files.
+	
+    o	In test files, library( spam, warn.conflict=FALSE)
+	is used to avoid masking messages in R-2.8.0.
+	Timing output in test files is suppressed.
+	
+    o	Added trivial headers to most files. 
+
+
+    o	Bug fix in spam.list(), negative values were not correctly
+	handled.
+
+    o	Bug fix in subsetting (occured when subsetting very 
+	sparse matrices, memory allocation problem).	
+
+
+                CHANGES IN R VERSION 0.15-2
+
+    o	Method all.equal for matrix-spam signature. 
+
+    o   Bug fix in Fortran function of nearest.dist. Numerical
+	instabilities could return NaN on diagonal. Additionally,
+	overhaul of tests/dist.R.
+
+    o	Several minor improvements in the help files as well
+	as in function nearest.dist and tests/*.R.
+
+
+                CHANGES IN R VERSION 0.15-1
+
+    o   Improvements in the nearest.dist function. The diagonals
+	are now handled consistenly.
+
+    o	Symmetry check criterion for Cholesky decomposition has been
+	relaxed from (2+eps)*eps to 100*eps for an easier handling when
+	working with great circle distance induced covariance matrices.
+	Same cutoff is used with eigen. Instead of using norm, 
+	we use essentially an isSymmetric.spam test.
+
+    o	Methods isSymmetric and all.equal for spam. 
+	
+    o	Methods image and display for spam.chol.NgPeyton.
+
+    o	Method as.spam for distance class implemented.
+
+    o	Complete rewrite of spam.list. Method as.spam for lists
+	are implemented as well. 
+
+    o   Method spam for spam objects (possibility to rearrange the 
+	dimension) has been eliminated. The approach was based on
+	creating the full matrix and assigning it back to a spam 
+	object. 
+	
+    o   Binary subsetting and subassigning is implemented.
+
+    o	Bug fix: the Cholesky Fortran routine checks if diagonal 
+	elements are available (and positive).
+
+    o   Bug fix: in dim<-.spam
+
+    o	Minor improvements in the help files as well as the following
+	R functions: norm, .spam.matmul.
+
+
+                CHANGES IN R VERSION 0.15-0
+
+    o   The devel versions of 14-x have been sitting around for 
+	a while and I was inconsistent with the devel/gold numbering. 
+	To avoid any confusion, I have decided to go to the next 
+	minor version. An additional reason supporting this is 
+	that the version number identification has changed over 
+	the 0.14-devel.
+
+
+	**************************************************
+	*						 *
+	*	    SPAM VERSION 0.14  			 *
+	*						 *
+	**************************************************
+
+                CHANGES IN R VERSION 0.14-x
+
+    o   A few rudimentary functions to change between the compressed
+	sparse row formats of the packages SparseM and Matrix.
+	Just the functions, no S3/S4 constructs available.
+
+    o	Functionality to read matrices stored in the Harwell-Boeing 
+	or MatrixMarket formats.Read MatrixMarket.
+
+    o	Rewritten cbind.spam and rbind.spam. Both can take now 
+	numeric and spam objects. cbind.spam calls now Fortran 
+	code and is now very fast. Rewrite of their help.  	
+
+    o	Implemented spam.list to go from a index based list to a 
+	spam matrix. The function triplets does the inverse.
+	
+    o   forwardsolve and backsolve methods for spam objects.
+
+    o   Implemented the function 'dim<-' for spam objects.
+
+    o   Method diag and as.matrix for spam.chol.NgPeyton.
+
+    o	eps is now tested for being at least double precision.
+	
+    o	as.spam.xxx and spam.yyy functions have been streamlined.
+		
+    o	Initializing an empty spam matrix causes a warning but still
+	coerces to a zero matrix, see new("spam",entries=rep(1,0))
+
+    o	Eliminated bug in subsetting (occuring when subsetting 
+	for an empty matrix). Clean out subsetting and assigning.
+
+    o	Include a inst subdirectory containing this file, which
+	is renamed to NEWS. Once we have reached a stable version
+	I will maintain a proper CHANGELOG file in the root 
+	directory.
+
+    o	Proper method handling for kronecker and bug fixes in 
+	kronecker.spam. 
+		
+    o	Saved the datasets UScounties.storder/ndorder as spam
+	objects as assumed by demo article-jss.
+
+    o	Implemented many 'identical' structures and homogenized zero
+	matrix handling, throughout the R code. int0, ..., int2 are 
+	internally defined integers.
+
+    o	Similar changes as for 13-3. Additionally, considerable 
+	improvements in	help, file structure, tests, timing, etc.
+
+
+                CHANGES IN R VERSION 0.14-0
+
+	Major revision. Slight loss of backwards compatibility.
+
+    o	New demo article-jss.
+
+    o   New variable spam.version, similar to the R version
+	variable.
+	 
+    o	Change and adding of a few option names, for example 
+	cholsymmetrycheck, cholpivotcheck, cholupdatesingular, 
+	dopivoting, safemode, ... 
+	See help files for details.
+
+    o	Complete rewrite of chol. The argument ordering is 
+	now called pivot, more consistent with the generic 
+	function. Two different orderings are implemented.
+	Uses the new option cholsymmetrycheck.
+
+    o	Similar changes as in chol in determinant.spam.	
+
+    o	New function update.spam.chol.NgPeyton.
+    
+    o	Invisible/minor changes in method c for spam, in solve.spam, 
+	determinant.chol.NgPeyton 
+
+    o	The class spam.chol.NgPeyton is defined differently.
+	Accordingly, print and summary methods are updated.
+	Notably, fill-in ratios are given with summary. 
+	Summary also hands back the length of the vectors holding the 
+	factor and the column indices.
+	
+    o	New methods for spam.chol.NgPeyton, namely, dim, length, c,
+	dim<-, and length<-. The latter two giving simply errors.
+
+    o   Along the redefinition of the class spam.chol.NgPeyton,
+	forwardsolve.spam and backsolve.spam are updated. 
+	Use now the option dopivoting.
+
+    o	kronecker.r is implemented.  
+
+    o	nearest.dist, a function to calculate close distances 
+	within one or two sets of locations is implemented.
+	Roughly speaking, it is the union of dist in base and 
+	rdist/rdist.earth in fields. (comes with options
+	nearestdistincreasefactor and nearestdistnnz). 
+
+    o   print and show now emphasize that the non-zero elements 
+	are row-wise printed. 
+	
+    o	UScounties is a dataset containing the adjacency matrix 
+	of the first and second order neighbors of the counties
+	of the lower 48 US states.
+
+    o	Some changes in help files, especially in the *-class 
+	files.
+    
+    o	Eliminated warnings issued when compiling.
+
+    o	Minor R and Fortran code cleaning. 
+
+    o	Along the new features, update of CHANGELOG, todo,
+	NAMESPACE files, etc.
+
+
+	**************************************************
+	*						 *
+	*	    SPAM VERSION SERIES 0.13  		 *
+	*						 *
+	**************************************************
+
+                CHANGES IN R VERSION 0.13-3
+
+    o   Minor changes in R and Fortran code to eliminate warnings.
+
+    o   In diag()'s argument list, drop the explicit default (' = n').
+        As is now in R-2.7.
+
+
+                CHANGES IN R VERSION 0.13-2
+
+    o   New spam.options and getOption functions. .Spam
+        as a variable is not visible anymore.
+
+    o   Retrieving information from the DESCRIPTION file directly
+        (thanks to Roger Bivand).
+
+
+                CHANGES IN R VERSION 0.13-1
+
+    o   Minor Fortran Changes for g77 compatibility. Thanks to 
+        Roger Bivand.
+
+    o	Updated DESCRIPTION file.
+
+    
+                CHANGES IN R VERSION 0.13
+
+    o   Updated NAMESPACE (for versions > 2.5).
+
+    o	Some changes in help files.
+    
+    o	Cleaned Fortran source files (eliminated unused 
+	subroutines and used the posted complier output to 
+	straighten details). 
+
+    o	Implemented more efficient transpose Fortran code.
+        This also eliminates a bug when transposing a 1 row 
+	matrix.
+
+    o	Eliminated bug when assigning with a 1 row matix.
+
+    o	Eliminated bug (Fortran code) that could potentially 
+	occur when assigning.
+
+    o	Eliminated bug when plotting a 1 row matix.
+
+    o	Minor R code cleaning.
+
+
+
+	**************************************************
+	*						 *
+	*	    SPAM VERSION 0.12  			 *
+	*						 *
+	**************************************************
+
+
+    o   Updated NAMESPACE and DESCRIPTION file.
+
+    o	print and summary pass back NULL instead of the 
+	object.
+
+    o   Changed to prod(x dimension) instead of nrow*ncol to 
+	overcome integer overflow for very large matrices.
+
+    o   Introduced a prototype in the definition of spam 
+	and spam.chol.*.
+
+    o   .Spam$safemode also determines if a spam object is 
+	tested for validity, as well as for NAOK.
+
+    o   In many functions sparse matrix construction is 
+	done manually using slots (and check=FALSE, if 
+	approprate).
+
+    o	Increased the value of symmetry criteria to 
+	(2+eps)*eps, as each element can be off by eps, 
+	subtraction leads to a 2*eps offset and yet we are 
+	symmetric.
+
+    o   Major restructuration of chol/det with elimination
+	of auxiliarychol. 
+
+    o	Methods chol/backsolve/forwarsolve now call the *.spam
+	functions.
+
+    o 	Many internal changes to favour speed and efficiency.
+
+    o 	Bug fix in .spam.elemul. occuring when the result is the 
+	zero matrix.
diff --git a/win32/deps/library/spam/CITATION b/win32/deps/library/spam/CITATION
new file mode 100644
index 0000000..ee1caab
--- /dev/null
+++ b/win32/deps/library/spam/CITATION
@@ -0,0 +1,19 @@
+citHeader("To cite spam in publications use:")
+
+citEntry(entry = "Article",
+  title        = "{spam}: A Sparse Matrix {R} Package with Emphasis on MCMC Methods for Gaussian Markov Random Fields",
+  author       = personList(as.person("Reinhard Furrer"),
+                   as.person("Stephan R. Sain")),
+  journal      = "Journal of Statistical Software",
+  year         = "2010",
+  volume       = "36",
+  number       = "10",
+  pages        = "1--25",
+  url          = "http://www.jstatsoft.org/v36/i10/";,
+
+  textVersion  =
+  paste("Reinhard Furrer, Stephan R. Sain (2010).",
+        "spam: A Sparse Matrix R Package with Emphasis on MCMC Methods for Gaussian Markov Random Fields.",
+        "Journal of Statistical Software, 36(10), 1-25.",
+        "URL http://www.jstatsoft.org/v36/i10/.";)
+)
diff --git a/win32/deps/library/spam/DESCRIPTION b/win32/deps/library/spam/DESCRIPTION
index a91bffd..8662c00 100644
--- a/win32/deps/library/spam/DESCRIPTION
+++ b/win32/deps/library/spam/DESCRIPTION
@@ -1,11 +1,11 @@
 Package: spam
-Version: 0.20-3
-Date: 2010-01-13
+Version: 0.29-2
+Date: 2012-08-17
 Author: Reinhard Furrer
 Maintainer: Reinhard Furrer <reinhard furrer math uzh ch>
-Depends: R (>= 2.4), methods
+Depends: R (>= 2.11), methods
 Suggests: fields, SparseM (>= 0.72), Matrix
-Description: Set of function for sparse matrix algebra. Differences
+Description: Set of function for sparse matrix algebra.  Differences
         with SparseM/Matrix are: (1) we only support (essentially) one
         sparse matrix format, (2) based on transparent and simple
         structure(s), (3) tailored for MCMC calculations within GMRF.
@@ -15,7 +15,8 @@ LazyData: Yes
 License: GPL | file LICENSE
 Title: SPArse Matrix
 URL: http://www.math.uzh.ch/furrer/software/spam/
-Packaged: 2010-01-13 08:59:46 UTC; furrer
+Packaged: 2012-08-17 09:43:09 UTC; furrer
 Repository: CRAN
-Date/Publication: 2010-01-13 11:29:37
-Built: R 2.9.2; i386-pc-mingw32; 2010-01-13 23:20:15 UTC; windows
+Date/Publication: 2012-08-17 11:09:49
+Built: R 2.15.2; x86_64-w64-mingw32; 2013-01-24 20:10:10 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/spam/INDEX b/win32/deps/library/spam/INDEX
index 08f8fa6..b8b6f92 100644
--- a/win32/deps/library/spam/INDEX
+++ b/win32/deps/library/spam/INDEX
@@ -7,36 +7,47 @@ UScounties              Adjacency structure of the counties in the
                         contiguous United States
 USprecip                Monthly total precipitation (mm) for April 1948
                         in the contiguous United States
-adiag                   Binds Arrays Corner-to-Corner
 all.equal.spam          Test if Two 'spam' Objects are (Nearly) Equal
 apply.spam              Apply Functions Over Sparse Matrix Margins
+bandwidth               Bandwidth of a Sparse Matrix
+bdiag                   Binds Arrays Corner-to-Corner
 cbind                   Combine spam Matrices by Rows or Columns
-chol                    Cholesky Factorization for Sparse Matrices
+chol.spam               Cholesky Factorization for Sparse Matrices
+circulant.spam          Create Circulant Matrices
+cleanup                 Cleaning up sparse matrices
 complexity              Complexity for Sparse Matrices
 det                     Calculate the determinant of a positive
                         definite Sparse Matrix
 diag                    Sparse Matrix diagonals
-dim                     Dimensions of an Object
-display                 Graphially represent the nonzero entries
+dim<-.spam              Dimensions of an Object
+display                 Graphially Represent the Nonzero Entries
 dist.spam               Distance Matrix Computation
 foreign                 Transformation to other sparse formats
+head                    Return the First or Last Part of an Object
 image                   Display a spam Object as Color Image
-import                  Read external matrix formats
+import                  Read External Matrix Formats
 isSymmetric.spam        Test if a spam matrix is Symmetric
-kronecker               Kronecker products on sparse matrices
+kronecker.default       Kronecker Products on Sparse Matrices
 lower.tri               Lower and Upper Triangular Part of a Sparse
                         Matrix
+make.prec               Create Precision Matrices
 map.landkreis           Administrative districts of Germany
+mle                     Maximum likelihood estimates
 ordering                Extract the permutation
 overview                SPArse Matrix Package
+permutation             Permute a matrix
 powerboost              Specific options Setting
+precmat                 IGMRF Precision Matrices
 print                   Printing and summarizing sparse matrices
+rmvnorm.const           Draw Constrainted Multivariate Normals
 rmvnorm.spam            Draw Multivariate Normals
+rowSums                 Form Row and Column Sums and Means
 solve.spam              Linear Equation Solving for Sparse Matrices
 spam                    Sparse Matrix Class
 spam-class              Class "spam"
 spam.chol.NgPeyton-class
                         Class "spam.chol.NgPeyton"
 spam.options            Options Settings
+toeplitz.spam           Create Toeplitz Matrices
 triplet                 Transform a spam format to triplets
 version                 Spam Version Information
diff --git a/win32/deps/library/spam/MD5 b/win32/deps/library/spam/MD5
index 775dab7..b7e5d8d 100644
--- a/win32/deps/library/spam/MD5
+++ b/win32/deps/library/spam/MD5
@@ -1,73 +1,38 @@
-34428e5eaa439730735765db41b992b2 *CONTENTS
-5209247a5d8de7348c03af4d1197adf7 *DESCRIPTION
-872d3232bc4d1db97925711e6f003193 *INDEX
+512c41e65e4afe45afa7c4e54e753367 *0NEWS
+9c84294096a034b8f22f473187ddac2f *CITATION
+41a5ba2ed83f451f9920d0dd92f74b2f *DESCRIPTION
+2084ca5f776d6eca0ad57615945081e1 *INDEX
 0981f20e64159b699b6f28b281905af8 *LICENSE
-bca7a7f8ad7cb26046dacf724d634924 *Meta/Rd.rds
-eb2fffcb02f4037905102cd94b6ddbe6 *Meta/data.rds
-aa39421fc88157931d6edf8c0a367d2d *Meta/demo.rds
-0bfb5ed52a59f044da2b5e44e698682f *Meta/hsearch.rds
-006a515221222e55802bd05216da2e0c *Meta/nsInfo.rds
-ede8c4b701670708aac25cd462284b8e *Meta/package.rds
-8a3a918c3f87c6fd0462740ea8bb75a7 *NAMESPACE
-44e9b2590cf3cfebff10b48983e38bea *NEWS
-f0fb9cd6da53d50c649011e2ebf026f8 *R-ex/Rex.zip
-f07d3015c4220dea7a7be8c741d2985b *R/spam
-2491e69d6ed62db5ef43b65c44243456 *R/spam.rdb
-a2634206939d6e4ce5012ef2484ef320 *R/spam.rdx
-5f5f16f169fefbc07314dc65f3ea8173 *chtml/spam.chm
-891fdd32b6dd71bad10e0525b4115ab7 *data/Rdata.rdb
-e153bcb3093f1798f3cf189ad119e342 *data/Rdata.rds
-97aea3c2e798277c027ef9a4d0cb9d1e *data/Rdata.rdx
-ffea98cc8460a7f5ddc8e1982d49bfc2 *demo/article-jss-example1.R
-f795e4ef203a65cf250ad265bb988de3 *demo/article-jss-example2.R
-0eb0fcac280445f3f04c171b7c1dcb27 *demo/article-jss.R
-40706f0ded4620ca1a6b4b94da5cbf9a *demo/cholesky.R
-40a4eb44f77cba5e3dbf124889ace30a *demo/spam.R
-b51b8cb0828ccbb44d02295d86ea5e5f *demo/timing.R
+387866d91d7781f6ad70223669546f6b *Meta/Rd.rds
+58642038b590127658741287d9355036 *Meta/data.rds
+0e8866ccba73133e1e26a1238396c8e7 *Meta/demo.rds
+137c7012e06f927695e6b0b76b4e7e6d *Meta/hsearch.rds
+1e66059a08c1e374e8821c6ec869c078 *Meta/links.rds
+ca70a647fb512b5bd02e2e95ae422df2 *Meta/nsInfo.rds
+40c1db4929c5fe68508ed2628099a4b7 *Meta/package.rds
+58bcfc6df6d218dbd4c3ba5374c27035 *NAMESPACE
+2f682d3d6b5a9b9272e71b07bd6629e0 *NEWS
+240d28d145138a75831809e31a480bad *R/spam
+81d5c33557eec8cf8e02240526ced627 *R/spam.rdb
+ce313b1645bf74a6034eecb7b698b023 *R/spam.rdx
+f857b5e1180aa6b49b8233d6f91f81cd *data/Rdata.rdb
+fe588ab1d708b2a19e7031a2646091f5 *data/Rdata.rds
+e62faf8e28b13ee71fb406eb014e4ef9 *data/Rdata.rdx
+777e3e94868c1414ec1f9c6b415d163d *demo/article-jss-example1.R
+eb97d62402d6fa6c299b869ba981d054 *demo/article-jss-example2.R
+0a46cd71466eba8d7cf994bcf77cf251 *demo/article-jss.R
+d5cb30f164ce3f8372b0b8980448557a *demo/cholesky.R
+f5088e9a56468a6b8b552ae3f742d8ff *demo/spam.R
+55eca567613e7c1b4943293f9da038a1 *demo/timing.R
 0f7ff8c0275da9085576b25fa7437bfd *demodata/germany.adjacency
-21d9d7d211df35de5af4f8d3420118b3 *help/AnIndex
-3a4382461fdaa3b884e3d4eb4d0bbf17 *help/Rhelp.zip
-3a210c5dc1d93c65c3c9d5d808e2c198 *html/00Index.html
-8a35bd978b148b44fc000a3afc627589 *html/Oral.html
-ee2a2a891732aedff9336205c365787b *html/SPAM.html
-4990ac6f296952321dde7bf85d8f5000 *html/UScounties.html
-3ed477cf4e713fdfc43ad1bc95557722 *html/USprecip.html
-3450f7177b0d05b991fac487bcaaab28 *html/adiag.html
-25aa3d2f253c700ea0b1c88c6fc9ba27 *html/allequal.html
-7802c738f54e41d1eb6e2e734b5dd41e *html/apply.html
-b73ce3fbc1a8323f9784c5599437608a *html/chol.html
-51c3d9a1180eda1e54309602a72fc4ed *html/complexity.html
-710cbf0c000f7c64ab4e378c2e245d70 *html/det.html
-8469cf502192b6ba57aa972a69499ae9 *html/diag.html
-1b1cc4c9290b45b09baf1b0ef8390818 *html/dim.html
-4f4040d6d558a6a3151323fb41e55492 *html/display.html
-1023069f63ba970668090e695ea83f54 *html/foreign.html
-bef3a6ab57af15a1ad3b4793c7b3aee9 *html/germany.html
-8d1e60e93125c65de5c2bd39bc7e0227 *html/history.spam.html
-064531e56d00c71df86d42698d626793 *html/image.html
-84e34d2d6b506bd7e0ab9e8ae71fc9a1 *html/import.html
-acffb1e84646b2185f9df07b88f8dcc1 *html/isSymmetric.html
-dafdbc9d8cbbb88cc7348162dfe15669 *html/kronecker.html
-b6df7e5bb3d78184594938be8f1362a0 *html/lu.tri.html
-56a16d1a088639463b5276d84ab0263a *html/math.html
-1999db6432e3209487b9162eed13de1e *html/math2.html
-3a0c64e33d199b26367b1f4b907837d8 *html/nearestdist.html
-b219b3f13c3a5cd42d51379fde8c3777 *html/operations.html
-684cb2cecae13e64d5f4629ba2c81cee *html/options.html
-4a956144759106a55a4fed9e7b369a78 *html/ordering.html
-c8a26d06c91e1fe5125f06e01356d1f6 *html/powerboost.html
-efa91170f281cceec7c16bba7e741e5a *html/print.html
-4881d105ad9e0bf857066ba0f9dc3233 *html/rmvnorm.html
-c79f85960c58521d7c5bce7a267c4f16 *html/solve.html
-25f1de1b30dca3addc17e8b2fe10ae96 *html/spam-class.html
-90335d887daaf17fe6d959f560f92603 *html/spam.chol.NgPeyton-class.html
-d34ac3f608162bd07a23376dfdbc066c *html/spam.creation.html
-aaed0b0772002e2708b335576e0f9261 *html/spam.internal.html
-822272db7609d62e3479a4eafc9bba79 *html/summary.html
-4977665e3a620ecc3134437b1f55a1e3 *html/todo.html
-b5b6e25c2517a91607df2076573b24cd *html/triplet.html
-340a96a47820a1035e9cae0fa0a7d930 *html/version.html
-ad86492eb3083834007d139986a14ac5 *html/xybind.html
-07b7863f82ac5f17b4fc1a0721d8d35a *latex/Rhelp.zip
-277eda7fdae4f35008da1b1ed942adf0 *libs/spam.dll
-65e4f3d90172f90f69f07e2c80b1219e *man/spam.Rd.gz
+3abc1e86dc25fcdf208f17c76c9402b4 *help/AnIndex
+6e537666a594338de7c85802c58029b7 *help/aliases.rds
+c6b4893cffe3687cbf0f98791b173a1d *help/paths.rds
+614ff2d6616641d60bfb19a8b2286146 *help/spam.rdb
+e2abbeaf68381b16f62f66a805f34b38 *help/spam.rdx
+2e69154ec550efaf8c2b636d59a6cb48 *html/00Index.html
+444535b9cb76ddff1bab1e1865a3fb14 *html/R.css
+34dae2ee20d29ef912e837397ebb18cc *libs/i386/spam.dll
+d82c5767bafb90e7d498e35feaf7165f *libs/i386/symbols.rds
+39ab9f0812451064655c423b9a3ea580 *libs/x64/spam.dll
+5ae67cee102212cb8ced98d514a4ff1e *libs/x64/symbols.rds
diff --git a/win32/deps/library/spam/Meta/Rd.rds b/win32/deps/library/spam/Meta/Rd.rds
index 13020b6..12d08a5 100644
Binary files a/win32/deps/library/spam/Meta/Rd.rds and b/win32/deps/library/spam/Meta/Rd.rds differ
diff --git a/win32/deps/library/spam/Meta/data.rds b/win32/deps/library/spam/Meta/data.rds
index 72a65b6..1cb5040 100644
Binary files a/win32/deps/library/spam/Meta/data.rds and b/win32/deps/library/spam/Meta/data.rds differ
diff --git a/win32/deps/library/spam/Meta/demo.rds b/win32/deps/library/spam/Meta/demo.rds
index 86639c2..6b7affa 100644
Binary files a/win32/deps/library/spam/Meta/demo.rds and b/win32/deps/library/spam/Meta/demo.rds differ
diff --git a/win32/deps/library/spam/Meta/hsearch.rds b/win32/deps/library/spam/Meta/hsearch.rds
index 2f81d8d..ca1a5ec 100644
Binary files a/win32/deps/library/spam/Meta/hsearch.rds and b/win32/deps/library/spam/Meta/hsearch.rds differ
diff --git a/win32/deps/library/spam/Meta/links.rds b/win32/deps/library/spam/Meta/links.rds
new file mode 100644
index 0000000..899ddac
Binary files /dev/null and b/win32/deps/library/spam/Meta/links.rds differ
diff --git a/win32/deps/library/spam/Meta/nsInfo.rds b/win32/deps/library/spam/Meta/nsInfo.rds
index 42ccd0e..c3c7ea7 100644
Binary files a/win32/deps/library/spam/Meta/nsInfo.rds and b/win32/deps/library/spam/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/spam/Meta/package.rds b/win32/deps/library/spam/Meta/package.rds
index 03b9731..0891f2d 100644
Binary files a/win32/deps/library/spam/Meta/package.rds and b/win32/deps/library/spam/Meta/package.rds differ
diff --git a/win32/deps/library/spam/NAMESPACE b/win32/deps/library/spam/NAMESPACE
index 0dcf2cf..eeaa9f5 100644
--- a/win32/deps/library/spam/NAMESPACE
+++ b/win32/deps/library/spam/NAMESPACE
@@ -3,38 +3,12 @@ useDynLib(spam)
 importFrom("graphics",image)
 importFrom("graphics",plot)           
 
-
 # Next two paragraphs are from Matrix....
 # Currently, group generics need to be explicitly imported (Bug?):
 importFrom("methods", #Arith,Compare,
            Math, Math2, Summary#, Complex
            )
 
-if(paste(R.version$major, R.version$minor, sep=".") < "2.6") 
-{
-## workaround S4-Group(generic|method) quirk: R/AllGeneric.R
-## needs setGeneric(*, group=) and this for all non-Primitives :
-export(
-       ## "Math"
-       "log",
-       "gamma",
-       "lgamma",
-
-       ## "Math2"
-       "round",
-       "signif",
-
-       ## "Summary"
-       "max",
-       "min",
-       "range",
-       "prod",
-       "sum",
-       "any",
-       "all"
-)
-}
-
 # Generic functions
 export("dcheck",
        "icheck",
@@ -79,6 +53,13 @@ export("dcheck",
 
        "kronecker.default",
        "kronecker.spam",
+
+       "diff.spam",
+
+       "circulant.spam",
+       "toeplitz.spam",
+
+       "make.prec",
        
        "determinant.spam",
        "determinant.spam.chol.NgPeyton",
@@ -104,12 +85,45 @@ export("dcheck",
        "rmvnorm.spam",
        "rmvnorm.canonical",
        "rmvnorm.prec",
+       "rmvnorm.const",
+       "rmvnorm.canonical.const",
+       "rmvnorm.prec.const",
+
+       "precmat.RW1",
+       "precmat.RW2",
+       "precmat.season",
+       "precmat.IGMRFreglat",
+       "precmat.IGMRFirreglat",
+       
+       "rowSums.spam",
+       "colSums.spam",
+       "rowMeans.spam",
+       "colMeans.spam",
+
+       "head.spam",
+       "tail.spam",
+
+       "chol2inv.spam",
+       
+       "mle.spam",
+       "mle.nomean.spam",
+       "neg2loglikelihood.spam",
+       "mle",
+       "mle.nomean",
+       "neg2loglikelihood",
+       
+       "bdiag.spam",
 
-       "adiag.spam",
+       "bandwidth",
        
 #       ".spam.matmul.mat",
 #       ".spam.matmul",
+#       "solve.spam.mat",
+#       "solve.spam.dummy",
 
+       "subset.spam",
+       "subset.rows.spam",
+       
        "triplet",
        "as.spam.matrix.csr",
        "as.matrix.csr.spam",
@@ -121,8 +135,15 @@ export("dcheck",
        "read.MM",
        "read.HB",
 
+       "powerboost",
+
+       "permutation.spam",
+       
        "map.landkreis",
-       "adjacency.landkreis"
+       "adjacency.landkreis",
+
+       "cleanup",
+       "backsolve"
        )
 
 
@@ -166,14 +187,24 @@ exportMethods(
               "lower.tri",
               
               "norm",
+              "rowSums",
+              "rowMeans",
+              "colSums",
+              "colMeans",
 
+              "head",
+              "tail",
+              
               "chol",
               "ordering",
               "forwardsolve",
               "backsolve",
               "solve",
+              "chol2inv",
 
               "kronecker",
+
+              "permutation",
               
               "[",
               "[<-",
diff --git a/win32/deps/library/spam/NEWS b/win32/deps/library/spam/NEWS
index 6e62011..a1c9f19 100644
--- a/win32/deps/library/spam/NEWS
+++ b/win32/deps/library/spam/NEWS
@@ -1,385 +1,232 @@
-			Dear Emacs, please make this -*-Text-*- mode!
+	CHANGES IN VERSION 0.29-0, 0.29-1, 0.29-2
 
-	**************************************************
-	*						 *
-	*	    SPAM VERSION 0.20  			 *
-	*						 *
-	**************************************************
+SIGNIFICANT USER-VISIBLE CHANGES
 
-                CHANGES IN R VERSION 0.20-3
-    
-    o	Resolved dependency issues.
-
-                CHANGES IN R VERSION 0.20-1,2
-    
-    o	Minor changes to pass the CRAN test.
-
-
-                CHANGES IN R VERSION 0.20-0
-    
-    o	New demos, test functions, datasets.
-
-    o	Method t for spam.chol.NgPeyton.
-
-    o	Method Math2 now with signature digits="ANY". 	
-
-    o	Update in rmvnorm.canonical, can take a Cholesky structure
-    	as argument. 
-
-    o   New functionality for a sparse times a full matrix 
-    	multiplication.
-
-    o	Minor ajustment in memory allocation of chol.	
-
-
-	**************************************************
-	*						 *
-	*	    SPAM VERSION 0.15  			 *
-	*						 *
-	**************************************************
-
-                CHANGES IN R VERSION 0.15-6
-    
-    o   Minor change in Fortran routines to accomodate some Intel 
-    	compilers (pointed out by Tim Hoar).
+   o	There is a generic conflict with 'backsolve' between spam
+   	and other packages (e.g., bdsmatrix). To avoid the issue,
+	we use the standard generic implemented in 'methods' which
+	requires an additional argument for version 0.29-0 (see 
+	also PR#14883). 
+	However to maintain backwards compatibility with packages
+	that depend on spam, this was reverted in 0.29-1. 
 
+	Currently, this conflict is not properly solved. I propose
+	to load 'spam' first then the other packages, followed by
+	manually calling:
 
-                CHANGES IN R VERSION 0.15-5
+	  setMethod("backsolve","spam.chol.NgPeyton",backsolve.spam)
+	  setMethod("backsolve","spam",backsolve.spam)
 
-    o   New function adiag.spam, creation of block diagonal sparse
-    	matrices. No method though.
+	Stay tuned...
 
-    o	New functions rmvnorm.spam, rmvnorm.canonical and
-    	rmvnorm.prec to draw multivariate normals.
+   o	Calls like:
+        
+	  mat <- diag.spam(4)
+	  diag( mat[-1,]) <- 3
+  	  diag.spam( mat[,-1]) <-2
 
-    o	New function apply.spam, similar functionality as apply.		
+	now work. They are, however, somewhat inefficient. 
+	'toeplitz.spam' is to be prefered. Pointed out by
+	Florian Gerber.
 
-    o   drop is implemented now when subsetting a sparse matrix 
-    	with a binary matrix.
+   o	The Gibbs sampler in the demo article-jss-example2 contains 
+   	several bugs, pointed out by Steve Geinitz and Andrea Riebler. 
+	I'll post an updated sampler in a future release.
 
-    o   Major overhaul to nearest.dist: zeros are not included.
-	Old parameters are kept for backwards compatibility.
 
-    o	Orders/complexities of major algorithms are now described 
-	in the help 'complexity'. 
+NEW FEATURES
 
-    o   Using packageStartupMessage in .onAttach.
+   o	New functions 'rmvnorm.const', 'rmvnorm.prec.const' and
+   	'rmvnorm.canonical.const' to draw constrained multivariate
+	normal variates.
 
-    o   Code clean up and help improvements. Changes reflecting the
-    	change to UZH.
+   o	New functions 'precmat' (wrapper to), 'precmat.RW1', 'precmat.RW2', 
+    	'precmat.season', 'precmat.IGMRFreglat' and 'precmat.IGMRFirreglat'
+   	to create precision matrices for IGMRF.
 
-    o	Bugfix in assinging via a nx2 matrix.
- 
+   o	New methods 'rowSums', 'colSums' and  'rowMeans', 'colMeans' for
+   	'spam' objects.
 
-		
-                CHANGES IN R VERSION 0.15-4
+   o	New methods 'head' and 'tail' for 'spam' and 'spam.chol.NgPeyton' 
+   	objects.
 
-    o	Changes in help files. Minor code improvements.
-   
-    o   New function powerboost.
-	 
-    o	Changes to if(getRversion() >= "x.y"), required for R 2.10.
+   o 	New method 'chol2inv' for 'spam' object.
 
-   
+   o	New option 'inefficiencywarning': handling of warnings issued 
+   	in case of an inefficient calculation. 
 
-                CHANGES IN R VERSION 0.15-3
+   o	New option 'structurebased': should operations be performed on
+   	the nonzero entries or on including the zeros. Classical example:
+	what should the cosine of a sparse matrix look like?
+	In the near future, all operations from Math and Ops will include
+	this option. Some loss of backwards compatibility might be 
+	lost in the future.  
 
-    o	Several bug fixes in the demos due to the changes in 
-	the previous versions.	
 
-    o	Several minior changes in the help files to compile with
-	the new help parser and to correct for typos.
+INTERNAL CHANGES
 
-    o	Added the demos into the tests directory. Additionally,
-	tests contains now the proper Rout.saves files.
+   o	New much faster approach to extract rows. For not too sparse 
+   	large matrices improvements over two orders of magnitudes are
+	achieved.
 	
-    o	In test files, library( spam, warn.conflict=FALSE)
-	is used to avoid masking messages in R-2.8.0.
-	Timing output in test files is suppressed.
-	
-    o	Added trivial headers to most files. 
+   o 	Elininated '.Internal()' calls that induce a 'Note' on CRAN
+   	checks. This also implied a minor rewrite of 'image.spam'.	
 
+   o 	Minor code improvements. 
 
-    o	Bug fix in spam.list(), negative values were not correctly
-	handled.
+   o	Eliminated non-API calls (29.1).
 
-    o	Bug fix in subsetting (occured when subsetting very 
-	sparse matrices, memory allocation problem).	
+   o	Rewritten .C("bincode",...) call as suggested by Brian Ripley
+   	(29.2).
+  
 
+BUG FIXES
 
-                CHANGES IN R VERSION 0.15-2
+   o 	Bug fix that occures when multiplying elementwise matrices 
+   	that have non-intersecting structures (pointed out by 
+	Corentin Barbu).
 
-    o	Method all.equal for matrix-spam signature. 
+   o	Bug fix in triangular backsolves involving 'spam' objects 
+   	and rhs matrices.
 
-    o   Bug fix in Fortran function of nearest.dist. Numerical
-	instabilities could return NaN on diagonal. Additionally,
-	overhaul of tests/dist.R.
+   o	Bug fix in triangular backsolve causing errors on some
+   	architectures.
 
-    o	Several minor improvements in the help files as well
-	as in function nearest.dist and tests/*.R.
 
 
-                CHANGES IN R VERSION 0.15-1
 
-    o   Improvements in the nearest.dist function. The diagonals
-	are now handled consistenly.
+	CHANGES IN VERSION 0.28
 
-    o	Symmetry check criterion for Cholesky decomposition has been
-	relaxed from (2+eps)*eps to 100*eps for an easier handling when
-	working with great circle distance induced covariance matrices.
-	Same cutoff is used with eigen. Instead of using norm, 
-	we use essentially an isSymmetric.spam test.
+NEW FEATURES
 
-    o	Methods isSymmetric and all.equal for spam. 
-	
-    o	Methods image and display for spam.chol.NgPeyton.
+   o	New function 'cleanup' (suggested by Simon Barthelme). 
 
-    o	Method as.spam for distance class implemented.
+   o 	Extending help files.
 
-    o	Complete rewrite of spam.list. Method as.spam for lists
-	are implemented as well. 
+   o 	Improved functionality of 'isSymmetric'.
 
-    o   Method spam for spam objects (possibility to rearrange the 
-	dimension) has been eliminated. The approach was based on
-	creating the full matrix and assigning it back to a spam 
-	object. 
-	
-    o   Binary subsetting and subassigning is implemented.
 
-    o	Bug fix: the Cholesky Fortran routine checks if diagonal 
-	elements are available (and positive).
+INTERNAL CHANGES
 
-    o   Bug fix: in dim<-.spam
+   o	Proper storage of data files.
 
-    o	Minor improvements in the help files as well as the following
-	R functions: norm, .spam.matmul.
+   o 	Cleaning up argument names within spam functions.	 
 
+   o    Cleaning up old Fortran code, i.e., eliminating
+   	unnecessary subroutines and write calls.
 
-                CHANGES IN R VERSION 0.15-0
 
-    o   The devel versions of 14-x have been sitting around for 
-	a while and I was inconsistent with the devel/gold numbering. 
-	To avoid any confusion, I have decided to go to the next 
-	minor version. An additional reason supporting this is 
-	that the version number identification has changed over 
-	the 0.14-devel.
+BUG FIXES
 
+   o 	Bug fix that may occure when extracting zero elements 
+        (pointed out by Corentin Barbu).
 
-	**************************************************
-	*						 *
-	*	    SPAM VERSION 0.14  			 *
-	*						 *
-	**************************************************
 
-                CHANGES IN R VERSION 0.14-x
 
-    o   A few rudimentary functions to change between the compressed
-	sparse row formats of the packages SparseM and Matrix.
-	Just the functions, no S3/S4 constructs available.
 
-    o	Functionality to read matrices stored in the Harwell-Boeing 
-	or MatrixMarket formats.Read MatrixMarket.
+	CHANGES IN VERSION 0.27
 
-    o	Rewritten cbind.spam and rbind.spam. Both can take now 
-	numeric and spam objects. cbind.spam calls now Fortran 
-	code and is now very fast. Rewrite of their help.  	
+NEW FEATURES
 
-    o	Implemented spam.list to go from a index based list to a 
-	spam matrix. The function triplets does the inverse.
-	
-    o   forwardsolve and backsolve methods for spam objects.
+    o	Requires now R2.10 and higher.
 
-    o   Implemented the function 'dim<-' for spam objects.
+    o	Functions to create Toeplitz and circulant matrices.
 
-    o   Method diag and as.matrix for spam.chol.NgPeyton.
+    o 	Function to create precision matrices for gridded GMRF.
 
-    o	eps is now tested for being at least double precision.
-	
-    o	as.spam.xxx and spam.yyy functions have been streamlined.
-		
-    o	Initializing an empty spam matrix causes a warning but still
-	coerces to a zero matrix, see new("spam",entries=rep(1,0))
+    o	Improvements in the mle.* functions.
 
-    o	Eliminated bug in subsetting (occuring when subsetting 
-	for an empty matrix). Clean out subsetting and assigning.
+    o	Method diff for sparse matrices (suggested by Paul Eilers).
 
-    o	Include a inst subdirectory containing this file, which
-	is renamed to NEWS. Once we have reached a stable version
-	I will maintain a proper CHANGELOG file in the root 
-	directory.
+    o 	Improvement of help pages. 
 
-    o	Proper method handling for kronecker and bug fixes in 
-	kronecker.spam. 
-		
-    o	Saved the datasets UScounties.storder/ndorder as spam
-	objects as assumed by demo article-jss.
+    o	Eliminated some help aliases to base functions 
+    	(for which no 'usage' is given). 
 
-    o	Implemented many 'identical' structures and homogenized zero
-	matrix handling, throughout the R code. int0, ..., int2 are 
-	internally defined integers.
 
-    o	Similar changes as for 13-3. Additionally, considerable 
-	improvements in	help, file structure, tests, timing, etc.
+INTERNAL CHANGES
 
+    o  	Change to iL coding.
 
-                CHANGES IN R VERSION 0.14-0
+    o	Start to using 'identical'.
 
-	Major revision. Slight loss of backwards compatibility.
+    o 	Code cleaning due to requirement of R2.10 and higher.
 
-    o	New demo article-jss.
 
-    o   New variable spam.version, similar to the R version
-	variable.
-	 
-    o	Change and adding of a few option names, for example 
-	cholsymmetrycheck, cholpivotcheck, cholupdatesingular, 
-	dopivoting, safemode, ... 
-	See help files for details.
+BUG FIXES
 
-    o	Complete rewrite of chol. The argument ordering is 
-	now called pivot, more consistent with the generic 
-	function. Two different orderings are implemented.
-	Uses the new option cholsymmetrycheck.
+    o   Bug fix in as.spam.list (thanks to Paul Eilers).
 
-    o	Similar changes as in chol in determinant.spam.	
+    o 	Bug fix in demo(spam) (thanks to Thomas Gsponer).
 
-    o	New function update.spam.chol.NgPeyton.
-    
-    o	Invisible/minor changes in method c for spam, in solve.spam, 
-	determinant.chol.NgPeyton 
-
-    o	The class spam.chol.NgPeyton is defined differently.
-	Accordingly, print and summary methods are updated.
-	Notably, fill-in ratios are given with summary. 
-	Summary also hands back the length of the vectors holding the 
-	factor and the column indices.
-	
-    o	New methods for spam.chol.NgPeyton, namely, dim, length, c,
-	dim<-, and length<-. The latter two giving simply errors.
 
-    o   Along the redefinition of the class spam.chol.NgPeyton,
-	forwardsolve.spam and backsolve.spam are updated. 
-	Use now the option dopivoting.
 
-    o	kronecker.r is implemented.  
 
-    o	nearest.dist, a function to calculate close distances 
-	within one or two sets of locations is implemented.
-	Roughly speaking, it is the union of dist in base and 
-	rdist/rdist.earth in fields. (comes with options
-	nearestdistincreasefactor and nearestdistnnz). 
 
-    o   print and show now emphasize that the non-zero elements 
-	are row-wise printed. 
+	CHANGES IN VERSION 0.24, 0.25 and 0.26
 	
-    o	UScounties is a dataset containing the adjacency matrix 
-	of the first and second order neighbors of the counties
-	of the lower 48 US states.
-
-    o	Some changes in help files, especially in the *-class 
-	files.
-    
-    o	Eliminated warnings issued when compiling.
+    o 	Devel versions, not released.	
 
-    o	Minor R and Fortran code cleaning. 
 
-    o	Along the new features, update of CHANGELOG, todo,
-	NAMESPACE files, etc.
 
 
-	**************************************************
-	*						 *
-	*	    SPAM VERSION SERIES 0.13  		 *
-	*						 *
-	**************************************************
 
-                CHANGES IN R VERSION 0.13-3
+	CHANGES IN VERSION 0.23
 
-    o   Minor changes in R and Fortran code to eliminate warnings.
+NEW FEATURES
 
-    o   In diag()'s argument list, drop the explicit default (' = n').
-        As is now in R-2.7.
+    o	Further improved versions of demos. 
 
+    o	Some improvements to meet Rd standards.
+        Adjustments for future R versions. 
 
-                CHANGES IN R VERSION 0.13-2
 
-    o   New spam.options and getOption functions. .Spam
-        as a variable is not visible anymore.
 
-    o   Retrieving information from the DESCRIPTION file directly
-        (thanks to Roger Bivand).
 
 
-                CHANGES IN R VERSION 0.13-1
+	CHANGES IN VERSION 0.22
 
-    o   Minor Fortran Changes for g77 compatibility. Thanks to 
-        Roger Bivand.
+NEW FEATURES
 
-    o	Updated DESCRIPTION file.
+    o	Improved versions of demos. Synchronized with the JSS article.
 
-    
-                CHANGES IN R VERSION 0.13
+    o   Additional changes and improvements in the help files (thanks
+    	to Steve Geinitz).
 
-    o   Updated NAMESPACE (for versions > 2.5).
 
-    o	Some changes in help files.
     
-    o	Cleaned Fortran source files (eliminated unused 
-	subroutines and used the posted complier output to 
-	straighten details). 
 
-    o	Implemented more efficient transpose Fortran code.
-        This also eliminates a bug when transposing a 1 row 
-	matrix.
 
-    o	Eliminated bug when assigning with a 1 row matix.
 
-    o	Eliminated bug (Fortran code) that could potentially 
-	occur when assigning.
 
-    o	Eliminated bug when plotting a 1 row matix.
-
-    o	Minor R code cleaning.
 
+	CHANGES IN VERSION 0.21
 
+	
+NEW FEATURES
 
-	**************************************************
-	*						 *
-	*	    SPAM VERSION 0.12  			 *
-	*						 *
-	**************************************************
+    o	New NEWS file, to work better with news() command.
+    	The previous is available under ONEWS.
 
 
-    o   Updated NAMESPACE and DESCRIPTION file.
+    o 	New functions bandwidth, permutation, mle[.nomean][.spam],
+    	neg2loglikelihood[.spam].
+   
 
-    o	print and summary pass back NULL instead of the 
-	object.
+    o	Renamed adiag.spam to bdiag.spam.
 
-    o   Changed to prod(x dimension) instead of nrow*ncol to 
-	overcome integer overflow for very large matrices.
 
-    o   Introduced a prototype in the definition of spam 
-	and spam.chol.*.
+    o	Cleaned up argument naming with the rmvnorm.* 
+    	suite.
 
-    o   .Spam$safemode also determines if a spam object is 
-	tested for validity, as well as for NAOK.
 
-    o   In many functions sparse matrix construction is 
-	done manually using slots (and check=FALSE, if 
-	approprate).
+INTERNAL CHANGES
 
-    o	Increased the value of symmetry criteria to 
-	(2+eps)*eps, as each element can be off by eps, 
-	subtraction leads to a 2*eps offset and yet we are 
-	symmetric.
+    o   Various Fortran code, R code and help file 
+    	improvements.
 
-    o   Major restructuration of chol/det with elimination
-	of auxiliarychol. 
 
-    o	Methods chol/backsolve/forwarsolve now call the *.spam
-	functions.
+BUG FIXES
 
-    o 	Many internal changes to favour speed and efficiency.
+    o	Minor change in one of the demos (solves a 64bit issue). 	
 
-    o 	Bug fix in .spam.elemul. occuring when the result is the 
-	zero matrix.
diff --git a/win32/deps/library/spam/R/spam b/win32/deps/library/spam/R/spam
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/spam/R/spam
+++ b/win32/deps/library/spam/R/spam
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/spam/R/spam.rdb b/win32/deps/library/spam/R/spam.rdb
index 0a9fdf2..0ae3d0a 100644
Binary files a/win32/deps/library/spam/R/spam.rdb and b/win32/deps/library/spam/R/spam.rdb differ
diff --git a/win32/deps/library/spam/R/spam.rdx b/win32/deps/library/spam/R/spam.rdx
index 5589873..ef3854d 100644
Binary files a/win32/deps/library/spam/R/spam.rdx and b/win32/deps/library/spam/R/spam.rdx differ
diff --git a/win32/deps/library/spam/data/Rdata.rdb b/win32/deps/library/spam/data/Rdata.rdb
index a9f2263..163ae99 100644
Binary files a/win32/deps/library/spam/data/Rdata.rdb and b/win32/deps/library/spam/data/Rdata.rdb differ
diff --git a/win32/deps/library/spam/data/Rdata.rds b/win32/deps/library/spam/data/Rdata.rds
index 6ba072a..ddd52e9 100644
Binary files a/win32/deps/library/spam/data/Rdata.rds and b/win32/deps/library/spam/data/Rdata.rds differ
diff --git a/win32/deps/library/spam/data/Rdata.rdx b/win32/deps/library/spam/data/Rdata.rdx
index fa46268..efc475b 100644
Binary files a/win32/deps/library/spam/data/Rdata.rdx and b/win32/deps/library/spam/data/Rdata.rdx differ
diff --git a/win32/deps/library/spam/demo/article-jss-example1.R b/win32/deps/library/spam/demo/article-jss-example1.R
index 473156a..a4be16c 100644
--- a/win32/deps/library/spam/demo/article-jss-example1.R
+++ b/win32/deps/library/spam/demo/article-jss-example1.R
@@ -1,4 +1,4 @@
-# This is file ../spam0.20-3/demo/article-jss-example1.R
+# This is file ../spam0.29-2/demo/article-jss-example1.R
 # This file is part of the spam package, 
 #      http://www.math.uzh.ch/furrer/software/spam/
 # written and maintained by Reinhard Furrer.
@@ -6,9 +6,22 @@
 
 
 
-library(spam)
+# This demo contains the R code of the example in Section 5.1 of the
+# JSS article:
+#     "spam: A Sparse Matrix R Package with Emphasis on
+#            MCMC Methods for Gaussian Markov Random Fields"
+#
+# Compared to the R code given in the article, here we give:
+# - improved formatting
+# - more comments
+# - the R code to construct the figures
 
-data(UKDriverDeaths)
+
+
+# SETUP:
+library("spam")
+
+data("UKDriverDeaths")
 
 y <- sqrt(c(UKDriverDeaths))       # square root counts
 
@@ -17,7 +30,7 @@ m <- 12                            # We want to predict for one season.
 nm <- n+m                          # Total length of s and t
 
 
-priorshape <-  c(4,1,1)            # alpha's, as in Rue & Held (2005)
+priorshape <-  c(4, 1, 1)          # alpha's, as in Rue & Held (2005)
 priorinvscale <- c(4, 0.1, 0.0005) # beta's 
 
 # Construct the individual block precisions
@@ -25,19 +38,19 @@ priorinvscale <- c(4, 0.1, 0.0005) # beta's
 
 # Qsy, Qty are trivial:
 Qsy <- diag.spam(n)
-dim(Qsy) <- c(n+m,n)
+dim(Qsy) <- c(n+m, n)
 
 Qty <- Qsy
 
-Qst <- spam(0,nm,nm)
-Qst[cbind(1:n,1:n)] <- rep(1,n)
+Qst <- spam(0, nm, nm)
+Qst[cbind(1:n, 1:n)] <- rep(1, n)
 
 
 # The form of Qss is given by (Rue and Held equation 3.59).
 # Qss can be constructed with a loop:
-Qss <- spam(0,nm,nm)
+Qss <- spam(0, nm, nm)
 for (i in 0:(nm-m)) {
-    Qss[i+1:m,i+1:m] <- Qss[i+1:m,i+1:m]+1
+    Qss[i+1:m,i+1:m] <- Qss[i+1:m, i+1:m]+1
 }
 
 # Note that for the final version we need:
@@ -65,12 +78,16 @@ Qst_yk <- rbind(cbind(k[2]*Qss + k[1]*diag.spam(nm), k[1]*Qst),
                 
 struct <- chol(Qst_yk)
 
+
+# Figure 6:
+display(Qst_yk)           
+display(struct)           
+
 # Note that we do not provide the exactly the same ordering 
 # algorithms. Hence, the following is sightly different than
 # Figure RH4.2.
-cholQst_yk <- chol(Qst_yk,pivot='RCM')
+cholQst_yk <- chol(Qst_yk,pivot="RCM")
 P <- ordering(cholQst_yk)
-display(Qst_yk)
 display(Qst_yk[P,P])
 
 
@@ -79,9 +96,10 @@ display(Qst_yk[P,P])
 # k=( kappa_y, kappa_s, kappa_t)'
 
 # Gibbs sampler
-ngibbs <- 100   # In the original version is 500!
+ngibbs <- 500   # Is very fast!
 burnin <- 10    # > 0
 totalg <- ngibbs+burnin
+set.seed(14)
 
 # Initialize parameters:
 spost <- tpost <- array(0, c(totalg, nm))
@@ -94,7 +112,7 @@ tpost[1,] <- 40
 # calculation of a few variables:
 postshape <- priorshape + c(	n/2, (n+1)/2, (n+m-2)/2) 
 
-
+# GIBBS' ITERATIONS:
 timing <- system.time({
 for (ig in 2:totalg) {
     
@@ -124,7 +142,7 @@ for (ig in 2:totalg) {
 
   kpost[ig,] <- rgamma(3, postshape, postinvscale)	
 
-  if( (ig%%10)==0) cat('.')
+  if( (ig%%10)==0) cat(".")
 
 }
 
@@ -132,7 +150,7 @@ for (ig in 2:totalg) {
 
 
 # POSTPROCESSING:
-cat('\nTotal time:',timing[1],'per iteration:',timing[1]/totalg,'\n')
+cat("\nTotal time:",timing[1],"per iteration:",timing[1]/totalg,"\n")
 
 
 # Eliminate burn-in:
@@ -140,11 +158,15 @@ kpost <- kpost[-c(1:burnin),]
 spost <- spost[-c(1:burnin),]
 tpost <- tpost[-c(1:burnin),]
 
+print(summary(kpost))
+
 postquant <- apply(spost+tpost, 2, quantile,c(.025,.975))
 postmean  <- apply(spost+tpost, 2, mean)
 postmedi  <- apply(spost+tpost, 2, median)
 
 
+######################################################################
+# Figure 7:
 par(mfcol=c(1,1),mai=c(.6,.8,.01,.01))
 
 plot( y^2, ylim=c(800,2900),xlim=c(0,nm),ylab="Counts")
@@ -154,7 +176,7 @@ matlines( t(postquant)^2, col=4,lty=1)
 
 legend("topright",legend=c("Posterior median", "Quantiles of posterior sample",
                     "Quantiles of predictive distribution"),
-       bty='n',col=c(2,4,3),lty=1)
+       bty="n",col=c(2,4,3),lty=1)
 
 
 
@@ -165,13 +187,13 @@ dim(ypred) <- c(ngibbs,nm)
 postpredquant <- apply(ypred, 2, quantile,c(.025,.975))
 matlines( t(postpredquant)^2, col=3,lty=1)
 points(y^2)
-dev.off() 
+
 
 kpostmedian <- apply(kpost,2,median)
 
 par(mfcol=c(1,3),mai=c(.65,.65,.01,.01),cex=.85,mgp=c(2.6,1,0))
 
-matplot( log( kpost), lty=1, type='l',xlab='Index')
+matplot( log( kpost), lty=1, type="l",xlab="Index")
 abline(h=log(kpostmedian),col=3)
 acf( kpost[,3],ylab=expression(kappa[t]))
 plot(kpost[,2:3],ylab=expression(kappa[t]),xlab=expression(kappa[s]),cex=.8)
@@ -182,20 +204,11 @@ allkappas <- rbind(apply(kpost,2,mean),
                    apply(kpost,2,median),
                    apply(1/kpost,2,mean),
                    apply(1/kpost,2,median))
-colnames(allkappas) <- c('kappa_y', 'kappa_s', 'kappa_t')
-rownames(allkappas) <- c('Prec (mean)', 'Prec (median)',
-                         'Var (mean)', 'Var (median) ')
+colnames(allkappas) <- c("kappa_y", "kappa_s", "kappa_t")
+rownames(allkappas) <- c("Prec (mean)", "Prec (median)",
+                         "Var (mean)", "Var (median) ")
 print(allkappas,4)
 
-png("example1_m1.png",width=300,height=300)
-par(mai=c(.5,.5,.05,.05))
-display(Qst_yk)
-dev.off()
-
-png("example1_m2.png",width=300,height=300)
-par(mai=c(.5,.5,.05,.05))
-display(struct)
 
 
-summary(kpost)
 
diff --git a/win32/deps/library/spam/demo/article-jss-example2.R b/win32/deps/library/spam/demo/article-jss-example2.R
index 84c0d0d..d3f710e 100644
--- a/win32/deps/library/spam/demo/article-jss-example2.R
+++ b/win32/deps/library/spam/demo/article-jss-example2.R
@@ -1,12 +1,26 @@
-# This is file ../spam0.20-3/demo/article-jss-example2.R
+# This is file ../spam0.29-2/demo/article-jss-example2.R
 # This file is part of the spam package, 
 #      http://www.math.uzh.ch/furrer/software/spam/
 # written and maintained by Reinhard Furrer.
      
 
 
+# This demo contains the R code of the example in Section 5.2 of the
+# JSS article:
+#     "spam: A Sparse Matrix R Package with Emphasis on
+#            MCMC Methods for Gaussian Markov Random Fields"
+
+
+# Compared to the R code in the article, here we give:
+# - improved formatting
+# - more comments, e.g. how to run the code using regular matrices 
+# - the code to construct the figures
+
+cat("\nThis demo contains the R code of the second example\nin the JSS article. As pointed out by Steve Geinitz\nand Andrea Riebler, the Gibbs sampler is not correct\nand contains several bugs. \n\nI'll post an updated sampler in a future release.\n\n") 
+
+
 # INITALIZE AND FUNCTIONS:
-require( fields, warn.conflict=FALSE)
+require("fields", warn.conflict=FALSE)
 
 
 # READ DATA:
@@ -71,8 +85,8 @@ postshape <- ahyper + c(n-1,n)/2
 
 accept <- numeric(totalg)
 
-struct <- chol(Q1 + Q2,
-               memory=list(nnzcolindices=6467))
+struct <- chol(Q1 + Q2 + diag.spam(2*n),
+               memory=list(nnzcolindices=5500))
 
 # struct <- NULL        # If no update steps are wanted
 
@@ -99,8 +113,7 @@ for (ig in 2:totalg) {
                              b,
                              # Precision matrix
                              Q,
-                             Rstruct=struct,
-                             memory=list(nnzcolindices=6467))
+                             Rstruct=struct)
   
 
   ustar <- xstar[1:n]
@@ -135,7 +148,7 @@ for (ig in 2:totalg) {
     kpost[ig,] <- kpost[ig-1,]    
   }
                    
-  if( (ig%%10)==0) cat('.')
+  if( (ig%%10)==0) cat(".")
 
 }
 
@@ -144,10 +157,10 @@ for (ig in 2:totalg) {
 
 
 # POSTPROCESSING:
-cat('\nTotal time:',timing[1],'per iteration:',timing[1]/totalg)
+cat("\nTotal time:",timing[1],"per iteration:",timing[1]/totalg)
 
 accept <- accept[-c(1:burnin)]
-cat('\nAcceptance rate:',mean(accept),'\n')
+cat("\nAcceptance rate:",mean(accept),"\n")
 
 kpost <- kpost[-c(1:burnin),]
 upost <- upost[-c(1:burnin),]
@@ -171,30 +184,32 @@ vpostmedian <- apply(vpost,2,median)
 
 
 ######################################################################
-# Figures 
+# Figure 8:
+
 par(mfcol=c(1,3),mai=rep(0,4))
 map.landkreis(log(Y))
 map.landkreis(Y/E,zlim=c(.1,2.4))
 map.landkreis(exp(upostmedian),zlim=c(.1,2.4))
 
 
+# Figure 9:
 par(mfcol=c(2,4),mai=c(.5,.5,.05,.1),mgp=c(2.3,.8,0))
-hist(kpost[,1],main='',xlab=expression(kappa[u]),prob=T)
+hist(kpost[,1],main="",xlab=expression(kappa[u]),prob=TRUE)
 lines(density(kpost[,1]),col=2)
 tmp <- seq(0,to=max(kpost[,1]),l=500)
 lines(tmp,dgamma(tmp,ahyper[1],bhyper[1]),col=4)
 abline(v=kpostmedian[1],col=3)
 
-hist(kpost[,2],main='',xlab=expression(kappa[y]),prob=T)
+hist(kpost[,2],main="",xlab=expression(kappa[y]),prob=TRUE)
 lines(density(kpost[,2]),col=2)
 tmp <- seq(0,to=max(kpost[,2]),l=500)
 lines(tmp,dgamma(tmp,ahyper[2],bhyper[2]),col=4)
 abline(v=kpostmedian[2],col=3)
 
 # Trace plots:
-plot(kpost[,1],ylab=expression(kappa[u]),type='l')
+plot(kpost[,1],ylab=expression(kappa[u]),type="l")
 abline(h=kpostmedian[1],col=3)
-plot(kpost[,2],ylab=expression(kappa[y]),type='l')
+plot(kpost[,2],ylab=expression(kappa[y]),type="l")
 abline(h=kpostmedian[2],col=3)
 
 # ACF:
@@ -208,9 +223,9 @@ plot(kpost[,1],kpost[,2],xlab=expression(kappa[u]),ylab=expression(kappa[y]))
 abline(v=kpostmedian[1],h=kpostmedian[2],col=3)
 
 
-plot(accept+rnorm(ngibbs,sd=.05),pch='.',ylim=c(-1,2),yaxt='n',ylab='')
-text(ngibbs/2,1/2,paste('Acceptance rate:',round(mean(accept),3)))
-axis(2,at=c(0,1),label=c('Reject','Accept'))
+plot(accept+rnorm(ngibbs,sd=.05),pch=".",ylim=c(-1,2),yaxt="n",ylab="")
+text(ngibbs/2,1/2,paste("Acceptance rate:",round(mean(accept),3)))
+axis(2,at=c(0,1),label=c("Reject","Accept"))
 
 detach(Oral)
 ######################################################################
diff --git a/win32/deps/library/spam/demo/article-jss.R b/win32/deps/library/spam/demo/article-jss.R
index 1eb542a..a4cbbaf 100644
--- a/win32/deps/library/spam/demo/article-jss.R
+++ b/win32/deps/library/spam/demo/article-jss.R
@@ -1,4 +1,4 @@
-# This is file ../spam0.20-3/demo/article-jss.R
+# This is file ../spam0.29-2/demo/article-jss.R
 # This file is part of the spam package, 
 #      http://www.math.uzh.ch/furrer/software/spam/
 # written and maintained by Reinhard Furrer.
@@ -12,22 +12,21 @@
 
 
 # This demo contains the R code to construct the figures and the table of the
-# article:
+# JSS article:
 #     "spam: A Sparse Matrix R Package with Emphasis on
 #            MCMC Methods for Gaussian Markov Random Fields"
-# submitted to JSS.
 
 
 # The code presented here differs in the following points form the actually used
 # one:
 # - Very large grid sizes or very high order neighbor structures are not included
 #   here;
-# - Instead of (100+1) factorizations only (10+1) are performed here;
-# - The ratios in Fig 3 and 4 are not included here.
+# - Instead of (100+1) factorizations only (50+1) are performed here;
 # - No figure fine-tuning is done here.
 # - We had a few additional gc(), just to be sure.  
 
 
+######################################################################
 # Figure 1:
 i <- c( 2,4,4,5,5)
 j <- c( 1,1,2,1,3)
@@ -58,6 +57,7 @@ display( as.spam(R))
 abline( h=-U supernodes+ 5,col=3,lty=2)
 
 
+######################################################################
 # Figure 2:
 theta1 <- .1
 theta2 <- .01
@@ -81,19 +81,23 @@ display( as.spam(U))
 text(400,-2200,"no permutation\nz=689615\nw=96463\ns=711",adj=0)
 
 
-# general parameters for the following
-N <- 25         # would be 100 in the article 
+
+
+######################################################################
+# Figure 3:
+
+# general parameters for the following figures
+N <- 50         # would be 100 in the article 
 stsel <- 1      # user.self
 rPsx <- 1       # for function "system.time"
 rPsy <- 3       # memory usage 
 rPint <- .0001  # small interval
 
 
-# Figure 3:
-theta1 <- .1
+theta1 <- .1    
 theta2 <- .05
 
-xseq <- ceiling(4 + exp(seq(0,to=5,by=1))/2)  # would be seq(0.5,to=6,by=.5) in the article
+xseq <- ceiling(4 + exp(seq(0.5,to=5.5,by=.5))/2)  # would be seq(0,to=6,by=.5) in the article
 xseql <- length(xseq)
 
 table <- array(NA,c(xseql,4))
@@ -126,18 +130,30 @@ for (ix in 1:xseql) {
 table <- pmax(table, 0.0001)
 
 par(mfcol=c(1,2))
-plot(xseq, table[,1], type='l', log='xy', ylim=range(table[,c(1,3)]),
+plot(xseq, table[,1], type="l", log="xy", ylim=range(table[,c(1,3)]),
      xlab="L (log scale)", ylab="seconds (log scale)")
 lines(xseq, table[,3], lty=2)
+lines(xseq,table[,1]/table[,3],col=4,lty=3)
 
-plot(xseq, table[,2], type='l', log='xy', ylim=range(table[,c(2,4)]+0.01),
+plot(xseq, table[,2], type="l", log="xy", ylim=range(table[,c(2,4)]+0.01),
      xlab="L (log scale)", ylab="Mbytes (log scale)")
 lines(xseq, table[,4], lty=2)
+lines(xseq,table[,2]/table[,4],col=4,lty=3)
+
+
 
 
+######################################################################
 # Figure 4:
 
-x <- 30     # was 50 in article
+# general parameters for the following figures
+N <- 50         # would be 100 in the article 
+stsel <- 1      # user.self
+rPsx <- 1       # for function "system.time"
+rPsy <- 3       # memory usage 
+rPint <- .0001  # small interval
+
+x <- 50     # was 50 in article
 maxnn <- 6  # was 6 in article
 
 egdx <- expand.grid( 1:(maxnn+1), 1:(maxnn+1))
@@ -173,20 +189,45 @@ for (id in 1:dvall) {
 
 }
 
-# Since we have a small N, elements in table might be zero.
+# If we have a small N, elements in table might be zero.
 table <- pmax(table, 0.0001)
 
 par(mfcol=c(1,2))
-plot( dval, table[,1], type='l', log='xy',ylim=range(table[,c(1,3)]),
+plot( dval, table[,1], type="l", log="xy",ylim=range(table[,c(1,3)]),
      xlab="distance (log scale)", ylab="seconds (log scale)")
 lines( dval, table[,3],lty=2)
+lines( dval, table[,1]/table[,3],col=4,lty=3)
 
-plot( dval, table[,2], type='l', log='xy',ylim=range(table[,c(2,4)]),
+plot( dval, table[,2], type="l", log="xy",ylim=range(table[,c(2,4)]),
      xlab="distance (log scale)", ylab="Mbytes (log scale)")
 lines( dval, table[,4],lty=2)
+lines( dval, table[,2]/table[,4],col=4,lty=3)
+
+
+######################################################################
+# Figure 5
+In <- diag.spam(nrow(UScounties.storder))
+struct <- chol(In + .2 * UScounties.storder + .1 * UScounties.ndorder)
+
+len.1 <- 90 # in the article, is set to 180
+len.2 <- 50 # in the article, is set to 100
+theta.1 <- seq(-.225, to=.515, len=len.1)
+theta.2 <- seq(-.09, to=.235, len=len.2)
+
+grid <- array(NA, c(len.1, len.2))
+spam.options("cholupdatesingular"="null")
+
+for (i in 1:len.1)
+  for(j in 1:len.2) 
+    grid[i,j] <- !is.null(update(struct, In + theta.1[i]*UScounties.storder
+                       + theta.2[j]* UScounties.ndorder))
 
+image(theta.1, theta.2, grid, xlab=expression(theta[1]), ylab=expression(theta[2]),
+      xlim=c(-.3,.6),ylim=c(-.1,.25),col=c(0,"gray"))
+abline(v=0,h=0, lty=2)
 
 
+######################################################################
 # Table 1:
 table <- array(NA,c(9,4))
 
diff --git a/win32/deps/library/spam/demo/cholesky.R b/win32/deps/library/spam/demo/cholesky.R
index 070a487..26cfb3e 100644
--- a/win32/deps/library/spam/demo/cholesky.R
+++ b/win32/deps/library/spam/demo/cholesky.R
@@ -1,4 +1,4 @@
-# This is file ../spam0.20-3/demo/cholesky.R
+# This is file ../spam0.29-2/demo/cholesky.R
 # This file is part of the spam package, 
 #      http://www.math.uzh.ch/furrer/software/spam/
 # written and maintained by Reinhard Furrer.
diff --git a/win32/deps/library/spam/demo/spam.R b/win32/deps/library/spam/demo/spam.R
index dbbbd95..f2d01f7 100644
--- a/win32/deps/library/spam/demo/spam.R
+++ b/win32/deps/library/spam/demo/spam.R
@@ -1,4 +1,4 @@
-# This is file ../spam0.20-3/demo/spam.R
+# This is file ../spam0.29-2/demo/spam.R
 # This file is part of the spam package, 
 #      http://www.math.uzh.ch/furrer/software/spam/
 # written and maintained by Reinhard Furrer.
@@ -67,8 +67,7 @@ par(ask=interactive() &&
 display(smat, main="'scatterplot'-type display, very efficient")
 
 
-
-.Spam$imagesize <- prod(smat dimension)+1
+spam.options("imagesize"=prod(smat dimension)+1)
 display(smat, main="'image'-type display, may be slow and heavy")
 
 par(opar)
diff --git a/win32/deps/library/spam/demo/timing.R b/win32/deps/library/spam/demo/timing.R
index 7b22ed5..a90bb54 100644
--- a/win32/deps/library/spam/demo/timing.R
+++ b/win32/deps/library/spam/demo/timing.R
@@ -1,4 +1,4 @@
-# This is file ../spam0.20-3/demo/timing.R
+# This is file ../spam0.29-2/demo/timing.R
 # This file is part of the spam package, 
 #      http://www.math.uzh.ch/furrer/software/spam/
 # written and maintained by Reinhard Furrer.
diff --git a/win32/deps/library/spam/help/AnIndex b/win32/deps/library/spam/help/AnIndex
index 5c60544..e396669 100644
--- a/win32/deps/library/spam/help/AnIndex
+++ b/win32/deps/library/spam/help/AnIndex
@@ -50,8 +50,6 @@
 abs	math
 acos	math
 acosh	math
-adiag	adiag
-adiag.spam	adiag
 adjacency.landkreis	germany
 all	summary
 all.equal,matrix,spam-method	allequal
@@ -74,7 +72,7 @@ as.spam,list-method	spam.creation
 as.spam,matrix-method	spam.creation
 as.spam,numeric-method	spam.creation
 as.spam,spam-method	spam.creation
-as.spam,spam.chol.NgPeyton-method	spam.creation
+as.spam,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 as.spam.chol.NgPeyton	spam.creation
 as.spam.dgCMatrix	foreign
 as.spam.dgRMatrix	foreign
@@ -95,19 +93,33 @@ backsolve,matrix-method	solve
 backsolve,spam-method	solve
 backsolve,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 backsolve-methods	solve
-backsolve.default	solve
 backsolve.spam	solve
+bandwidth	bandwidth
+bdiag	bdiag
+bdiag.spam	bdiag
 c,spam-method	spam-class
 c,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 cbind	xybind
 cbind,spam-method	xybind
 cbind.spam	xybind
 ceiling	math
-chol	chol
 chol,ANY-method	chol
 chol,matrix-method	chol
 chol,spam-method	chol
+chol,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 chol.spam	chol
+chol2inv	solve
+chol2inv,spam-method	solve
+chol2inv,spam.chol.NgPeyton-method	solve
+chol2inv.spam	solve
+circulant.spam	circulant
+cleanup	cleanup
+colMeans	rowcolstats
+colMeans,spam-method	rowcolstats
+colMeans.spam	rowcolstats
+colSums	rowcolstats
+colSums,spam-method	rowcolstats
+colSums.spam	rowcolstats
 Compare,numeric,spam-method	spam-class
 Compare,spam,numeric-method	spam-class
 complexities	complexity
@@ -122,8 +134,9 @@ det,spam.chol.NgPeyton-method	det
 det.spam	det
 determinant	det
 determinant,spam-method	det
-determinant,spam.chol.NgPeyton-method	det
+determinant,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 determinant.spam	det
+determinant.spam.chol	det
 determinant.spam.chol.NgPeyton	det
 diag	diag
 diag,ANY-method	diag
@@ -137,7 +150,7 @@ diag<-	diag
 diag<-,ANY-method	diag
 diag<-,spam-method	diag
 diag<-.spam	diag
-dim	dim
+diff.spam	methods
 dim,ANY-method	operations
 dim,spam-method	operations
 dim,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
@@ -146,7 +159,7 @@ dim<-,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 dim<-.spam	dim
 display	display
 display,spam-method	display
-display,spam.chol.NgPeyton-method	display
+display,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 display.spam	display
 dist.spam	nearestdist
 distance	nearestdist
@@ -159,24 +172,26 @@ forwardsolve,matrix-method	solve
 forwardsolve,spam-method	solve
 forwardsolve,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 forwardsolve-methods	solve
-forwardsolve.default	solve
 forwardsolve.spam	solve
 gamma	math
 germany	Oral
 germany.graph	germany
+head	headtail
+head,spam-method	headtail
+head,spam.chol.NgPeyton-method	headtail
+head.spam	headtail
 history	history.spam
 history.spam	history.spam
 icheck	spam.internal
 image	image
 image,spam-method	image
-image,spam.chol.NgPeyton-method	image
+image,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 image.spam	image
 import	import
 initialize,spam-method	spam.creation
 is.spam	spam.creation
 isSymmetric,spam-method	isSymmetric
 isSymmetric.spam	isSymmetric
-kronecker	kronecker
 kronecker,ANY,spam-method	spam-class
 kronecker,spam,ANY-method	spam-class
 kronecker,spam,spam-method	spam-class
@@ -192,6 +207,7 @@ log10	math
 lower.tri	lu.tri
 lower.tri,spam-method	spam-class
 lower.tri.spam	lu.tri
+make.prec	makeprec
 map.landkreis	germany
 Math	math
 Math,spam-method	math
@@ -200,10 +216,20 @@ Math2,spam,numeric-method	math2
 Math2,spam-method	math2
 max	summary
 min	summary
+mle	mle
+mle.nomean	mle
+mle.nomean.spam	mle
+mle.spam	mle
 ncol,spam-method	operations
 nearest.dist	nearestdist
+neg2loglikelihood	mle
+neg2loglikelihood.spam	mle
 norm	operations
 norm,ANY-method	operations
+norm,matrix,character-method	operations
+norm,matrix,missing-method	operations
+norm,numeric,character-method	operations
+norm,numeric,missing-method	operations
 norm,spam,character-method	operations
 norm,spam,missing-method	operations
 norm.spam	operations
@@ -213,17 +239,30 @@ Oral	Oral
 ordering	ordering
 ordering,matrix-method	ordering
 ordering,spam-method	ordering
-ordering,spam.chol.NgPeyton-method	ordering
+ordering,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 ordering-methods	ordering
+ordering.spam.chol	ordering
+ordering.spam.chol.NgPeyton	ordering
 overview	SPAM
+permutation	permutation
+permutation,matrix-method	permutation
+permutation,spam-method	permutation
+permutation.spam	permutation
 plot,spam,missing-method	spam-class
 plot,spam,spam-method	spam-class
 plot.spam	operations
 powerboost	powerboost
+precmat	precmat
+precmat.IGMRFirreglat	precmat
+precmat.IGMRFreglat	precmat
+precmat.RW1	precmat
+precmat.RW2	precmat
+precmat.season	precmat
 print	print
 print,spam-method	print
-print,spam.chol.NgPeyton-method	print
+print,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 print.spam	print
+print.spam.chol	print
 print.spam.chol.NgPeyton	print
 prod	summary
 range	summary
@@ -233,14 +272,22 @@ rbind.spam	xybind
 read.HB	import
 read.MM	import
 rmvnorm.canonical	rmvnorm
+rmvnorm.canonical.const	rmvnorm.const
+rmvnorm.const	rmvnorm.const
 rmvnorm.prec	rmvnorm
+rmvnorm.prec.const	rmvnorm.const
 rmvnorm.spam	rmvnorm
 round	math2
+rowMeans	rowcolstats
+rowMeans,spam-method	rowcolstats
+rowMeans.spam	rowcolstats
+rowSums	rowcolstats
+rowSums,spam-method	rowcolstats
+rowSums.spam	rowcolstats
 show,spam-method	spam-class
 show,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 signif	math2
 sin	math
-solve	solve
 solve,ANY-method	solve
 solve,spam-method	solve
 solve.spam	solve
@@ -262,23 +309,29 @@ spam.options	options
 spam.Version	version
 spam.version	version
 sqrt	math
+subset.rows.spam	operations
 subset.spam	operations
 sum	summary
 Summary	summary
 summary	print
 Summary,spam-method	summary
 summary,spam-method	print
-summary,spam.chol.NgPeyton-method	print
+summary,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 Summary.spam	summary
 summary.spam	print
+summary.spam.chol	print
 summary.spam.chol.NgPeyton	print
-t,ANY-method	operations
-t,spam-method	operations
+t,spam-method	spam-class
 t,spam.chol.NgPeyton-method	spam.chol.NgPeyton-class
 t.spam	operations
+tail	headtail
+tail,spam-method	headtail
+tail,spam.chol.NgPeyton-method	headtail
+tail.spam	headtail
 tan	math
 todo	todo
 todo.spam	todo
+toeplitz.spam	toeplitz
 triplet	triplet
 trunc	math
 update	chol
@@ -293,31 +346,43 @@ UScounties.storder	UScounties
 USprecip	USprecip
 validspamobject	spam.creation
 version	version
-[,spam,ANY,ANY-method	operations
-[,spam,ANY-method	spam-class
-[,spam,matrix,matrix-method	spam-class
-[,spam,matrix,missing-method	spam-class
-[,spam,missing,missing-method	spam-class
-[,spam,missing,vector-method	spam-class
-[,spam,spam,missing-method	spam-class
-[,spam,vector,missing-method	spam-class
-[,spam,vector,vector-method	spam-class
+[,spam,ANY,ANY,ANY-method	spam-class
+[,spam,matrix,matrix,ANY-method	spam-class
+[,spam,matrix,missing,logical-method	spam-class
+[,spam,matrix,missing,missing-method	spam-class
+[,spam,missing,missing,ANY-method	spam-class
+[,spam,missing,vector,ANY-method	spam-class
+[,spam,spam,missing,ANY-method	spam-class
+[,spam,vector,missing,logical-method	spam-class
+[,spam,vector,missing,missing-method	spam-class
+[,spam,vector,vector,ANY-method	spam-class
 [.spam	operations
+[<-,spam,ANY,ANY,ANY-method	spam-class
 [<-,spam,ANY,ANY-method	operations
 [<-,spam,ANY-method	spam-class
+[<-,spam,matrix,matrix,ANY-method	spam-class
 [<-,spam,matrix,matrix,numeric-method	spam-class
 [<-,spam,matrix,matrix-method	operations
+[<-,spam,matrix,missing,ANY-method	spam-class
 [<-,spam,matrix,missing,numeric-method	spam-class
 [<-,spam,matrix,missing-method	operations
+[<-,spam,missing,missing,ANY-method	spam-class
 [<-,spam,missing,missing,numeric-method	spam-class
 [<-,spam,missing,missing-method	operations
+[<-,spam,missing,vector,ANY-method	spam-class
 [<-,spam,missing,vector,numeric-method	spam-class
+[<-,spam,missing,vector,spam-method	spam-class
 [<-,spam,missing,vector-method	operations
+[<-,spam,spam,missing,ANY-method	spam-class
 [<-,spam,spam,missing,numeric-method	spam-class
 [<-,spam,spam,missing-method	operations
+[<-,spam,vector,missing,ANY-method	spam-class
 [<-,spam,vector,missing,numeric-method	spam-class
+[<-,spam,vector,missing,spam-method	spam-class
 [<-,spam,vector,missing-method	operations
+[<-,spam,vector,vector,ANY-method	spam-class
 [<-,spam,vector,vector,numeric-method	spam-class
+[<-,spam,vector,vector,spam-method	spam-class
 [<-,spam,vector,vector-method	operations
 [<-.spam	operations
 ^,spam-method	operations
diff --git a/win32/deps/library/spam/help/aliases.rds b/win32/deps/library/spam/help/aliases.rds
new file mode 100644
index 0000000..02a8b34
Binary files /dev/null and b/win32/deps/library/spam/help/aliases.rds differ
diff --git a/win32/deps/library/spam/help/paths.rds b/win32/deps/library/spam/help/paths.rds
new file mode 100644
index 0000000..8e84b02
Binary files /dev/null and b/win32/deps/library/spam/help/paths.rds differ
diff --git a/win32/deps/library/spam/help/spam.rdb b/win32/deps/library/spam/help/spam.rdb
new file mode 100644
index 0000000..2ce70f5
Binary files /dev/null and b/win32/deps/library/spam/help/spam.rdb differ
diff --git a/win32/deps/library/spam/help/spam.rdx b/win32/deps/library/spam/help/spam.rdx
new file mode 100644
index 0000000..b995fd8
Binary files /dev/null and b/win32/deps/library/spam/help/spam.rdx differ
diff --git a/win32/deps/library/spam/html/00Index.html b/win32/deps/library/spam/html/00Index.html
index 6fc22f7..2e97600 100644
--- a/win32/deps/library/spam/html/00Index.html
+++ b/win32/deps/library/spam/html/00Index.html
@@ -1,25 +1,26 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><title>R: SPArse Matrix</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="../../R.css">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
 </head><body>
-<h1>SPArse Matrix <img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]"></h1>
-
+<h1> SPArse Matrix
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
 <hr>
-
 <div align="center">
-<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg"
-alt="[Package List]" width="30" height="30" border="0"></a>
-<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg"
-alt="[Top]" width="30" height="30" border="0"></a>
-</div>
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;spam&rsquo; version 0.29-2</h2>
 
-<h2>Documentation for package &lsquo;spam&rsquo; version 0.20-3</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 align="center">
-<a href="#"></a>
 <a href="#A">A</a>
 <a href="#B">B</a>
 <a href="#C">C</a>
@@ -27,6 +28,7 @@ alt="[Top]" width="30" height="30" border="0"></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>
@@ -43,109 +45,6 @@ alt="[Top]" width="30" height="30" border="0"></a>
 </p>
 
 
-<h2><a name="">--  --</a></h2>
-
-<table width="100%">
-<tr><td width="25%"><a href="operations.html">!=,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%%,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%*%,ANY,ANY-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%*%,matrix,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%*%,numeric,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%*%,spam,matrix-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%*%,spam,numeric-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%*%,spam,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%*%-methods</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%/%,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d*%</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d*%,matrix,ANY-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d*%,matrix,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d*%,numeric,matrix-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d*%,numeric,numeric-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d*%,numeric,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d*%,spam,ANY-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d*%,spam,numeric-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d*%,spam,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d+%</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d+%,matrix,ANY-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d+%,matrix,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d+%,numeric,matrix-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d+%,numeric,numeric-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d+%,numeric,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d+%,spam,ANY-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d+%,spam,numeric-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">%d+%,spam,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">&amp;,ANY,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">&amp;,spam,ANY-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">&amp;,spam,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">*,ANY,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">*,spam,ANY-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">*,spam,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">+,ANY,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">+,spam,ANY-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">+,spam,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">-,ANY,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">-,spam,ANY-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">-,spam,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="options.html">.Spam</a></td>
-<td>Options Settings</td></tr>
-<tr><td width="25%"><a href="operations.html">/,ANY,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">/,spam,ANY-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">/,spam,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">&lt;,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">&lt;=,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">==,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">&gt;,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">&gt;=,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-</table>
-
 <h2><a name="A">-- A --</a></h2>
 
 <table width="100%">
@@ -155,17 +54,11 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Mathematical functions</td></tr>
 <tr><td width="25%"><a href="math.html">acosh</a></td>
 <td>Mathematical functions</td></tr>
-<tr><td width="25%"><a href="adiag.html">adiag</a></td>
-<td>Binds Arrays Corner-to-Corner</td></tr>
-<tr><td width="25%"><a href="adiag.html">adiag.spam</a></td>
-<td>Binds Arrays Corner-to-Corner</td></tr>
 <tr><td width="25%"><a href="germany.html">adjacency.landkreis</a></td>
 <td>Administrative districts of Germany</td></tr>
 <tr><td width="25%"><a href="summary.html">all</a></td>
 <td>Rounding of Numbers</td></tr>
-<tr><td width="25%"><a href="allequal.html">all.equal,matrix,spam-method</a></td>
-<td>Test if Two 'spam' Objects are (Nearly) Equal</td></tr>
-<tr><td width="25%"><a href="allequal.html">all.equal,spam,spam-method</a></td>
+<tr><td width="25%"><a href="allequal.html">all.equal-method</a></td>
 <td>Test if Two 'spam' Objects are (Nearly) Equal</td></tr>
 <tr><td width="25%"><a href="allequal.html">all.equal.spam</a></td>
 <td>Test if Two 'spam' Objects are (Nearly) Equal</td></tr>
@@ -173,19 +66,15 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Rounding of Numbers</td></tr>
 <tr><td width="25%"><a href="apply.html">apply.spam</a></td>
 <td>Apply Functions Over Sparse Matrix Margins</td></tr>
-<tr><td width="25%"><a href="spam-class.html">Arith,numeric,spam-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">Arith,spam,missing-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">Arith,spam,numeric-method</a></td>
+<tr><td width="25%"><a href="spam-class.html">Arith-method</a></td>
 <td>Class "spam"</td></tr>
 <tr><td width="25%"><a href="foreign.html">as.dgCMatrix.spam</a></td>
 <td>Transformation to other sparse formats</td></tr>
 <tr><td width="25%"><a href="foreign.html">as.dgRMatrix.spam</a></td>
 <td>Transformation to other sparse formats</td></tr>
-<tr><td width="25%"><a href="spam-class.html">as.matrix,spam-method</a></td>
+<tr><td width="25%"><a href="spam-class.html">as.matrix-method</a></td>
 <td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">as.matrix,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">as.matrix-method</a></td>
 <td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="foreign.html">as.matrix.csr.spam</a></td>
 <td>Transformation to other sparse formats</td></tr>
@@ -193,17 +82,9 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Class "spam"</td></tr>
 <tr><td width="25%"><a href="spam.creation.html">as.spam</a></td>
 <td>Sparse Matrix Class</td></tr>
-<tr><td width="25%"><a href="spam.creation.html">as.spam,dist-method</a></td>
-<td>Sparse Matrix Class</td></tr>
-<tr><td width="25%"><a href="spam.creation.html">as.spam,list-method</a></td>
-<td>Sparse Matrix Class</td></tr>
-<tr><td width="25%"><a href="spam.creation.html">as.spam,matrix-method</a></td>
-<td>Sparse Matrix Class</td></tr>
-<tr><td width="25%"><a href="spam.creation.html">as.spam,numeric-method</a></td>
-<td>Sparse Matrix Class</td></tr>
-<tr><td width="25%"><a href="spam.creation.html">as.spam,spam-method</a></td>
-<td>Sparse Matrix Class</td></tr>
-<tr><td width="25%"><a href="spam.creation.html">as.spam,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">as.spam-method</a></td>
+<td>Class "spam.chol.NgPeyton"</td></tr>
+<tr><td width="25%"><a href="spam.creation.html">as.spam-method</a></td>
 <td>Sparse Matrix Class</td></tr>
 <tr><td width="25%"><a href="spam.creation.html">as.spam.chol.NgPeyton</a></td>
 <td>Sparse Matrix Class</td></tr>
@@ -240,50 +121,66 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <table width="100%">
 <tr><td width="25%"><a href="solve.html">backsolve</a></td>
 <td>Linear Equation Solving for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="solve.html">backsolve,ANY-method</a></td>
-<td>Linear Equation Solving for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="solve.html">backsolve,matrix-method</a></td>
+<tr><td width="25%"><a href="solve.html">backsolve-method</a></td>
 <td>Linear Equation Solving for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="solve.html">backsolve,spam-method</a></td>
-<td>Linear Equation Solving for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">backsolve,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">backsolve-method</a></td>
 <td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="solve.html">backsolve-methods</a></td>
 <td>Linear Equation Solving for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="solve.html">backsolve.default</a></td>
-<td>Linear Equation Solving for Sparse Matrices</td></tr>
 <tr><td width="25%"><a href="solve.html">backsolve.spam</a></td>
 <td>Linear Equation Solving for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="bandwidth.html">bandwidth</a></td>
+<td>Bandwidth of a Sparse Matrix</td></tr>
+<tr><td width="25%"><a href="bdiag.html">bdiag</a></td>
+<td>Binds Arrays Corner-to-Corner</td></tr>
+<tr><td width="25%"><a href="bdiag.html">bdiag.spam</a></td>
+<td>Binds Arrays Corner-to-Corner</td></tr>
 </table>
 
 <h2><a name="C">-- C --</a></h2>
 
 <table width="100%">
-<tr><td width="25%"><a href="spam-class.html">c,spam-method</a></td>
+<tr><td width="25%"><a href="spam-class.html">c-method</a></td>
 <td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">c,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">c-method</a></td>
 <td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="xybind.html">cbind</a></td>
 <td>Combine spam Matrices by Rows or Columns</td></tr>
-<tr><td width="25%"><a href="xybind.html">cbind,spam-method</a></td>
+<tr><td width="25%"><a href="xybind.html">cbind-method</a></td>
 <td>Combine spam Matrices by Rows or Columns</td></tr>
 <tr><td width="25%"><a href="xybind.html">cbind.spam</a></td>
 <td>Combine spam Matrices by Rows or Columns</td></tr>
 <tr><td width="25%"><a href="math.html">ceiling</a></td>
 <td>Mathematical functions</td></tr>
-<tr><td width="25%"><a href="chol.html">chol</a></td>
-<td>Cholesky Factorization for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="chol.html">chol,ANY-method</a></td>
-<td>Cholesky Factorization for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="chol.html">chol,matrix-method</a></td>
-<td>Cholesky Factorization for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="chol.html">chol,spam-method</a></td>
+<tr><td width="25%"><a href="chol.html">chol-method</a></td>
 <td>Cholesky Factorization for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">chol-method</a></td>
+<td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="chol.html">chol.spam</a></td>
 <td>Cholesky Factorization for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="spam-class.html">Compare,numeric,spam-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">Compare,spam,numeric-method</a></td>
+<tr><td width="25%"><a href="solve.html">chol2inv</a></td>
+<td>Linear Equation Solving for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="solve.html">chol2inv-method</a></td>
+<td>Linear Equation Solving for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="solve.html">chol2inv.spam</a></td>
+<td>Linear Equation Solving for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="circulant.html">circulant.spam</a></td>
+<td>Create Circulant Matrices</td></tr>
+<tr><td width="25%"><a href="cleanup.html">cleanup</a></td>
+<td>Cleaning up sparse matrices</td></tr>
+<tr><td width="25%"><a href="rowcolstats.html">colMeans</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="rowcolstats.html">colMeans-method</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="rowcolstats.html">colMeans.spam</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="rowcolstats.html">colSums</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="rowcolstats.html">colSums-method</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="rowcolstats.html">colSums.spam</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="spam-class.html">Compare-method</a></td>
 <td>Class "spam"</td></tr>
 <tr><td width="25%"><a href="complexity.html">complexities</a></td>
 <td>Complexity for Sparse Matrices</td></tr>
@@ -302,31 +199,29 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <table width="100%">
 <tr><td width="25%"><a href="det.html">det</a></td>
 <td>Calculate the determinant of a positive definite Sparse Matrix</td></tr>
-<tr><td width="25%"><a href="det.html">det,spam-method</a></td>
-<td>Calculate the determinant of a positive definite Sparse Matrix</td></tr>
-<tr><td width="25%"><a href="det.html">det,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="det.html">det-method</a></td>
 <td>Calculate the determinant of a positive definite Sparse Matrix</td></tr>
 <tr><td width="25%"><a href="det.html">det.spam</a></td>
 <td>Calculate the determinant of a positive definite Sparse Matrix</td></tr>
 <tr><td width="25%"><a href="det.html">determinant</a></td>
 <td>Calculate the determinant of a positive definite Sparse Matrix</td></tr>
-<tr><td width="25%"><a href="det.html">determinant,spam-method</a></td>
-<td>Calculate the determinant of a positive definite Sparse Matrix</td></tr>
-<tr><td width="25%"><a href="det.html">determinant,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="det.html">determinant-method</a></td>
 <td>Calculate the determinant of a positive definite Sparse Matrix</td></tr>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">determinant-method</a></td>
+<td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="det.html">determinant.spam</a></td>
 <td>Calculate the determinant of a positive definite Sparse Matrix</td></tr>
+<tr><td width="25%"><a href="det.html">determinant.spam.chol</a></td>
+<td>Calculate the determinant of a positive definite Sparse Matrix</td></tr>
 <tr><td width="25%"><a href="det.html">determinant.spam.chol.NgPeyton</a></td>
 <td>Calculate the determinant of a positive definite Sparse Matrix</td></tr>
 <tr><td width="25%"><a href="diag.html">diag</a></td>
 <td>Sparse Matrix diagonals</td></tr>
-<tr><td width="25%"><a href="diag.html">diag,ANY-method</a></td>
-<td>Sparse Matrix diagonals</td></tr>
-<tr><td width="25%"><a href="diag.html">diag,spam-method</a></td>
+<tr><td width="25%"><a href="diag.html">diag-method</a></td>
 <td>Sparse Matrix diagonals</td></tr>
-<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">diag,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">diag-method</a></td>
 <td>Class "spam.chol.NgPeyton"</td></tr>
-<tr><td width="25%"><a href="diag.html">diag.assign,spam-method</a></td>
+<tr><td width="25%"><a href="diag.html">diag.assign-method</a></td>
 <td>Sparse Matrix diagonals</td></tr>
 <tr><td width="25%"><a href="diag.html">diag.of.spam</a></td>
 <td>Sparse Matrix diagonals</td></tr>
@@ -336,34 +231,28 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Sparse Matrix diagonals</td></tr>
 <tr><td width="25%"><a href="diag.html">diag&lt;-</a></td>
 <td>Sparse Matrix diagonals</td></tr>
-<tr><td width="25%"><a href="diag.html">diag&lt;-,ANY-method</a></td>
-<td>Sparse Matrix diagonals</td></tr>
-<tr><td width="25%"><a href="diag.html">diag&lt;-,spam-method</a></td>
+<tr><td width="25%"><a href="diag.html">diag&lt;--method</a></td>
 <td>Sparse Matrix diagonals</td></tr>
 <tr><td width="25%"><a href="diag.html">diag&lt;-.spam</a></td>
 <td>Sparse Matrix diagonals</td></tr>
-<tr><td width="25%"><a href="dim.html">dim</a></td>
-<td>Dimensions of an Object</td></tr>
-<tr><td width="25%"><a href="operations.html">dim,ANY-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">dim,spam-method</a></td>
+<tr><td width="25%"><a href="operations.html">dim-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">dim,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">dim-method</a></td>
 <td>Class "spam.chol.NgPeyton"</td></tr>
-<tr><td width="25%"><a href="dim.html">dim&lt;-,spam-method</a></td>
+<tr><td width="25%"><a href="dim.html">dim&lt;--method</a></td>
 <td>Dimensions of an Object</td></tr>
-<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">dim&lt;-,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">dim&lt;--method</a></td>
 <td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="dim.html">dim&lt;-.spam</a></td>
 <td>Dimensions of an Object</td></tr>
 <tr><td width="25%"><a href="display.html">display</a></td>
-<td>Graphially represent the nonzero entries</td></tr>
-<tr><td width="25%"><a href="display.html">display,spam-method</a></td>
-<td>Graphially represent the nonzero entries</td></tr>
-<tr><td width="25%"><a href="display.html">display,spam.chol.NgPeyton-method</a></td>
-<td>Graphially represent the nonzero entries</td></tr>
+<td>Graphially Represent the Nonzero Entries</td></tr>
+<tr><td width="25%"><a href="display.html">display-method</a></td>
+<td>Graphially Represent the Nonzero Entries</td></tr>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">display-method</a></td>
+<td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="display.html">display.spam</a></td>
-<td>Graphially represent the nonzero entries</td></tr>
+<td>Graphially Represent the Nonzero Entries</td></tr>
 <tr><td width="25%"><a href="nearestdist.html">dist.spam</a></td>
 <td>Distance Matrix Computation</td></tr>
 <tr><td width="25%"><a href="nearestdist.html">distance</a></td>
@@ -386,18 +275,12 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Transformation to other sparse formats</td></tr>
 <tr><td width="25%"><a href="solve.html">forwardsolve</a></td>
 <td>Linear Equation Solving for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="solve.html">forwardsolve,ANY-method</a></td>
-<td>Linear Equation Solving for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="solve.html">forwardsolve,matrix-method</a></td>
-<td>Linear Equation Solving for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="solve.html">forwardsolve,spam-method</a></td>
+<tr><td width="25%"><a href="solve.html">forwardsolve-method</a></td>
 <td>Linear Equation Solving for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">forwardsolve,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">forwardsolve-method</a></td>
 <td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="solve.html">forwardsolve-methods</a></td>
 <td>Linear Equation Solving for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="solve.html">forwardsolve.default</a></td>
-<td>Linear Equation Solving for Sparse Matrices</td></tr>
 <tr><td width="25%"><a href="solve.html">forwardsolve.spam</a></td>
 <td>Linear Equation Solving for Sparse Matrices</td></tr>
 </table>
@@ -413,24 +296,35 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Administrative districts of Germany</td></tr>
 </table>
 
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="headtail.html">head</a></td>
+<td>Return the First or Last Part of an Object</td></tr>
+<tr><td width="25%"><a href="headtail.html">head-method</a></td>
+<td>Return the First or Last Part of an Object</td></tr>
+<tr><td width="25%"><a href="headtail.html">head.spam</a></td>
+<td>Return the First or Last Part of an Object</td></tr>
+</table>
+
 <h2><a name="I">-- I --</a></h2>
 
 <table width="100%">
 <tr><td width="25%"><a href="image.html">image</a></td>
 <td>Display a spam Object as Color Image</td></tr>
-<tr><td width="25%"><a href="image.html">image,spam-method</a></td>
-<td>Display a spam Object as Color Image</td></tr>
-<tr><td width="25%"><a href="image.html">image,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="image.html">image-method</a></td>
 <td>Display a spam Object as Color Image</td></tr>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">image-method</a></td>
+<td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="image.html">image.spam</a></td>
 <td>Display a spam Object as Color Image</td></tr>
 <tr><td width="25%"><a href="import.html">import</a></td>
-<td>Read external matrix formats</td></tr>
-<tr><td width="25%"><a href="spam.creation.html">initialize,spam-method</a></td>
+<td>Read External Matrix Formats</td></tr>
+<tr><td width="25%"><a href="spam.creation.html">initialize-method</a></td>
 <td>Sparse Matrix Class</td></tr>
 <tr><td width="25%"><a href="spam.creation.html">is.spam</a></td>
 <td>Sparse Matrix Class</td></tr>
-<tr><td width="25%"><a href="isSymmetric.html">isSymmetric,spam-method</a></td>
+<tr><td width="25%"><a href="isSymmetric.html">isSymmetric-method</a></td>
 <td>Test if a spam matrix is Symmetric</td></tr>
 <tr><td width="25%"><a href="isSymmetric.html">isSymmetric.spam</a></td>
 <td>Test if a spam matrix is Symmetric</td></tr>
@@ -439,30 +333,24 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <h2><a name="K">-- K --</a></h2>
 
 <table width="100%">
-<tr><td width="25%"><a href="kronecker.html">kronecker</a></td>
-<td>Kronecker products on sparse matrices</td></tr>
-<tr><td width="25%"><a href="spam-class.html">kronecker,ANY,spam-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">kronecker,spam,ANY-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">kronecker,spam,spam-method</a></td>
+<tr><td width="25%"><a href="spam-class.html">kronecker-method</a></td>
 <td>Class "spam"</td></tr>
 <tr><td width="25%"><a href="kronecker.html">kronecker.default</a></td>
-<td>Kronecker products on sparse matrices</td></tr>
+<td>Kronecker Products on Sparse Matrices</td></tr>
 <tr><td width="25%"><a href="kronecker.html">kronecker.spam</a></td>
-<td>Kronecker products on sparse matrices</td></tr>
+<td>Kronecker Products on Sparse Matrices</td></tr>
 </table>
 
 <h2><a name="L">-- L --</a></h2>
 
 <table width="100%">
-<tr><td width="25%"><a href="spam-class.html">length,spam-method</a></td>
+<tr><td width="25%"><a href="spam-class.html">length-method</a></td>
 <td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">length,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">length-method</a></td>
 <td>Class "spam.chol.NgPeyton"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">length&lt;-,spam-method</a></td>
+<tr><td width="25%"><a href="spam-class.html">length&lt;--method</a></td>
 <td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">length&lt;-,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">length&lt;--method</a></td>
 <td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="math.html">lgamma</a></td>
 <td>Mathematical functions</td></tr>
@@ -472,7 +360,7 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Mathematical functions</td></tr>
 <tr><td width="25%"><a href="lu.tri.html">lower.tri</a></td>
 <td>Lower and Upper Triangular Part of a Sparse Matrix</td></tr>
-<tr><td width="25%"><a href="spam-class.html">lower.tri,spam-method</a></td>
+<tr><td width="25%"><a href="spam-class.html">lower.tri-method</a></td>
 <td>Class "spam"</td></tr>
 <tr><td width="25%"><a href="lu.tri.html">lower.tri.spam</a></td>
 <td>Lower and Upper Triangular Part of a Sparse Matrix</td></tr>
@@ -481,42 +369,50 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <h2><a name="M">-- M --</a></h2>
 
 <table width="100%">
+<tr><td width="25%"><a href="makeprec.html">make.prec</a></td>
+<td>Create Precision Matrices</td></tr>
 <tr><td width="25%"><a href="germany.html">map.landkreis</a></td>
 <td>Administrative districts of Germany</td></tr>
 <tr><td width="25%"><a href="math.html">Math</a></td>
 <td>Mathematical functions</td></tr>
-<tr><td width="25%"><a href="math.html">Math,spam-method</a></td>
+<tr><td width="25%"><a href="math.html">Math-method</a></td>
 <td>Mathematical functions</td></tr>
 <tr><td width="25%"><a href="math2.html">Math2</a></td>
 <td>Rounding of Numbers</td></tr>
-<tr><td width="25%"><a href="math2.html">Math2,spam,numeric-method</a></td>
-<td>Rounding of Numbers</td></tr>
-<tr><td width="25%"><a href="math2.html">Math2,spam-method</a></td>
+<tr><td width="25%"><a href="math2.html">Math2-method</a></td>
 <td>Rounding of Numbers</td></tr>
 <tr><td width="25%"><a href="summary.html">max</a></td>
 <td>Rounding of Numbers</td></tr>
 <tr><td width="25%"><a href="summary.html">min</a></td>
 <td>Rounding of Numbers</td></tr>
+<tr><td width="25%"><a href="mle.html">mle</a></td>
+<td>Maximum likelihood estimates</td></tr>
+<tr><td width="25%"><a href="mle.html">mle.nomean</a></td>
+<td>Maximum likelihood estimates</td></tr>
+<tr><td width="25%"><a href="mle.html">mle.nomean.spam</a></td>
+<td>Maximum likelihood estimates</td></tr>
+<tr><td width="25%"><a href="mle.html">mle.spam</a></td>
+<td>Maximum likelihood estimates</td></tr>
 </table>
 
 <h2><a name="N">-- N --</a></h2>
 
 <table width="100%">
-<tr><td width="25%"><a href="operations.html">ncol,spam-method</a></td>
+<tr><td width="25%"><a href="operations.html">ncol-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
 <tr><td width="25%"><a href="nearestdist.html">nearest.dist</a></td>
 <td>Distance Matrix Computation</td></tr>
+<tr><td width="25%"><a href="mle.html">neg2loglikelihood</a></td>
+<td>Maximum likelihood estimates</td></tr>
+<tr><td width="25%"><a href="mle.html">neg2loglikelihood.spam</a></td>
+<td>Maximum likelihood estimates</td></tr>
 <tr><td width="25%"><a href="operations.html">norm</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">norm,ANY-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">norm,spam,character-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">norm,spam,missing-method</a></td>
+<tr><td width="25%"><a href="operations.html">norm-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
 <tr><td width="25%"><a href="operations.html">norm.spam</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">nrow,spam-method</a></td>
+<tr><td width="25%"><a href="operations.html">nrow-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
 </table>
 
@@ -529,13 +425,15 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Oral Cavity Cancer</td></tr>
 <tr><td width="25%"><a href="ordering.html">ordering</a></td>
 <td>Extract the permutation</td></tr>
-<tr><td width="25%"><a href="ordering.html">ordering,matrix-method</a></td>
+<tr><td width="25%"><a href="ordering.html">ordering-method</a></td>
 <td>Extract the permutation</td></tr>
-<tr><td width="25%"><a href="ordering.html">ordering,spam-method</a></td>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">ordering-method</a></td>
+<td>Class "spam.chol.NgPeyton"</td></tr>
+<tr><td width="25%"><a href="ordering.html">ordering-methods</a></td>
 <td>Extract the permutation</td></tr>
-<tr><td width="25%"><a href="ordering.html">ordering,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="ordering.html">ordering.spam.chol</a></td>
 <td>Extract the permutation</td></tr>
-<tr><td width="25%"><a href="ordering.html">ordering-methods</a></td>
+<tr><td width="25%"><a href="ordering.html">ordering.spam.chol.NgPeyton</a></td>
 <td>Extract the permutation</td></tr>
 <tr><td width="25%"><a href="SPAM.html">overview</a></td>
 <td>SPArse Matrix Package</td></tr>
@@ -544,22 +442,40 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <h2><a name="P">-- P --</a></h2>
 
 <table width="100%">
-<tr><td width="25%"><a href="spam-class.html">plot,spam,missing-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">plot,spam,spam-method</a></td>
+<tr><td width="25%"><a href="permutation.html">permutation</a></td>
+<td>Permute a matrix</td></tr>
+<tr><td width="25%"><a href="permutation.html">permutation-method</a></td>
+<td>Permute a matrix</td></tr>
+<tr><td width="25%"><a href="permutation.html">permutation.spam</a></td>
+<td>Permute a matrix</td></tr>
+<tr><td width="25%"><a href="spam-class.html">plot-method</a></td>
 <td>Class "spam"</td></tr>
 <tr><td width="25%"><a href="operations.html">plot.spam</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
 <tr><td width="25%"><a href="powerboost.html">powerboost</a></td>
 <td>Specific options Setting</td></tr>
+<tr><td width="25%"><a href="precmat.html">precmat</a></td>
+<td>IGMRF Precision Matrices</td></tr>
+<tr><td width="25%"><a href="precmat.html">precmat.IGMRFirreglat</a></td>
+<td>IGMRF Precision Matrices</td></tr>
+<tr><td width="25%"><a href="precmat.html">precmat.IGMRFreglat</a></td>
+<td>IGMRF Precision Matrices</td></tr>
+<tr><td width="25%"><a href="precmat.html">precmat.RW1</a></td>
+<td>IGMRF Precision Matrices</td></tr>
+<tr><td width="25%"><a href="precmat.html">precmat.RW2</a></td>
+<td>IGMRF Precision Matrices</td></tr>
+<tr><td width="25%"><a href="precmat.html">precmat.season</a></td>
+<td>IGMRF Precision Matrices</td></tr>
 <tr><td width="25%"><a href="print.html">print</a></td>
 <td>Printing and summarizing sparse matrices</td></tr>
-<tr><td width="25%"><a href="print.html">print,spam-method</a></td>
-<td>Printing and summarizing sparse matrices</td></tr>
-<tr><td width="25%"><a href="print.html">print,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="print.html">print-method</a></td>
 <td>Printing and summarizing sparse matrices</td></tr>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">print-method</a></td>
+<td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="print.html">print.spam</a></td>
 <td>Printing and summarizing sparse matrices</td></tr>
+<tr><td width="25%"><a href="print.html">print.spam.chol</a></td>
+<td>Printing and summarizing sparse matrices</td></tr>
 <tr><td width="25%"><a href="print.html">print.spam.chol.NgPeyton</a></td>
 <td>Printing and summarizing sparse matrices</td></tr>
 <tr><td width="25%"><a href="summary.html">prod</a></td>
@@ -573,40 +489,54 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Rounding of Numbers</td></tr>
 <tr><td width="25%"><a href="xybind.html">rbind</a></td>
 <td>Combine spam Matrices by Rows or Columns</td></tr>
-<tr><td width="25%"><a href="xybind.html">rbind,spam-method</a></td>
+<tr><td width="25%"><a href="xybind.html">rbind-method</a></td>
 <td>Combine spam Matrices by Rows or Columns</td></tr>
 <tr><td width="25%"><a href="xybind.html">rbind.spam</a></td>
 <td>Combine spam Matrices by Rows or Columns</td></tr>
 <tr><td width="25%"><a href="import.html">read.HB</a></td>
-<td>Read external matrix formats</td></tr>
+<td>Read External Matrix Formats</td></tr>
 <tr><td width="25%"><a href="import.html">read.MM</a></td>
-<td>Read external matrix formats</td></tr>
+<td>Read External Matrix Formats</td></tr>
 <tr><td width="25%"><a href="rmvnorm.html">rmvnorm.canonical</a></td>
 <td>Draw Multivariate Normals</td></tr>
+<tr><td width="25%"><a href="rmvnorm.const.html">rmvnorm.canonical.const</a></td>
+<td>Draw Constrainted Multivariate Normals</td></tr>
+<tr><td width="25%"><a href="rmvnorm.const.html">rmvnorm.const</a></td>
+<td>Draw Constrainted Multivariate Normals</td></tr>
 <tr><td width="25%"><a href="rmvnorm.html">rmvnorm.prec</a></td>
 <td>Draw Multivariate Normals</td></tr>
+<tr><td width="25%"><a href="rmvnorm.const.html">rmvnorm.prec.const</a></td>
+<td>Draw Constrainted Multivariate Normals</td></tr>
 <tr><td width="25%"><a href="rmvnorm.html">rmvnorm.spam</a></td>
 <td>Draw Multivariate Normals</td></tr>
 <tr><td width="25%"><a href="math2.html">round</a></td>
 <td>Rounding of Numbers</td></tr>
+<tr><td width="25%"><a href="rowcolstats.html">rowMeans</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="rowcolstats.html">rowMeans-method</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="rowcolstats.html">rowMeans.spam</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="rowcolstats.html">rowSums</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="rowcolstats.html">rowSums-method</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
+<tr><td width="25%"><a href="rowcolstats.html">rowSums.spam</a></td>
+<td>Form Row and Column Sums and Means</td></tr>
 </table>
 
 <h2><a name="S">-- S --</a></h2>
 
 <table width="100%">
-<tr><td width="25%"><a href="spam-class.html">show,spam-method</a></td>
+<tr><td width="25%"><a href="spam-class.html">show-method</a></td>
 <td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">show,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">show-method</a></td>
 <td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="math2.html">signif</a></td>
 <td>Rounding of Numbers</td></tr>
 <tr><td width="25%"><a href="math.html">sin</a></td>
 <td>Mathematical functions</td></tr>
-<tr><td width="25%"><a href="solve.html">solve</a></td>
-<td>Linear Equation Solving for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="solve.html">solve,ANY-method</a></td>
-<td>Linear Equation Solving for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="solve.html">solve,spam-method</a></td>
+<tr><td width="25%"><a href="solve.html">solve-method</a></td>
 <td>Linear Equation Solving for Sparse Matrices</td></tr>
 <tr><td width="25%"><a href="solve.html">solve.spam</a></td>
 <td>Linear Equation Solving for Sparse Matrices</td></tr>
@@ -616,12 +546,10 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>SPArse Matrix Package</td></tr>
 <tr><td width="25%"><a href="spam.creation.html">spam</a></td>
 <td>Sparse Matrix Class</td></tr>
-<tr><td width="25%"><a href="spam.creation.html">spam,list-method</a></td>
-<td>Sparse Matrix Class</td></tr>
-<tr><td width="25%"><a href="spam.creation.html">spam,numeric-method</a></td>
-<td>Sparse Matrix Class</td></tr>
 <tr><td width="25%"><a href="spam-class.html">spam-class</a></td>
 <td>Class "spam"</td></tr>
+<tr><td width="25%"><a href="spam.creation.html">spam-method</a></td>
+<td>Sparse Matrix Class</td></tr>
 <tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">spam.chol.NgPeyton-class</a></td>
 <td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="spam-class.html">spam.class</a></td>
@@ -644,6 +572,8 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Spam Version Information</td></tr>
 <tr><td width="25%"><a href="math.html">sqrt</a></td>
 <td>Mathematical functions</td></tr>
+<tr><td width="25%"><a href="operations.html">subset.rows.spam</a></td>
+<td>Basic Linear Algebra for Sparse Matrices</td></tr>
 <tr><td width="25%"><a href="operations.html">subset.spam</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
 <tr><td width="25%"><a href="summary.html">sum</a></td>
@@ -652,16 +582,18 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <td>Rounding of Numbers</td></tr>
 <tr><td width="25%"><a href="print.html">summary</a></td>
 <td>Printing and summarizing sparse matrices</td></tr>
-<tr><td width="25%"><a href="summary.html">Summary,spam-method</a></td>
+<tr><td width="25%"><a href="summary.html">Summary-method</a></td>
 <td>Rounding of Numbers</td></tr>
-<tr><td width="25%"><a href="print.html">summary,spam-method</a></td>
-<td>Printing and summarizing sparse matrices</td></tr>
-<tr><td width="25%"><a href="print.html">summary,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="print.html">summary-method</a></td>
 <td>Printing and summarizing sparse matrices</td></tr>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">summary-method</a></td>
+<td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="summary.html">Summary.spam</a></td>
 <td>Rounding of Numbers</td></tr>
 <tr><td width="25%"><a href="print.html">summary.spam</a></td>
 <td>Printing and summarizing sparse matrices</td></tr>
+<tr><td width="25%"><a href="print.html">summary.spam.chol</a></td>
+<td>Printing and summarizing sparse matrices</td></tr>
 <tr><td width="25%"><a href="print.html">summary.spam.chol.NgPeyton</a></td>
 <td>Printing and summarizing sparse matrices</td></tr>
 </table>
@@ -669,16 +601,22 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <h2><a name="T">-- T --</a></h2>
 
 <table width="100%">
-<tr><td width="25%"><a href="operations.html">t,ANY-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">t,spam-method</a></td>
-<td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">t,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="spam-class.html">t-method</a></td>
+<td>Class "spam"</td></tr>
+<tr><td width="25%"><a href="spam.chol.NgPeyton-class.html">t-method</a></td>
 <td>Class "spam.chol.NgPeyton"</td></tr>
 <tr><td width="25%"><a href="operations.html">t.spam</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="headtail.html">tail</a></td>
+<td>Return the First or Last Part of an Object</td></tr>
+<tr><td width="25%"><a href="headtail.html">tail-method</a></td>
+<td>Return the First or Last Part of an Object</td></tr>
+<tr><td width="25%"><a href="headtail.html">tail.spam</a></td>
+<td>Return the First or Last Part of an Object</td></tr>
 <tr><td width="25%"><a href="math.html">tan</a></td>
 <td>Mathematical functions</td></tr>
+<tr><td width="25%"><a href="toeplitz.html">toeplitz.spam</a></td>
+<td>Create Toeplitz Matrices</td></tr>
 <tr><td width="25%"><a href="triplet.html">triplet</a></td>
 <td>Transform a spam format to triplets</td></tr>
 <tr><td width="25%"><a href="math.html">trunc</a></td>
@@ -690,13 +628,13 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <table width="100%">
 <tr><td width="25%"><a href="chol.html">update</a></td>
 <td>Cholesky Factorization for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="chol.html">update,spam.chol.NgPeyton-method</a></td>
+<tr><td width="25%"><a href="chol.html">update-method</a></td>
 <td>Cholesky Factorization for Sparse Matrices</td></tr>
 <tr><td width="25%"><a href="chol.html">update.spam.chol.NgPeyton</a></td>
 <td>Cholesky Factorization for Sparse Matrices</td></tr>
 <tr><td width="25%"><a href="lu.tri.html">upper.tri</a></td>
 <td>Lower and Upper Triangular Part of a Sparse Matrix</td></tr>
-<tr><td width="25%"><a href="spam-class.html">upper.tri,spam-method</a></td>
+<tr><td width="25%"><a href="spam-class.html">upper.tri-method</a></td>
 <td>Class "spam"</td></tr>
 <tr><td width="25%"><a href="lu.tri.html">upper.tri.spam</a></td>
 <td>Lower and Upper Triangular Part of a Sparse Matrix</td></tr>
@@ -722,67 +660,59 @@ alt="[Top]" width="30" height="30" border="0"></a>
 <h2><a name="misc">-- misc --</a></h2>
 
 <table width="100%">
-<tr><td width="25%"><a href="operations.html">[,spam,ANY,ANY-method</a></td>
+<tr><td width="25%"><a href="operations.html">!=-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[,spam,ANY-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[,spam,matrix,matrix-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[,spam,matrix,missing-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[,spam,missing,missing-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[,spam,missing,vector-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[,spam,spam,missing-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[,spam,vector,missing-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[,spam,vector,vector-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="operations.html">[.spam</a></td>
+<tr><td width="25%"><a href="operations.html">%%-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">[&lt;-,spam,ANY,ANY-method</a></td>
+<tr><td width="25%"><a href="operations.html">%*%-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[&lt;-,spam,ANY-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[&lt;-,spam,matrix,matrix,numeric-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="operations.html">[&lt;-,spam,matrix,matrix-method</a></td>
+<tr><td width="25%"><a href="operations.html">%*%-methods</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[&lt;-,spam,matrix,missing,numeric-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="operations.html">[&lt;-,spam,matrix,missing-method</a></td>
+<tr><td width="25%"><a href="operations.html">%/%-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[&lt;-,spam,missing,missing,numeric-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="operations.html">[&lt;-,spam,missing,missing-method</a></td>
+<tr><td width="25%"><a href="operations.html">%d*%</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[&lt;-,spam,missing,vector,numeric-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="operations.html">[&lt;-,spam,missing,vector-method</a></td>
+<tr><td width="25%"><a href="operations.html">%d*%-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[&lt;-,spam,spam,missing,numeric-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="operations.html">[&lt;-,spam,spam,missing-method</a></td>
+<tr><td width="25%"><a href="operations.html">%d+%</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[&lt;-,spam,vector,missing,numeric-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="operations.html">[&lt;-,spam,vector,missing-method</a></td>
+<tr><td width="25%"><a href="operations.html">%d+%-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="spam-class.html">[&lt;-,spam,vector,vector,numeric-method</a></td>
-<td>Class "spam"</td></tr>
-<tr><td width="25%"><a href="operations.html">[&lt;-,spam,vector,vector-method</a></td>
+<tr><td width="25%"><a href="operations.html">&amp;-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">[&lt;-.spam</a></td>
+<tr><td width="25%"><a href="operations.html">*-method</a></td>
+<td>Basic Linear Algebra for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="operations.html">+-method</a></td>
+<td>Basic Linear Algebra for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="operations.html">--method</a></td>
+<td>Basic Linear Algebra for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="options.html">.Spam</a></td>
+<td>Options Settings</td></tr>
+<tr><td width="25%"><a href="operations.html">/-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">^,spam-method</a></td>
+<tr><td width="25%"><a href="operations.html">&lt;-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">|,ANY,spam-method</a></td>
+<tr><td width="25%"><a href="operations.html">&lt;=-method</a></td>
+<td>Basic Linear Algebra for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="operations.html">==-method</a></td>
+<td>Basic Linear Algebra for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="operations.html">&gt;-method</a></td>
+<td>Basic Linear Algebra for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="operations.html">&gt;=-method</a></td>
+<td>Basic Linear Algebra for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="spam-class.html">[-method</a></td>
+<td>Class "spam"</td></tr>
+<tr><td width="25%"><a href="operations.html">[.spam</a></td>
+<td>Basic Linear Algebra for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="operations.html">[&lt;--method</a></td>
+<td>Basic Linear Algebra for Sparse Matrices</td></tr>
+<tr><td width="25%"><a href="spam-class.html">[&lt;--method</a></td>
+<td>Class "spam"</td></tr>
+<tr><td width="25%"><a href="operations.html">[&lt;-.spam</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">|,spam,ANY-method</a></td>
+<tr><td width="25%"><a href="operations.html">^-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
-<tr><td width="25%"><a href="operations.html">|,spam,spam-method</a></td>
+<tr><td width="25%"><a href="operations.html">|-method</a></td>
 <td>Basic Linear Algebra for Sparse Matrices</td></tr>
 </table>
 </body></html>
diff --git a/win32/deps/library/spam/html/R.css b/win32/deps/library/spam/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/spam/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/spam/libs/i386/spam.dll b/win32/deps/library/spam/libs/i386/spam.dll
new file mode 100644
index 0000000..1558919
Binary files /dev/null and b/win32/deps/library/spam/libs/i386/spam.dll differ
diff --git a/win32/deps/library/spam/libs/i386/symbols.rds b/win32/deps/library/spam/libs/i386/symbols.rds
new file mode 100644
index 0000000..b56dd66
Binary files /dev/null and b/win32/deps/library/spam/libs/i386/symbols.rds differ
diff --git a/win32/deps/library/spam/libs/x64/spam.dll b/win32/deps/library/spam/libs/x64/spam.dll
new file mode 100644
index 0000000..d9f8ff8
Binary files /dev/null and b/win32/deps/library/spam/libs/x64/spam.dll differ
diff --git a/win32/deps/library/spam/libs/x64/symbols.rds b/win32/deps/library/spam/libs/x64/symbols.rds
new file mode 100644
index 0000000..73383e9
Binary files /dev/null and b/win32/deps/library/spam/libs/x64/symbols.rds differ
diff --git a/win32/deps/library/spatial/CITATION b/win32/deps/library/spatial/CITATION
index f6a6566..95a548e 100644
--- a/win32/deps/library/spatial/CITATION
+++ b/win32/deps/library/spatial/CITATION
@@ -1,4 +1,4 @@
-citHeader("To cite the VR bundle (MASS, class, nnet, spatial) in publications use:")
+citHeader("To cite the spatial package in publications use:")
 
 citEntry(entry="Book",
          title = "Modern Applied Statistics with S",
diff --git a/win32/deps/library/spatial/DESCRIPTION b/win32/deps/library/spatial/DESCRIPTION
index 87178b7..f666df9 100644
--- a/win32/deps/library/spatial/DESCRIPTION
+++ b/win32/deps/library/spatial/DESCRIPTION
@@ -1,23 +1,20 @@
-Bundle: VR
-Contains: MASS class nnet spatial
-Priority: recommended
-Version: 7.2-48
-Date: 2009-07-29
-Depends: R (>= 2.5.0), grDevices, graphics, stats, utils
-Suggests: lattice, nlme, survival
-Author: S original by Venables & Ripley. R port by Brian Ripley
-        <ripley stats ox ac uk>, following earlier work by Kurt Hornik
-        and Albrecht Gebhardt.
-Maintainer: Brian Ripley <ripley stats ox ac uk>
-BundleDescription: Functions and datasets to support Venables and
-        Ripley, 'Modern Applied Statistics with S' (4th edition).
-License: GPL-2 | GPL-3
-URL: http://www.stats.ox.ac.uk/pub/MASS4/
-Packaged: 2009-07-31 13:56:57 UTC; ripley
-Repository: CRAN
-Date/Publication: 2009-08-05 11:20:53
-Package: spatial
-Description: Functions for kriging and point pattern analysis.
-Title: Functions for Kriging and Point Pattern Analysis
-LazyLoad: yes
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 13:01:18 UTC; windows
+Package: spatial
+Priority: recommended
+Version: 7.3-5
+Date: 2012-10-08
+Depends: R (>= 2.5.0), graphics, stats, utils
+Suggests: MASS
+Authors R: c(person("Brian", "Ripley", role = c("aut", "cre", "cph"),
+        email = "ripley stats ox ac uk"), person("Roger", "Bivand",
+        role = "ctb"))
+Author: Brian Ripley <ripley stats ox ac uk>
+Maintainer: Brian Ripley <ripley stats ox ac uk>
+Description: Functions for kriging and point pattern analysis.
+Title: Functions for Kriging and Point Pattern Analysis
+LazyLoad: yes
+ByteCompile: yes
+License: GPL-2 | GPL-3
+URL: http://www.stats.ox.ac.uk/pub/MASS4/
+Packaged: 2012-10-14 08:12:31 UTC; ripley
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:15:22 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/spatial/LICENCE b/win32/deps/library/spatial/LICENCE
index e694c08..58b4304 100644
--- a/win32/deps/library/spatial/LICENCE
+++ b/win32/deps/library/spatial/LICENCE
@@ -15,16 +15,10 @@ possible individual files also carry brief copyright notices.
 Copyrights
 ==========
 
-File MASS/R/profiles.R copyright (C) 1996 D. M. Bates and W. N. Venables.
-                       port to R by B. D. Ripley copyright (C) 1998
-                       corrections copyright (C) 2000,3,6 B. D. Ripley
-
-Our understanding is that the dataset files MASS/data/*.rda are not copyright.
-
 Files spatial/data/*.dat were generated or digitized by B. D. Ripley: no
 copyright is asserted.
 
-All other files are copyright (C) 1994-2007  W. N. Venables and
+All other files are copyright (C) 1994-2009  W. N. Venables and
 B. D. Ripley. Those parts which were distributed with the first
 edition are also copyright (C) 1994 Springer-Verlag New York Inc, with
 all rights assigned to W. N. Venables and B. D. Ripley.
diff --git a/win32/deps/library/spatial/Meta/Rd.rds b/win32/deps/library/spatial/Meta/Rd.rds
index a485d91..fcefe55 100644
Binary files a/win32/deps/library/spatial/Meta/Rd.rds and b/win32/deps/library/spatial/Meta/Rd.rds differ
diff --git a/win32/deps/library/spatial/Meta/hsearch.rds b/win32/deps/library/spatial/Meta/hsearch.rds
index 4aa579d..20d7513 100644
Binary files a/win32/deps/library/spatial/Meta/hsearch.rds and b/win32/deps/library/spatial/Meta/hsearch.rds differ
diff --git a/win32/deps/library/spatial/Meta/links.rds b/win32/deps/library/spatial/Meta/links.rds
new file mode 100644
index 0000000..d49d17e
Binary files /dev/null and b/win32/deps/library/spatial/Meta/links.rds differ
diff --git a/win32/deps/library/spatial/Meta/nsInfo.rds b/win32/deps/library/spatial/Meta/nsInfo.rds
index c19ae85..b75d566 100644
Binary files a/win32/deps/library/spatial/Meta/nsInfo.rds and b/win32/deps/library/spatial/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/spatial/Meta/package.rds b/win32/deps/library/spatial/Meta/package.rds
index fbf7bbf..72feeb3 100644
Binary files a/win32/deps/library/spatial/Meta/package.rds and b/win32/deps/library/spatial/Meta/package.rds differ
diff --git a/win32/deps/library/spatial/R/spatial b/win32/deps/library/spatial/R/spatial
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/spatial/R/spatial
+++ b/win32/deps/library/spatial/R/spatial
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/spatial/R/spatial.rdb b/win32/deps/library/spatial/R/spatial.rdb
index f74e5e5..d18da3d 100644
Binary files a/win32/deps/library/spatial/R/spatial.rdb and b/win32/deps/library/spatial/R/spatial.rdb differ
diff --git a/win32/deps/library/spatial/R/spatial.rdx b/win32/deps/library/spatial/R/spatial.rdx
index cfcfc2c..7de8661 100644
Binary files a/win32/deps/library/spatial/R/spatial.rdx and b/win32/deps/library/spatial/R/spatial.rdx differ
diff --git a/win32/deps/library/spatial/help/aliases.rds b/win32/deps/library/spatial/help/aliases.rds
new file mode 100644
index 0000000..db457e8
Binary files /dev/null and b/win32/deps/library/spatial/help/aliases.rds differ
diff --git a/win32/deps/library/spatial/help/paths.rds b/win32/deps/library/spatial/help/paths.rds
new file mode 100644
index 0000000..fc7e9e6
Binary files /dev/null and b/win32/deps/library/spatial/help/paths.rds differ
diff --git a/win32/deps/library/spatial/help/spatial.rdb b/win32/deps/library/spatial/help/spatial.rdb
new file mode 100644
index 0000000..31244ba
Binary files /dev/null and b/win32/deps/library/spatial/help/spatial.rdb differ
diff --git a/win32/deps/library/spatial/help/spatial.rdx b/win32/deps/library/spatial/help/spatial.rdx
new file mode 100644
index 0000000..0e7f77f
Binary files /dev/null and b/win32/deps/library/spatial/help/spatial.rdx differ
diff --git a/win32/deps/library/spatial/html/00Index.html b/win32/deps/library/spatial/html/00Index.html
new file mode 100644
index 0000000..6a90cec
--- /dev/null
+++ b/win32/deps/library/spatial/html/00Index.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Functions for Kriging and Point Pattern Analysis</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Functions for Kriging and Point Pattern Analysis
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;spatial&rsquo; version 7.3-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 width="25%"><a href="anova.trls.html">anova.trls</a></td>
+<td>Anova tables for fitted trend surface objects</td></tr>
+<tr><td width="25%"><a href="anova.trls.html">anovalist.trls</a></td>
+<td>Anova tables for fitted trend surface objects</td></tr>
+<tr><td width="25%"><a href="correlogram.html">correlogram</a></td>
+<td>Compute Spatial Correlograms</td></tr>
+<tr><td width="25%"><a href="expcov.html">expcov</a></td>
+<td>Spatial Covariance Functions</td></tr>
+<tr><td width="25%"><a href="expcov.html">gaucov</a></td>
+<td>Spatial Covariance Functions</td></tr>
+<tr><td width="25%"><a href="Kaver.html">Kaver</a></td>
+<td>Average K-functions from Simulations</td></tr>
+<tr><td width="25%"><a href="Kenvl.html">Kenvl</a></td>
+<td>Compute Envelope and Average of Simulations of K-fns</td></tr>
+<tr><td width="25%"><a href="Kfn.html">Kfn</a></td>
+<td>Compute K-fn of a Point Pattern</td></tr>
+<tr><td width="25%"><a href="trls.influence.html">plot.trls</a></td>
+<td>Regression diagnostics for trend surfaces</td></tr>
+<tr><td width="25%"><a href="ppgetregion.html">ppgetregion</a></td>
+<td>Get Domain for Spatial Point Pattern Analyses</td></tr>
+<tr><td width="25%"><a href="ppinit.html">ppinit</a></td>
+<td>Read a Point Process Object from a File</td></tr>
+<tr><td width="25%"><a href="pplik.html">pplik</a></td>
+<td>Pseudo-likelihood Estimation of a Strauss Spatial Point Process</td></tr>
+<tr><td width="25%"><a href="ppregion.html">ppregion</a></td>
+<td>Set Domain for Spatial Point Pattern Analyses</td></tr>
+<tr><td width="25%"><a href="predict.trls.html">predict.trls</a></td>
+<td>Predict method for trend surface fits</td></tr>
+<tr><td width="25%"><a href="prmat.html">prmat</a></td>
+<td>Evaluate Kriging Surface over a Grid</td></tr>
+<tr><td width="25%"><a href="Psim.html">Psim</a></td>
+<td>Simulate Binomial Spatial Point Process</td></tr>
+<tr><td width="25%"><a href="semat.html">semat</a></td>
+<td>Evaluate Kriging Standard Error of Prediction over a Grid</td></tr>
+<tr><td width="25%"><a href="expcov.html">sphercov</a></td>
+<td>Spatial Covariance Functions</td></tr>
+<tr><td width="25%"><a href="SSI.html">SSI</a></td>
+<td>Simulates Sequential Spatial Inhibition Point Process</td></tr>
+<tr><td width="25%"><a href="Strauss.html">Strauss</a></td>
+<td>Simulates Strauss Spatial Point Process</td></tr>
+<tr><td width="25%"><a href="surf.gls.html">surf.gls</a></td>
+<td>Fits a Trend Surface by Generalized Least-squares</td></tr>
+<tr><td width="25%"><a href="surf.ls.html">surf.ls</a></td>
+<td>Fits a Trend Surface by Least-squares</td></tr>
+<tr><td width="25%"><a href="trls.influence.html">trls.influence</a></td>
+<td>Regression diagnostics for trend surfaces</td></tr>
+<tr><td width="25%"><a href="trmat.html">trmat</a></td>
+<td>Evaluate Trend Surface over a Grid</td></tr>
+<tr><td width="25%"><a href="variogram.html">variogram</a></td>
+<td>Compute Spatial Variogram</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/spatial/html/R.css b/win32/deps/library/spatial/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/spatial/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/spatial/libs/i386/spatial.dll b/win32/deps/library/spatial/libs/i386/spatial.dll
new file mode 100644
index 0000000..9a7767d
Binary files /dev/null and b/win32/deps/library/spatial/libs/i386/spatial.dll differ
diff --git a/win32/deps/library/spatial/po/de/LC_MESSAGES/R-spatial.mo b/win32/deps/library/spatial/po/de/LC_MESSAGES/R-spatial.mo
new file mode 100644
index 0000000..3370ea8
Binary files /dev/null and b/win32/deps/library/spatial/po/de/LC_MESSAGES/R-spatial.mo differ
diff --git a/win32/deps/library/spatial/po/en quot/LC_MESSAGES/R-spatial.mo b/win32/deps/library/spatial/po/en quot/LC_MESSAGES/R-spatial.mo
new file mode 100644
index 0000000..cc4d2fd
Binary files /dev/null and b/win32/deps/library/spatial/po/en quot/LC_MESSAGES/R-spatial.mo differ
diff --git a/win32/deps/library/spatial/po/fr/LC_MESSAGES/R-spatial.mo b/win32/deps/library/spatial/po/fr/LC_MESSAGES/R-spatial.mo
new file mode 100644
index 0000000..b505175
Binary files /dev/null and b/win32/deps/library/spatial/po/fr/LC_MESSAGES/R-spatial.mo differ
diff --git a/win32/deps/library/spatial/po/pl/LC_MESSAGES/R-spatial.mo b/win32/deps/library/spatial/po/pl/LC_MESSAGES/R-spatial.mo
new file mode 100644
index 0000000..93b796c
Binary files /dev/null and b/win32/deps/library/spatial/po/pl/LC_MESSAGES/R-spatial.mo differ
diff --git a/win32/deps/library/spatial/tests/Examples/spatial-Ex.Rout.save b/win32/deps/library/spatial/tests/Examples/spatial-Ex.Rout.save
new file mode 100644
index 0000000..dbda68d
--- /dev/null
+++ b/win32/deps/library/spatial/tests/Examples/spatial-Ex.Rout.save
@@ -0,0 +1,514 @@
+
+R version 2.13.0 Under development (unstable) (2011-03-05 r54672)
+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.
+
+  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 <- "spatial"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('spatial')
+> 
+> assign(".oldSearch", search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("Kaver")
+> ### * Kaver
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Kaver
+> ### Title: Average K-functions from Simulations
+> ### Aliases: Kaver
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> towns <- ppinit("towns.dat")
+> par(pty="s")
+> plot(Kfn(towns, 40), type="b")
+> plot(Kfn(towns, 10), type="b", xlab="distance", ylab="L(t)")
+> for(i in 1:10) lines(Kfn(Psim(69), 10))
+> lims <- Kenvl(10,100,Psim(69))
+> lines(lims$x,lims$lower, lty=2, col="green")
+> lines(lims$x,lims$upper, lty=2, col="green")
+> lines(Kaver(10,25,Strauss(69,0.5,3.5)),  col="red")
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("Kenvl")
+> ### * Kenvl
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Kenvl
+> ### Title: Compute Envelope and Average of Simulations of K-fns
+> ### Aliases: Kenvl
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> towns <- ppinit("towns.dat")
+> par(pty="s")
+> plot(Kfn(towns, 40), type="b")
+> plot(Kfn(towns, 10), type="b", xlab="distance", ylab="L(t)")
+> for(i in 1:10) lines(Kfn(Psim(69), 10))
+> lims <- Kenvl(10,100,Psim(69))
+> lines(lims$x,lims$lower, lty=2, col="green")
+> lines(lims$x,lims$upper, lty=2, col="green")
+> lines(Kaver(10,25,Strauss(69,0.5,3.5)), col="red")
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("Kfn")
+> ### * Kfn
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Kfn
+> ### Title: Compute K-fn of a Point Pattern
+> ### Aliases: Kfn
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> towns <- ppinit("towns.dat")
+> par(pty="s")
+> plot(Kfn(towns, 10), type="s", xlab="distance", ylab="L(t)")
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("Psim")
+> ### * Psim
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Psim
+> ### Title: Simulate Binomial Spatial Point Process
+> ### Aliases: Psim
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> towns <- ppinit("towns.dat")
+> par(pty="s")
+> plot(Kfn(towns, 10), type="s", xlab="distance", ylab="L(t)")
+> for(i in 1:10) lines(Kfn(Psim(69), 10))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("SSI")
+> ### * SSI
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SSI
+> ### Title: Simulates Sequential Spatial Inhibition Point Process
+> ### Aliases: SSI
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> towns <- ppinit("towns.dat")
+> par(pty = "s")
+> plot(Kfn(towns, 10), type = "b", xlab = "distance", ylab = "L(t)")
+> lines(Kaver(10, 25, SSI(69, 1.2)))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("Strauss")
+> ### * Strauss
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: Strauss
+> ### Title: Simulates Strauss Spatial Point Process
+> ### Aliases: Strauss
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> towns <- ppinit("towns.dat")
+> par(pty="s")
+> plot(Kfn(towns, 10), type="b", xlab="distance", ylab="L(t)")
+> lines(Kaver(10, 25, Strauss(69,0.5,3.5)))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("anova.trls")
+> ### * anova.trls
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: anova.trls
+> ### Title: Anova tables for fitted trend surface objects
+> ### Aliases: anova.trls anovalist.trls
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> library(stats)
+> data(topo, package="MASS")
+> topo0 <- surf.ls(0, topo)
+> topo1 <- surf.ls(1, topo)
+> topo2 <- surf.ls(2, topo)
+> topo3 <- surf.ls(3, topo)
+> topo4 <- surf.ls(4, topo)
+> anova(topo0, topo1, topo2, topo3, topo4)
+Analysis of Variance Table
+
+Model 1: surf.ls(np = 0, x = topo)
+Model 2: surf.ls(np = 1, x = topo)
+Model 3: surf.ls(np = 2, x = topo)
+Model 4: surf.ls(np = 3, x = topo)
+Model 5: surf.ls(np = 4, x = topo)
+  Res.Df Res.Sum Sq Df Sum Sq F value    Pr(>F)
+1     51     196030                            
+2     49      67186  2 128844 46.9843 4.040e-12
+3     46      39958  3  27228 10.4482 2.325e-05
+4     42      21577  4  18381  8.9447 2.558e-05
+5     37      14886  5   6691  3.3265     0.014
+> summary(topo4)
+Analysis of Variance Table
+ Model: surf.ls(np = 4, x = topo)
+             Sum Sq Df    Mean Sq  F value     Pr(>F)
+Regression 181144.0 14 12938.8567 32.16092 2.2204e-16
+Deviation   14885.7 37   402.3162                    
+Total      196029.7 51                               
+Multiple R-Squared: 0.9241,	Adjusted R-squared: 0.8953 
+AIC: (df = 15) 324.1594
+Fitted:
+   Min     1Q Median     3Q    Max 
+ 702.1  785.0  836.3  880.5  939.1 
+Residuals:
+    Min      1Q  Median      3Q     Max 
+-34.077 -12.568  -2.085  14.056  50.161 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("correlogram")
+> ### * correlogram
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: correlogram
+> ### Title: Compute Spatial Correlograms
+> ### Aliases: correlogram
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> data(topo, package="MASS")
+> topo.kr <- surf.ls(2, topo)
+> correlogram(topo.kr, 25)
+> d <- seq(0, 7, 0.1)
+> lines(d, expcov(d, 0.7))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("expcov")
+> ### * expcov
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: expcov
+> ### Title: Spatial Covariance Functions
+> ### Aliases: expcov gaucov sphercov
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> data(topo, package="MASS")
+> topo.kr <- surf.ls(2, topo)
+> correlogram(topo.kr, 25)
+> d <- seq(0, 7, 0.1)
+> lines(d, expcov(d, 0.7))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ppinit")
+> ### * ppinit
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ppinit
+> ### Title: Read a Point Process Object from a File
+> ### Aliases: ppinit
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> towns <- ppinit("towns.dat")
+> par(pty="s")
+> plot(Kfn(towns, 10), type="b", xlab="distance", ylab="L(t)")
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("pplik")
+> ### * pplik
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pplik
+> ### Title: Pseudo-likelihood Estimation of a Strauss Spatial Point Process
+> ### Aliases: pplik
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> pines <- ppinit("pines.dat")
+> pplik(pines, 0.7)
+[1] 0.1508756
+> 
+> 
+> 
+> cleanEx()
+> nameEx("predict.trls")
+> ### * predict.trls
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.trls
+> ### Title: Predict method for trend surface fits
+> ### Aliases: predict.trls
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> data(topo, package="MASS")
+> topo2 <- surf.ls(2, topo)
+> topo4 <- surf.ls(4, topo)
+> x <- c(1.78, 2.21)
+> y <- c(6.15, 6.15)
+> z2 <- predict(topo2, x, y)
+> z4 <- predict(topo4, x, y)
+> cat("2nd order predictions:", z2, "\n4th order predictions:", z4, "\n")
+2nd order predictions: 756.0682 747.0624 
+4th order predictions: 765.5547 742.3738 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("prmat")
+> ### * prmat
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: prmat
+> ### Title: Evaluate Kriging Surface over a Grid
+> ### Aliases: prmat
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> data(topo, package="MASS")
+> topo.kr <- surf.gls(2, expcov, topo, d=0.7)
+> prsurf <- prmat(topo.kr, 0, 6.5, 0, 6.5, 50)
+> contour(prsurf, levels=seq(700, 925, 25))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("semat")
+> ### * semat
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: semat
+> ### Title: Evaluate Kriging Standard Error of Prediction over a Grid
+> ### Aliases: semat
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> data(topo, package="MASS")
+> topo.kr <- surf.gls(2, expcov, topo, d=0.7)
+> prsurf <- prmat(topo.kr, 0, 6.5, 0, 6.5, 50)
+> contour(prsurf, levels=seq(700, 925, 25))
+> sesurf <- semat(topo.kr, 0, 6.5, 0, 6.5, 30)
+> contour(sesurf, levels=c(22,25))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("surf.gls")
+> ### * surf.gls
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: surf.gls
+> ### Title: Fits a Trend Surface by Generalized Least-squares
+> ### Aliases: surf.gls
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> library(MASS)  # for eqscplot
+> data(topo, package="MASS")
+> topo.kr <- surf.gls(2, expcov, topo, d=0.7)
+> trsurf <- trmat(topo.kr, 0, 6.5, 0, 6.5, 50)
+> eqscplot(trsurf, type = "n")
+> contour(trsurf, add = TRUE)
+> 
+> prsurf <- prmat(topo.kr, 0, 6.5, 0, 6.5, 50)
+> contour(prsurf, levels=seq(700, 925, 25))
+> sesurf <- semat(topo.kr, 0, 6.5, 0, 6.5, 30)
+> eqscplot(sesurf, type = "n")
+> contour(sesurf, levels = c(22, 25), add = TRUE)
+> 
+> 
+> 
+> cleanEx()
+
+detaching âpackage:MASSâ
+
+> nameEx("surf.ls")
+> ### * surf.ls
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: surf.ls
+> ### Title: Fits a Trend Surface by Least-squares
+> ### Aliases: surf.ls
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> library(MASS)  # for eqscplot
+> data(topo, package="MASS")
+> topo.kr <- surf.ls(2, topo)
+> trsurf <- trmat(topo.kr, 0, 6.5, 0, 6.5, 50)
+> eqscplot(trsurf, type = "n")
+> contour(trsurf, add = TRUE)
+> points(topo)
+> 
+> eqscplot(trsurf, type = "n")
+> contour(trsurf, add = TRUE)
+> plot(topo.kr, add = TRUE)
+> title(xlab= "Circle radius proportional to Cook's influence statistic")
+> 
+> 
+> 
+> cleanEx()
+
+detaching âpackage:MASSâ
+
+> nameEx("trls.influence")
+> ### * trls.influence
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: trls.influence
+> ### Title: Regression diagnostics for trend surfaces
+> ### Aliases: trls.influence plot.trls
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> library(MASS)  # for eqscplot
+> data(topo, package = "MASS")
+> topo2 <- surf.ls(2, topo)
+> infl.topo2 <- trls.influence(topo2)
+> (cand <- as.data.frame(infl.topo2)[abs(infl.topo2$stresid) > 1.5, ])
+           r        hii   stresid         Di
+1   61.21889 0.35476783  2.585852 0.61275133
+4  -45.58507 0.13493260 -1.662930 0.07188916
+12  44.71663 0.21022336  1.707234 0.12930392
+31  52.05575 0.07154233  1.833006 0.04314966
+37  54.75944 0.06974770  1.926349 0.04637112
+48  97.75499 0.08574061  3.468809 0.18807312
+50 -63.25149 0.27530059 -2.520972 0.40237779
+> cand.xy <- topo[as.integer(rownames(cand)), c("x", "y")]
+> trsurf <- trmat(topo2, 0, 6.5, 0, 6.5, 50)
+> eqscplot(trsurf, type = "n")
+> contour(trsurf, add = TRUE, col = "grey")
+> plot(topo2, add = TRUE, div = 3)
+> points(cand.xy, pch = 16, col = "orange")
+> text(cand.xy, labels = rownames(cand.xy), pos = 4, offset = 0.5)
+> 
+> 
+> 
+> cleanEx()
+
+detaching âpackage:MASSâ
+
+> nameEx("trmat")
+> ### * trmat
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: trmat
+> ### Title: Evaluate Trend Surface over a Grid
+> ### Aliases: trmat
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> data(topo, package="MASS")
+> topo.kr <- surf.ls(2, topo)
+> trsurf <- trmat(topo.kr, 0, 6.5, 0, 6.5, 50)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("variogram")
+> ### * variogram
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: variogram
+> ### Title: Compute Spatial Variogram
+> ### Aliases: variogram
+> ### Keywords: spatial
+> 
+> ### ** Examples
+> 
+> data(topo, package="MASS")
+> topo.kr <- surf.ls(2, topo)
+> variogram(topo.kr, 25)
+> 
+> 
+> 
+> ### * <FOOTER>
+> ###
+> cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  0.784 0.106 1.435 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
diff --git a/win32/deps/library/splines/DESCRIPTION b/win32/deps/library/splines/DESCRIPTION
index b03a72c..54009c9 100644
--- a/win32/deps/library/splines/DESCRIPTION
+++ b/win32/deps/library/splines/DESCRIPTION
@@ -1,11 +1,11 @@
 Package: splines
-Version: 2.9.2
+Version: 2.15.2
 Priority: base
 Imports: graphics, stats
 Title: Regression Spline Functions and Classes
-Author: Douglas M. Bates <bates stat wisc edu> and William N. Venables
-        <Bill Venables csiro au>
+Author: Douglas M. Bates <bates stat wisc edu> and
+ William N. Venables <Bill Venables csiro au>
 Maintainer: R Core Team <R-core r-project org>
 Description: Regression spline functions and classes
-License: Part of R 2.9.2
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 12:46:05 UTC; windows
+License: Part of R 2.15.2
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:07:55 UTC; windows
diff --git a/win32/deps/library/splines/INDEX b/win32/deps/library/splines/INDEX
index 5b9675f..ea12d63 100644
--- a/win32/deps/library/splines/INDEX
+++ b/win32/deps/library/splines/INDEX
@@ -12,4 +12,4 @@ splineDesign            Design Matrix for B-splines
 splineKnots             Knot Vector from a Spline
 splineOrder             Determine the Order of a Spline
 splines-package         Regression Spline Functions and Classes
-xyVector                Construct an xyVector Object
+xyVector                Construct an 'xyVector' Object
diff --git a/win32/deps/library/splines/Meta/Rd.rds b/win32/deps/library/splines/Meta/Rd.rds
index 19b688d..f0ab2fa 100644
Binary files a/win32/deps/library/splines/Meta/Rd.rds and b/win32/deps/library/splines/Meta/Rd.rds differ
diff --git a/win32/deps/library/splines/Meta/hsearch.rds b/win32/deps/library/splines/Meta/hsearch.rds
index 7286b49..ff05ab5 100644
Binary files a/win32/deps/library/splines/Meta/hsearch.rds and b/win32/deps/library/splines/Meta/hsearch.rds differ
diff --git a/win32/deps/library/splines/Meta/links.rds b/win32/deps/library/splines/Meta/links.rds
new file mode 100644
index 0000000..bd91165
Binary files /dev/null and b/win32/deps/library/splines/Meta/links.rds differ
diff --git a/win32/deps/library/splines/Meta/nsInfo.rds b/win32/deps/library/splines/Meta/nsInfo.rds
index f2db186..cb23c63 100644
Binary files a/win32/deps/library/splines/Meta/nsInfo.rds and b/win32/deps/library/splines/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/splines/Meta/package.rds b/win32/deps/library/splines/Meta/package.rds
index 3a03e08..d09d9c0 100644
Binary files a/win32/deps/library/splines/Meta/package.rds and b/win32/deps/library/splines/Meta/package.rds differ
diff --git a/win32/deps/library/splines/NAMESPACE b/win32/deps/library/splines/NAMESPACE
index 8cf91db..61ec3f1 100644
--- a/win32/deps/library/splines/NAMESPACE
+++ b/win32/deps/library/splines/NAMESPACE
@@ -1,3 +1,5 @@
+useDynLib(splines, .registration = TRUE, .fixes = "C_")
+
 export(as.polySpline, asVector, backSpline, bs, interpSpline, ns,
        periodicSpline, polySpline, spline.des, splineDesign,
        splineKnots, splineOrder, xyVector)
diff --git a/win32/deps/library/splines/R/splines b/win32/deps/library/splines/R/splines
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/splines/R/splines
+++ b/win32/deps/library/splines/R/splines
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/splines/R/splines.rdb b/win32/deps/library/splines/R/splines.rdb
index e8908b1..6c6779f 100644
Binary files a/win32/deps/library/splines/R/splines.rdb and b/win32/deps/library/splines/R/splines.rdb differ
diff --git a/win32/deps/library/splines/R/splines.rdx b/win32/deps/library/splines/R/splines.rdx
index 145f4d7..5048981 100644
Binary files a/win32/deps/library/splines/R/splines.rdx and b/win32/deps/library/splines/R/splines.rdx differ
diff --git a/win32/deps/library/splines/help/aliases.rds b/win32/deps/library/splines/help/aliases.rds
new file mode 100644
index 0000000..f9185d8
Binary files /dev/null and b/win32/deps/library/splines/help/aliases.rds differ
diff --git a/win32/deps/library/splines/help/paths.rds b/win32/deps/library/splines/help/paths.rds
new file mode 100644
index 0000000..be52d00
Binary files /dev/null and b/win32/deps/library/splines/help/paths.rds differ
diff --git a/win32/deps/library/splines/help/splines.rdb b/win32/deps/library/splines/help/splines.rdb
new file mode 100644
index 0000000..e1be526
Binary files /dev/null and b/win32/deps/library/splines/help/splines.rdb differ
diff --git a/win32/deps/library/splines/help/splines.rdx b/win32/deps/library/splines/help/splines.rdx
new file mode 100644
index 0000000..9cd364a
Binary files /dev/null and b/win32/deps/library/splines/help/splines.rdx differ
diff --git a/win32/deps/library/splines/html/00Index.html b/win32/deps/library/splines/html/00Index.html
new file mode 100644
index 0000000..43185c1
--- /dev/null
+++ b/win32/deps/library/splines/html/00Index.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Regression Spline Functions and Classes</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Regression Spline Functions and Classes
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;splines&rsquo; version 2.15.2</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td width="25%"><a href="splines-package.html">splines-package</a></td>
+<td>Regression Spline Functions and Classes</td></tr>
+<tr><td width="25%"><a href="polySpline.html">as.polySpline</a></td>
+<td>Piecewise Polynomial Spline Representation</td></tr>
+<tr><td width="25%"><a href="asVector.html">asVector</a></td>
+<td>Coerce an Object to a Vector</td></tr>
+<tr><td width="25%"><a href="backSpline.html">backSpline</a></td>
+<td>Monotone Inverse Spline</td></tr>
+<tr><td width="25%"><a href="bs.html">bs</a></td>
+<td>B-Spline Basis for Polynomial Splines</td></tr>
+<tr><td width="25%"><a href="interpSpline.html">interpSpline</a></td>
+<td>Create an Interpolation Spline</td></tr>
+<tr><td width="25%"><a href="ns.html">ns</a></td>
+<td>Generate a Basis Matrix for Natural Cubic Splines</td></tr>
+<tr><td width="25%"><a href="periodicSpline.html">periodicSpline</a></td>
+<td>Create a Periodic Interpolation Spline</td></tr>
+<tr><td width="25%"><a href="polySpline.html">polySpline</a></td>
+<td>Piecewise Polynomial Spline Representation</td></tr>
+<tr><td width="25%"><a href="predict.bs.html">predict.bs</a></td>
+<td>Evaluate a Spline Basis</td></tr>
+<tr><td width="25%"><a href="predict.bSpline.html">predict.bSpline</a></td>
+<td>Evaluate a Spline at New Values of x</td></tr>
+<tr><td width="25%"><a href="predict.bSpline.html">predict.nbSpline</a></td>
+<td>Evaluate a Spline at New Values of x</td></tr>
+<tr><td width="25%"><a href="predict.bSpline.html">predict.npolySpline</a></td>
+<td>Evaluate a Spline at New Values of x</td></tr>
+<tr><td width="25%"><a href="predict.bs.html">predict.ns</a></td>
+<td>Evaluate a Spline Basis</td></tr>
+<tr><td width="25%"><a href="predict.bSpline.html">predict.pbSpline</a></td>
+<td>Evaluate a Spline at New Values of x</td></tr>
+<tr><td width="25%"><a href="predict.bSpline.html">predict.ppolySpline</a></td>
+<td>Evaluate a Spline at New Values of x</td></tr>
+<tr><td width="25%"><a href="splineDesign.html">spline.des</a></td>
+<td>Design Matrix for B-splines</td></tr>
+<tr><td width="25%"><a href="splineDesign.html">splineDesign</a></td>
+<td>Design Matrix for B-splines</td></tr>
+<tr><td width="25%"><a href="splineKnots.html">splineKnots</a></td>
+<td>Knot Vector from a Spline</td></tr>
+<tr><td width="25%"><a href="splineOrder.html">splineOrder</a></td>
+<td>Determine the Order of a Spline</td></tr>
+<tr><td width="25%"><a href="splines-package.html">splines</a></td>
+<td>Regression Spline Functions and Classes</td></tr>
+<tr><td width="25%"><a href="xyVector.html">xyVector</a></td>
+<td>Construct an 'xyVector' Object</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/splines/html/R.css b/win32/deps/library/splines/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/splines/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/splines/libs/i386/splines.dll b/win32/deps/library/splines/libs/i386/splines.dll
new file mode 100644
index 0000000..888f501
Binary files /dev/null and b/win32/deps/library/splines/libs/i386/splines.dll differ
diff --git a/win32/deps/library/splines/po/da/LC_MESSAGES/R-splines.mo b/win32/deps/library/splines/po/da/LC_MESSAGES/R-splines.mo
new file mode 100644
index 0000000..812ff6a
Binary files /dev/null and b/win32/deps/library/splines/po/da/LC_MESSAGES/R-splines.mo differ
diff --git a/win32/deps/library/splines/po/da/LC_MESSAGES/splines.mo b/win32/deps/library/splines/po/da/LC_MESSAGES/splines.mo
new file mode 100644
index 0000000..c8b68b2
Binary files /dev/null and b/win32/deps/library/splines/po/da/LC_MESSAGES/splines.mo differ
diff --git a/win32/deps/library/splines/po/de/LC_MESSAGES/R-splines.mo b/win32/deps/library/splines/po/de/LC_MESSAGES/R-splines.mo
new file mode 100644
index 0000000..01f1bee
Binary files /dev/null and b/win32/deps/library/splines/po/de/LC_MESSAGES/R-splines.mo differ
diff --git a/win32/deps/library/splines/po/de/LC_MESSAGES/splines.mo b/win32/deps/library/splines/po/de/LC_MESSAGES/splines.mo
new file mode 100644
index 0000000..73c9c70
Binary files /dev/null and b/win32/deps/library/splines/po/de/LC_MESSAGES/splines.mo differ
diff --git a/win32/deps/library/splines/po/en quot/LC_MESSAGES/R-splines.mo b/win32/deps/library/splines/po/en quot/LC_MESSAGES/R-splines.mo
new file mode 100644
index 0000000..838d2f2
Binary files /dev/null and b/win32/deps/library/splines/po/en quot/LC_MESSAGES/R-splines.mo differ
diff --git a/win32/deps/library/splines/po/en quot/LC_MESSAGES/splines.mo b/win32/deps/library/splines/po/en quot/LC_MESSAGES/splines.mo
new file mode 100644
index 0000000..2ab6fb8
Binary files /dev/null and b/win32/deps/library/splines/po/en quot/LC_MESSAGES/splines.mo differ
diff --git a/win32/deps/library/splines/po/fr/LC_MESSAGES/R-splines.mo b/win32/deps/library/splines/po/fr/LC_MESSAGES/R-splines.mo
new file mode 100644
index 0000000..ffb86af
Binary files /dev/null and b/win32/deps/library/splines/po/fr/LC_MESSAGES/R-splines.mo differ
diff --git a/win32/deps/library/splines/po/fr/LC_MESSAGES/splines.mo b/win32/deps/library/splines/po/fr/LC_MESSAGES/splines.mo
new file mode 100644
index 0000000..ae03005
Binary files /dev/null and b/win32/deps/library/splines/po/fr/LC_MESSAGES/splines.mo differ
diff --git a/win32/deps/library/splines/po/ja/LC_MESSAGES/R-splines.mo b/win32/deps/library/splines/po/ja/LC_MESSAGES/R-splines.mo
new file mode 100644
index 0000000..3508a5e
Binary files /dev/null and b/win32/deps/library/splines/po/ja/LC_MESSAGES/R-splines.mo differ
diff --git a/win32/deps/library/splines/po/ja/LC_MESSAGES/splines.mo b/win32/deps/library/splines/po/ja/LC_MESSAGES/splines.mo
new file mode 100644
index 0000000..1e1d9eb
Binary files /dev/null and b/win32/deps/library/splines/po/ja/LC_MESSAGES/splines.mo differ
diff --git a/win32/deps/library/splines/po/ko/LC_MESSAGES/R-splines.mo b/win32/deps/library/splines/po/ko/LC_MESSAGES/R-splines.mo
new file mode 100644
index 0000000..7d8e6bf
Binary files /dev/null and b/win32/deps/library/splines/po/ko/LC_MESSAGES/R-splines.mo differ
diff --git a/win32/deps/library/splines/po/ko/LC_MESSAGES/splines.mo b/win32/deps/library/splines/po/ko/LC_MESSAGES/splines.mo
new file mode 100644
index 0000000..6b93fe5
Binary files /dev/null and b/win32/deps/library/splines/po/ko/LC_MESSAGES/splines.mo differ
diff --git a/win32/deps/library/splines/po/pl/LC_MESSAGES/R-splines.mo b/win32/deps/library/splines/po/pl/LC_MESSAGES/R-splines.mo
new file mode 100644
index 0000000..3c9de62
Binary files /dev/null and b/win32/deps/library/splines/po/pl/LC_MESSAGES/R-splines.mo differ
diff --git a/win32/deps/library/splines/po/pl/LC_MESSAGES/splines.mo b/win32/deps/library/splines/po/pl/LC_MESSAGES/splines.mo
new file mode 100644
index 0000000..1f8cacf
Binary files /dev/null and b/win32/deps/library/splines/po/pl/LC_MESSAGES/splines.mo differ
diff --git a/win32/deps/library/splines/po/pt_BR/LC_MESSAGES/R-splines.mo b/win32/deps/library/splines/po/pt_BR/LC_MESSAGES/R-splines.mo
new file mode 100644
index 0000000..14444c3
Binary files /dev/null and b/win32/deps/library/splines/po/pt_BR/LC_MESSAGES/R-splines.mo differ
diff --git a/win32/deps/library/splines/po/pt_BR/LC_MESSAGES/splines.mo b/win32/deps/library/splines/po/pt_BR/LC_MESSAGES/splines.mo
new file mode 100644
index 0000000..fa80c6b
Binary files /dev/null and b/win32/deps/library/splines/po/pt_BR/LC_MESSAGES/splines.mo differ
diff --git a/win32/deps/library/splines/po/ru/LC_MESSAGES/R-splines.mo b/win32/deps/library/splines/po/ru/LC_MESSAGES/R-splines.mo
new file mode 100644
index 0000000..b3bb728
Binary files /dev/null and b/win32/deps/library/splines/po/ru/LC_MESSAGES/R-splines.mo differ
diff --git a/win32/deps/library/splines/po/ru/LC_MESSAGES/splines.mo b/win32/deps/library/splines/po/ru/LC_MESSAGES/splines.mo
new file mode 100644
index 0000000..da3a406
Binary files /dev/null and b/win32/deps/library/splines/po/ru/LC_MESSAGES/splines.mo differ
diff --git a/win32/deps/library/splines/po/zh_CN/LC_MESSAGES/R-splines.mo b/win32/deps/library/splines/po/zh_CN/LC_MESSAGES/R-splines.mo
new file mode 100644
index 0000000..ecb82a3
Binary files /dev/null and b/win32/deps/library/splines/po/zh_CN/LC_MESSAGES/R-splines.mo differ
diff --git a/win32/deps/library/splines/po/zh_CN/LC_MESSAGES/splines.mo b/win32/deps/library/splines/po/zh_CN/LC_MESSAGES/splines.mo
new file mode 100644
index 0000000..6fd2f19
Binary files /dev/null and b/win32/deps/library/splines/po/zh_CN/LC_MESSAGES/splines.mo differ
diff --git a/win32/deps/library/stats/COPYRIGHTS.modreg b/win32/deps/library/stats/COPYRIGHTS.modreg
index 4f0e734..be2b1ec 100644
--- a/win32/deps/library/stats/COPYRIGHTS.modreg
+++ b/win32/deps/library/stats/COPYRIGHTS.modreg
@@ -39,5 +39,5 @@ src/loessf.f
 
   The files are unchanged apart from the insertion of that statement.
 
-All other files are copyright the R Core Development Team and/or B. D. Ripley.
+All other files are copyright the R Core Team and/or B. D. Ripley.
 
diff --git a/win32/deps/library/stats/DESCRIPTION b/win32/deps/library/stats/DESCRIPTION
index b46cd69..8941be4 100644
--- a/win32/deps/library/stats/DESCRIPTION
+++ b/win32/deps/library/stats/DESCRIPTION
@@ -1,9 +1,9 @@
 Package: stats
-Version: 2.9.2
+Version: 2.15.2
 Priority: base
 Title: The R Stats Package
-Author: R Development Core Team and contributors worldwide
+Author: R Core Team and contributors worldwide
 Maintainer: R Core Team <R-core r-project org>
 Description: R statistical functions
-License: Part of R 2.9.2
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 12:44:09 UTC; windows
+License: Part of R 2.15.2
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:06:07 UTC; windows
diff --git a/win32/deps/library/stats/INDEX b/win32/deps/library/stats/INDEX
index 7c3c2f8..61dc293 100644
--- a/win32/deps/library/stats/INDEX
+++ b/win32/deps/library/stats/INDEX
@@ -9,6 +9,7 @@ Box.test                Box-Pierce and Ljung-Box Tests
 C                       Sets Contrasts for a Factor
 Cauchy                  The Cauchy Distribution
 Chisquare               The (non-central) Chi-Squared Distribution
+Distributions           Distributions in the stats package
 Exponential             The Exponential Distribution
 FDist                   The F Distribution
 GammaDist               The Gamma Distribution
@@ -30,16 +31,18 @@ PP.test                 Phillips-Perron Test for Unit Roots
 Poisson                 The Poisson Distribution
 SSD                     SSD Matrix and Estimated Variance Matrix in
                         Multivariate Models
-SSasymp                 Asymptotic Regression Model
-SSasympOff              Asymptotic Regression Model with an Offset
-SSasympOrig             Asymptotic Regression Model through the Origin
-SSbiexp                 Biexponential model
-SSfol                   First-order Compartment Model
-SSfpl                   Four-parameter Logistic Model
-SSgompertz              Gompertz Growth Model
-SSlogis                 Logistic Model
-SSmicmen                Michaelis-Menten Model
-SSweibull               Weibull growth curve model
+SSasymp                 Self-Starting Nls Asymptotic Regression Model
+SSasympOff              Self-Starting Nls Asymptotic Regression Model
+                        with an Offset
+SSasympOrig             Self-Starting Nls Asymptotic Regression Model
+                        through the Origin
+SSbiexp                 Self-Starting Nls Biexponential model
+SSfol                   Self-Starting Nls First-order Compartment Model
+SSfpl                   Self-Starting Nls Four-Parameter Logistic Model
+SSgompertz              Self-Starting Nls Gompertz Growth Model
+SSlogis                 Self-Starting Nls Logistic Model
+SSmicmen                Self-Starting Nls Michaelis-Menten Model
+SSweibull               Self-Starting Nls Weibull Growth Curve Model
 SignRank                Distribution of the Wilcoxon Signed Rank
                         Statistic
 StructTS                Fit Structural Time Series
@@ -70,7 +73,7 @@ ar                      Fit Autoregressive Models to Time Series
 ar.ols                  Fit Autoregressive Models to Time Series by OLS
 arima                   ARIMA Modelling of Time Series
 arima.sim               Simulate from an ARIMA Model
-arima0                  ARIMA Modelling of Time Series -- Preliminary
+arima0                  ARIMA Modelling of Time Series - Preliminary
                         Version
 as.hclust               Convert Objects to Class hclust
 asOneSidedFormula       Convert to One-Sided Formula
@@ -85,15 +88,14 @@ bw.nrd0                 Bandwidth Selectors for Kernel Density
 cancor                  Canonical Correlations
 case.names              Case and Variable Names of Fitted Models
 chisq.test              Pearson's Chi-squared Test for Count Data
-clearNames              Remove the Names from an Object
 cmdscale                Classical (Metric) Multidimensional Scaling
 coef                    Extract Model Coefficients
 complete.cases          Find Complete Cases
 confint                 Confidence Intervals for Model Parameters
-constrOptim             Linearly constrained optimisation
-contr.helmert           Contrast Matrices
+constrOptim             Linearly Constrained Optimization
+contr.helmert           (Possibly Sparse) Contrast Matrices
 contrasts               Get and Set Contrast Matrices
-convolve                Fast Convolution
+convolve                Convolution of Sequences via FFT
 cophenetic              Cophenetic Distances for a Hierarchical
                         Clustering
 cor                     Correlation, Variance and Covariance (Matrices)
@@ -101,7 +103,7 @@ cor.test                Test for Association/Correlation Between Paired
                         Samples
 cov.wt                  Weighted Covariance Matrices
 cpgram                  Plot Cumulative Periodogram
-cutree                  Cut a tree into groups of data
+cutree                  Cut a Tree into Groups of Data
 decompose               Classical Seasonal Decomposition by Moving
                         Averages
 delete.response         Modify Terms Objects
@@ -150,7 +152,7 @@ identify.hclust         Identify Clusters in a Dendrogram
 influence.measures      Regression Deletion Diagnostics
 integrate               Integration of One-Dimensional Functions
 interaction.plot        Two-way Interaction Plot
-is.empty.model          Check if a Model is Empty
+is.empty.model          Test if a Model's Formula is Empty
 isoreg                  Isotonic / Monotone Regression
 kernapply               Apply Smoothing Kernel
 kernel                  Smoothing Kernel Objects
@@ -186,7 +188,8 @@ mcnemar.test            McNemar's Chi-squared Test for Count Data
 median                  Median Value
 medpolish               Median Polish of a Matrix
 model.extract           Extract Components from a Model Frame
-model.frame             Extracting the "Environment" of a Model Formula
+model.frame             Extracting the Model Frame from a Formula or
+                        Fit
 model.matrix            Construct Design Matrices
 model.tables            Compute Tables of Results from an Aov Model Fit
 monthplot               Plot a Seasonal or other Subseries from a Time
@@ -202,7 +205,8 @@ nlm                     Non-Linear Minimization
 nlminb                  Optimization using PORT routines
 nls                     Nonlinear Least Squares
 nls.control             Control the Iterations in nls
-numericDeriv            Evaluate derivatives numerically
+nobs                    Extract the Number of Observations from a Fit.
+numericDeriv            Evaluate Derivatives Numerically
 offset                  Include an Offset in a Model Formula
 oneway.test             Test for Equal Means in a One-Way Layout
 optim                   General-purpose Optimization
@@ -213,7 +217,7 @@ p.adjust                Adjust P-values for Multiple Comparisons
 pairwise.prop.test      Pairwise comparisons for proportions
 pairwise.t.test         Pairwise t tests
 pairwise.table          Tabulate p values for pairwise comparisons
-pairwise.wilcox.test    Pairwise Wilcoxon rank sum tests
+pairwise.wilcox.test    Pairwise Wilcoxon Rank Sum Tests
 plot.HoltWinters        Plot function for HoltWinters objects
 plot.acf                Plot Autocovariance and Autocorrelation
                         Functions
@@ -230,10 +234,10 @@ plot.ts                 Plotting Time-Series Objects
 poisson.test            Exact Poisson tests
 poly                    Compute Orthogonal Polynomials
 power                   Create a Power Link Object
-power.anova.test        Power calculations for balanced one-way
-                        analysis of variance tests
-power.prop.test         Power calculations two sample test for
-                        proportions
+power.anova.test        Power Calculations for Balanced One-Way
+                        Analysis of Variance Tests
+power.prop.test         Power Calculations for Two-Sample Test for
+                        Proportions
 power.t.test            Power calculations for one and two sample t
                         tests
 ppoints                 Ordinates for Probability Plotting
@@ -241,14 +245,14 @@ ppr                     Projection Pursuit Regression
 prcomp                  Principal Components Analysis
 predict                 Model Predictions
 predict.Arima           Forecast from ARIMA fits
-predict.HoltWinters     prediction function for fitted Holt-Winters
-                        models
+predict.HoltWinters     Prediction Function for Fitted Holt-Winters
+                        Models
 predict.glm             Predict Method for GLM Fits
 predict.lm              Predict method for Linear Model Fits
 predict.loess           Predict Loess Curve or Surface
 predict.nls             Predicting from Nonlinear Least Squares Fits
 predict.smooth.spline   Predict from Smoothing Spline Fit
-preplot                 Pre-computations for a Plotting Objeect
+preplot                 Pre-computations for a Plotting Object
 princomp                Principal Components Analysis
 print.power.htest       Print method for power calculation object
 print.ts                Printing Time-Series Objects
@@ -263,16 +267,16 @@ qqnorm                  Quantile-Quantile Plots
 quade.test              Quade Test
 quantile                Sample Quantiles
 r2dtable                Random 2-way Tables with Given Marginals
+rWishart                Random Wishart Distributed Matrices
 read.ftable             Manipulate Flat Contingency Tables
 rect.hclust             Draw Rectangles Around Hierarchical Clusters
 relevel                 Reorder Levels of Factor
+reorder.default         Reorder Levels of a Factor
 reorder.dendrogram      Reorder a Dendrogram
-reorder.factor          Reorder Levels of a Factor
 replications            Number of Replications of Terms
 reshape                 Reshape Grouped Data
 residuals               Extract Model Residuals
-runmed                  Running Medians -- Robust Scatter Plot
-                        Smoothing
+runmed                  Running Medians - Robust Scatter Plot Smoothing
 scatter.smooth          Scatter Plot with Smooth Curve Fitted by Loess
 screeplot               Screeplots
 sd                      Standard Deviation
@@ -284,7 +288,7 @@ simulate                Simulate Responses
 smooth                  Tukey's (Running Median) Smoothing
 smooth.spline           Fit a Smoothing Spline
 smoothEnds              End Points Smoothing (for Running Medians)
-sortedXyData            Create a sortedXyData object
+sortedXyData            Create a 'sortedXyData' Object
 spec.ar                 Estimate Spectral Density of a Time Series from
                         AR Fit
 spec.pgram              Estimate Spectral Density of a Time Series by a
@@ -294,7 +298,7 @@ spectrum                Spectral Density Estimation
 splinefun               Interpolating Splines
 start                   Encode the Terminal Times of Time Series
 stat.anova              GLM Anova Statistics
-stats-deprecated        Deprecated Functions in Stats package
+stats-deprecated        Deprecated Functions in Package 'stats'
 stats-package           The R Stats Package
 step                    Choose a model by AIC in a Stepwise Algorithm
 stepfun                 Step Function Class
@@ -310,7 +314,7 @@ summary.princomp        Summary method for Principal Components
 supsmu                  Friedman's SuperSmoother
 symnum                  Symbolic Number Coding
 t.test                  Student's t-Test
-termplot                Plot regression terms
+termplot                Plot Regression Terms
 terms                   Model Terms
 terms.formula           Construct a terms Object from a Formula
 terms.object            Description of Terms Objects
@@ -331,6 +335,7 @@ vcov                    Calculate Variance-Covariance Matrix for a
                         Fitted Model Object
 weighted.mean           Weighted Arithmetic Mean
 weighted.residuals      Compute Weighted Residuals
+weights                 Extract Model Weights
 wilcox.test             Wilcoxon Rank Sum and Signed Rank Tests
 window                  Time Windows
 xtabs                   Cross Tabulation
diff --git a/win32/deps/library/stats/Meta/Rd.rds b/win32/deps/library/stats/Meta/Rd.rds
index c46a14d..345fee8 100644
Binary files a/win32/deps/library/stats/Meta/Rd.rds and b/win32/deps/library/stats/Meta/Rd.rds differ
diff --git a/win32/deps/library/stats/Meta/demo.rds b/win32/deps/library/stats/Meta/demo.rds
index 6bdb416..8bb2fdf 100644
Binary files a/win32/deps/library/stats/Meta/demo.rds and b/win32/deps/library/stats/Meta/demo.rds differ
diff --git a/win32/deps/library/stats/Meta/hsearch.rds b/win32/deps/library/stats/Meta/hsearch.rds
index 5783d9d..9787d03 100644
Binary files a/win32/deps/library/stats/Meta/hsearch.rds and b/win32/deps/library/stats/Meta/hsearch.rds differ
diff --git a/win32/deps/library/stats/Meta/links.rds b/win32/deps/library/stats/Meta/links.rds
new file mode 100644
index 0000000..583c84d
Binary files /dev/null and b/win32/deps/library/stats/Meta/links.rds differ
diff --git a/win32/deps/library/stats/Meta/nsInfo.rds b/win32/deps/library/stats/Meta/nsInfo.rds
index a90bb71..1a34273 100644
Binary files a/win32/deps/library/stats/Meta/nsInfo.rds and b/win32/deps/library/stats/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/stats/Meta/package.rds b/win32/deps/library/stats/Meta/package.rds
index b63204d..473cb61 100644
Binary files a/win32/deps/library/stats/Meta/package.rds and b/win32/deps/library/stats/Meta/package.rds differ
diff --git a/win32/deps/library/stats/NAMESPACE b/win32/deps/library/stats/NAMESPACE
index 9b3c2b7..249c699 100644
--- a/win32/deps/library/stats/NAMESPACE
+++ b/win32/deps/library/stats/NAMESPACE
@@ -1,5 +1,11 @@
-# Refer to all C/Fortran routines by their name prefixed by R_
-useDynLib(stats, .registration = TRUE, .fixes = "R_")
+# Refer to all C/Fortran routines by their name prefixed by C_
+useDynLib(stats, .registration = TRUE, .fixes = "C_")
+
+import(graphics)
+importFrom(grDevices, dev.interactive, palette, extendrange, xy.coords)
+
+importFrom(utils, str)
+
 
 # exportPattern("^[^\\.]")
 export(.checkMFClasses, .getXlevels, .MFclass)
@@ -7,10 +13,10 @@ export(.checkMFClasses, .getXlevels, .MFclass)
 export(add.scope, add1, addmargins, aggregate, aggregate.data.frame,
        aggregate.default, aggregate.ts, AIC, alias, anova, anova.glm,
        anova.glmlist, anova.lm, anova.lmlist, anova.mlm, aov, approx,
-       approxfun, as.formula, as.ts, ave, binomial, bw.bcv, bw.nrd,
-       bw.nrd0, bw.SJ, bw.ucv, C, case.names, coef, coefficients,
-       complete.cases, confint, confint.default, constrOptim,
-       contr.SAS, contr.helmert, contr.poly, contr.sum,
+       approxfun, as.formula, as.ts, ave, BIC, binomial, bw.bcv,
+       bw.nrd, bw.nrd0, bw.SJ, bw.ucv, C, case.names, coef,
+       coefficients, complete.cases, confint, confint.default,
+       constrOptim, contr.SAS, contr.helmert, contr.poly, contr.sum,
        contr.treatment, contrasts, "contrasts<-", convolve,
        cooks.distance, cor, cov, cov.wt, cov2cor, covratio, cycle, D,
        dbeta, dbinom, dcauchy, dchisq, delete.response, deltat,
@@ -22,7 +28,7 @@ export(add.scope, add1, addmargins, aggregate, aggregate.data.frame,
        dunif, dweibull, dwilcox, eff.aovlist, effects, estVar, end,
        expand.model.frame, extractAIC, factor.scope, family, fft,
        fitted, fitted.values, fivenum, formula, frequency, ftable,
-       Gamma, gaussian, get_all_vars, glm, glm.control, glm.fit,
+       Gamma, gaussian, get_all_vars, getCall, glm, glm.control, glm.fit,
        hasTsp, hat, hatvalues, hatvalues.lm, influence,
        influence.measures, integrate, interaction.plot,
        inverse.gaussian, IQR, is.empty.model, is.mts, is.ts, lines.ts,
@@ -34,31 +40,31 @@ export(add.scope, add1, addmargins, aggregate, aggregate.data.frame,
        model.matrix.default, model.matrix.lm, model.offset,
        model.response, model.tables, model.weights, mvfft, na.action,
        na.exclude, na.fail, na.omit, na.pass, napredict, naprint,
-       naresid, nextn, nlm, nlminb, offset, optim, optimise, optimize,
-       p.adjust, p.adjust.methods, pbeta, pbinom, pcauchy, pchisq,
-       pexp, pf, pgamma, pgeom, phyper, plnorm, plogis, plot.density,
-       plot.lm, plot.mlm, plot.ts, plot.TukeyHSD, pnbinom, pnorm,
-       poisson, poly, polym, power, ppoints, ppois, predict,
-       predict.glm, predict.lm, predict.mlm, predict.poly, preplot,
-       printCoefmat, print.anova, print.density, print.family,
-       print.formula, print.ftable, print.glm, print.infl,
-       print.integrate, print.lm, print.logLik, print.terms, print.ts,
-       profile, proj, psignrank, pt, ptukey, punif, pweibull, pwilcox,
-       qbeta, qbinom, qcauchy, qchisq, qexp, qf, qgamma, qgeom,
-       qhyper, qlnorm, qlogis, qnbinom, qnorm, qpois, qqline, qqnorm,
-       qqnorm.default, qqplot, qsignrank, qt, qtukey, quantile,
-       quantile.default, quasi, quasibinomial, quasipoisson, qunif,
-       qweibull, qwilcox, r2dtable, rbeta, rbinom, rcauchy, rchisq,
-       read.ftable, reformulate, relevel, replications, reshape,
-       resid, residuals, residuals.default, residuals.glm,
-       residuals.lm, rexp, rf, rgamma, rgeom, rhyper, rlnorm, rlogis,
-       rmultinom, rnbinom, rnorm, rpois, rsignrank, rstandard,
-       rstandard.glm, rstandard.lm, rstudent, rstudent.glm,
-       rstudent.lm, rt, runif, rweibull, rwilcox, sd, se.contrast,
-       simulate, spline, splinefun, splinefunH, SSD, start, stat.anova, step,
-       summary.aov, summary.aovlist, summary.glm, summary.infl,
-       summary.lm, summary.manova, summary.mlm, symnum, termplot,
-       terms, terms.aovlist, terms.default, terms.formula,
+       naresid, nextn, nlm, nlminb, nobs, offset, optim, optimHess, optimise,
+       optimize, p.adjust, p.adjust.methods, pbeta, pbinom, pcauchy,
+       pchisq, pexp, pf, pgamma, pgeom, phyper, plnorm, plogis,
+       plot.density, plot.lm, plot.mlm, plot.ts, plot.TukeyHSD,
+       pnbinom, pnorm, poisson, poly, polym, power, ppoints, ppois,
+       predict, predict.glm, predict.lm, predict.mlm, predict.poly,
+       preplot, printCoefmat, print.anova, print.density,
+       print.family, print.formula, print.ftable, print.glm,
+       print.infl, print.integrate, print.lm, print.logLik,
+       print.terms, print.ts, profile, proj, psignrank, pt, ptukey,
+       punif, pweibull, pwilcox, qbeta, qbinom, qcauchy, qchisq, qexp,
+       qf, qgamma, qgeom, qhyper, qlnorm, qlogis, qnbinom, qnorm,
+       qpois, qqline, qqnorm, qqnorm.default, qqplot, qsignrank, qt,
+       qtukey, quantile, quantile.default, quasi, quasibinomial,
+       quasipoisson, qunif, qweibull, qwilcox, r2dtable, rbeta,
+       rbinom, rcauchy, rchisq, read.ftable, reformulate, relevel,
+       replications, reshape, resid, residuals, residuals.default,
+       residuals.glm, residuals.lm, rexp, rf, rgamma, rgeom, rhyper,
+       rlnorm, rlogis, rmultinom, rnbinom, rnorm, rpois, rsignrank,
+       rstandard, rstandard.glm, rstandard.lm, rstudent, rstudent.glm,
+       rstudent.lm, rt, runif, rweibull, rwilcox, rWishart, sd, se.contrast,
+       simulate, spline, splinefun, splinefunH, SSD, start,
+       stat.anova, step, summary.aov, summary.aovlist, summary.glm,
+       summary.infl, summary.lm, summary.manova, summary.mlm, symnum,
+       termplot, terms, terms.aovlist, terms.default, terms.formula,
        terms.terms, time, ts, tsp, "tsp<-", TukeyHSD, TukeyHSD.aov,
        uniroot, update, update.default, update.formula, var,
        variable.names, vcov, weighted.mean, weighted.residuals,
@@ -75,12 +81,6 @@ export(mauchley.test)
 export(reshapeWide, reshapeLong, print.coefmat, anovalist.lm, lm.fit.null,
        lm.wfit.null, glm.fit.null)
 
-import(graphics)
-## 'graphics' imports 'grDevices' completely; hence this is currently a noop:
-importFrom(grDevices, dev.interactive, palette, extendrange, xy.coords)
-
-importFrom(utils, str)
-
 ## register all the methods for generics elsewhere in case namespace is
 ## loaded but not currently attached.
 S3method("[", acf)
@@ -92,14 +92,18 @@ S3method(add1, default)
 S3method(add1, glm)
 S3method(add1, lm)
 S3method(add1, mlm)
+S3method("aggregate", "formula")
 S3method(AIC, default)
 S3method(AIC, logLik)
 S3method(alias, formula)
 S3method(alias, lm)
+S3method(as.data.frame, aovproj)
 S3method(as.data.frame, ftable)
 S3method(as.data.frame, logLik)
 S3method(as.table, ftable)
 S3method(as.ts, default)
+S3method(BIC, default)
+S3method(BIC, logLik)
 S3method(case.names, default)
 S3method(case.names, lm)
 S3method(cbind, ts)
@@ -142,6 +146,7 @@ S3method(extractAIC, survreg)
 S3method(family, glm)
 S3method(family, lm)
 S3method(fitted, default)
+S3method(fitted, kmeans)
 S3method(format, ftable)
 S3method(formula, character)
 S3method(formula, data.frame)
@@ -153,6 +158,7 @@ S3method(formula, terms)
 S3method(frequency, default)
 S3method(ftable, default)
 S3method(ftable, formula)
+S3method(getCall, default)
 S3method(influence, glm)
 S3method(influence, lm)
 S3method(labels, dist)
@@ -160,6 +166,7 @@ S3method(labels, lm)
 S3method(labels, terms)
 S3method(logLik, glm)
 S3method(logLik, lm)
+S3method(logLik, logLik)
 S3method(makepredictcall, default)
 S3method(makepredictcall, poly)
 S3method(mauchly.test, SSD)
@@ -182,6 +189,11 @@ S3method(naprint, exclude)
 S3method(naprint, omit)
 S3method(naresid, default)
 S3method(naresid, exclude)
+S3method(nobs, default)
+S3method(nobs, glm)
+S3method(nobs, lm)
+S3method(nobs, logLik)
+S3method(nobs, nls)
 S3method(Ops, ts)
 S3method(plot, density)
 S3method(plot, lm)
@@ -226,12 +238,14 @@ S3method(proj, aov)
 S3method(proj, aovlist)
 S3method(proj, default)
 S3method(proj, lm)
+S3method(qr, lm)
 S3method(quantile, default)
+S3method(quantile, ecdf)
+S3method(quantile, POSIXt)
 S3method(relevel, default)
 S3method(relevel, factor)
 S3method(relevel, ordered)
-S3method(reorder, factor)
-S3method(reorder, character)
+S3method(reorder, default)
 S3method(se.contrast, aov)
 S3method(se.contrast, aovlist)
 S3method(simulate, lm)
@@ -256,6 +270,8 @@ S3method(variable.names, lm)
 S3method(vcov, glm)
 #S3method(vcov, gls)
 S3method(vcov, lm)
+S3method(vcov, summary.lm)
+S3method(vcov, summary.glm)
 S3method(vcov, mlm)
 #S3method(vcov, lme)
 S3method(weights, default)
@@ -359,6 +375,7 @@ export(as.dendrogram, dendrapply, heatmap, is.leaf,
 
 S3method("[[", dendrogram)
 S3method(as.dendrogram, hclust)
+S3method(as.hclust, dendrogram)
 S3method(as.hclust, default)
 S3method(as.hclust, twins)
 S3method(as.matrix, dist)
@@ -369,6 +386,7 @@ S3method(cut, dendrogram)
 S3method(format, dist)
 S3method(identify, hclust)
 S3method(labels, dendrogram)
+S3method(merge, dendrogram)
 S3method(plot, dendrogram)
 S3method(plot, hclust)
 S3method(plot, prcomp)
@@ -527,3 +545,8 @@ S3method(summary, stepfun)
 S3method(as.dist, default)
 S3method(cophenetic, default)
 S3method(cophenetic, dendrogram)
+S3method(weighted.mean, Date)
+S3method(weighted.mean, default)
+S3method(weighted.mean, difftime)
+S3method(weighted.mean, POSIXct)
+S3method(weighted.mean, POSIXlt)
diff --git a/win32/deps/library/stats/R/stats b/win32/deps/library/stats/R/stats
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/stats/R/stats
+++ b/win32/deps/library/stats/R/stats
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/stats/R/stats.rdb b/win32/deps/library/stats/R/stats.rdb
index c1b26f8..43850f1 100644
Binary files a/win32/deps/library/stats/R/stats.rdb and b/win32/deps/library/stats/R/stats.rdb differ
diff --git a/win32/deps/library/stats/R/stats.rdx b/win32/deps/library/stats/R/stats.rdx
index 773ccf5..02f5a1c 100644
Binary files a/win32/deps/library/stats/R/stats.rdx and b/win32/deps/library/stats/R/stats.rdx differ
diff --git a/win32/deps/library/stats/demo/glm.vr.R b/win32/deps/library/stats/demo/glm.vr.R
index e0024de..37393ac 100644
--- a/win32/deps/library/stats/demo/glm.vr.R
+++ b/win32/deps/library/stats/demo/glm.vr.R
@@ -1,3 +1,5 @@
+#  Copyright (C) 1997-2009 The R Core Team
+
 #### -*- R -*-
 require(stats)
 Fr <- c(68,42,42,30, 37,52,24,43,
diff --git a/win32/deps/library/stats/demo/lm.glm.R b/win32/deps/library/stats/demo/lm.glm.R
index 36b5c73..d291e53 100644
--- a/win32/deps/library/stats/demo/lm.glm.R
+++ b/win32/deps/library/stats/demo/lm.glm.R
@@ -2,6 +2,9 @@
 ###			By Annette Dobson
 ###
 ### == with some additions ==
+
+#  Copyright (C) 1997-2008 The R Core Team
+
 require(stats); require(graphics)
 
 ## Plant Weight Data (Page 9)
@@ -9,8 +12,8 @@ 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, labels=c("Ctl","Trt"))
 weight <- c(ctl,trt)
-anova(lm(weight~group))
-summary(lm(weight~group-1))
+anova  (lm(weight~group))
+summary(lm(weight~group -1))
 
 
 ## Birth Weight Data (Page 14)
@@ -20,11 +23,13 @@ birthw <- c(2968, 2795, 3163, 2925, 2625, 2847, 3292, 3473, 2628, 3176,
 	    3421, 2975, 3317, 2729, 2935, 2754, 3210, 2817, 3126, 2539,
 	    2412, 2991, 2875, 3231)
 sex <- gl(2,12, labels=c("M","F"))
-plot(age, birthw, col=as.numeric(sex), main="Dobson's Birth Weight Data")
-lines(lowess(age[sex=='F'], birthw[sex=='F']), col=1)
-lines(lowess(age[sex=='M'], birthw[sex=='M']), col=2)
+plot(age, birthw, col=as.numeric(sex), pch=3*as.numeric(sex),
+     main="Dobson's Birth Weight Data")
+lines(lowess(age[sex=='M'], birthw[sex=='M']), col=1)
+lines(lowess(age[sex=='F'], birthw[sex=='F']), col=2)
+legend("topleft", levels(sex), col=1:2, pch=3*(1:2), lty=1, bty="n")
 
-summary(l1 <- lm(birthw ~ sex + age), correlation=TRUE)
+summary(l1 <- lm(birthw ~ sex + age),    correlation=TRUE)
 summary(l0 <- lm(birthw ~ sex + age -1), correlation=TRUE)
 anova(l1,l0)
 summary(li <- lm(birthw ~ sex + sex:age -1), correlation=TRUE)
@@ -41,19 +46,19 @@ anova(z0,zz)
 ## Poisson Regression Data (Page 42)
 x <- c(-1,-1,0,0,0,0,1,1,1)
 y <- c(2,3,6,7,8,9,10,12,15)
-summary(glm(y~x,family=poisson(link="identity")))
+summary(glm(y~x, family=poisson(link="identity")))
 
 
 ## Calorie Data (Page 45)
 calorie <- data.frame(
-		      carb = c(33,40,37,27,30,43,34,48,30,38,
-		      50,51,30,36,41,42,46,24,35,37),
-		      age  = c(33,47,49,35,46,52,62,23,32,42,
-		      31,61,63,40,50,64,56,61,48,28),
-		      wgt  = c(100, 92,135,144,140,101, 95,101, 98,105,
-		      108, 85,130,127,109,107,117,100,118,102),
-		      prot = c(14,15,18,12,15,15,14,17,15,14,
-		      17,19,19,20,15,16,18,13,18,14))
+    carb = c(33,40,37,27,30,43,34,48,30,38,
+	     50,51,30,36,41,42,46,24,35,37),
+    age	 = c(33,47,49,35,46,52,62,23,32,42,
+	     31,61,63,40,50,64,56,61,48,28),
+    wgt	 = c(100, 92,135,144,140,101, 95,101, 98,105,
+	     108, 85,130,127,109,107,117,100,118,102),
+    prot = c(14,15,18,12,15,15,14,17,15,14,
+	     17,19,19,20,15,16,18,13,18,14))
 summary(lmcal <- lm(carb~age+wgt+prot, data= calorie))
 
 
diff --git a/win32/deps/library/stats/demo/nlm.R b/win32/deps/library/stats/demo/nlm.R
index 42d9b8b..8b63e3b 100644
--- a/win32/deps/library/stats/demo/nlm.R
+++ b/win32/deps/library/stats/demo/nlm.R
@@ -1,3 +1,5 @@
+#  Copyright (C) 1997-2009 The R Core Team
+
 ### Helical Valley Function
 ### Page 362 Dennis + Schnabel
 
@@ -15,8 +17,8 @@ f <- function(x) {
 }
 
 ## explore surface {at x3 = 0}
-x <- seq(-1, 2, length=50)
-y <- seq(-1, 1, length=50)
+x <- seq(-1, 2, length.out=50)
+y <- seq(-1, 1, length.out=50)
 z <- apply(as.matrix(expand.grid(x, y)), 1, function(x) f(c(x, 0)))
 contour(x, y, matrix(log10(z), 50, 50))
 str(nlm.f <- nlm(f, c(-1,0,0), hessian = TRUE))
@@ -36,8 +38,8 @@ fx <- function(x)
     x1 <- x[,1]; x2 <- x[,2]
     100*(x2 - x1*x1)^2 + (1-x1)^2
 }
-x <- seq(-2, 2, length=100)
-y <- seq(-0.5, 1.5, length=100)
+x <- seq(-2, 2, length.out=100)
+y <- seq(-0.5, 1.5, length.out=100)
 z <- fx(expand.grid(x, y))
 op <- par(mfrow = c(2,1), mar = 0.1 + c(3,3,0,0))
 contour(x, y, matrix(log10(z), length(x)))
@@ -47,7 +49,7 @@ points(rbind(nlm.f2$estim[1:2]), col = "red", pch = 20)
 
 ## Zoom in :
 rect(0.9, 0.9, 1.1, 1.1, border = "orange", lwd = 2)
-x <- y <- seq(0.9, 1.1, length=100)
+x <- y <- seq(0.9, 1.1, length.out=100)
 z <- fx(expand.grid(x, y))
 contour(x, y, matrix(log10(z), length(x)))
 mtext("zoomed in");box(col = "orange")
diff --git a/win32/deps/library/stats/demo/smooth.R b/win32/deps/library/stats/demo/smooth.R
index 187368a..563974f 100644
--- a/win32/deps/library/stats/demo/smooth.R
+++ b/win32/deps/library/stats/demo/smooth.R
@@ -1,4 +1,5 @@
 ### This used to be in   example(smooth) before we had package-specific demos
+#  Copyright (C) 1997-2009 The R Core Team
 
 require(stats); require(graphics); require(datasets)
 op <- par(mfrow = c(1,1))
diff --git a/win32/deps/library/stats/help/AnIndex b/win32/deps/library/stats/help/AnIndex
index ff3c0c6..86bef5a 100644
--- a/win32/deps/library/stats/help/AnIndex
+++ b/win32/deps/library/stats/help/AnIndex
@@ -13,6 +13,7 @@ addmargins	addmargins
 aggregate	aggregate
 aggregate.data.frame	aggregate
 aggregate.default	aggregate
+aggregate.formula	aggregate
 aggregate.ts	aggregate
 AIC	AIC
 alias	alias
@@ -55,6 +56,7 @@ as.dist.default	dist
 as.formula	formula
 as.hclust	as.hclust
 as.hclust.default	as.hclust
+as.hclust.dendrogram	dendrogram
 as.hclust.twins	as.hclust
 as.matrix.dist	dist
 as.stepfun	stepfun
@@ -67,6 +69,7 @@ bartlett.test	bartlett.test
 bartlett.test.default	bartlett.test
 bartlett.test.formula	bartlett.test
 Beta	Beta
+BIC	AIC
 binom.test	binom.test
 Binomial	Binomial
 binomial	family
@@ -89,7 +92,7 @@ cbind.ts	ts
 ccf	acf
 chisq.test	chisq.test
 Chisquare	Chisquare
-clearNames	clearNames
+clearNames	stats-defunct
 cmdscale	cmdscale
 coef	coef
 coefficients	coef
@@ -159,6 +162,9 @@ diffinv	diffinv
 diffinv.default	diffinv
 diffinv.ts	diffinv
 dist	dist
+distribution	Distributions
+Distributions	Distributions
+distributions	Distributions
 dlnorm	Lognormal
 dlogis	Logistic
 dmultinom	Multinom
@@ -203,6 +209,7 @@ filter	filter
 fisher.test	fisher.test
 fitted	fitted.values
 fitted.default	fitted.values
+fitted.kmeans	kmeans
 fitted.values	fitted.values
 fivenum	fivenum
 fligner.test	fligner.test
@@ -228,6 +235,8 @@ Gamma	family
 GammaDist	GammaDist
 gaussian	family
 Geometric	Geometric
+getCall	update
+getCall.default	update
 getInitial	getInitial
 getInitial.default	getInitial
 getInitial.formula	getInitial
@@ -325,6 +334,7 @@ mcnemar.test	mcnemar.test
 median	median
 median.default	median
 medpolish	medpolish
+merge.dendrogram	dendrogram
 model.extract	model.extract
 model.frame	model.frame
 model.frame.aovlist	model.frame
@@ -388,12 +398,15 @@ NLSstLfAsymptote	NLSstLfAsymptote
 NLSstLfAsymptote.sortedXyData	NLSstLfAsymptote
 NLSstRtAsymptote	NLSstRtAsymptote
 NLSstRtAsymptote.sortedXyData	NLSstRtAsymptote
+nobs	nobs
+nobs.default	nobs
 Normal	Normal
 numericDeriv	numericDeriv
 offset	offset
 oneway.test	oneway.test
 Ops.ts	ts
 optim	optim
+optimHess	optim
 optimise	optimize
 optimize	optimize
 order.dendrogram	order.dendrogram
@@ -566,6 +579,7 @@ quade.test.default	quade.test
 quade.test.formula	quade.test
 quantile	quantile
 quantile.default	quantile
+quantile.ecdf	ecdf
 quasi	family
 quasibinomial	family
 quasipoisson	family
@@ -585,9 +599,8 @@ relevel.default	relevel
 relevel.factor	relevel
 relevel.ordered	relevel
 reorder	reorder.factor
-reorder.character	reorder.factor
+reorder.default	reorder.factor
 reorder.dendrogram	reorder.dendrogram
-reorder.factor	reorder.factor
 replications	replications
 reshape	reshape
 reshapeLong	stats-defunct
@@ -624,6 +637,7 @@ runif	Uniform
 runmed	runmed
 rweibull	Weibull
 rwilcox	Wilcoxon
+rWishart	rWishart
 SafePrediction	makepredictcall
 scatter.smooth	scatter.smooth
 screeplot	screeplot
@@ -735,11 +749,14 @@ vcov.glm	vcov
 vcov.gls	vcov
 vcov.lm	vcov
 vcov.lme	vcov
+vcov.summary.glm	vcov
+vcov.summary.lm	vcov
 Weibull	Weibull
 weighted.mean	weighted.mean
+weighted.mean.default	weighted.mean
 weighted.residuals	weighted.residuals
-weights	lm.summaries
-weights.default	lm.summaries
+weights	weights
+weights.default	weights
 weights.glm	glm
 wilcox.test	wilcox.test
 wilcox.test.default	wilcox.test
diff --git a/win32/deps/library/stats/help/aliases.rds b/win32/deps/library/stats/help/aliases.rds
new file mode 100644
index 0000000..0325d05
Binary files /dev/null and b/win32/deps/library/stats/help/aliases.rds differ
diff --git a/win32/deps/library/stats/help/paths.rds b/win32/deps/library/stats/help/paths.rds
new file mode 100644
index 0000000..e2f2ddc
Binary files /dev/null and b/win32/deps/library/stats/help/paths.rds differ
diff --git a/win32/deps/library/stats/help/stats.rdb b/win32/deps/library/stats/help/stats.rdb
new file mode 100644
index 0000000..a60a2d8
Binary files /dev/null and b/win32/deps/library/stats/help/stats.rdb differ
diff --git a/win32/deps/library/stats/help/stats.rdx b/win32/deps/library/stats/help/stats.rdx
new file mode 100644
index 0000000..60f3d89
Binary files /dev/null and b/win32/deps/library/stats/help/stats.rdx differ
diff --git a/win32/deps/library/stats/html/00Index.html b/win32/deps/library/stats/html/00Index.html
new file mode 100644
index 0000000..b649900
--- /dev/null
+++ b/win32/deps/library/stats/html/00Index.html
@@ -0,0 +1,1348 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: The R Stats Package</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> The R Stats Package
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;stats&rsquo; version 2.15.2</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>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p 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="#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="#X">X</a>
+<a href="#misc">misc</a>
+</p>
+
+<table width="100%">
+<tr><td width="25%"><a href="stats-package.html">stats-package</a></td>
+<td>The R Stats Package</td></tr>
+</table>
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="acf.html">acf</a></td>
+<td>Auto- and Cross- Covariance and -Correlation Function Estimation</td></tr>
+<tr><td width="25%"><a href="acf2AR.html">acf2AR</a></td>
+<td>Compute an AR Process Exactly Fitting an ACF</td></tr>
+<tr><td width="25%"><a href="factor.scope.html">add.scope</a></td>
+<td>Compute Allowed Changes in Adding to or Dropping from a Formula</td></tr>
+<tr><td width="25%"><a href="add1.html">add1</a></td>
+<td>Add or Drop All Possible Single Terms to a Model</td></tr>
+<tr><td width="25%"><a href="addmargins.html">addmargins</a></td>
+<td>Puts Arbitrary Margins on Multidimensional Tables or Arrays</td></tr>
+<tr><td width="25%"><a href="aggregate.html">aggregate</a></td>
+<td>Compute Summary Statistics of Data Subsets</td></tr>
+<tr><td width="25%"><a href="AIC.html">AIC</a></td>
+<td>Akaike's An Information Criterion</td></tr>
+<tr><td width="25%"><a href="alias.html">alias</a></td>
+<td>Find Aliases (Dependencies) in a Model</td></tr>
+<tr><td width="25%"><a href="anova.html">anova</a></td>
+<td>Anova Tables</td></tr>
+<tr><td width="25%"><a href="anova.glm.html">anova.glm</a></td>
+<td>Analysis of Deviance for Generalized Linear Model Fits</td></tr>
+<tr><td width="25%"><a href="anova.lm.html">anova.lm</a></td>
+<td>ANOVA for Linear Model Fits</td></tr>
+<tr><td width="25%"><a href="anova.mlm.html">anova.mlm</a></td>
+<td>Comparisons between Multivariate Linear Models</td></tr>
+<tr><td width="25%"><a href="ansari.test.html">ansari.test</a></td>
+<td>Ansari-Bradley Test</td></tr>
+<tr><td width="25%"><a href="aov.html">aov</a></td>
+<td>Fit an Analysis of Variance Model</td></tr>
+<tr><td width="25%"><a href="approxfun.html">approx</a></td>
+<td>Interpolation Functions</td></tr>
+<tr><td width="25%"><a href="approxfun.html">approxfun</a></td>
+<td>Interpolation Functions</td></tr>
+<tr><td width="25%"><a href="ar.html">ar</a></td>
+<td>Fit Autoregressive Models to Time Series</td></tr>
+<tr><td width="25%"><a href="ar.html">ar.burg</a></td>
+<td>Fit Autoregressive Models to Time Series</td></tr>
+<tr><td width="25%"><a href="ar.html">ar.burg.default</a></td>
+<td>Fit Autoregressive Models to Time Series</td></tr>
+<tr><td width="25%"><a href="ar.html">ar.mle</a></td>
+<td>Fit Autoregressive Models to Time Series</td></tr>
+<tr><td width="25%"><a href="ar.ols.html">ar.ols</a></td>
+<td>Fit Autoregressive Models to Time Series by OLS</td></tr>
+<tr><td width="25%"><a href="ar.html">ar.yw</a></td>
+<td>Fit Autoregressive Models to Time Series</td></tr>
+<tr><td width="25%"><a href="ar.html">ar.yw.default</a></td>
+<td>Fit Autoregressive Models to Time Series</td></tr>
+<tr><td width="25%"><a href="arima.html">arima</a></td>
+<td>ARIMA Modelling of Time Series</td></tr>
+<tr><td width="25%"><a href="arima.sim.html">arima.sim</a></td>
+<td>Simulate from an ARIMA Model</td></tr>
+<tr><td width="25%"><a href="arima0.html">arima0</a></td>
+<td>ARIMA Modelling of Time Series - Preliminary Version</td></tr>
+<tr><td width="25%"><a href="ARMAacf.html">ARMAacf</a></td>
+<td>Compute Theoretical ACF for an ARMA Process</td></tr>
+<tr><td width="25%"><a href="ARMAtoMA.html">ARMAtoMA</a></td>
+<td>Convert ARMA Process to Infinite MA Process</td></tr>
+<tr><td width="25%"><a href="dendrogram.html">as.dendrogram</a></td>
+<td>General Tree Structures</td></tr>
+<tr><td width="25%"><a href="dist.html">as.dist</a></td>
+<td>Distance Matrix Computation</td></tr>
+<tr><td width="25%"><a href="formula.html">as.formula</a></td>
+<td>Model Formulae</td></tr>
+<tr><td width="25%"><a href="as.hclust.html">as.hclust</a></td>
+<td>Convert Objects to Class hclust</td></tr>
+<tr><td width="25%"><a href="dendrogram.html">as.hclust.dendrogram</a></td>
+<td>General Tree Structures</td></tr>
+<tr><td width="25%"><a href="dist.html">as.matrix.dist</a></td>
+<td>Distance Matrix Computation</td></tr>
+<tr><td width="25%"><a href="stepfun.html">as.stepfun</a></td>
+<td>Step Function Class</td></tr>
+<tr><td width="25%"><a href="ts.html">as.ts</a></td>
+<td>Time-Series Objects</td></tr>
+<tr><td width="25%"><a href="asOneSidedFormula.html">asOneSidedFormula</a></td>
+<td>Convert to One-Sided Formula</td></tr>
+<tr><td width="25%"><a href="ave.html">ave</a></td>
+<td>Group Averages Over Level Combinations of Factors</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="kernel.html">bandwidth.kernel</a></td>
+<td>Smoothing Kernel Objects</td></tr>
+<tr><td width="25%"><a href="bartlett.test.html">bartlett.test</a></td>
+<td>Bartlett Test of Homogeneity of Variances</td></tr>
+<tr><td width="25%"><a href="Beta.html">Beta</a></td>
+<td>The Beta Distribution</td></tr>
+<tr><td width="25%"><a href="AIC.html">BIC</a></td>
+<td>Akaike's An Information Criterion</td></tr>
+<tr><td width="25%"><a href="binom.test.html">binom.test</a></td>
+<td>Exact Binomial Test</td></tr>
+<tr><td width="25%"><a href="Binomial.html">Binomial</a></td>
+<td>The Binomial Distribution</td></tr>
+<tr><td width="25%"><a href="family.html">binomial</a></td>
+<td>Family Objects for Models</td></tr>
+<tr><td width="25%"><a href="biplot.html">biplot</a></td>
+<td>Biplot of Multivariate Data</td></tr>
+<tr><td width="25%"><a href="biplot.princomp.html">biplot.princomp</a></td>
+<td>Biplot for Principal Components</td></tr>
+<tr><td width="25%"><a href="box.test.html">Box.test</a></td>
+<td>Box-Pierce and Ljung-Box Tests</td></tr>
+<tr><td width="25%"><a href="bandwidth.html">bw.bcv</a></td>
+<td>Bandwidth Selectors for Kernel Density Estimation</td></tr>
+<tr><td width="25%"><a href="bandwidth.html">bw.nrd</a></td>
+<td>Bandwidth Selectors for Kernel Density Estimation</td></tr>
+<tr><td width="25%"><a href="bandwidth.html">bw.nrd0</a></td>
+<td>Bandwidth Selectors for Kernel Density Estimation</td></tr>
+<tr><td width="25%"><a href="bandwidth.html">bw.SJ</a></td>
+<td>Bandwidth Selectors for Kernel Density Estimation</td></tr>
+<tr><td width="25%"><a href="bandwidth.html">bw.ucv</a></td>
+<td>Bandwidth Selectors for Kernel Density Estimation</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="zC.html">C</a></td>
+<td>Sets Contrasts for a Factor</td></tr>
+<tr><td width="25%"><a href="cancor.html">cancor</a></td>
+<td>Canonical Correlations</td></tr>
+<tr><td width="25%"><a href="case.names.html">case.names</a></td>
+<td>Case and Variable Names of Fitted Models</td></tr>
+<tr><td width="25%"><a href="case.names.html">case.names.lm</a></td>
+<td>Case and Variable Names of Fitted Models</td></tr>
+<tr><td width="25%"><a href="Cauchy.html">Cauchy</a></td>
+<td>The Cauchy Distribution</td></tr>
+<tr><td width="25%"><a href="ts.html">cbind.ts</a></td>
+<td>Time-Series Objects</td></tr>
+<tr><td width="25%"><a href="acf.html">ccf</a></td>
+<td>Auto- and Cross- Covariance and -Correlation Function Estimation</td></tr>
+<tr><td width="25%"><a href="chisq.test.html">chisq.test</a></td>
+<td>Pearson's Chi-squared Test for Count Data</td></tr>
+<tr><td width="25%"><a href="Chisquare.html">Chisquare</a></td>
+<td>The (non-central) Chi-Squared Distribution</td></tr>
+<tr><td width="25%"><a href="cmdscale.html">cmdscale</a></td>
+<td>Classical (Metric) Multidimensional Scaling</td></tr>
+<tr><td width="25%"><a href="coef.html">coef</a></td>
+<td>Extract Model Coefficients</td></tr>
+<tr><td width="25%"><a href="coef.html">coefficients</a></td>
+<td>Extract Model Coefficients</td></tr>
+<tr><td width="25%"><a href="complete.cases.html">complete.cases</a></td>
+<td>Find Complete Cases</td></tr>
+<tr><td width="25%"><a href="confint.html">confint</a></td>
+<td>Confidence Intervals for Model Parameters</td></tr>
+<tr><td width="25%"><a href="constrOptim.html">constrOptim</a></td>
+<td>Linearly Constrained Optimization</td></tr>
+<tr><td width="25%"><a href="contrast.html">contr.helmert</a></td>
+<td>(Possibly Sparse) Contrast Matrices</td></tr>
+<tr><td width="25%"><a href="contrast.html">contr.poly</a></td>
+<td>(Possibly Sparse) Contrast Matrices</td></tr>
+<tr><td width="25%"><a href="contrast.html">contr.SAS</a></td>
+<td>(Possibly Sparse) Contrast Matrices</td></tr>
+<tr><td width="25%"><a href="contrast.html">contr.sum</a></td>
+<td>(Possibly Sparse) Contrast Matrices</td></tr>
+<tr><td width="25%"><a href="contrast.html">contr.treatment</a></td>
+<td>(Possibly Sparse) Contrast Matrices</td></tr>
+<tr><td width="25%"><a href="contrasts.html">contrasts</a></td>
+<td>Get and Set Contrast Matrices</td></tr>
+<tr><td width="25%"><a href="convolve.html">convolve</a></td>
+<td>Convolution of Sequences via FFT</td></tr>
+<tr><td width="25%"><a href="influence.measures.html">cooks.distance</a></td>
+<td>Regression Deletion Diagnostics</td></tr>
+<tr><td width="25%"><a href="influence.measures.html">cooks.distance.lm</a></td>
+<td>Regression Deletion Diagnostics</td></tr>
+<tr><td width="25%"><a href="cophenetic.html">cophenetic</a></td>
+<td>Cophenetic Distances for a Hierarchical Clustering</td></tr>
+<tr><td width="25%"><a href="cor.html">cor</a></td>
+<td>Correlation, Variance and Covariance (Matrices)</td></tr>
+<tr><td width="25%"><a href="cor.test.html">cor.test</a></td>
+<td>Test for Association/Correlation Between Paired Samples</td></tr>
+<tr><td width="25%"><a href="cor.html">cov</a></td>
+<td>Correlation, Variance and Covariance (Matrices)</td></tr>
+<tr><td width="25%"><a href="cov.wt.html">cov.wt</a></td>
+<td>Weighted Covariance Matrices</td></tr>
+<tr><td width="25%"><a href="cor.html">cov2cor</a></td>
+<td>Correlation, Variance and Covariance (Matrices)</td></tr>
+<tr><td width="25%"><a href="influence.measures.html">covratio</a></td>
+<td>Regression Deletion Diagnostics</td></tr>
+<tr><td width="25%"><a href="cpgram.html">cpgram</a></td>
+<td>Plot Cumulative Periodogram</td></tr>
+<tr><td width="25%"><a href="dendrogram.html">cut.dendrogram</a></td>
+<td>General Tree Structures</td></tr>
+<tr><td width="25%"><a href="cutree.html">cutree</a></td>
+<td>Cut a Tree into Groups of Data</td></tr>
+<tr><td width="25%"><a href="time.html">cycle</a></td>
+<td>Sampling Times of Time Series</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="deriv.html">D</a></td>
+<td>Symbolic and Algorithmic Derivatives of Simple Expressions</td></tr>
+<tr><td width="25%"><a href="Beta.html">dbeta</a></td>
+<td>The Beta Distribution</td></tr>
+<tr><td width="25%"><a href="Binomial.html">dbinom</a></td>
+<td>The Binomial Distribution</td></tr>
+<tr><td width="25%"><a href="Cauchy.html">dcauchy</a></td>
+<td>The Cauchy Distribution</td></tr>
+<tr><td width="25%"><a href="Chisquare.html">dchisq</a></td>
+<td>The (non-central) Chi-Squared Distribution</td></tr>
+<tr><td width="25%"><a href="decompose.html">decompose</a></td>
+<td>Classical Seasonal Decomposition by Moving Averages</td></tr>
+<tr><td width="25%"><a href="delete.response.html">delete.response</a></td>
+<td>Modify Terms Objects</td></tr>
+<tr><td width="25%"><a href="time.html">deltat</a></td>
+<td>Sampling Times of Time Series</td></tr>
+<tr><td width="25%"><a href="dendrapply.html">dendrapply</a></td>
+<td>Apply a Function to All Nodes of a Dendrogram</td></tr>
+<tr><td width="25%"><a href="dendrogram.html">dendrogram</a></td>
+<td>General Tree Structures</td></tr>
+<tr><td width="25%"><a href="density.html">density</a></td>
+<td>Kernel Density Estimation</td></tr>
+<tr><td width="25%"><a href="deriv.html">deriv</a></td>
+<td>Symbolic and Algorithmic Derivatives of Simple Expressions</td></tr>
+<tr><td width="25%"><a href="deriv.html">deriv3</a></td>
+<td>Symbolic and Algorithmic Derivatives of Simple Expressions</td></tr>
+<tr><td width="25%"><a href="deviance.html">deviance</a></td>
+<td>Model Deviance</td></tr>
+<tr><td width="25%"><a href="Exponential.html">dexp</a></td>
+<td>The Exponential Distribution</td></tr>
+<tr><td width="25%"><a href="Fdist.html">df</a></td>
+<td>The F Distribution</td></tr>
+<tr><td width="25%"><a href="kernel.html">df.kernel</a></td>
+<td>Smoothing Kernel Objects</td></tr>
+<tr><td width="25%"><a href="df.residual.html">df.residual</a></td>
+<td>Residual Degrees-of-Freedom</td></tr>
+<tr><td width="25%"><a href="influence.measures.html">dfbeta</a></td>
+<td>Regression Deletion Diagnostics</td></tr>
+<tr><td width="25%"><a href="influence.measures.html">dfbetas</a></td>
+<td>Regression Deletion Diagnostics</td></tr>
+<tr><td width="25%"><a href="influence.measures.html">dffits</a></td>
+<td>Regression Deletion Diagnostics</td></tr>
+<tr><td width="25%"><a href="GammaDist.html">dgamma</a></td>
+<td>The Gamma Distribution</td></tr>
+<tr><td width="25%"><a href="Geometric.html">dgeom</a></td>
+<td>The Geometric Distribution</td></tr>
+<tr><td width="25%"><a href="Hypergeometric.html">dhyper</a></td>
+<td>The Hypergeometric Distribution</td></tr>
+<tr><td width="25%"><a href="ts-methods.html">diff.ts</a></td>
+<td>Methods for Time Series Objects</td></tr>
+<tr><td width="25%"><a href="diffinv.html">diffinv</a></td>
+<td>Discrete Integration: Inverse of Differencing</td></tr>
+<tr><td width="25%"><a href="dist.html">dist</a></td>
+<td>Distance Matrix Computation</td></tr>
+<tr><td width="25%"><a href="Distributions.html">distribution</a></td>
+<td>Distributions in the stats package</td></tr>
+<tr><td width="25%"><a href="Distributions.html">Distributions</a></td>
+<td>Distributions in the stats package</td></tr>
+<tr><td width="25%"><a href="Distributions.html">distributions</a></td>
+<td>Distributions in the stats package</td></tr>
+<tr><td width="25%"><a href="Lognormal.html">dlnorm</a></td>
+<td>The Log Normal Distribution</td></tr>
+<tr><td width="25%"><a href="Logistic.html">dlogis</a></td>
+<td>The Logistic Distribution</td></tr>
+<tr><td width="25%"><a href="Multinom.html">dmultinom</a></td>
+<td>The Multinomial Distribution</td></tr>
+<tr><td width="25%"><a href="NegBinomial.html">dnbinom</a></td>
+<td>The Negative Binomial Distribution</td></tr>
+<tr><td width="25%"><a href="Normal.html">dnorm</a></td>
+<td>The Normal Distribution</td></tr>
+<tr><td width="25%"><a href="Poisson.html">dpois</a></td>
+<td>The Poisson Distribution</td></tr>
+<tr><td width="25%"><a href="factor.scope.html">drop.scope</a></td>
+<td>Compute Allowed Changes in Adding to or Dropping from a Formula</td></tr>
+<tr><td width="25%"><a href="delete.response.html">drop.terms</a></td>
+<td>Modify Terms Objects</td></tr>
+<tr><td width="25%"><a href="add1.html">drop1</a></td>
+<td>Add or Drop All Possible Single Terms to a Model</td></tr>
+<tr><td width="25%"><a href="SignRank.html">dsignrank</a></td>
+<td>Distribution of the Wilcoxon Signed Rank Statistic</td></tr>
+<tr><td width="25%"><a href="TDist.html">dt</a></td>
+<td>The Student t Distribution</td></tr>
+<tr><td width="25%"><a href="dummy.coef.html">dummy.coef</a></td>
+<td>Extract Coefficients in Original Coding</td></tr>
+<tr><td width="25%"><a href="dummy.coef.html">dummy.coef.lm</a></td>
+<td>Extract Coefficients in Original Coding</td></tr>
+<tr><td width="25%"><a href="Uniform.html">dunif</a></td>
+<td>The Uniform Distribution</td></tr>
+<tr><td width="25%"><a href="Weibull.html">dweibull</a></td>
+<td>The Weibull Distribution</td></tr>
+<tr><td width="25%"><a href="Wilcoxon.html">dwilcox</a></td>
+<td>Distribution of the Wilcoxon Rank Sum Statistic</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="ecdf.html">ecdf</a></td>
+<td>Empirical Cumulative Distribution Function</td></tr>
+<tr><td width="25%"><a href="eff.aovlist.html">eff.aovlist</a></td>
+<td>Compute Efficiencies of Multistratum Analysis of Variance</td></tr>
+<tr><td width="25%"><a href="effects.html">effects</a></td>
+<td>Effects from Fitted Model</td></tr>
+<tr><td width="25%"><a href="embed.html">embed</a></td>
+<td>Embedding a Time Series</td></tr>
+<tr><td width="25%"><a href="start.html">end</a></td>
+<td>Encode the Terminal Times of Time Series</td></tr>
+<tr><td width="25%"><a href="aov.html">Error</a></td>
+<td>Fit an Analysis of Variance Model</td></tr>
+<tr><td width="25%"><a href="SSD.html">estVar</a></td>
+<td>SSD Matrix and Estimated Variance Matrix in Multivariate Models</td></tr>
+<tr><td width="25%"><a href="expand.model.frame.html">expand.model.frame</a></td>
+<td>Add new variables to a model frame</td></tr>
+<tr><td width="25%"><a href="Exponential.html">Exponential</a></td>
+<td>The Exponential Distribution</td></tr>
+<tr><td width="25%"><a href="extractAIC.html">extractAIC</a></td>
+<td>Extract AIC from a Fitted Model</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="factanal.html">factanal</a></td>
+<td>Factor Analysis</td></tr>
+<tr><td width="25%"><a href="factor.scope.html">factor.scope</a></td>
+<td>Compute Allowed Changes in Adding to or Dropping from a Formula</td></tr>
+<tr><td width="25%"><a href="family.html">family</a></td>
+<td>Family Objects for Models</td></tr>
+<tr><td width="25%"><a href="glm.summaries.html">family.glm</a></td>
+<td>Accessing Generalized Linear Model Fits</td></tr>
+<tr><td width="25%"><a href="lm.summaries.html">family.lm</a></td>
+<td>Accessing Linear Model Fits</td></tr>
+<tr><td width="25%"><a href="Fdist.html">FDist</a></td>
+<td>The F Distribution</td></tr>
+<tr><td width="25%"><a href="fft.html">fft</a></td>
+<td>Fast Discrete Fourier Transform</td></tr>
+<tr><td width="25%"><a href="filter.html">filter</a></td>
+<td>Linear Filtering on a Time Series</td></tr>
+<tr><td width="25%"><a href="fisher.test.html">fisher.test</a></td>
+<td>Fisher's Exact Test for Count Data</td></tr>
+<tr><td width="25%"><a href="kmeans.html">fitted.kmeans</a></td>
+<td>K-Means Clustering</td></tr>
+<tr><td width="25%"><a href="fitted.values.html">fitted.values</a></td>
+<td>Extract Model Fitted Values</td></tr>
+<tr><td width="25%"><a href="fivenum.html">fivenum</a></td>
+<td>Tukey Five-Number Summaries</td></tr>
+<tr><td width="25%"><a href="fligner.test.html">fligner.test</a></td>
+<td>Fligner-Killeen Test of Homogeneity of Variances</td></tr>
+<tr><td width="25%"><a href="dist.html">format.dist</a></td>
+<td>Distance Matrix Computation</td></tr>
+<tr><td width="25%"><a href="read.ftable.html">format.ftable</a></td>
+<td>Manipulate Flat Contingency Tables</td></tr>
+<tr><td width="25%"><a href="formula.html">formula</a></td>
+<td>Model Formulae</td></tr>
+<tr><td width="25%"><a href="lm.summaries.html">formula.lm</a></td>
+<td>Accessing Linear Model Fits</td></tr>
+<tr><td width="25%"><a href="formula.nls.html">formula.nls</a></td>
+<td>Extract Model Formula from nls Object</td></tr>
+<tr><td width="25%"><a href="time.html">frequency</a></td>
+<td>Sampling Times of Time Series</td></tr>
+<tr><td width="25%"><a href="friedman.test.html">friedman.test</a></td>
+<td>Friedman Rank Sum Test</td></tr>
+<tr><td width="25%"><a href="ftable.html">ftable</a></td>
+<td>Flat Contingency Tables</td></tr>
+<tr><td width="25%"><a href="ftable.formula.html">ftable.formula</a></td>
+<td>Formula Notation for Flat Contingency Tables</td></tr>
+</table>
+
+<h2><a name="G">-- G --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="family.html">Gamma</a></td>
+<td>Family Objects for Models</td></tr>
+<tr><td width="25%"><a href="GammaDist.html">GammaDist</a></td>
+<td>The Gamma Distribution</td></tr>
+<tr><td width="25%"><a href="family.html">gaussian</a></td>
+<td>Family Objects for Models</td></tr>
+<tr><td width="25%"><a href="Geometric.html">Geometric</a></td>
+<td>The Geometric Distribution</td></tr>
+<tr><td width="25%"><a href="update.html">getCall</a></td>
+<td>Update and Re-fit a Model Call</td></tr>
+<tr><td width="25%"><a href="getInitial.html">getInitial</a></td>
+<td>Get Initial Parameter Estimates</td></tr>
+<tr><td width="25%"><a href="model.frame.html">get_all_vars</a></td>
+<td>Extracting the Model Frame from a Formula or Fit</td></tr>
+<tr><td width="25%"><a href="glm.html">glm</a></td>
+<td>Fitting Generalized Linear Models</td></tr>
+<tr><td width="25%"><a href="glm.control.html">glm.control</a></td>
+<td>Auxiliary for Controlling GLM Fitting</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="tsp.html">hasTsp</a></td>
+<td>Tsp Attribute of Time-Series-like Objects</td></tr>
+<tr><td width="25%"><a href="influence.measures.html">hat</a></td>
+<td>Regression Deletion Diagnostics</td></tr>
+<tr><td width="25%"><a href="influence.measures.html">hatvalues</a></td>
+<td>Regression Deletion Diagnostics</td></tr>
+<tr><td width="25%"><a href="hclust.html">hclust</a></td>
+<td>Hierarchical Clustering</td></tr>
+<tr><td width="25%"><a href="heatmap.html">heatmap</a></td>
+<td>Draw a Heat Map</td></tr>
+<tr><td width="25%"><a href="HoltWinters.html">HoltWinters</a></td>
+<td>Holt-Winters Filtering</td></tr>
+<tr><td width="25%"><a href="Hypergeometric.html">Hypergeometric</a></td>
+<td>The Hypergeometric Distribution</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="identify.hclust.html">identify.hclust</a></td>
+<td>Identify Clusters in a Dendrogram</td></tr>
+<tr><td width="25%"><a href="lm.influence.html">influence</a></td>
+<td>Regression Diagnostics</td></tr>
+<tr><td width="25%"><a href="influence.measures.html">influence.measures</a></td>
+<td>Regression Deletion Diagnostics</td></tr>
+<tr><td width="25%"><a href="integrate.html">integrate</a></td>
+<td>Integration of One-Dimensional Functions</td></tr>
+<tr><td width="25%"><a href="interaction.plot.html">interaction.plot</a></td>
+<td>Two-way Interaction Plot</td></tr>
+<tr><td width="25%"><a href="family.html">inverse.gaussian</a></td>
+<td>Family Objects for Models</td></tr>
+<tr><td width="25%"><a href="IQR.html">IQR</a></td>
+<td>The Interquartile Range</td></tr>
+<tr><td width="25%"><a href="is.empty.html">is.empty.model</a></td>
+<td>Test if a Model's Formula is Empty</td></tr>
+<tr><td width="25%"><a href="dendrogram.html">is.leaf</a></td>
+<td>General Tree Structures</td></tr>
+<tr><td width="25%"><a href="ts.html">is.mts</a></td>
+<td>Time-Series Objects</td></tr>
+<tr><td width="25%"><a href="stepfun.html">is.stepfun</a></td>
+<td>Step Function Class</td></tr>
+<tr><td width="25%"><a href="ts.html">is.ts</a></td>
+<td>Time-Series Objects</td></tr>
+<tr><td width="25%"><a href="kernel.html">is.tskernel</a></td>
+<td>Smoothing Kernel Objects</td></tr>
+<tr><td width="25%"><a href="isoreg.html">isoreg</a></td>
+<td>Isotonic / Monotone Regression</td></tr>
+</table>
+
+<h2><a name="K">-- K --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="KalmanLike.html">KalmanForecast</a></td>
+<td>Kalman Filtering</td></tr>
+<tr><td width="25%"><a href="KalmanLike.html">KalmanLike</a></td>
+<td>Kalman Filtering</td></tr>
+<tr><td width="25%"><a href="KalmanLike.html">KalmanRun</a></td>
+<td>Kalman Filtering</td></tr>
+<tr><td width="25%"><a href="KalmanLike.html">KalmanSmooth</a></td>
+<td>Kalman Filtering</td></tr>
+<tr><td width="25%"><a href="kernapply.html">kernapply</a></td>
+<td>Apply Smoothing Kernel</td></tr>
+<tr><td width="25%"><a href="kernel.html">kernel</a></td>
+<td>Smoothing Kernel Objects</td></tr>
+<tr><td width="25%"><a href="kmeans.html">kmeans</a></td>
+<td>K-Means Clustering</td></tr>
+<tr><td width="25%"><a href="stepfun.html">knots</a></td>
+<td>Step Function Class</td></tr>
+<tr><td width="25%"><a href="kruskal.test.html">kruskal.test</a></td>
+<td>Kruskal-Wallis Rank Sum Test</td></tr>
+<tr><td width="25%"><a href="ks.test.html">ks.test</a></td>
+<td>Kolmogorov-Smirnov Tests</td></tr>
+<tr><td width="25%"><a href="ksmooth.html">ksmooth</a></td>
+<td>Kernel Regression Smoother</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="order.dendrogram.html">labels.dendrogram</a></td>
+<td>Ordering or Labels of the Leaves in a Dendrogram</td></tr>
+<tr><td width="25%"><a href="dist.html">labels.dist</a></td>
+<td>Distance Matrix Computation</td></tr>
+<tr><td width="25%"><a href="lm.summaries.html">labels.lm</a></td>
+<td>Accessing Linear Model Fits</td></tr>
+<tr><td width="25%"><a href="terms.html">labels.terms</a></td>
+<td>Model Terms</td></tr>
+<tr><td width="25%"><a href="lag.html">lag</a></td>
+<td>Lag a Time Series</td></tr>
+<tr><td width="25%"><a href="lag.plot.html">lag.plot</a></td>
+<td>Time Series Lag Plots</td></tr>
+<tr><td width="25%"><a href="line.html">line</a></td>
+<td>Robust Line Fitting</td></tr>
+<tr><td width="25%"><a href="plot.isoreg.html">lines.isoreg</a></td>
+<td>Plot Method for isoreg Objects</td></tr>
+<tr><td width="25%"><a href="plot.stepfun.html">lines.stepfun</a></td>
+<td>Plot Step Functions</td></tr>
+<tr><td width="25%"><a href="plot.ts.html">lines.ts</a></td>
+<td>Plotting Time-Series Objects</td></tr>
+<tr><td width="25%"><a href="lm.html">lm</a></td>
+<td>Fitting Linear Models</td></tr>
+<tr><td width="25%"><a href="lmfit.html">lm.fit</a></td>
+<td>Fitter Functions for Linear Models</td></tr>
+<tr><td width="25%"><a href="lm.influence.html">lm.influence</a></td>
+<td>Regression Diagnostics</td></tr>
+<tr><td width="25%"><a href="lmfit.html">lm.wfit</a></td>
+<td>Fitter Functions for Linear Models</td></tr>
+<tr><td width="25%"><a href="loadings.html">loadings</a></td>
+<td>Print Loadings in Factor Analysis</td></tr>
+<tr><td width="25%"><a href="loess.html">loess</a></td>
+<td>Local Polynomial Regression Fitting</td></tr>
+<tr><td width="25%"><a href="loess.control.html">loess.control</a></td>
+<td>Set Parameters for Loess</td></tr>
+<tr><td width="25%"><a href="scatter.smooth.html">loess.smooth</a></td>
+<td>Scatter Plot with Smooth Curve Fitted by Loess</td></tr>
+<tr><td width="25%"><a href="Logistic.html">Logistic</a></td>
+<td>The Logistic Distribution</td></tr>
+<tr><td width="25%"><a href="logLik.html">logLik</a></td>
+<td>Extract Log-Likelihood</td></tr>
+<tr><td width="25%"><a href="logLik.html">logLik.lm</a></td>
+<td>Extract Log-Likelihood</td></tr>
+<tr><td width="25%"><a href="loglin.html">loglin</a></td>
+<td>Fitting Log-Linear Models</td></tr>
+<tr><td width="25%"><a href="Lognormal.html">Lognormal</a></td>
+<td>The Log Normal Distribution</td></tr>
+<tr><td width="25%"><a href="lowess.html">lowess</a></td>
+<td>Scatter Plot Smoothing</td></tr>
+<tr><td width="25%"><a href="ls.diag.html">ls.diag</a></td>
+<td>Compute Diagnostics for 'lsfit' Regression Results</td></tr>
+<tr><td width="25%"><a href="ls.print.html">ls.print</a></td>
+<td>Print 'lsfit' Regression Results</td></tr>
+<tr><td width="25%"><a href="lsfit.html">lsfit</a></td>
+<td>Find the Least Squares Fit</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="mad.html">mad</a></td>
+<td>Median Absolute Deviation</td></tr>
+<tr><td width="25%"><a href="mahalanobis.html">mahalanobis</a></td>
+<td>Mahalanobis Distance</td></tr>
+<tr><td width="25%"><a href="make.link.html">make.link</a></td>
+<td>Create a Link for GLM Families</td></tr>
+<tr><td width="25%"><a href="KalmanLike.html">makeARIMA</a></td>
+<td>Kalman Filtering</td></tr>
+<tr><td width="25%"><a href="makepredictcall.html">makepredictcall</a></td>
+<td>Utility Function for Safe Prediction</td></tr>
+<tr><td width="25%"><a href="poly.html">makepredictcall.poly</a></td>
+<td>Compute Orthogonal Polynomials</td></tr>
+<tr><td width="25%"><a href="manova.html">manova</a></td>
+<td>Multivariate Analysis of Variance</td></tr>
+<tr><td width="25%"><a href="mantelhaen.test.html">mantelhaen.test</a></td>
+<td>Cochran-Mantel-Haenszel Chi-Squared Test for Count Data</td></tr>
+<tr><td width="25%"><a href="mauchly.test.html">mauchly.test</a></td>
+<td>Mauchly's Test of Sphericity</td></tr>
+<tr><td width="25%"><a href="mcnemar.test.html">mcnemar.test</a></td>
+<td>McNemar's Chi-squared Test for Count Data</td></tr>
+<tr><td width="25%"><a href="median.html">median</a></td>
+<td>Median Value</td></tr>
+<tr><td width="25%"><a href="medpolish.html">medpolish</a></td>
+<td>Median Polish of a Matrix</td></tr>
+<tr><td width="25%"><a href="dendrogram.html">merge.dendrogram</a></td>
+<td>General Tree Structures</td></tr>
+<tr><td width="25%"><a href="model.extract.html">model.extract</a></td>
+<td>Extract Components from a Model Frame</td></tr>
+<tr><td width="25%"><a href="model.frame.html">model.frame</a></td>
+<td>Extracting the Model Frame from a Formula or Fit</td></tr>
+<tr><td width="25%"><a href="model.matrix.html">model.matrix</a></td>
+<td>Construct Design Matrices</td></tr>
+<tr><td width="25%"><a href="model.extract.html">model.offset</a></td>
+<td>Extract Components from a Model Frame</td></tr>
+<tr><td width="25%"><a href="model.extract.html">model.response</a></td>
+<td>Extract Components from a Model Frame</td></tr>
+<tr><td width="25%"><a href="model.tables.html">model.tables</a></td>
+<td>Compute Tables of Results from an Aov Model Fit</td></tr>
+<tr><td width="25%"><a href="model.extract.html">model.weights</a></td>
+<td>Extract Components from a Model Frame</td></tr>
+<tr><td width="25%"><a href="monthplot.html">monthplot</a></td>
+<td>Plot a Seasonal or other Subseries from a Time Series</td></tr>
+<tr><td width="25%"><a href="mood.test.html">mood.test</a></td>
+<td>Mood Two-Sample Test of Scale</td></tr>
+<tr><td width="25%"><a href="Multinom.html">Multinomial</a></td>
+<td>The Multinomial Distribution</td></tr>
+<tr><td width="25%"><a href="fft.html">mvfft</a></td>
+<td>Fast Discrete Fourier Transform</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="na.action.html">na.action</a></td>
+<td>NA Action</td></tr>
+<tr><td width="25%"><a href="na.contiguous.html">na.contiguous</a></td>
+<td>Find Longest Contiguous Stretch of non-NAs</td></tr>
+<tr><td width="25%"><a href="na.fail.html">na.exclude</a></td>
+<td>Handle Missing Values in Objects</td></tr>
+<tr><td width="25%"><a href="na.fail.html">na.fail</a></td>
+<td>Handle Missing Values in Objects</td></tr>
+<tr><td width="25%"><a href="na.fail.html">na.omit</a></td>
+<td>Handle Missing Values in Objects</td></tr>
+<tr><td width="25%"><a href="ts-methods.html">na.omit.ts</a></td>
+<td>Methods for Time Series Objects</td></tr>
+<tr><td width="25%"><a href="na.fail.html">na.pass</a></td>
+<td>Handle Missing Values in Objects</td></tr>
+<tr><td width="25%"><a href="nafns.html">napredict</a></td>
+<td>Adjust for Missing Values</td></tr>
+<tr><td width="25%"><a href="naprint.html">naprint</a></td>
+<td>Adjust for Missing Values</td></tr>
+<tr><td width="25%"><a href="nafns.html">naresid</a></td>
+<td>Adjust for Missing Values</td></tr>
+<tr><td width="25%"><a href="NegBinomial.html">NegBinomial</a></td>
+<td>The Negative Binomial Distribution</td></tr>
+<tr><td width="25%"><a href="nextn.html">nextn</a></td>
+<td>Highly Composite Numbers</td></tr>
+<tr><td width="25%"><a href="nlm.html">nlm</a></td>
+<td>Non-Linear Minimization</td></tr>
+<tr><td width="25%"><a href="nlminb.html">nlminb</a></td>
+<td>Optimization using PORT routines</td></tr>
+<tr><td width="25%"><a href="nls.html">nls</a></td>
+<td>Nonlinear Least Squares</td></tr>
+<tr><td width="25%"><a href="nls.control.html">nls.control</a></td>
+<td>Control the Iterations in nls</td></tr>
+<tr><td width="25%"><a href="NLSstAsymptotic.html">NLSstAsymptotic</a></td>
+<td>Fit the Asymptotic Regression Model</td></tr>
+<tr><td width="25%"><a href="NLSstClosestX.html">NLSstClosestX</a></td>
+<td>Inverse Interpolation</td></tr>
+<tr><td width="25%"><a href="NLSstLfAsymptote.html">NLSstLfAsymptote</a></td>
+<td>Horizontal Asymptote on the Left Side</td></tr>
+<tr><td width="25%"><a href="NLSstRtAsymptote.html">NLSstRtAsymptote</a></td>
+<td>Horizontal Asymptote on the Right Side</td></tr>
+<tr><td width="25%"><a href="nobs.html">nobs</a></td>
+<td>Extract the Number of Observations from a Fit.</td></tr>
+<tr><td width="25%"><a href="Normal.html">Normal</a></td>
+<td>The Normal Distribution</td></tr>
+<tr><td width="25%"><a href="numericDeriv.html">numericDeriv</a></td>
+<td>Evaluate Derivatives Numerically</td></tr>
+</table>
+
+<h2><a name="O">-- O --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="offset.html">offset</a></td>
+<td>Include an Offset in a Model Formula</td></tr>
+<tr><td width="25%"><a href="oneway.test.html">oneway.test</a></td>
+<td>Test for Equal Means in a One-Way Layout</td></tr>
+<tr><td width="25%"><a href="ts.html">Ops.ts</a></td>
+<td>Time-Series Objects</td></tr>
+<tr><td width="25%"><a href="optim.html">optim</a></td>
+<td>General-purpose Optimization</td></tr>
+<tr><td width="25%"><a href="optim.html">optimHess</a></td>
+<td>General-purpose Optimization</td></tr>
+<tr><td width="25%"><a href="optimize.html">optimise</a></td>
+<td>One Dimensional Optimization</td></tr>
+<tr><td width="25%"><a href="optimize.html">optimize</a></td>
+<td>One Dimensional Optimization</td></tr>
+<tr><td width="25%"><a href="order.dendrogram.html">order.dendrogram</a></td>
+<td>Ordering or Labels of the Leaves in a Dendrogram</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="p.adjust.html">p.adjust</a></td>
+<td>Adjust P-values for Multiple Comparisons</td></tr>
+<tr><td width="25%"><a href="p.adjust.html">p.adjust.methods</a></td>
+<td>Adjust P-values for Multiple Comparisons</td></tr>
+<tr><td width="25%"><a href="acf.html">pacf</a></td>
+<td>Auto- and Cross- Covariance and -Correlation Function Estimation</td></tr>
+<tr><td width="25%"><a href="pairwise.prop.test.html">pairwise.prop.test</a></td>
+<td>Pairwise comparisons for proportions</td></tr>
+<tr><td width="25%"><a href="pairwise.t.test.html">pairwise.t.test</a></td>
+<td>Pairwise t tests</td></tr>
+<tr><td width="25%"><a href="pairwise.table.html">pairwise.table</a></td>
+<td>Tabulate p values for pairwise comparisons</td></tr>
+<tr><td width="25%"><a href="pairwise.wilcox.test.html">pairwise.wilcox.test</a></td>
+<td>Pairwise Wilcoxon Rank Sum Tests</td></tr>
+<tr><td width="25%"><a href="Beta.html">pbeta</a></td>
+<td>The Beta Distribution</td></tr>
+<tr><td width="25%"><a href="Binomial.html">pbinom</a></td>
+<td>The Binomial Distribution</td></tr>
+<tr><td width="25%"><a href="birthday.html">pbirthday</a></td>
+<td>Probability of coincidences</td></tr>
+<tr><td width="25%"><a href="Cauchy.html">pcauchy</a></td>
+<td>The Cauchy Distribution</td></tr>
+<tr><td width="25%"><a href="Chisquare.html">pchisq</a></td>
+<td>The (non-central) Chi-Squared Distribution</td></tr>
+<tr><td width="25%"><a href="Exponential.html">pexp</a></td>
+<td>The Exponential Distribution</td></tr>
+<tr><td width="25%"><a href="Fdist.html">pf</a></td>
+<td>The F Distribution</td></tr>
+<tr><td width="25%"><a href="GammaDist.html">pgamma</a></td>
+<td>The Gamma Distribution</td></tr>
+<tr><td width="25%"><a href="Geometric.html">pgeom</a></td>
+<td>The Geometric Distribution</td></tr>
+<tr><td width="25%"><a href="Hypergeometric.html">phyper</a></td>
+<td>The Hypergeometric Distribution</td></tr>
+<tr><td width="25%"><a href="hclust.html">plclust</a></td>
+<td>Hierarchical Clustering</td></tr>
+<tr><td width="25%"><a href="Lognormal.html">plnorm</a></td>
+<td>The Log Normal Distribution</td></tr>
+<tr><td width="25%"><a href="Logistic.html">plogis</a></td>
+<td>The Logistic Distribution</td></tr>
+<tr><td width="25%"><a href="plot.acf.html">plot.acf</a></td>
+<td>Plot Autocovariance and Autocorrelation Functions</td></tr>
+<tr><td width="25%"><a href="decompose.html">plot.decomposed.ts</a></td>
+<td>Classical Seasonal Decomposition by Moving Averages</td></tr>
+<tr><td width="25%"><a href="dendrogram.html">plot.dendrogram</a></td>
+<td>General Tree Structures</td></tr>
+<tr><td width="25%"><a href="plot.density.html">plot.density</a></td>
+<td>Plot Method for Kernel Density Estimation</td></tr>
+<tr><td width="25%"><a href="ecdf.html">plot.ecdf</a></td>
+<td>Empirical Cumulative Distribution Function</td></tr>
+<tr><td width="25%"><a href="hclust.html">plot.hclust</a></td>
+<td>Hierarchical Clustering</td></tr>
+<tr><td width="25%"><a href="plot.HoltWinters.html">plot.HoltWinters</a></td>
+<td>Plot function for HoltWinters objects</td></tr>
+<tr><td width="25%"><a href="plot.isoreg.html">plot.isoreg</a></td>
+<td>Plot Method for isoreg Objects</td></tr>
+<tr><td width="25%"><a href="plot.lm.html">plot.lm</a></td>
+<td>Plot Diagnostics for an lm Object</td></tr>
+<tr><td width="25%"><a href="plot.ppr.html">plot.ppr</a></td>
+<td>Plot Ridge Functions for Projection Pursuit Regression Fit</td></tr>
+<tr><td width="25%"><a href="prcomp.html">plot.prcomp</a></td>
+<td>Principal Components Analysis</td></tr>
+<tr><td width="25%"><a href="princomp.html">plot.princomp</a></td>
+<td>Principal Components Analysis</td></tr>
+<tr><td width="25%"><a href="plot.profile.nls.html">plot.profile.nls</a></td>
+<td>Plot a profile.nls Object</td></tr>
+<tr><td width="25%"><a href="plot.spec.html">plot.spec</a></td>
+<td>Plotting Spectral Densities</td></tr>
+<tr><td width="25%"><a href="plot.spec.html">plot.spec.coherency</a></td>
+<td>Plotting Spectral Densities</td></tr>
+<tr><td width="25%"><a href="plot.stepfun.html">plot.stepfun</a></td>
+<td>Plot Step Functions</td></tr>
+<tr><td width="25%"><a href="stlmethods.html">plot.stl</a></td>
+<td>Methods for STL Objects</td></tr>
+<tr><td width="25%"><a href="plot.ts.html">plot.ts</a></td>
+<td>Plotting Time-Series Objects</td></tr>
+<tr><td width="25%"><a href="kernel.html">plot.tskernel</a></td>
+<td>Smoothing Kernel Objects</td></tr>
+<tr><td width="25%"><a href="TukeyHSD.html">plot.TukeyHSD</a></td>
+<td>Compute Tukey Honest Significant Differences</td></tr>
+<tr><td width="25%"><a href="NegBinomial.html">pnbinom</a></td>
+<td>The Negative Binomial Distribution</td></tr>
+<tr><td width="25%"><a href="Normal.html">pnorm</a></td>
+<td>The Normal Distribution</td></tr>
+<tr><td width="25%"><a href="Poisson.html">Poisson</a></td>
+<td>The Poisson Distribution</td></tr>
+<tr><td width="25%"><a href="family.html">poisson</a></td>
+<td>Family Objects for Models</td></tr>
+<tr><td width="25%"><a href="poisson.test.html">poisson.test</a></td>
+<td>Exact Poisson tests</td></tr>
+<tr><td width="25%"><a href="poly.html">poly</a></td>
+<td>Compute Orthogonal Polynomials</td></tr>
+<tr><td width="25%"><a href="poly.html">polym</a></td>
+<td>Compute Orthogonal Polynomials</td></tr>
+<tr><td width="25%"><a href="power.html">power</a></td>
+<td>Create a Power Link Object</td></tr>
+<tr><td width="25%"><a href="power.anova.test.html">power.anova.test</a></td>
+<td>Power Calculations for Balanced One-Way Analysis of Variance Tests</td></tr>
+<tr><td width="25%"><a href="power.prop.test.html">power.prop.test</a></td>
+<td>Power Calculations for Two-Sample Test for Proportions</td></tr>
+<tr><td width="25%"><a href="power.t.test.html">power.t.test</a></td>
+<td>Power calculations for one and two sample t tests</td></tr>
+<tr><td width="25%"><a href="pp.test.html">PP.test</a></td>
+<td>Phillips-Perron Test for Unit Roots</td></tr>
+<tr><td width="25%"><a href="ppoints.html">ppoints</a></td>
+<td>Ordinates for Probability Plotting</td></tr>
+<tr><td width="25%"><a href="Poisson.html">ppois</a></td>
+<td>The Poisson Distribution</td></tr>
+<tr><td width="25%"><a href="ppr.html">ppr</a></td>
+<td>Projection Pursuit Regression</td></tr>
+<tr><td width="25%"><a href="prcomp.html">prcomp</a></td>
+<td>Principal Components Analysis</td></tr>
+<tr><td width="25%"><a href="predict.html">predict</a></td>
+<td>Model Predictions</td></tr>
+<tr><td width="25%"><a href="ar.html">predict.ar</a></td>
+<td>Fit Autoregressive Models to Time Series</td></tr>
+<tr><td width="25%"><a href="predict.arima.html">predict.Arima</a></td>
+<td>Forecast from ARIMA fits</td></tr>
+<tr><td width="25%"><a href="arima0.html">predict.arima0</a></td>
+<td>ARIMA Modelling of Time Series - Preliminary Version</td></tr>
+<tr><td width="25%"><a href="predict.glm.html">predict.glm</a></td>
+<td>Predict Method for GLM Fits</td></tr>
+<tr><td width="25%"><a href="predict.HoltWinters.html">predict.HoltWinters</a></td>
+<td>Prediction Function for Fitted Holt-Winters Models</td></tr>
+<tr><td width="25%"><a href="predict.lm.html">predict.lm</a></td>
+<td>Predict method for Linear Model Fits</td></tr>
+<tr><td width="25%"><a href="predict.loess.html">predict.loess</a></td>
+<td>Predict Loess Curve or Surface</td></tr>
+<tr><td width="25%"><a href="predict.nls.html">predict.nls</a></td>
+<td>Predicting from Nonlinear Least Squares Fits</td></tr>
+<tr><td width="25%"><a href="poly.html">predict.poly</a></td>
+<td>Compute Orthogonal Polynomials</td></tr>
+<tr><td width="25%"><a href="prcomp.html">predict.prcomp</a></td>
+<td>Principal Components Analysis</td></tr>
+<tr><td width="25%"><a href="princomp.html">predict.princomp</a></td>
+<td>Principal Components Analysis</td></tr>
+<tr><td width="25%"><a href="predict.smooth.spline.html">predict.smooth.spline</a></td>
+<td>Predict from Smoothing Spline Fit</td></tr>
+<tr><td width="25%"><a href="StructTS.html">predict.StructTS</a></td>
+<td>Fit Structural Time Series</td></tr>
+<tr><td width="25%"><a href="preplot.html">preplot</a></td>
+<td>Pre-computations for a Plotting Object</td></tr>
+<tr><td width="25%"><a href="princomp.html">princomp</a></td>
+<td>Principal Components Analysis</td></tr>
+<tr><td width="25%"><a href="anova.html">print.anova</a></td>
+<td>Anova Tables</td></tr>
+<tr><td width="25%"><a href="aov.html">print.aov</a></td>
+<td>Fit an Analysis of Variance Model</td></tr>
+<tr><td width="25%"><a href="ar.html">print.ar</a></td>
+<td>Fit Autoregressive Models to Time Series</td></tr>
+<tr><td width="25%"><a href="arima0.html">print.arima0</a></td>
+<td>ARIMA Modelling of Time Series - Preliminary Version</td></tr>
+<tr><td width="25%"><a href="dendrogram.html">print.dendrogram</a></td>
+<td>General Tree Structures</td></tr>
+<tr><td width="25%"><a href="density.html">print.density</a></td>
+<td>Kernel Density Estimation</td></tr>
+<tr><td width="25%"><a href="dist.html">print.dist</a></td>
+<td>Distance Matrix Computation</td></tr>
+<tr><td width="25%"><a href="ecdf.html">print.ecdf</a></td>
+<td>Empirical Cumulative Distribution Function</td></tr>
+<tr><td width="25%"><a href="family.html">print.family</a></td>
+<td>Family Objects for Models</td></tr>
+<tr><td width="25%"><a href="formula.html">print.formula</a></td>
+<td>Model Formulae</td></tr>
+<tr><td width="25%"><a href="ftable.html">print.ftable</a></td>
+<td>Flat Contingency Tables</td></tr>
+<tr><td width="25%"><a href="glm.html">print.glm</a></td>
+<td>Fitting Generalized Linear Models</td></tr>
+<tr><td width="25%"><a href="hclust.html">print.hclust</a></td>
+<td>Hierarchical Clustering</td></tr>
+<tr><td width="25%"><a href="HoltWinters.html">print.HoltWinters</a></td>
+<td>Holt-Winters Filtering</td></tr>
+<tr><td width="25%"><a href="influence.measures.html">print.infl</a></td>
+<td>Regression Deletion Diagnostics</td></tr>
+<tr><td width="25%"><a href="integrate.html">print.integrate</a></td>
+<td>Integration of One-Dimensional Functions</td></tr>
+<tr><td width="25%"><a href="kmeans.html">print.kmeans</a></td>
+<td>K-Means Clustering</td></tr>
+<tr><td width="25%"><a href="lm.html">print.lm</a></td>
+<td>Fitting Linear Models</td></tr>
+<tr><td width="25%"><a href="loadings.html">print.loadings</a></td>
+<td>Print Loadings in Factor Analysis</td></tr>
+<tr><td width="25%"><a href="logLik.html">print.logLik</a></td>
+<td>Extract Log-Likelihood</td></tr>
+<tr><td width="25%"><a href="print.power.htest.html">print.power.htest</a></td>
+<td>Print method for power calculation object</td></tr>
+<tr><td width="25%"><a href="prcomp.html">print.prcomp</a></td>
+<td>Principal Components Analysis</td></tr>
+<tr><td width="25%"><a href="princomp.html">print.princomp</a></td>
+<td>Principal Components Analysis</td></tr>
+<tr><td width="25%"><a href="stepfun.html">print.stepfun</a></td>
+<td>Step Function Class</td></tr>
+<tr><td width="25%"><a href="StructTS.html">print.StructTS</a></td>
+<td>Fit Structural Time Series</td></tr>
+<tr><td width="25%"><a href="summary.aov.html">print.summary.aov</a></td>
+<td>Summarize an Analysis of Variance Model</td></tr>
+<tr><td width="25%"><a href="summary.glm.html">print.summary.glm</a></td>
+<td>Summarizing Generalized Linear Model Fits</td></tr>
+<tr><td width="25%"><a href="summary.lm.html">print.summary.lm</a></td>
+<td>Summarizing Linear Model Fits</td></tr>
+<tr><td width="25%"><a href="summary.manova.html">print.summary.manova</a></td>
+<td>Summary Method for Multivariate Analysis of Variance</td></tr>
+<tr><td width="25%"><a href="summary.nls.html">print.summary.nls</a></td>
+<td>Summarizing Non-Linear Least-Squares Model Fits</td></tr>
+<tr><td width="25%"><a href="prcomp.html">print.summary.prcomp</a></td>
+<td>Principal Components Analysis</td></tr>
+<tr><td width="25%"><a href="summary.princomp.html">print.summary.princomp</a></td>
+<td>Summary method for Principal Components Analysis</td></tr>
+<tr><td width="25%"><a href="terms.html">print.terms</a></td>
+<td>Model Terms</td></tr>
+<tr><td width="25%"><a href="print.ts.html">print.ts</a></td>
+<td>Printing Time-Series Objects</td></tr>
+<tr><td width="25%"><a href="TukeyHSD.html">print.TukeyHSD</a></td>
+<td>Compute Tukey Honest Significant Differences</td></tr>
+<tr><td width="25%"><a href="xtabs.html">print.xtabs</a></td>
+<td>Cross Tabulation</td></tr>
+<tr><td width="25%"><a href="printCoefmat.html">printCoefmat</a></td>
+<td>Print Coefficient Matrices</td></tr>
+<tr><td width="25%"><a href="profile.html">profile</a></td>
+<td>Generic Function for Profiling Models</td></tr>
+<tr><td width="25%"><a href="profile.nls.html">profile.nls</a></td>
+<td>Method for Profiling nls Objects</td></tr>
+<tr><td width="25%"><a href="proj.html">proj</a></td>
+<td>Projections of Models</td></tr>
+<tr><td width="25%"><a href="varimax.html">promax</a></td>
+<td>Rotation Methods for Factor Analysis</td></tr>
+<tr><td width="25%"><a href="prop.test.html">prop.test</a></td>
+<td>Test of Equal or Given Proportions</td></tr>
+<tr><td width="25%"><a href="prop.trend.test.html">prop.trend.test</a></td>
+<td>Test for trend in proportions</td></tr>
+<tr><td width="25%"><a href="SignRank.html">psignrank</a></td>
+<td>Distribution of the Wilcoxon Signed Rank Statistic</td></tr>
+<tr><td width="25%"><a href="TDist.html">pt</a></td>
+<td>The Student t Distribution</td></tr>
+<tr><td width="25%"><a href="Tukey.html">ptukey</a></td>
+<td>The Studentized Range Distribution</td></tr>
+<tr><td width="25%"><a href="Uniform.html">punif</a></td>
+<td>The Uniform Distribution</td></tr>
+<tr><td width="25%"><a href="Weibull.html">pweibull</a></td>
+<td>The Weibull Distribution</td></tr>
+<tr><td width="25%"><a href="Wilcoxon.html">pwilcox</a></td>
+<td>Distribution of the Wilcoxon Rank Sum Statistic</td></tr>
+</table>
+
+<h2><a name="Q">-- Q --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Beta.html">qbeta</a></td>
+<td>The Beta Distribution</td></tr>
+<tr><td width="25%"><a href="Binomial.html">qbinom</a></td>
+<td>The Binomial Distribution</td></tr>
+<tr><td width="25%"><a href="birthday.html">qbirthday</a></td>
+<td>Probability of coincidences</td></tr>
+<tr><td width="25%"><a href="Cauchy.html">qcauchy</a></td>
+<td>The Cauchy Distribution</td></tr>
+<tr><td width="25%"><a href="Chisquare.html">qchisq</a></td>
+<td>The (non-central) Chi-Squared Distribution</td></tr>
+<tr><td width="25%"><a href="Exponential.html">qexp</a></td>
+<td>The Exponential Distribution</td></tr>
+<tr><td width="25%"><a href="Fdist.html">qf</a></td>
+<td>The F Distribution</td></tr>
+<tr><td width="25%"><a href="GammaDist.html">qgamma</a></td>
+<td>The Gamma Distribution</td></tr>
+<tr><td width="25%"><a href="Geometric.html">qgeom</a></td>
+<td>The Geometric Distribution</td></tr>
+<tr><td width="25%"><a href="Hypergeometric.html">qhyper</a></td>
+<td>The Hypergeometric Distribution</td></tr>
+<tr><td width="25%"><a href="Lognormal.html">qlnorm</a></td>
+<td>The Log Normal Distribution</td></tr>
+<tr><td width="25%"><a href="Logistic.html">qlogis</a></td>
+<td>The Logistic Distribution</td></tr>
+<tr><td width="25%"><a href="NegBinomial.html">qnbinom</a></td>
+<td>The Negative Binomial Distribution</td></tr>
+<tr><td width="25%"><a href="Normal.html">qnorm</a></td>
+<td>The Normal Distribution</td></tr>
+<tr><td width="25%"><a href="Poisson.html">qpois</a></td>
+<td>The Poisson Distribution</td></tr>
+<tr><td width="25%"><a href="qqnorm.html">qqline</a></td>
+<td>Quantile-Quantile Plots</td></tr>
+<tr><td width="25%"><a href="qqnorm.html">qqnorm</a></td>
+<td>Quantile-Quantile Plots</td></tr>
+<tr><td width="25%"><a href="qqnorm.html">qqplot</a></td>
+<td>Quantile-Quantile Plots</td></tr>
+<tr><td width="25%"><a href="SignRank.html">qsignrank</a></td>
+<td>Distribution of the Wilcoxon Signed Rank Statistic</td></tr>
+<tr><td width="25%"><a href="TDist.html">qt</a></td>
+<td>The Student t Distribution</td></tr>
+<tr><td width="25%"><a href="Tukey.html">qtukey</a></td>
+<td>The Studentized Range Distribution</td></tr>
+<tr><td width="25%"><a href="quade.test.html">quade.test</a></td>
+<td>Quade Test</td></tr>
+<tr><td width="25%"><a href="quantile.html">quantile</a></td>
+<td>Sample Quantiles</td></tr>
+<tr><td width="25%"><a href="ecdf.html">quantile.ecdf</a></td>
+<td>Empirical Cumulative Distribution Function</td></tr>
+<tr><td width="25%"><a href="family.html">quasi</a></td>
+<td>Family Objects for Models</td></tr>
+<tr><td width="25%"><a href="family.html">quasibinomial</a></td>
+<td>Family Objects for Models</td></tr>
+<tr><td width="25%"><a href="family.html">quasipoisson</a></td>
+<td>Family Objects for Models</td></tr>
+<tr><td width="25%"><a href="Uniform.html">qunif</a></td>
+<td>The Uniform Distribution</td></tr>
+<tr><td width="25%"><a href="Weibull.html">qweibull</a></td>
+<td>The Weibull Distribution</td></tr>
+<tr><td width="25%"><a href="Wilcoxon.html">qwilcox</a></td>
+<td>Distribution of the Wilcoxon Rank Sum Statistic</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="r2dtable.html">r2dtable</a></td>
+<td>Random 2-way Tables with Given Marginals</td></tr>
+<tr><td width="25%"><a href="Beta.html">rbeta</a></td>
+<td>The Beta Distribution</td></tr>
+<tr><td width="25%"><a href="Binomial.html">rbinom</a></td>
+<td>The Binomial Distribution</td></tr>
+<tr><td width="25%"><a href="Cauchy.html">rcauchy</a></td>
+<td>The Cauchy Distribution</td></tr>
+<tr><td width="25%"><a href="Chisquare.html">rchisq</a></td>
+<td>The (non-central) Chi-Squared Distribution</td></tr>
+<tr><td width="25%"><a href="read.ftable.html">read.ftable</a></td>
+<td>Manipulate Flat Contingency Tables</td></tr>
+<tr><td width="25%"><a href="rect.hclust.html">rect.hclust</a></td>
+<td>Draw Rectangles Around Hierarchical Clusters</td></tr>
+<tr><td width="25%"><a href="delete.response.html">reformulate</a></td>
+<td>Modify Terms Objects</td></tr>
+<tr><td width="25%"><a href="relevel.html">relevel</a></td>
+<td>Reorder Levels of Factor</td></tr>
+<tr><td width="25%"><a href="reorder.factor.html">reorder</a></td>
+<td>Reorder Levels of a Factor</td></tr>
+<tr><td width="25%"><a href="reorder.dendrogram.html">reorder.dendrogram</a></td>
+<td>Reorder a Dendrogram</td></tr>
+<tr><td width="25%"><a href="replications.html">replications</a></td>
+<td>Number of Replications of Terms</td></tr>
+<tr><td width="25%"><a href="reshape.html">reshape</a></td>
+<td>Reshape Grouped Data</td></tr>
+<tr><td width="25%"><a href="residuals.html">resid</a></td>
+<td>Extract Model Residuals</td></tr>
+<tr><td width="25%"><a href="residuals.html">residuals</a></td>
+<td>Extract Model Residuals</td></tr>
+<tr><td width="25%"><a href="residuals.html">residuals.default</a></td>
+<td>Extract Model Residuals</td></tr>
+<tr><td width="25%"><a href="glm.summaries.html">residuals.glm</a></td>
+<td>Accessing Generalized Linear Model Fits</td></tr>
+<tr><td width="25%"><a href="HoltWinters.html">residuals.HoltWinters</a></td>
+<td>Holt-Winters Filtering</td></tr>
+<tr><td width="25%"><a href="lm.summaries.html">residuals.lm</a></td>
+<td>Accessing Linear Model Fits</td></tr>
+<tr><td width="25%"><a href="line.html">residuals.tukeyline</a></td>
+<td>Robust Line Fitting</td></tr>
+<tr><td width="25%"><a href="dendrogram.html">rev.dendrogram</a></td>
+<td>General Tree Structures</td></tr>
+<tr><td width="25%"><a href="Exponential.html">rexp</a></td>
+<td>The Exponential Distribution</td></tr>
+<tr><td width="25%"><a href="Fdist.html">rf</a></td>
+<td>The F Distribution</td></tr>
+<tr><td width="25%"><a href="GammaDist.html">rgamma</a></td>
+<td>The Gamma Distribution</td></tr>
+<tr><td width="25%"><a href="Geometric.html">rgeom</a></td>
+<td>The Geometric Distribution</td></tr>
+<tr><td width="25%"><a href="Hypergeometric.html">rhyper</a></td>
+<td>The Hypergeometric Distribution</td></tr>
+<tr><td width="25%"><a href="Lognormal.html">rlnorm</a></td>
+<td>The Log Normal Distribution</td></tr>
+<tr><td width="25%"><a href="Logistic.html">rlogis</a></td>
+<td>The Logistic Distribution</td></tr>
+<tr><td width="25%"><a href="Multinom.html">rmultinom</a></td>
+<td>The Multinomial Distribution</td></tr>
+<tr><td width="25%"><a href="NegBinomial.html">rnbinom</a></td>
+<td>The Negative Binomial Distribution</td></tr>
+<tr><td width="25%"><a href="Normal.html">rnorm</a></td>
+<td>The Normal Distribution</td></tr>
+<tr><td width="25%"><a href="Poisson.html">rpois</a></td>
+<td>The Poisson Distribution</td></tr>
+<tr><td width="25%"><a href="SignRank.html">rsignrank</a></td>
+<td>Distribution of the Wilcoxon Signed Rank Statistic</td></tr>
+<tr><td width="25%"><a href="influence.measures.html">rstandard</a></td>
+<td>Regression Deletion Diagnostics</td></tr>
+<tr><td width="25%"><a href="influence.measures.html">rstudent</a></td>
+<td>Regression Deletion Diagnostics</td></tr>
+<tr><td width="25%"><a href="TDist.html">rt</a></td>
+<td>The Student t Distribution</td></tr>
+<tr><td width="25%"><a href="Uniform.html">runif</a></td>
+<td>The Uniform Distribution</td></tr>
+<tr><td width="25%"><a href="runmed.html">runmed</a></td>
+<td>Running Medians - Robust Scatter Plot Smoothing</td></tr>
+<tr><td width="25%"><a href="Weibull.html">rweibull</a></td>
+<td>The Weibull Distribution</td></tr>
+<tr><td width="25%"><a href="Wilcoxon.html">rwilcox</a></td>
+<td>Distribution of the Wilcoxon Rank Sum Statistic</td></tr>
+<tr><td width="25%"><a href="rWishart.html">rWishart</a></td>
+<td>Random Wishart Distributed Matrices</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="makepredictcall.html">SafePrediction</a></td>
+<td>Utility Function for Safe Prediction</td></tr>
+<tr><td width="25%"><a href="scatter.smooth.html">scatter.smooth</a></td>
+<td>Scatter Plot with Smooth Curve Fitted by Loess</td></tr>
+<tr><td width="25%"><a href="screeplot.html">screeplot</a></td>
+<td>Screeplots</td></tr>
+<tr><td width="25%"><a href="sd.html">sd</a></td>
+<td>Standard Deviation</td></tr>
+<tr><td width="25%"><a href="se.contrast.html">se.contrast</a></td>
+<td>Standard Errors for Contrasts in Model Terms</td></tr>
+<tr><td width="25%"><a href="se.contrast.html">se.contrast.aov</a></td>
+<td>Standard Errors for Contrasts in Model Terms</td></tr>
+<tr><td width="25%"><a href="selfStart.html">selfStart</a></td>
+<td>Construct Self-starting Nonlinear Models</td></tr>
+<tr><td width="25%"><a href="setNames.html">setNames</a></td>
+<td>Set the Names in an Object</td></tr>
+<tr><td width="25%"><a href="shapiro.test.html">shapiro.test</a></td>
+<td>Shapiro-Wilk Normality Test</td></tr>
+<tr><td width="25%"><a href="SignRank.html">SignRank</a></td>
+<td>Distribution of the Wilcoxon Signed Rank Statistic</td></tr>
+<tr><td width="25%"><a href="simulate.html">simulate</a></td>
+<td>Simulate Responses</td></tr>
+<tr><td width="25%"><a href="smooth.html">smooth</a></td>
+<td>Tukey's (Running Median) Smoothing</td></tr>
+<tr><td width="25%"><a href="smooth.spline.html">smooth.spline</a></td>
+<td>Fit a Smoothing Spline</td></tr>
+<tr><td width="25%"><a href="smoothEnds.html">smoothEnds</a></td>
+<td>End Points Smoothing (for Running Medians)</td></tr>
+<tr><td width="25%"><a href="sortedXyData.html">sortedXyData</a></td>
+<td>Create a 'sortedXyData' Object</td></tr>
+<tr><td width="25%"><a href="spectrum.html">spec</a></td>
+<td>Spectral Density Estimation</td></tr>
+<tr><td width="25%"><a href="spec.ar.html">spec.ar</a></td>
+<td>Estimate Spectral Density of a Time Series from AR Fit</td></tr>
+<tr><td width="25%"><a href="spec.pgram.html">spec.pgram</a></td>
+<td>Estimate Spectral Density of a Time Series by a Smoothed Periodogram</td></tr>
+<tr><td width="25%"><a href="spec.taper.html">spec.taper</a></td>
+<td>Taper a Time Series by a Cosine Bell</td></tr>
+<tr><td width="25%"><a href="spectrum.html">spectrum</a></td>
+<td>Spectral Density Estimation</td></tr>
+<tr><td width="25%"><a href="splinefun.html">spline</a></td>
+<td>Interpolating Splines</td></tr>
+<tr><td width="25%"><a href="splinefun.html">splinefun</a></td>
+<td>Interpolating Splines</td></tr>
+<tr><td width="25%"><a href="splinefun.html">splinefunH</a></td>
+<td>Interpolating Splines</td></tr>
+<tr><td width="25%"><a href="SSasymp.html">SSasymp</a></td>
+<td>Self-Starting Nls Asymptotic Regression Model</td></tr>
+<tr><td width="25%"><a href="SSasympOff.html">SSasympOff</a></td>
+<td>Self-Starting Nls Asymptotic Regression Model with an Offset</td></tr>
+<tr><td width="25%"><a href="SSasympOrig.html">SSasympOrig</a></td>
+<td>Self-Starting Nls Asymptotic Regression Model through the Origin</td></tr>
+<tr><td width="25%"><a href="SSbiexp.html">SSbiexp</a></td>
+<td>Self-Starting Nls Biexponential model</td></tr>
+<tr><td width="25%"><a href="SSD.html">SSD</a></td>
+<td>SSD Matrix and Estimated Variance Matrix in Multivariate Models</td></tr>
+<tr><td width="25%"><a href="SSfol.html">SSfol</a></td>
+<td>Self-Starting Nls First-order Compartment Model</td></tr>
+<tr><td width="25%"><a href="SSfpl.html">SSfpl</a></td>
+<td>Self-Starting Nls Four-Parameter Logistic Model</td></tr>
+<tr><td width="25%"><a href="SSgompertz.html">SSgompertz</a></td>
+<td>Self-Starting Nls Gompertz Growth Model</td></tr>
+<tr><td width="25%"><a href="SSlogis.html">SSlogis</a></td>
+<td>Self-Starting Nls Logistic Model</td></tr>
+<tr><td width="25%"><a href="SSmicmen.html">SSmicmen</a></td>
+<td>Self-Starting Nls Michaelis-Menten Model</td></tr>
+<tr><td width="25%"><a href="SSweibull.html">SSweibull</a></td>
+<td>Self-Starting Nls Weibull Growth Curve Model</td></tr>
+<tr><td width="25%"><a href="start.html">start</a></td>
+<td>Encode the Terminal Times of Time Series</td></tr>
+<tr><td width="25%"><a href="stat.anova.html">stat.anova</a></td>
+<td>GLM Anova Statistics</td></tr>
+<tr><td width="25%"><a href="stats-package.html">stats</a></td>
+<td>The R Stats Package</td></tr>
+<tr><td width="25%"><a href="stats-deprecated.html">stats-deprecated</a></td>
+<td>Deprecated Functions in Package 'stats'</td></tr>
+<tr><td width="25%"><a href="step.html">step</a></td>
+<td>Choose a model by AIC in a Stepwise Algorithm</td></tr>
+<tr><td width="25%"><a href="stepfun.html">stepfun</a></td>
+<td>Step Function Class</td></tr>
+<tr><td width="25%"><a href="stl.html">stl</a></td>
+<td>Seasonal Decomposition of Time Series by Loess</td></tr>
+<tr><td width="25%"><a href="dendrogram.html">str.dendrogram</a></td>
+<td>General Tree Structures</td></tr>
+<tr><td width="25%"><a href="logLik.html">str.logLik</a></td>
+<td>Extract Log-Likelihood</td></tr>
+<tr><td width="25%"><a href="StructTS.html">StructTS</a></td>
+<td>Fit Structural Time Series</td></tr>
+<tr><td width="25%"><a href="summary.aov.html">summary.aov</a></td>
+<td>Summarize an Analysis of Variance Model</td></tr>
+<tr><td width="25%"><a href="ecdf.html">summary.ecdf</a></td>
+<td>Empirical Cumulative Distribution Function</td></tr>
+<tr><td width="25%"><a href="summary.glm.html">summary.glm</a></td>
+<td>Summarizing Generalized Linear Model Fits</td></tr>
+<tr><td width="25%"><a href="influence.measures.html">summary.infl</a></td>
+<td>Regression Deletion Diagnostics</td></tr>
+<tr><td width="25%"><a href="summary.lm.html">summary.lm</a></td>
+<td>Summarizing Linear Model Fits</td></tr>
+<tr><td width="25%"><a href="summary.manova.html">summary.manova</a></td>
+<td>Summary Method for Multivariate Analysis of Variance</td></tr>
+<tr><td width="25%"><a href="summary.nls.html">summary.nls</a></td>
+<td>Summarizing Non-Linear Least-Squares Model Fits</td></tr>
+<tr><td width="25%"><a href="prcomp.html">summary.prcomp</a></td>
+<td>Principal Components Analysis</td></tr>
+<tr><td width="25%"><a href="summary.princomp.html">summary.princomp</a></td>
+<td>Summary method for Principal Components Analysis</td></tr>
+<tr><td width="25%"><a href="stepfun.html">summary.stepfun</a></td>
+<td>Step Function Class</td></tr>
+<tr><td width="25%"><a href="supsmu.html">supsmu</a></td>
+<td>Friedman's SuperSmoother</td></tr>
+<tr><td width="25%"><a href="symnum.html">symnum</a></td>
+<td>Symbolic Number Coding</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="t.test.html">t.test</a></td>
+<td>Student's t-Test</td></tr>
+<tr><td width="25%"><a href="ts.html">t.ts</a></td>
+<td>Time-Series Objects</td></tr>
+<tr><td width="25%"><a href="TDist.html">TDist</a></td>
+<td>The Student t Distribution</td></tr>
+<tr><td width="25%"><a href="termplot.html">termplot</a></td>
+<td>Plot Regression Terms</td></tr>
+<tr><td width="25%"><a href="terms.html">terms</a></td>
+<td>Model Terms</td></tr>
+<tr><td width="25%"><a href="terms.formula.html">terms.formula</a></td>
+<td>Construct a terms Object from a Formula</td></tr>
+<tr><td width="25%"><a href="terms.object.html">terms.object</a></td>
+<td>Description of Terms Objects</td></tr>
+<tr><td width="25%"><a href="time.html">time</a></td>
+<td>Sampling Times of Time Series</td></tr>
+<tr><td width="25%"><a href="time.html">time.default</a></td>
+<td>Sampling Times of Time Series</td></tr>
+<tr><td width="25%"><a href="toeplitz.html">toeplitz</a></td>
+<td>Form Symmetric Toeplitz Matrix</td></tr>
+<tr><td width="25%"><a href="ts.html">ts</a></td>
+<td>Time-Series Objects</td></tr>
+<tr><td width="25%"><a href="ts.union.html">ts.intersect</a></td>
+<td>Bind Two or More Time Series</td></tr>
+<tr><td width="25%"><a href="ts.plot.html">ts.plot</a></td>
+<td>Plot Multiple Time Series</td></tr>
+<tr><td width="25%"><a href="ts.union.html">ts.union</a></td>
+<td>Bind Two or More Time Series</td></tr>
+<tr><td width="25%"><a href="tsdiag.html">tsdiag</a></td>
+<td>Diagnostic Plots for Time-Series Fits</td></tr>
+<tr><td width="25%"><a href="tsp.html">tsp</a></td>
+<td>Tsp Attribute of Time-Series-like Objects</td></tr>
+<tr><td width="25%"><a href="tsSmooth.html">tsSmooth</a></td>
+<td>Use Fixed-Interval Smoothing on Time Series</td></tr>
+<tr><td width="25%"><a href="Tukey.html">Tukey</a></td>
+<td>The Studentized Range Distribution</td></tr>
+<tr><td width="25%"><a href="TukeyHSD.html">TukeyHSD</a></td>
+<td>Compute Tukey Honest Significant Differences</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Uniform.html">Uniform</a></td>
+<td>The Uniform Distribution</td></tr>
+<tr><td width="25%"><a href="uniroot.html">uniroot</a></td>
+<td>One Dimensional Root (Zero) Finding</td></tr>
+<tr><td width="25%"><a href="update.html">update</a></td>
+<td>Update and Re-fit a Model Call</td></tr>
+<tr><td width="25%"><a href="update.formula.html">update.formula</a></td>
+<td>Model Updating</td></tr>
+</table>
+
+<h2><a name="V">-- V --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="cor.html">var</a></td>
+<td>Correlation, Variance and Covariance (Matrices)</td></tr>
+<tr><td width="25%"><a href="var.test.html">var.test</a></td>
+<td>F Test to Compare Two Variances</td></tr>
+<tr><td width="25%"><a href="case.names.html">variable.names</a></td>
+<td>Case and Variable Names of Fitted Models</td></tr>
+<tr><td width="25%"><a href="case.names.html">variable.names.lm</a></td>
+<td>Case and Variable Names of Fitted Models</td></tr>
+<tr><td width="25%"><a href="varimax.html">varimax</a></td>
+<td>Rotation Methods for Factor Analysis</td></tr>
+<tr><td width="25%"><a href="vcov.html">vcov</a></td>
+<td>Calculate Variance-Covariance Matrix for a Fitted Model Object</td></tr>
+<tr><td width="25%"><a href="vcov.html">vcov.lme</a></td>
+<td>Calculate Variance-Covariance Matrix for a Fitted Model Object</td></tr>
+<tr><td width="25%"><a href="vcov.html">vcov.summary.lm</a></td>
+<td>Calculate Variance-Covariance Matrix for a Fitted Model Object</td></tr>
+</table>
+
+<h2><a name="W">-- W --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Weibull.html">Weibull</a></td>
+<td>The Weibull Distribution</td></tr>
+<tr><td width="25%"><a href="weighted.mean.html">weighted.mean</a></td>
+<td>Weighted Arithmetic Mean</td></tr>
+<tr><td width="25%"><a href="weighted.mean.html">weighted.mean.default</a></td>
+<td>Weighted Arithmetic Mean</td></tr>
+<tr><td width="25%"><a href="weighted.residuals.html">weighted.residuals</a></td>
+<td>Compute Weighted Residuals</td></tr>
+<tr><td width="25%"><a href="weights.html">weights</a></td>
+<td>Extract Model Weights</td></tr>
+<tr><td width="25%"><a href="glm.html">weights.glm</a></td>
+<td>Fitting Generalized Linear Models</td></tr>
+<tr><td width="25%"><a href="wilcox.test.html">wilcox.test</a></td>
+<td>Wilcoxon Rank Sum and Signed Rank Tests</td></tr>
+<tr><td width="25%"><a href="Wilcoxon.html">Wilcoxon</a></td>
+<td>Distribution of the Wilcoxon Rank Sum Statistic</td></tr>
+<tr><td width="25%"><a href="window.html">window</a></td>
+<td>Time Windows</td></tr>
+<tr><td width="25%"><a href="read.ftable.html">write.ftable</a></td>
+<td>Manipulate Flat Contingency Tables</td></tr>
+</table>
+
+<h2><a name="X">-- X --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="xtabs.html">xtabs</a></td>
+<td>Cross Tabulation</td></tr>
+</table>
+
+<h2><a name="misc">-- misc --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="checkMFClasses.html">.checkMFClasses</a></td>
+<td>Functions to Check the Type of Variables passed to Model Frames</td></tr>
+<tr><td width="25%"><a href="checkMFClasses.html">.getXlevels</a></td>
+<td>Functions to Check the Type of Variables passed to Model Frames</td></tr>
+<tr><td width="25%"><a href="checkMFClasses.html">.MFclass</a></td>
+<td>Functions to Check the Type of Variables passed to Model Frames</td></tr>
+<tr><td width="25%"><a href="acf.html">[.acf</a></td>
+<td>Auto- and Cross- Covariance and -Correlation Function Estimation</td></tr>
+<tr><td width="25%"><a href="formula.html">[.formula</a></td>
+<td>Model Formulae</td></tr>
+<tr><td width="25%"><a href="delete.response.html">[.terms</a></td>
+<td>Modify Terms Objects</td></tr>
+<tr><td width="25%"><a href="ts.html">[.ts</a></td>
+<td>Time-Series Objects</td></tr>
+<tr><td width="25%"><a href="dendrogram.html">[[.dendrogram</a></td>
+<td>General Tree Structures</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/stats/html/R.css b/win32/deps/library/stats/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/stats/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/stats/libs/i386/stats.dll b/win32/deps/library/stats/libs/i386/stats.dll
new file mode 100644
index 0000000..1be3aff
Binary files /dev/null and b/win32/deps/library/stats/libs/i386/stats.dll differ
diff --git a/win32/deps/library/stats/po/da/LC_MESSAGES/R-stats.mo b/win32/deps/library/stats/po/da/LC_MESSAGES/R-stats.mo
new file mode 100644
index 0000000..dd0b6d8
Binary files /dev/null and b/win32/deps/library/stats/po/da/LC_MESSAGES/R-stats.mo differ
diff --git a/win32/deps/library/stats/po/da/LC_MESSAGES/stats.mo b/win32/deps/library/stats/po/da/LC_MESSAGES/stats.mo
new file mode 100644
index 0000000..f99e20a
Binary files /dev/null and b/win32/deps/library/stats/po/da/LC_MESSAGES/stats.mo differ
diff --git a/win32/deps/library/stats/po/de/LC_MESSAGES/R-stats.mo b/win32/deps/library/stats/po/de/LC_MESSAGES/R-stats.mo
new file mode 100644
index 0000000..4fda4b6
Binary files /dev/null and b/win32/deps/library/stats/po/de/LC_MESSAGES/R-stats.mo differ
diff --git a/win32/deps/library/stats/po/de/LC_MESSAGES/stats.mo b/win32/deps/library/stats/po/de/LC_MESSAGES/stats.mo
new file mode 100644
index 0000000..4e8685a
Binary files /dev/null and b/win32/deps/library/stats/po/de/LC_MESSAGES/stats.mo differ
diff --git a/win32/deps/library/stats/po/en quot/LC_MESSAGES/R-stats.mo b/win32/deps/library/stats/po/en quot/LC_MESSAGES/R-stats.mo
new file mode 100644
index 0000000..144bb4b
Binary files /dev/null and b/win32/deps/library/stats/po/en quot/LC_MESSAGES/R-stats.mo differ
diff --git a/win32/deps/library/stats/po/en quot/LC_MESSAGES/stats.mo b/win32/deps/library/stats/po/en quot/LC_MESSAGES/stats.mo
new file mode 100644
index 0000000..d50b682
Binary files /dev/null and b/win32/deps/library/stats/po/en quot/LC_MESSAGES/stats.mo differ
diff --git a/win32/deps/library/stats/po/fr/LC_MESSAGES/R-stats.mo b/win32/deps/library/stats/po/fr/LC_MESSAGES/R-stats.mo
new file mode 100644
index 0000000..b837791
Binary files /dev/null and b/win32/deps/library/stats/po/fr/LC_MESSAGES/R-stats.mo differ
diff --git a/win32/deps/library/stats/po/fr/LC_MESSAGES/stats.mo b/win32/deps/library/stats/po/fr/LC_MESSAGES/stats.mo
new file mode 100644
index 0000000..d8161cd
Binary files /dev/null and b/win32/deps/library/stats/po/fr/LC_MESSAGES/stats.mo differ
diff --git a/win32/deps/library/stats/po/it/LC_MESSAGES/R-stats.mo b/win32/deps/library/stats/po/it/LC_MESSAGES/R-stats.mo
new file mode 100644
index 0000000..1300a15
Binary files /dev/null and b/win32/deps/library/stats/po/it/LC_MESSAGES/R-stats.mo differ
diff --git a/win32/deps/library/stats/po/it/LC_MESSAGES/stats.mo b/win32/deps/library/stats/po/it/LC_MESSAGES/stats.mo
new file mode 100644
index 0000000..2ee773b
Binary files /dev/null and b/win32/deps/library/stats/po/it/LC_MESSAGES/stats.mo differ
diff --git a/win32/deps/library/stats/po/ja/LC_MESSAGES/R-stats.mo b/win32/deps/library/stats/po/ja/LC_MESSAGES/R-stats.mo
new file mode 100644
index 0000000..4ce8ce2
Binary files /dev/null and b/win32/deps/library/stats/po/ja/LC_MESSAGES/R-stats.mo differ
diff --git a/win32/deps/library/stats/po/ja/LC_MESSAGES/stats.mo b/win32/deps/library/stats/po/ja/LC_MESSAGES/stats.mo
new file mode 100644
index 0000000..afe2601
Binary files /dev/null and b/win32/deps/library/stats/po/ja/LC_MESSAGES/stats.mo differ
diff --git a/win32/deps/library/stats/po/ko/LC_MESSAGES/R-stats.mo b/win32/deps/library/stats/po/ko/LC_MESSAGES/R-stats.mo
new file mode 100644
index 0000000..3b1308d
Binary files /dev/null and b/win32/deps/library/stats/po/ko/LC_MESSAGES/R-stats.mo differ
diff --git a/win32/deps/library/stats/po/ko/LC_MESSAGES/stats.mo b/win32/deps/library/stats/po/ko/LC_MESSAGES/stats.mo
new file mode 100644
index 0000000..7b9fca9
Binary files /dev/null and b/win32/deps/library/stats/po/ko/LC_MESSAGES/stats.mo differ
diff --git a/win32/deps/library/stats/po/pl/LC_MESSAGES/R-stats.mo b/win32/deps/library/stats/po/pl/LC_MESSAGES/R-stats.mo
new file mode 100644
index 0000000..8015114
Binary files /dev/null and b/win32/deps/library/stats/po/pl/LC_MESSAGES/R-stats.mo differ
diff --git a/win32/deps/library/stats/po/pl/LC_MESSAGES/stats.mo b/win32/deps/library/stats/po/pl/LC_MESSAGES/stats.mo
new file mode 100644
index 0000000..12facc6
Binary files /dev/null and b/win32/deps/library/stats/po/pl/LC_MESSAGES/stats.mo differ
diff --git a/win32/deps/library/stats/po/pt_BR/LC_MESSAGES/R-stats.mo b/win32/deps/library/stats/po/pt_BR/LC_MESSAGES/R-stats.mo
new file mode 100644
index 0000000..f4535c7
Binary files /dev/null and b/win32/deps/library/stats/po/pt_BR/LC_MESSAGES/R-stats.mo differ
diff --git a/win32/deps/library/stats/po/pt_BR/LC_MESSAGES/stats.mo b/win32/deps/library/stats/po/pt_BR/LC_MESSAGES/stats.mo
new file mode 100644
index 0000000..7e9483a
Binary files /dev/null and b/win32/deps/library/stats/po/pt_BR/LC_MESSAGES/stats.mo differ
diff --git a/win32/deps/library/stats/po/ru/LC_MESSAGES/R-stats.mo b/win32/deps/library/stats/po/ru/LC_MESSAGES/R-stats.mo
new file mode 100644
index 0000000..e72629f
Binary files /dev/null and b/win32/deps/library/stats/po/ru/LC_MESSAGES/R-stats.mo differ
diff --git a/win32/deps/library/stats/po/ru/LC_MESSAGES/stats.mo b/win32/deps/library/stats/po/ru/LC_MESSAGES/stats.mo
new file mode 100644
index 0000000..ca21fd9
Binary files /dev/null and b/win32/deps/library/stats/po/ru/LC_MESSAGES/stats.mo differ
diff --git a/win32/deps/library/stats/po/tr/LC_MESSAGES/R-stats.mo b/win32/deps/library/stats/po/tr/LC_MESSAGES/R-stats.mo
new file mode 100644
index 0000000..c2e1829
Binary files /dev/null and b/win32/deps/library/stats/po/tr/LC_MESSAGES/R-stats.mo differ
diff --git a/win32/deps/library/stats/po/zh_CN/LC_MESSAGES/R-stats.mo b/win32/deps/library/stats/po/zh_CN/LC_MESSAGES/R-stats.mo
new file mode 100644
index 0000000..0b372fa
Binary files /dev/null and b/win32/deps/library/stats/po/zh_CN/LC_MESSAGES/R-stats.mo differ
diff --git a/win32/deps/library/stats/po/zh_CN/LC_MESSAGES/stats.mo b/win32/deps/library/stats/po/zh_CN/LC_MESSAGES/stats.mo
new file mode 100644
index 0000000..b52e926
Binary files /dev/null and b/win32/deps/library/stats/po/zh_CN/LC_MESSAGES/stats.mo differ
diff --git a/win32/deps/library/stats/tests/NLSstClosest.R b/win32/deps/library/stats/tests/NLSstClosest.R
new file mode 100644
index 0000000..8ebb201
--- /dev/null
+++ b/win32/deps/library/stats/tests/NLSstClosest.R
@@ -0,0 +1,12 @@
+## PR#14384
+
+sXY <- structure(list(x = c(0, 24, 27, 48, 51, 72, 75, 96, 99),
+                      y = c(4.98227, 6.38021, 6.90309, 7.77815, 7.64345, 7.23045, 7.27875, 7.11394, 6.95424)),
+                 .Names = c("x", "y"), row.names = c(NA, 9L),
+                 class = c("sortedXyData", "data.frame"))
+a <- NLSstLfAsymptote(sXY)
+d <- NLSstRtAsymptote(sXY)
+z <- NLSstClosestX(sXY, (a+d)/2)
+stopifnot(!is.na(z))
+## early versions gave NaN
+
diff --git a/win32/deps/library/stats/tests/cmdscale.R b/win32/deps/library/stats/tests/cmdscale.R
new file mode 100644
index 0000000..aff5060
--- /dev/null
+++ b/win32/deps/library/stats/tests/cmdscale.R
@@ -0,0 +1,10 @@
+## regression tests on cmdscale from R 2.13.0
+
+cmdsE <- cmdscale(eurodist, k = 20, eig = TRUE, x.ret = TRUE)
+utils::str(cmdsE)
+cmdsE2 <- cmdscale(eurodist, k = 20, add = TRUE, eig = TRUE, x.ret = TRUE)
+utils::str(cmdsE2)
+stopifnot(identical(rownames(cmdsE2$points), attr(eurodist, "Labels")))
+
+## the exact answers diff by platform, since eigenvalue calculations are
+## involved
diff --git a/win32/deps/library/stats/tests/drop1-polr.R b/win32/deps/library/stats/tests/drop1-polr.R
new file mode 100644
index 0000000..962cc86
--- /dev/null
+++ b/win32/deps/library/stats/tests/drop1-polr.R
@@ -0,0 +1,32 @@
+### Test calling drop1.default() "deep down" -- via
+### correct formula environment
+
+library(stats)
+stopifnot(require(MASS))
+
+regr <- function(formula, data, ...)
+{
+    lform <- formula(formula)
+    d1 <- data
+    i.polr(lform, d1, ...)
+}
+
+i.polr <- function(form, data, ...)
+{
+    lfo <- form
+    d2 <- data
+    environment(lfo) <- environment()
+    lreg <- polr(lfo, data=d2, ...)
+    do.drop(lreg, lreg1$coef, ltesttype="Chisq")
+}
+
+do.drop <- function(lreg, lcoeftab, ltesttype)
+{
+    drop1(lreg, test=ltesttype, scope=terms(lreg), trace=FALSE)
+}
+
+m  <- polr(Sat ~ Infl + Type + Cont, data = housing)
+rr <- regr(formula(m), data = housing)
+dr1 <- drop1(m)
+stopifnot(is.data.frame(rr),
+	  all.equal(rr[-(3:4)], dr1, check.attributes=FALSE))
diff --git a/win32/deps/library/stats/tests/ig_glm.R b/win32/deps/library/stats/tests/ig_glm.R
new file mode 100644
index 0000000..db040a6
--- /dev/null
+++ b/win32/deps/library/stats/tests/ig_glm.R
@@ -0,0 +1,61 @@
+## some tests of inverse-gaussian GLMs based on a file suppled by
+## David Firth, Feb 2009.
+
+options(digits=5)
+
+##  Data from Whitmore, G A (1986), Inverse Gaussian Ratio Estimation.
+##  Applied Statistics 35(1), 8-15.
+##
+##  A "real, but disguised" set of data (Whitmore, 1986, p8).
+##
+##  For each of 20 products, x is projected sales and y is actual sales.
+
+x <- c(5959, 3534, 2641, 1965, 1738, 1182, 667, 613, 610, 549,
+       527, 353, 331, 290, 253, 193, 156, 133, 122, 114)
+y <- c(5673, 3659, 2565, 2182, 1839, 1236, 918, 902, 756, 500,
+       487, 463, 225, 257, 311, 212, 166, 123, 198, 99)
+
+## Whitmore's model (2.4) is
+
+fit <- glm(y ~ x - 1, weights = x^2,
+           family = inverse.gaussian(link = "identity"),
+           epsilon = 1e-12)
+fit
+coef(summary(fit))
+##  Alternatively, use the explicit formula that's available for the MLE
+##  in this example.  It's just a ratio estimate:
+(beta.exact <- sum(y)/sum(x))
+stopifnot(all.equal(beta.exact, as.vector(coef(fit))))
+## and for a confidence interval via confint
+(ci <- confint(fit, 1, level = 0.95))
+## and via asymptotic normality
+sterr <- coef(summary(fit))[, "Std. Error"]
+coef(fit) + (1.96 * sterr * c(-1, 1))
+
+## David suggested the use of an inverse link
+
+fit2 <- glm(y ~ I(1/x) - 1, weights = x^2,
+            family = inverse.gaussian(link = "inverse"),
+            epsilon = 1e-12)
+coef(summary(fit2))
+## which gives the same CIs both ways
+ci1 <- rev(1/(confint(fit2, 1, level = 0.95)))
+sterr <- (summary(fit2)$coefficients)[, "Std. Error"]
+ci2 <- 1/(coef(fit2) - (1.96 * sterr * c(-1, 1)))
+stopifnot(all.equal(as.vector(ci), as.vector(ci1), 1e-5),
+          all.equal(as.vector(ci), ci2, 1e-3))
+
+##  because the log likelihood for 1/beta is exactly quadratic.
+
+##  The approximate intervals above differ slightly from the exact
+##  confidence interval given in Whitmore (1986) -- as is to be
+##  expected (they are based on asymptotic approximations, not the
+##  exact pivot).
+
+
+## Now simulate from this model
+if(require("SuppDists")) {
+    print( ys <- simulate(fit, nsim = 3, seed = 1) )
+    for(i in seq_len(3))
+        print(coef(summary(update(fit, ys[, i] ~ .))))
+}
diff --git a/win32/deps/library/stats/tests/ks-test.R b/win32/deps/library/stats/tests/ks-test.R
new file mode 100644
index 0000000..dc380ec
--- /dev/null
+++ b/win32/deps/library/stats/tests/ks-test.R
@@ -0,0 +1,22 @@
+## some examples of the KS test
+
+## unrealistic one of PR#14561
+ds1 <- c(1.7,2,3,3,4,4,5,5,6,6)
+ks.test(ds1, "pnorm", mean = 3.3, sd = 1.55216)
+# how on earth can sigma = 1.55216 be known?
+
+# R >= 2.14.0 allows the equally invalid
+ks.test(ds1, "pnorm", mean = 3.3, sd = 1.55216, exact = TRUE)
+
+## Try out the effects of rounding
+set.seed(123)
+ds2 <- rnorm(1000)
+ks.test(ds2, "pnorm") # exact = FALSE is default for n = 1000
+ks.test(ds2, "pnorm", exact = TRUE)
+## next two are still close
+ks.test(round(ds2, 2), "pnorm")
+ks.test(round(ds2, 2), "pnorm", exact = TRUE)
+# now D has doubled, but p-values remain similar (if very different from ds2)
+ks.test(round(ds2, 1), "pnorm")
+ks.test(round(ds2, 1), "pnorm", exact = TRUE)
+
diff --git a/win32/deps/library/stats/tests/ks-test.Rout.save b/win32/deps/library/stats/tests/ks-test.Rout.save
new file mode 100644
index 0000000..991451a
--- /dev/null
+++ b/win32/deps/library/stats/tests/ks-test.Rout.save
@@ -0,0 +1,115 @@
+
+R Under development (unstable) (2011-08-04 r56621)
+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.
+
+> ## some examples of the KS test
+> 
+> ## unrealistic one of PR#14561
+> ds1 <- c(1.7,2,3,3,4,4,5,5,6,6)
+> ks.test(ds1, "pnorm", mean = 3.3, sd = 1.55216)
+
+	One-sample Kolmogorov-Smirnov test
+
+data:  ds1 
+D = 0.274, p-value = 0.4407
+alternative hypothesis: two-sided 
+
+Warning message:
+In ks.test(ds1, "pnorm", mean = 3.3, sd = 1.55216) :
+  ties should not be present for the Kolmogorov-Smirnov test
+> # how on earth can sigma = 1.55216 be known?
+> 
+> # R >= 2.14.0 allows the equally invalid
+> ks.test(ds1, "pnorm", mean = 3.3, sd = 1.55216, exact = TRUE)
+
+	One-sample Kolmogorov-Smirnov test
+
+data:  ds1 
+D = 0.274, p-value = 0.3715
+alternative hypothesis: two-sided 
+
+Warning message:
+In ks.test(ds1, "pnorm", mean = 3.3, sd = 1.55216, exact = TRUE) :
+  ties should not be present for the Kolmogorov-Smirnov test
+> 
+> ## Try out the effects of rounding
+> set.seed(123)
+> ds2 <- rnorm(1000)
+> ks.test(ds2, "pnorm") # exact = FALSE is default for n = 1000
+
+	One-sample Kolmogorov-Smirnov test
+
+data:  ds2 
+D = 0.0194, p-value = 0.8452
+alternative hypothesis: two-sided 
+
+> ks.test(ds2, "pnorm", exact = TRUE)
+
+	One-sample Kolmogorov-Smirnov test
+
+data:  ds2 
+D = 0.0194, p-value = 0.8379
+alternative hypothesis: two-sided 
+
+> ## next two are still close
+> ks.test(round(ds2, 2), "pnorm")
+
+	One-sample Kolmogorov-Smirnov test
+
+data:  round(ds2, 2) 
+D = 0.0192, p-value = 0.856
+alternative hypothesis: two-sided 
+
+Warning message:
+In ks.test(round(ds2, 2), "pnorm") :
+  ties should not be present for the Kolmogorov-Smirnov test
+> ks.test(round(ds2, 2), "pnorm", exact = TRUE)
+
+	One-sample Kolmogorov-Smirnov test
+
+data:  round(ds2, 2) 
+D = 0.0192, p-value = 0.8489
+alternative hypothesis: two-sided 
+
+Warning message:
+In ks.test(round(ds2, 2), "pnorm", exact = TRUE) :
+  ties should not be present for the Kolmogorov-Smirnov test
+> # now D has doubled, but p-values remain similar (if very different from ds2)
+> ks.test(round(ds2, 1), "pnorm")
+
+	One-sample Kolmogorov-Smirnov test
+
+data:  round(ds2, 1) 
+D = 0.0367, p-value = 0.1344
+alternative hypothesis: two-sided 
+
+Warning message:
+In ks.test(round(ds2, 1), "pnorm") :
+  ties should not be present for the Kolmogorov-Smirnov test
+> ks.test(round(ds2, 1), "pnorm", exact = TRUE)
+
+	One-sample Kolmogorov-Smirnov test
+
+data:  round(ds2, 1) 
+D = 0.0367, p-value = 0.1311
+alternative hypothesis: two-sided 
+
+Warning message:
+In ks.test(round(ds2, 1), "pnorm", exact = TRUE) :
+  ties should not be present for the Kolmogorov-Smirnov test
+> 
+> 
diff --git a/win32/deps/library/stats/tests/nafns.R b/win32/deps/library/stats/tests/nafns.R
new file mode 100644
index 0000000..a531306
--- /dev/null
+++ b/win32/deps/library/stats/tests/nafns.R
@@ -0,0 +1,135 @@
+#  File src/library/stats/tests/nafns.R
+#  Part of the R package, http://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
+#  http://www.r-project.org/Licenses/
+
+## Tests of functions handling NAs in fits
+## These functions were introduced in 1.3.0.
+## They are used by lm and glm in base R, and by
+## packages MASS, rpart and survival.
+
+## Comparison strictness is set at 256eps, increased from 100eps for v.2.1.0
+## May look lenient, but notice that the Ozone levels that are being modeled
+## can be more than 100.
+
+dim(airquality)
+nd <- airquality[c(6,25:27), ]
+
+sm <- function(x) cat("length", length(x), "with", sum(is.na(x)), "NAs\n")
+
+# default is to omit some rows
+fit <- lm(Ozone ~ ., data=airquality, na.action=na.omit)
+summary(fit)
+sm(fitted(fit))
+sm(resid(fit))
+sm(predict(fit))
+(pp <- predict(fit, nd))
+
+fit2 <- lm(Ozone ~ ., data=airquality, na.action=na.exclude)
+summary(fit2) # same as before
+sm(fitted(fit2))
+sm(resid(fit2))
+sm(predict(fit2))
+(pp2 <- predict(fit2, nd))
+
+## same as before: napredict is only applied to predictions on the
+## original data, following Therneau's original code (and S-PLUS).
+## However, as from R 1.8.0 there is a separate na.action arg to predict.lm()
+stopifnot(all.equal(pp, pp2))
+
+## should fail
+try(fit3 <- lm(Ozone ~ ., data=airquality, na.action=na.fail))
+
+## more precise tests.
+f1 <- fitted(fit)
+f2 <- fitted(fit2)
+common <- match(names(f1), names(f2))
+stopifnot(max(abs(f1 - f2[common])) <= 256*.Machine$double.eps)
+stopifnot(all(is.na(f2[-common])))
+
+r1 <- resid(fit)
+r2 <- resid(fit2)
+common <- match(names(r1), names(r2))
+stopifnot(max(abs(r1 - r2[common])) <= 256*.Machine$double.eps)
+stopifnot(all(is.na(r2[-common])))
+
+p1 <- predict(fit)
+p2 <- predict(fit2)
+common <- match(names(p1), names(p2))
+stopifnot(max(abs(p1 - p2[common])) <= 256*.Machine$double.eps)
+stopifnot(all(is.na(p2[-common])))
+
+
+### now try out glm
+gfit <- glm(Ozone ~ ., data=airquality, na.action=na.omit)
+summary(gfit)
+sm(fitted(gfit))
+sm(resid(gfit))
+sm(predict(gfit))
+predict(gfit, nd)
+(pp <- predict(gfit, nd))
+
+gfit2 <- glm(Ozone ~ ., data=airquality, na.action=na.exclude)
+summary(gfit2) # same as before
+sm(fitted(gfit2))
+sm(resid(gfit2))
+sm(predict(gfit2))
+(pp2 <- predict(gfit2, nd))
+stopifnot(all.equal(pp, pp2))
+
+## more precise tests.
+f1 <- fitted(gfit)
+f2 <- fitted(gfit2)
+common <- match(names(f1), names(f2))
+stopifnot(max(abs(f1 - f2[common])) <= 256*.Machine$double.eps)
+stopifnot(all(is.na(f2[-common])))
+
+r1 <- resid(gfit)
+r2 <- resid(gfit2)
+common <- match(names(r1), names(r2))
+stopifnot(max(abs(r1 - r2[common])) <= 256*.Machine$double.eps)
+stopifnot(all(is.na(r2[-common])))
+
+p1 <- predict(gfit)
+p2 <- predict(gfit2)
+common <- match(names(p1), names(p2))
+stopifnot(max(abs(p1 - p2[common])) <= 256*.Machine$double.eps)
+stopifnot(all(is.na(p2[-common])))
+
+## tests of diagnostic measures.
+x <- 1:10
+y <- c(rnorm(9),NA)
+fit <- lm(y ~ x, na.action=na.exclude)
+fit2 <- lm(y ~ x, subset=-10)
+
+lm.influence(fit2); lm.influence(fit)
+
+rstandard(fit2); rstandard(fit)
+rstudent(fit2); rstudent(fit)
+
+dffits(fit2); dffits(fit)
+
+dfbetas(fit2); dfbetas(fit)
+
+covratio(fit2); covratio(fit)
+
+cooks.distance(fit2); cooks.distance(fit)
+
+(inf <- influence.measures(fit))
+(inf2 <- influence.measures(fit2))
+
+summary(inf)
+summary(inf2)
+
+plot(fit)
diff --git a/win32/deps/library/stats/tests/nls.R b/win32/deps/library/stats/tests/nls.R
new file mode 100644
index 0000000..870edaf
--- /dev/null
+++ b/win32/deps/library/stats/tests/nls.R
@@ -0,0 +1,263 @@
+#  File src/library/stats/tests/nls.R
+#  Part of the R package, http://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
+#  http://www.r-project.org/Licenses/
+
+## tests of nls, especially of weighted fits
+
+.proctime00 <- proc.time()
+library(stats)
+options(digits=5) # to avoid trivial printed differences
+options(show.signif.stars=FALSE) # avoid fancy quotes in o/p
+options(show.nls.convergence=FALSE) # avoid non-diffable output
+pdf("nls-test.pdf")
+
+## selfStart.default() w/ no parameters:
+logist <- deriv( ~Asym/(1+exp(-(x-xmid)/scal)), c("Asym", "xmid", "scal"),
+		function(x, Asym, xmid, scal){} )
+logistInit <- function(mCall, LHS, data) {
+    xy <- sortedXyData(mCall[["x"]], LHS, data)
+    if(nrow(xy) < 3) stop("Too few distinct input values to fit a logistic")
+    Asym <- max(abs(xy[,"y"]))
+    if (Asym != max(xy[,"y"])) Asym <- -Asym  # negative asymptote
+    xmid <- NLSstClosestX(xy, 0.5 * Asym)
+    scal <- NLSstClosestX(xy, 0.75 * Asym) - xmid
+    value <- c(Asym, xmid, scal)
+    names(value) <- mCall[c("Asym", "xmid", "scal")]
+    value
+}
+logist <- selfStart(logist, initial = logistInit) ##-> Error in R 1.5.0
+str(logist)
+
+## lower and upper in algorithm="port"
+set.seed(123)
+x <- runif(200)
+a <- b <- 1; c <- -0.1
+y <- a+b*x+c*x^2+rnorm(200, sd=0.05)
+plot(x,y)
+curve(a+b*x+c*x^2, add = TRUE)
+nls(y ~ a+b*x+c*I(x^2), start = c(a=1, b=1, c=0.1), algorithm = "port")
+(fm <- nls(y ~ a+b*x+c*I(x^2), start = c(a=1, b=1, c=0.1),
+           algorithm = "port", lower = c(0, 0, 0)))
+confint(fm)
+
+
+## weighted nls fit: unsupported < 2.3.0
+set.seed(123)
+y <- x <- 1:10
+yeps <- y + rnorm(length(y), sd = 0.01)
+wts <- rep(c(1, 2), length = 10); wts[5] <- 0
+fit0 <- lm(yeps ~ x, weights = wts)
+summary(fit0, cor = TRUE)
+cf0 <- coef(summary(fit0))[, 1:2]
+fit <- nls(yeps ~ a + b*x, start = list(a = 0.12345, b = 0.54321),
+           weights = wts, trace = TRUE)
+summary(fit, cor = TRUE)
+stopifnot(all.equal(residuals(fit), residuals(fit0), 1e5,
+                    check.attributes = FALSE))
+stopifnot(df.residual(fit) == df.residual(fit0))
+cf1 <- coef(summary(fit))[, 1:2]
+fit2 <- nls(yeps ~ a + b*x, start = list(a = 0.12345, b = 0.54321),
+            weights = wts, trace = TRUE, algorithm = "port")
+summary(fit2, cor = TRUE)
+cf2 <- coef(summary(fit2))[, 1:2]
+rownames(cf0) <- c("a", "b")
+# expect relative errors ca 2e-08
+stopifnot(all.equal(cf1, cf0, 1e-6),  all.equal(cf1, cf0, 1e-6))
+stopifnot(all.equal(residuals(fit2), residuals(fit0), 1e5,
+                    check.attributes = FALSE))
+
+
+DNase1 <- subset(DNase, Run == 1)
+DNase1$wts <- rep(8:1, each = 2)
+fm1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal),
+           data = DNase1, weights = wts)
+summary(fm1)
+
+## directly
+fm2 <- nls(density ~ Asym/(1 + exp((xmid - log(conc))/scal)),
+           data = DNase1, weights = wts,
+           start = list(Asym = 3, xmid = 0, scal = 1))
+summary(fm2)
+stopifnot(all.equal(coef(summary(fm2)), coef(summary(fm1)), tol = 1e-6))
+stopifnot(all.equal(residuals(fm2), residuals(fm1), tol = 1e-5))
+stopifnot(all.equal(fitted(fm2), fitted(fm1), tol = 1e-6))
+fm2a <- nls(density ~ Asym/(1 + exp((xmid - log(conc)))),
+            data = DNase1, weights = wts,
+            start = list(Asym = 3, xmid = 0))
+anova(fm2a, fm2)
+
+## and without using weights
+fm3 <- nls(~ sqrt(wts) * (density - Asym/(1 + exp((xmid - log(conc))/scal))),
+           data = DNase1, start = list(Asym = 3, xmid = 0, scal = 1))
+summary(fm3)
+stopifnot(all.equal(coef(summary(fm3)), coef(summary(fm1)), tol = 1e-6))
+ft <- with(DNase1, density - fitted(fm3)/sqrt(wts))
+stopifnot(all.equal(ft, fitted(fm1), tol = 1e-6))
+# sign of residuals is reversed
+r <- with(DNase1, -residuals(fm3)/sqrt(wts))
+all.equal(r, residuals(fm1), tol = 1e05)
+fm3a <- nls(~ sqrt(wts) * (density - Asym/(1 + exp((xmid - log(conc))))),
+            data = DNase1, start = list(Asym = 3, xmid = 0))
+anova(fm3a, fm3)
+
+## using conditional linearity
+fm4 <- nls(density ~ 1/(1 + exp((xmid - log(conc))/scal)),
+           data = DNase1, weights = wts,
+           start = list(xmid = 0, scal = 1), algorithm = "plinear")
+summary(fm4)
+cf <- coef(summary(fm4))[c(3,1,2), ]
+rownames(cf)[2] <- "Asym"
+stopifnot(all.equal(cf, coef(summary(fm1)), tol = 1e-6,
+                    check.attributes = FALSE))
+stopifnot(all.equal(residuals(fm4), residuals(fm1), tol = 1e-5))
+stopifnot(all.equal(fitted(fm4), fitted(fm1), tol = 1e-6))
+fm4a <- nls(density ~ 1/(1 + exp((xmid - log(conc)))),
+            data = DNase1, weights = wts,
+            start = list(xmid = 0), algorithm = "plinear")
+anova(fm4a, fm4)
+
+## using 'port'
+fm5 <- nls(density ~ Asym/(1 + exp((xmid - log(conc))/scal)),
+           data = DNase1, weights = wts,
+           start = list(Asym = 3, xmid = 0, scal = 1),
+           algorithm = "port")
+summary(fm5)
+stopifnot(all.equal(coef(summary(fm5)), coef(summary(fm1)), tol = 1e-6))
+stopifnot(all.equal(residuals(fm5), residuals(fm1), tol = 1e-5))
+stopifnot(all.equal(fitted(fm5), fitted(fm1), tol = 1e-6))
+
+## check profiling
+pfm1 <- profile(fm1)
+pfm3 <- profile(fm3)
+for(m in names(pfm1)) stopifnot(all.equal(pfm1[[m]], pfm3[[m]], tol=1e-5))
+pfm5 <- profile(fm5)
+for(m in names(pfm1))
+    stopifnot(all.equal(pfm1[[m]], pfm5[[m]], tol=1e-5))
+(c1 <- confint(fm1))
+(c4 <- confint(fm4, 1:2))
+stopifnot(all.equal(c1[2:3, ], c4, tol = 1e-3))
+
+## some low-dimensional examples
+npts <- 1000
+set.seed(1001)
+x <- runif(npts)
+b <- 0.7
+y <- x^b+rnorm(npts, sd=0.05)
+a <- 0.5
+y2 <- a*x^b+rnorm(npts, sd=0.05)
+c <- 1.0
+y3 <- a*(x+c)^b+rnorm(npts, sd=0.05)
+d <- 0.5
+y4 <- a*(x^d+c)^b+rnorm(npts, sd=0.05)
+m1 <- c(y ~ x^b, y2 ~ a*x^b, y3 ~ a*(x+exp(logc))^b)
+s1 <- list(c(b=1), c(a=1,b=1), c(a=1,b=1,logc=0))
+for(p in 1:3) {
+    fm <- nls(m1[[p]], start = s1[[p]])
+    print(fm)
+    print(confint(fm))
+    fm <- nls(m1[[p]], start = s1[[p]], algorithm="port")
+    print(fm)
+    print(confint(fm))
+}
+
+fm <- nls(y2~x^b, start=c(b=1), algorithm="plinear")
+confint(profile(fm))
+fm <- nls(y3 ~ (x+exp(logc))^b, start=c(b=1, logc=0), algorithm="plinear")
+confint(profile(fm))
+
+
+## more profiling with bounds
+op <- options(digits=3)
+npts <- 10
+set.seed(1001)
+a <- 2
+b <- 0.5
+x <- runif(npts)
+y <- a*x/(1+a*b*x) + rnorm(npts, sd=0.2)
+gfun <- function(a,b,x) {
+    if(a < 0 || b < 0) stop("bounds violated")
+    a*x/(1+a*b*x)
+}
+m1 <- nls(y ~ gfun(a,b,x), algorithm = "port",
+          lower = c(0,0), start = c(a=1, b=1))
+(pr1 <- profile(m1))
+confint(pr1)
+
+gfun <- function(a,b,x) {
+    if(a < 0 || b < 0 || a > 1.5 || b > 1) stop("bounds violated")
+    a*x/(1+a*b*x)
+}
+m2 <- nls(y ~ gfun(a,b,x), algorithm = "port",
+          lower = c(0, 0), upper=c(1.5, 1), start = c(a=1, b=1))
+profile(m2)
+confint(m2)
+options(op)
+
+## scoping problems
+test <- function()
+{
+    x <- seq(0,5,len=20)
+    n <- 1
+    y <- 2*x^2 + n + rnorm(x)
+    xy <- data.frame(x=x,y=y)
+    myf <- function(x,a,b,c) a*x^b+c
+    nls(y ~ myf(x,a,b,n), data=xy, start=c(a=1,b=1), trace=TRUE)
+}
+test()
+## failed to find n in 2.2.x
+## found wrong n in 2.3.x
+## finally worked in 2.4.0
+
+
+## list 'start'
+getExpmat <- function(theta, t)
+{
+        conc <- matrix(nrow = length(t), ncol = length(theta))
+        for(i in 1:length(theta)) conc[, i] <- exp(-theta[i] * t)
+        conc
+}
+
+expsum <- as.vector(getExpmat(c(.05,.005), 1:100) %*% c(1,1))
+expsumNoisy <- expsum + max(expsum) *.001 * rnorm(100)
+expsum.df <-data.frame(expsumNoisy)
+
+## estimate decay rates, amplitudes with default Gauss-Newton
+summary (nls(expsumNoisy ~ getExpmat(k, 1:100) %*% sp, expsum.df,
+             start = list(k = c(.6,.02), sp = c(1,2))))
+
+## didn't work with port in 2.4.1
+summary (nls(expsumNoisy ~ getExpmat(k, 1:100) %*% sp, expsum.df,
+             start = list(k = c(.6,.02), sp = c(1,2)),
+             algorithm = "port"))
+
+
+## PR13540
+
+x <- runif(200)
+b0 <- c(rep(0,100),runif(100))
+b1 <- 1
+fac <- as.factor(rep(c(0,1), each = 100))
+y <- b0 + b1*x + rnorm(200, sd=0.05)
+# next failed in 2.8.1
+fit <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=1),
+           algorithm ="port", upper = c(100, 100, 100))
+# next did not "fail" in proposed fix:
+fit <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=101),
+           algorithm ="port", upper = c(100, 100, 100),
+           control = list(warnOnly=TRUE))# warning ..
+with(fit$convInfo, ## start par. violates constraints
+     stopifnot(isConv == FALSE, stopCode == 300))
+
+cat('Time elapsed: ', proc.time() - .proctime00,'\n')
diff --git a/win32/deps/library/stats/tests/nls.Rout.save b/win32/deps/library/stats/tests/nls.Rout.save
new file mode 100644
index 0000000..6937a94
--- /dev/null
+++ b/win32/deps/library/stats/tests/nls.Rout.save
@@ -0,0 +1,662 @@
+
+R version 2.15.0 Patched (2012-04-11 r58983) -- "Easter Beagle"
+Copyright (C) 2012 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+Platform: x86_64-apple-darwin9.8.0/x86_64 (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.
+
+> #  File src/library/stats/tests/nls.R
+> #  Part of the R package, http://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
+> #  http://www.r-project.org/Licenses/
+> 
+> ## tests of nls, especially of weighted fits
+> 
+> .proctime00 <- proc.time()
+> library(stats)
+> options(digits=5) # to avoid trivial printed differences
+> options(show.signif.stars=FALSE) # avoid fancy quotes in o/p
+> options(show.nls.convergence=FALSE) # avoid non-diffable output
+> pdf("nls-test.pdf")
+> 
+> ## selfStart.default() w/ no parameters:
+> logist <- deriv( ~Asym/(1+exp(-(x-xmid)/scal)), c("Asym", "xmid", "scal"),
++ 		function(x, Asym, xmid, scal){} )
+> logistInit <- function(mCall, LHS, data) {
++     xy <- sortedXyData(mCall[["x"]], LHS, data)
++     if(nrow(xy) < 3) stop("Too few distinct input values to fit a logistic")
++     Asym <- max(abs(xy[,"y"]))
++     if (Asym != max(xy[,"y"])) Asym <- -Asym  # negative asymptote
++     xmid <- NLSstClosestX(xy, 0.5 * Asym)
++     scal <- NLSstClosestX(xy, 0.75 * Asym) - xmid
++     value <- c(Asym, xmid, scal)
++     names(value) <- mCall[c("Asym", "xmid", "scal")]
++     value
++ }
+> logist <- selfStart(logist, initial = logistInit) ##-> Error in R 1.5.0
+> str(logist)
+function (x, Asym, xmid, scal)  
+ - attr(*, "initial")=function (mCall, LHS, data)  
+ - attr(*, "class")= chr "selfStart"
+> 
+> ## lower and upper in algorithm="port"
+> set.seed(123)
+> x <- runif(200)
+> a <- b <- 1; c <- -0.1
+> y <- a+b*x+c*x^2+rnorm(200, sd=0.05)
+> plot(x,y)
+> curve(a+b*x+c*x^2, add = TRUE)
+> nls(y ~ a+b*x+c*I(x^2), start = c(a=1, b=1, c=0.1), algorithm = "port")
+Nonlinear regression model
+  model:  y ~ a + b * x + c * I(x^2) 
+   data:  parent.frame() 
+      a       b       c 
+ 1.0058  0.9824 -0.0897 
+ residual sum-of-squares: 0.46
+
+Algorithm "port", convergence message: relative convergence (4) 
+> (fm <- nls(y ~ a+b*x+c*I(x^2), start = c(a=1, b=1, c=0.1),
++            algorithm = "port", lower = c(0, 0, 0)))
+Nonlinear regression model
+  model:  y ~ a + b * x + c * I(x^2) 
+   data:  parent.frame() 
+   a    b    c 
+1.02 0.89 0.00 
+ residual sum-of-squares: 0.468
+
+Algorithm "port", convergence message: both X-convergence and relative convergence (5) 
+> confint(fm)
+Waiting for profiling to be done...
+     2.5%    97.5%
+a 1.00875 1.037847
+b 0.84138 0.914645
+c      NA 0.042807
+> 
+> 
+> ## weighted nls fit: unsupported < 2.3.0
+> set.seed(123)
+> y <- x <- 1:10
+> yeps <- y + rnorm(length(y), sd = 0.01)
+> wts <- rep(c(1, 2), length = 10); wts[5] <- 0
+> fit0 <- lm(yeps ~ x, weights = wts)
+> summary(fit0, cor = TRUE)
+
+Call:
+lm(formula = yeps ~ x, weights = wts)
+
+Weighted Residuals:
+     Min       1Q   Median       3Q      Max 
+-0.01562 -0.00723 -0.00158  0.00403  0.02413 
+
+Coefficients:
+            Estimate Std. Error t value Pr(>|t|)
+(Intercept)  0.00517    0.00764    0.68     0.52
+x            0.99915    0.00119  841.38   <2e-16
+
+Residual standard error: 0.0132 on 7 degrees of freedom
+Multiple R-squared:    1,	Adjusted R-squared:    1 
+F-statistic: 7.08e+05 on 1 and 7 DF,  p-value: <2e-16 
+
+Correlation of Coefficients:
+  (Intercept)
+x -0.89      
+
+> cf0 <- coef(summary(fit0))[, 1:2]
+> fit <- nls(yeps ~ a + b*x, start = list(a = 0.12345, b = 0.54321),
++            weights = wts, trace = TRUE)
+112.14 :  0.12345 0.54321 
+0.0012128 :  0.0051705 0.9991529 
+> summary(fit, cor = TRUE)
+
+Formula: yeps ~ a + b * x
+
+Parameters:
+  Estimate Std. Error t value Pr(>|t|)
+a  0.00517    0.00764    0.68     0.52
+b  0.99915    0.00119  841.37   <2e-16
+
+Residual standard error: 0.0132 on 7 degrees of freedom
+
+Correlation of Parameter Estimates:
+  a    
+b -0.89
+
+> stopifnot(all.equal(residuals(fit), residuals(fit0), 1e5,
++                     check.attributes = FALSE))
+> stopifnot(df.residual(fit) == df.residual(fit0))
+> cf1 <- coef(summary(fit))[, 1:2]
+> fit2 <- nls(yeps ~ a + b*x, start = list(a = 0.12345, b = 0.54321),
++             weights = wts, trace = TRUE, algorithm = "port")
+  0:     56.070572: 0.123450 0.543210
+  1:     6.3964587:  1.34546 0.700840
+  2: 0.00060639084: 0.00517053 0.999153
+  3: 0.00060639084: 0.00517051 0.999153
+> summary(fit2, cor = TRUE)
+
+Formula: yeps ~ a + b * x
+
+Parameters:
+  Estimate Std. Error t value Pr(>|t|)
+a  0.00517    0.00764    0.68     0.52
+b  0.99915    0.00119  841.38   <2e-16
+
+Residual standard error: 0.0132 on 7 degrees of freedom
+
+Correlation of Parameter Estimates:
+  a    
+b -0.89
+
+Algorithm "port", convergence message: both X-convergence and relative convergence (5) 
+
+> cf2 <- coef(summary(fit2))[, 1:2]
+> rownames(cf0) <- c("a", "b")
+> # expect relative errors ca 2e-08
+> stopifnot(all.equal(cf1, cf0, 1e-6),  all.equal(cf1, cf0, 1e-6))
+> stopifnot(all.equal(residuals(fit2), residuals(fit0), 1e5,
++                     check.attributes = FALSE))
+> 
+> 
+> DNase1 <- subset(DNase, Run == 1)
+> DNase1$wts <- rep(8:1, each = 2)
+> fm1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal),
++            data = DNase1, weights = wts)
+> summary(fm1)
+
+Formula: density ~ SSlogis(log(conc), Asym, xmid, scal)
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)
+Asym   2.3350     0.0966    24.2  3.5e-12
+xmid   1.4731     0.0947    15.6  8.8e-10
+scal   1.0385     0.0304    34.1  4.2e-14
+
+Residual standard error: 0.0355 on 13 degrees of freedom
+
+> 
+> ## directly
+> fm2 <- nls(density ~ Asym/(1 + exp((xmid - log(conc))/scal)),
++            data = DNase1, weights = wts,
++            start = list(Asym = 3, xmid = 0, scal = 1))
+> summary(fm2)
+
+Formula: density ~ Asym/(1 + exp((xmid - log(conc))/scal))
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)
+Asym   2.3350     0.0966    24.2  3.5e-12
+xmid   1.4731     0.0947    15.6  8.8e-10
+scal   1.0385     0.0304    34.1  4.2e-14
+
+Residual standard error: 0.0355 on 13 degrees of freedom
+
+> stopifnot(all.equal(coef(summary(fm2)), coef(summary(fm1)), tol = 1e-6))
+> stopifnot(all.equal(residuals(fm2), residuals(fm1), tol = 1e-5))
+> stopifnot(all.equal(fitted(fm2), fitted(fm1), tol = 1e-6))
+> fm2a <- nls(density ~ Asym/(1 + exp((xmid - log(conc)))),
++             data = DNase1, weights = wts,
++             start = list(Asym = 3, xmid = 0))
+> anova(fm2a, fm2)
+Analysis of Variance Table
+
+Model 1: density ~ Asym/(1 + exp((xmid - log(conc))))
+Model 2: density ~ Asym/(1 + exp((xmid - log(conc))/scal))
+  Res.Df Res.Sum Sq Df  Sum Sq F value Pr(>F)
+1     14     0.0186                          
+2     13     0.0164  1 0.00212    1.68   0.22
+> 
+> ## and without using weights
+> fm3 <- nls(~ sqrt(wts) * (density - Asym/(1 + exp((xmid - log(conc))/scal))),
++            data = DNase1, start = list(Asym = 3, xmid = 0, scal = 1))
+> summary(fm3)
+
+Formula: 0 ~ sqrt(wts) * (density - Asym/(1 + exp((xmid - log(conc))/scal)))
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)
+Asym   2.3350     0.0966    24.2  3.5e-12
+xmid   1.4731     0.0947    15.6  8.8e-10
+scal   1.0385     0.0304    34.1  4.2e-14
+
+Residual standard error: 0.0355 on 13 degrees of freedom
+
+> stopifnot(all.equal(coef(summary(fm3)), coef(summary(fm1)), tol = 1e-6))
+> ft <- with(DNase1, density - fitted(fm3)/sqrt(wts))
+> stopifnot(all.equal(ft, fitted(fm1), tol = 1e-6))
+> # sign of residuals is reversed
+> r <- with(DNase1, -residuals(fm3)/sqrt(wts))
+> all.equal(r, residuals(fm1), tol = 1e05)
+[1] TRUE
+> fm3a <- nls(~ sqrt(wts) * (density - Asym/(1 + exp((xmid - log(conc))))),
++             data = DNase1, start = list(Asym = 3, xmid = 0))
+> anova(fm3a, fm3)
+Analysis of Variance Table
+
+Model 1: 0 ~ sqrt(wts) * (density - Asym/(1 + exp((xmid - log(conc)))))
+Model 2: 0 ~ sqrt(wts) * (density - Asym/(1 + exp((xmid - log(conc))/scal)))
+  Res.Df Res.Sum Sq Df  Sum Sq F value Pr(>F)
+1     14     0.0186                          
+2     13     0.0164  1 0.00212    1.68   0.22
+> 
+> ## using conditional linearity
+> fm4 <- nls(density ~ 1/(1 + exp((xmid - log(conc))/scal)),
++            data = DNase1, weights = wts,
++            start = list(xmid = 0, scal = 1), algorithm = "plinear")
+> summary(fm4)
+
+Formula: density ~ 1/(1 + exp((xmid - log(conc))/scal))
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)
+xmid   1.4731     0.0947    15.6  8.8e-10
+scal   1.0385     0.0304    34.1  4.2e-14
+.lin   2.3350     0.0966    24.2  3.5e-12
+
+Residual standard error: 0.0355 on 13 degrees of freedom
+
+> cf <- coef(summary(fm4))[c(3,1,2), ]
+> rownames(cf)[2] <- "Asym"
+> stopifnot(all.equal(cf, coef(summary(fm1)), tol = 1e-6,
++                     check.attributes = FALSE))
+> stopifnot(all.equal(residuals(fm4), residuals(fm1), tol = 1e-5))
+> stopifnot(all.equal(fitted(fm4), fitted(fm1), tol = 1e-6))
+> fm4a <- nls(density ~ 1/(1 + exp((xmid - log(conc)))),
++             data = DNase1, weights = wts,
++             start = list(xmid = 0), algorithm = "plinear")
+> anova(fm4a, fm4)
+Analysis of Variance Table
+
+Model 1: density ~ 1/(1 + exp((xmid - log(conc))))
+Model 2: density ~ 1/(1 + exp((xmid - log(conc))/scal))
+  Res.Df Res.Sum Sq Df  Sum Sq F value Pr(>F)
+1     14     0.0186                          
+2     13     0.0164  1 0.00212    1.68   0.22
+> 
+> ## using 'port'
+> fm5 <- nls(density ~ Asym/(1 + exp((xmid - log(conc))/scal)),
++            data = DNase1, weights = wts,
++            start = list(Asym = 3, xmid = 0, scal = 1),
++            algorithm = "port")
+> summary(fm5)
+
+Formula: density ~ Asym/(1 + exp((xmid - log(conc))/scal))
+
+Parameters:
+     Estimate Std. Error t value Pr(>|t|)
+Asym   2.3350     0.0966    24.2  3.5e-12
+xmid   1.4731     0.0947    15.6  8.8e-10
+scal   1.0385     0.0304    34.1  4.2e-14
+
+Residual standard error: 0.0355 on 13 degrees of freedom
+
+Algorithm "port", convergence message: relative convergence (4) 
+
+> stopifnot(all.equal(coef(summary(fm5)), coef(summary(fm1)), tol = 1e-6))
+> stopifnot(all.equal(residuals(fm5), residuals(fm1), tol = 1e-5))
+> stopifnot(all.equal(fitted(fm5), fitted(fm1), tol = 1e-6))
+> 
+> ## check profiling
+> pfm1 <- profile(fm1)
+> pfm3 <- profile(fm3)
+> for(m in names(pfm1)) stopifnot(all.equal(pfm1[[m]], pfm3[[m]], tol=1e-5))
+> pfm5 <- profile(fm5)
+> for(m in names(pfm1))
++     stopifnot(all.equal(pfm1[[m]], pfm5[[m]], tol=1e-5))
+> (c1 <- confint(fm1))
+Waiting for profiling to be done...
+        2.5%  97.5%
+Asym 2.14936 2.5724
+xmid 1.28535 1.6966
+scal 0.97526 1.1068
+> (c4 <- confint(fm4, 1:2))
+Waiting for profiling to be done...
+       2.5%  97.5%
+xmid 1.2866 1.6949
+scal 0.9757 1.1063
+> stopifnot(all.equal(c1[2:3, ], c4, tol = 1e-3))
+> 
+> ## some low-dimensional examples
+> npts <- 1000
+> set.seed(1001)
+> x <- runif(npts)
+> b <- 0.7
+> y <- x^b+rnorm(npts, sd=0.05)
+> a <- 0.5
+> y2 <- a*x^b+rnorm(npts, sd=0.05)
+> c <- 1.0
+> y3 <- a*(x+c)^b+rnorm(npts, sd=0.05)
+> d <- 0.5
+> y4 <- a*(x^d+c)^b+rnorm(npts, sd=0.05)
+> m1 <- c(y ~ x^b, y2 ~ a*x^b, y3 ~ a*(x+exp(logc))^b)
+> s1 <- list(c(b=1), c(a=1,b=1), c(a=1,b=1,logc=0))
+> for(p in 1:3) {
++     fm <- nls(m1[[p]], start = s1[[p]])
++     print(fm)
++     print(confint(fm))
++     fm <- nls(m1[[p]], start = s1[[p]], algorithm="port")
++     print(fm)
++     print(confint(fm))
++ }
+Nonlinear regression model
+  model:  y ~ x^b 
+   data:  parent.frame() 
+    b 
+0.695 
+ residual sum-of-squares: 2.39
+Waiting for profiling to be done...
+   2.5%   97.5% 
+0.68704 0.70281 
+Nonlinear regression model
+  model:  y ~ x^b 
+   data:  parent.frame() 
+    b 
+0.695 
+ residual sum-of-squares: 2.39
+
+Algorithm "port", convergence message: relative convergence (4) 
+Waiting for profiling to be done...
+   2.5%   97.5% 
+0.68704 0.70281 
+Nonlinear regression model
+  model:  y2 ~ a * x^b 
+   data:  parent.frame() 
+    a     b 
+0.502 0.724 
+ residual sum-of-squares: 2.51
+Waiting for profiling to be done...
+     2.5%   97.5%
+a 0.49494 0.50893
+b 0.70019 0.74767
+Nonlinear regression model
+  model:  y2 ~ a * x^b 
+   data:  parent.frame() 
+    a     b 
+0.502 0.724 
+ residual sum-of-squares: 2.51
+
+Algorithm "port", convergence message: relative convergence (4) 
+Waiting for profiling to be done...
+     2.5%   97.5%
+a 0.49494 0.50893
+b 0.70019 0.74767
+Nonlinear regression model
+  model:  y3 ~ a * (x + exp(logc))^b 
+   data:  parent.frame() 
+     a      b   logc 
+ 0.558  0.603 -0.176 
+ residual sum-of-squares: 2.44
+Waiting for profiling to be done...
+         2.5%   97.5%
+a     0.35006 0.66057
+b     0.45107 0.91473
+logc -0.64627 0.40946
+Nonlinear regression model
+  model:  y3 ~ a * (x + exp(logc))^b 
+   data:  parent.frame() 
+     a      b   logc 
+ 0.558  0.603 -0.176 
+ residual sum-of-squares: 2.44
+
+Algorithm "port", convergence message: relative convergence (4) 
+Waiting for profiling to be done...
+         2.5%   97.5%
+a     0.35006 0.66057
+b     0.45107 0.91473
+logc -0.64627 0.40946
+> 
+> fm <- nls(y2~x^b, start=c(b=1), algorithm="plinear")
+> confint(profile(fm))
+   2.5%   97.5% 
+0.70019 0.74767 
+> fm <- nls(y3 ~ (x+exp(logc))^b, start=c(b=1, logc=0), algorithm="plinear")
+> confint(profile(fm))
+         2.5%   97.5%
+b     0.45105 0.91471
+logc -0.64625 0.40933
+> 
+> 
+> ## more profiling with bounds
+> op <- options(digits=3)
+> npts <- 10
+> set.seed(1001)
+> a <- 2
+> b <- 0.5
+> x <- runif(npts)
+> y <- a*x/(1+a*b*x) + rnorm(npts, sd=0.2)
+> gfun <- function(a,b,x) {
++     if(a < 0 || b < 0) stop("bounds violated")
++     a*x/(1+a*b*x)
++ }
+> m1 <- nls(y ~ gfun(a,b,x), algorithm = "port",
++           lower = c(0,0), start = c(a=1, b=1))
+> (pr1 <- profile(m1))
+$a
+      tau par.vals.a par.vals.b
+1  -3.869      0.706      0.000
+2  -3.114      0.802      0.000
+3  -0.863      1.124      0.000
+4   0.000      1.538      0.263
+5   0.590      1.952      0.446
+6   1.070      2.423      0.592
+7   1.534      3.082      0.737
+8   1.969      4.034      0.878
+9   2.376      5.502      1.014
+10  2.751      7.929      1.144
+11  3.090     12.263      1.264
+12  3.375     20.845      1.373
+
+$b
+     tau par.vals.a par.vals.b
+1 -0.673     1.2087     0.0272
+2  0.000     1.5381     0.2633
+3  0.707     2.0026     0.4994
+4  1.365     2.6295     0.7236
+5  1.994     3.5762     0.9522
+6  2.611     5.1820     1.1962
+7  3.225     8.2162     1.4614
+8  3.820    17.3946     1.7512
+
+attr(,"original.fit")
+Nonlinear regression model
+  model:  y ~ gfun(a, b, x) 
+   data:  parent.frame() 
+    a     b 
+1.538 0.263 
+ residual sum-of-squares: 0.389
+
+Algorithm "port", convergence message: relative convergence (4) 
+attr(,"summary")
+
+Formula: y ~ gfun(a, b, x)
+
+Parameters:
+  Estimate Std. Error t value Pr(>|t|)
+a    1.538      0.617    2.49    0.037
+b    0.263      0.352    0.75    0.476
+
+Residual standard error: 0.221 on 8 degrees of freedom
+
+Algorithm "port", convergence message: relative convergence (4) 
+
+attr(,"class")
+[1] "profile.nls" "profile"    
+> confint(pr1)
+  2.5% 97.5%
+a 0.96  5.20
+b   NA  1.07
+> 
+> gfun <- function(a,b,x) {
++     if(a < 0 || b < 0 || a > 1.5 || b > 1) stop("bounds violated")
++     a*x/(1+a*b*x)
++ }
+> m2 <- nls(y ~ gfun(a,b,x), algorithm = "port",
++           lower = c(0, 0), upper=c(1.5, 1), start = c(a=1, b=1))
+> profile(m2)
+$a
+     tau par.vals.a par.vals.b
+1 -3.681      0.729      0.000
+2 -2.945      0.823      0.000
+3 -0.977      1.099      0.000
+4  0.000      1.500      0.243
+
+$b
+     tau par.vals.a par.vals.b
+1 -0.733    1.18200    0.00395
+2  0.000    1.50000    0.24263
+3  1.645    1.50000    0.48132
+4  2.154    1.50000    0.57869
+5  2.727    1.50000    0.70706
+6  3.288    1.50000    0.85748
+
+attr(,"original.fit")
+Nonlinear regression model
+  model:  y ~ gfun(a, b, x) 
+   data:  parent.frame() 
+    a     b 
+1.500 0.243 
+ residual sum-of-squares: 0.39
+
+Algorithm "port", convergence message: relative convergence (4) 
+attr(,"summary")
+
+Formula: y ~ gfun(a, b, x)
+
+Parameters:
+  Estimate Std. Error t value Pr(>|t|)
+a    1.500      0.598    2.51    0.036
+b    0.243      0.356    0.68    0.514
+
+Residual standard error: 0.221 on 8 degrees of freedom
+
+Algorithm "port", convergence message: relative convergence (4) 
+
+attr(,"class")
+[1] "profile.nls" "profile"    
+> confint(m2)
+Waiting for profiling to be done...
+   2.5% 97.5%
+a 0.907    NA
+b    NA 0.611
+> options(op)
+> 
+> ## scoping problems
+> test <- function()
++ {
++     x <- seq(0,5,len=20)
++     n <- 1
++     y <- 2*x^2 + n + rnorm(x)
++     xy <- data.frame(x=x,y=y)
++     myf <- function(x,a,b,c) a*x^b+c
++     nls(y ~ myf(x,a,b,n), data=xy, start=c(a=1,b=1), trace=TRUE)
++ }
+> test()
+8291.9 :  1 1 
+726.02 :  0.80544 2.42971 
+552.85 :  1.290 2.129 
+70.431 :  1.9565 1.9670 
+26.555 :  1.9788 2.0064 
+26.503 :  1.9798 2.0046 
+26.503 :  1.9799 2.0046 
+Nonlinear regression model
+  model:  y ~ myf(x, a, b, n) 
+   data:  xy 
+   a    b 
+1.98 2.00 
+ residual sum-of-squares: 26.5
+> ## failed to find n in 2.2.x
+> ## found wrong n in 2.3.x
+> ## finally worked in 2.4.0
+> 
+> 
+> ## list 'start'
+> getExpmat <- function(theta, t)
++ {
++         conc <- matrix(nrow = length(t), ncol = length(theta))
++         for(i in 1:length(theta)) conc[, i] <- exp(-theta[i] * t)
++         conc
++ }
+> 
+> expsum <- as.vector(getExpmat(c(.05,.005), 1:100) %*% c(1,1))
+> expsumNoisy <- expsum + max(expsum) *.001 * rnorm(100)
+> expsum.df <-data.frame(expsumNoisy)
+> 
+> ## estimate decay rates, amplitudes with default Gauss-Newton
+> summary (nls(expsumNoisy ~ getExpmat(k, 1:100) %*% sp, expsum.df,
++              start = list(k = c(.6,.02), sp = c(1,2))))
+
+Formula: expsumNoisy ~ getExpmat(k, 1:100) %*% sp
+
+Parameters:
+    Estimate Std. Error t value Pr(>|t|)
+k1  5.00e-02   3.07e-04   162.5   <2e-16
+k2  4.99e-03   5.38e-05    92.8   <2e-16
+sp1 1.00e+00   4.47e-03   224.0   <2e-16
+sp2 9.99e-01   5.00e-03   199.8   <2e-16
+
+Residual standard error: 0.00205 on 96 degrees of freedom
+
+> 
+> ## didn't work with port in 2.4.1
+> summary (nls(expsumNoisy ~ getExpmat(k, 1:100) %*% sp, expsum.df,
++              start = list(k = c(.6,.02), sp = c(1,2)),
++              algorithm = "port"))
+
+Formula: expsumNoisy ~ getExpmat(k, 1:100) %*% sp
+
+Parameters:
+    Estimate Std. Error t value Pr(>|t|)
+k1  5.00e-02   3.07e-04   162.5   <2e-16
+k2  4.99e-03   5.38e-05    92.8   <2e-16
+sp1 1.00e+00   4.47e-03   224.0   <2e-16
+sp2 9.99e-01   5.00e-03   199.8   <2e-16
+
+Residual standard error: 0.00205 on 96 degrees of freedom
+
+Algorithm "port", convergence message: both X-convergence and relative convergence (5) 
+
+> 
+> 
+> ## PR13540
+> 
+> x <- runif(200)
+> b0 <- c(rep(0,100),runif(100))
+> b1 <- 1
+> fac <- as.factor(rep(c(0,1), each = 100))
+> y <- b0 + b1*x + rnorm(200, sd=0.05)
+> # next failed in 2.8.1
+> fit <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=1),
++            algorithm ="port", upper = c(100, 100, 100))
+> # next did not "fail" in proposed fix:
+> fit <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=101),
++            algorithm ="port", upper = c(100, 100, 100),
++            control = list(warnOnly=TRUE))# warning ..
+Warning message:
+In nls(y ~ b0[fac] + b1 * x, start = list(b0 = c(1, 1), b1 = 101),  :
+  Convergence failure: initial par violates constraints
+> with(fit$convInfo, ## start par. violates constraints
++      stopifnot(isConv == FALSE, stopCode == 300))
+> 
+> cat('Time elapsed: ', proc.time() - .proctime00,'\n')
+Time elapsed:  2.168 0.023 2.201 0 0 
+> 
diff --git a/win32/deps/library/stats/tests/offsets.R b/win32/deps/library/stats/tests/offsets.R
new file mode 100644
index 0000000..eea721a
--- /dev/null
+++ b/win32/deps/library/stats/tests/offsets.R
@@ -0,0 +1,27 @@
+## tests of offsets, and prediction from them.
+
+data(anorexia, package = "MASS")
+
+## via formula
+fit1 <- lm(Postwt ~ Prewt + Treat + offset(Prewt), data = anorexia)
+summary(fit1)
+pred <- fitted(fit1)
+stopifnot(all.equal(predict(fit1, anorexia), pred))
+
+## via argument
+fit2 <- lm(Postwt ~ Prewt + Treat, data = anorexia, offset=Prewt)
+summary(fit2)
+stopifnot(all.equal(predict(fit2, anorexia), pred))
+
+## now spili into two parts
+anorexia$o1 <- 0.9*anorexia$Prewt
+anorexia$o2 <- 0.1*anorexia$Prewt
+fit3 <- lm(Postwt ~ Prewt + Treat + offset(o1) + offset(o2), data = anorexia)
+summary(fit3)
+stopifnot(all.equal(predict(fit3, anorexia), pred))
+
+fit4 <- lm(Postwt ~ Prewt + Treat + offset(o1), data = anorexia, offset = o2)
+summary(fit4)
+stopifnot(all.equal(predict(fit4, anorexia), pred))
+
+## using more than one offset failed in R 2.8.1
diff --git a/win32/deps/library/stats/tests/ppr.R b/win32/deps/library/stats/tests/ppr.R
new file mode 100644
index 0000000..f582956
--- /dev/null
+++ b/win32/deps/library/stats/tests/ppr.R
@@ -0,0 +1,6 @@
+## example from PR#13571: should fail, not crash.
+
+require("stats")
+bad <- as.matrix(read.csv("ppr_test.csv"))
+try(ppr(bad[,-3], bad[, 3], nterms=1))
+
diff --git a/win32/deps/library/stats/tests/ppr_test.csv b/win32/deps/library/stats/tests/ppr_test.csv
new file mode 100644
index 0000000..3efcefd
--- /dev/null
+++ b/win32/deps/library/stats/tests/ppr_test.csv
@@ -0,0 +1,443 @@
+"","","bady"
+"1",-0.0348207628376986,1,-0.542937988158036
+"2",-0.0191633397482220,2,-0.169266091065016
+"3",-0.0341944659141195,1,-0.275406839429961
+"4",0.0249905933641021,2,0.384150222915368
+"5",0.0155961395104161,2,0.2341732751562
+"6",-0.0792878444118122,2,-0.021997198276666
+"7",-0.0248000120604336,1,0.399971463068032
+"8",0.108914381123697,1,-0.623493578304602
+"9",0.00620168565673016,1,-0.402266282137639
+"10",-0.034507614375909,2,1.08390058914255
+"11",-0.0905611890362353,2,0.024273472328843
+"12",0.0459715403040008,1,-0.448251018679603
+"13",-0.00976888589453599,2,0.70163011189378
+"14",-0.0157187066685371,1,0.123718062829826
+"15",-6.12835790604833e-05,2,0.0929302960910126
+"16",0.107661787276539,1,0.0445186997621552
+"17",-0.0238605666750649,2,-0.268966040102523
+"18",0.0494161733836856,1,-0.244466585236197
+"19",-0.0194764882100115,2,-0.272492268970116
+"20",-0.0113346282034837,2,0.58637312706044
+"21",-0.043275771306016,2,-0.388224863429526
+"22",-0.0263657543693812,1,-0.439522809120621
+"23",0.00776742796567782,2,-0.354209517739221
+"24",-0.0473467013092799,1,-0.166859766555732
+"25",-0.0188501912864324,2,0.265535097126863
+"26",0.0046359433477825,1,0.342255739372447
+"27",-0.0961978613484469,2,0.328193133923304
+"28",-0.0435889197678055,2,-0.738100695537103
+"29",-0.0376390989938044,2,0.0492751978645918
+"30",-0.0958847128866574,1,0.846962244613297
+"31",-0.00757684666200928,2,-0.311395214189561
+"32",-0.0536096705450705,2,-0.197180299226387
+"33",-0.0129003705124313,1,0.770727634055679
+"34",-0.0899348921126563,2,-0.214099277802346
+"35",-0.0489124436182275,2,-0.328796268354374
+"36",-0.00413221358232442,1,-0.123798883552826
+"37",-0.0285577936019079,2,0.557326881019212
+"38",-0.0429626228442264,2,0.910078165810043
+"39",0.0754074957122168,1,0.0625474905222085
+"40",0.00620168565673016,1,-0.660060421124099
+"41",0.07321545647969,1,-0.648765887241763
+"42",-0.072711726714232,2,-0.291387183530275
+"43",-0.0235474182132754,1,-0.580764200095337
+"44",-0.0100820343563255,2,-0.213881238361436
+"45",0.0046359433477825,1,0.342219498341999
+"46",0.00150445872988718,1,-0.627738756029472
+"47",-0.0476598497710694,2,0.638490421487924
+"48",-0.0742774690231797,2,0.366998080026886
+"49",0.00588853719494063,1,-0.192002931323743
+"50",0.00620168565673016,1,-0.42703489754501
+"51",-0.0373259505320149,2,0.399143495901645
+"52",-0.029184090525487,1,0.259085862758254
+"53",0.0447189464568426,2,-0.52960117919881
+"54",0.0221722572079963,2,-0.358445653831134
+"55",0.0177881787429428,2,0.299979528574020
+"56",-0.0226079728279068,2,0.34651271103047
+"57",-0.0304366843726451,2,-1.28260529016723
+"58",-0.104339721354975,2,-0.469681693832029
+"59",-0.057993749010124,2,0.572875739287276
+"60",0.048476727998317,1,0.318516539900054
+"61",-0.0786615474882331,2,-0.51629774307693
+"62",-0.0273051997547498,1,-0.238363914682604
+"63",-0.0138398158977999,1,-0.278262054849107
+"64",0.0434663526096845,2,0.240351359037258
+"65",-0.0598726397808612,1,-0.439820093575709
+"66",0.0149698425868371,1,-0.089734626673025
+"67",0.0121515064307313,1,0.157744469530662
+"68",0.00839372488925688,1,-0.147761547457720
+"69",-0.0241737151368545,1,0.640629492509571
+"70",-0.0614383820898088,2,0.721507998029808
+"71",-0.00914258897095694,2,-0.391891463942708
+"72",0.0262431872112602,2,0.409309553303869
+"73",0.0487898764601065,1,0.218024247023677
+"74",0.05317395492516,1,-0.149519213731968
+"75",0.0171618818193638,1,-0.647105867961298
+"76",-0.00100072896442909,1,-0.711807768742965
+"77",-0.106844909049291,1,-0.0568622733771722
+"78",-0.0276183482165393,2,0.95979439504761
+"79",-0.0683276482491785,2,1.05882959546064
+"80",0.0199802179754696,2,0.202513236360187
+"81",0.0534871033869495,2,-0.160509136618631
+"82",0.0284352264437869,1,-0.585827752105968
+"83",0.0171618818193638,2,-0.346456582878112
+"84",-0.0529833736214915,2,0.597901713985014
+"85",-0.0301235359108556,2,-0.132649008239744
+"86",-0.00100072896442909,2,-0.289025947256112
+"87",-0.0150924097449580,1,-0.255121884845899
+"88",0.0162224364339952,2,-0.136854078336641
+"89",-0.0370128020702253,1,-0.677430950151256
+"90",-0.0160318551303266,2,0.0753389806448792
+"91",-0.0451546620767532,2,0.100243021636830
+"92",0.0647604480113727,2,-0.125255305348025
+"93",-0.0207290820571696,2,-1.0505758255551
+"94",-0.0154055582067476,2,0.16885039497003
+"95",-0.0135266674360104,2,-0.169309597945285
+"96",-0.0288709420636975,2,0.369854431600131
+"97",-0.0122740735888523,1,-0.566282851696723
+"98",0.0425269072243159,2,0.556556637552114
+"99",-0.0138398158977999,1,-0.343832598689341
+"100",0.0375165318356834,2,-0.268130829056743
+"101",0.0444057979950531,2,-0.365938550530639
+"102",-0.00037443204085002,1,-0.0311681764689511
+"103",0.0249905933641021,2,1.22944913120819
+"104",0.0707102687853738,1,0.201090437227192
+"105",-0.0172844489774848,2,-0.594182131644277
+"106",-0.0216685274425382,1,-0.488925578404151
+"107",-0.0348207628376986,2,0.400182859035963
+"108",0.0406480164535787,2,0.0155260921851867
+"109",-0.0558017097775973,1,0.1349613580299
+"110",0.0375165318356834,1,-0.604279409412377
+"111",-0.0401442866881206,1,0.0912229513254876
+"112",0.0102726156599941,2,-0.585827187420521
+"113",0.0196670695136800,2,0.821569273382661
+"114",0.0202933664372591,1,0.779534939715196
+"115",-0.0329418720669614,2,-0.0427576052327692
+"116",0.0494161733836856,1,0.34552055454062
+"117",0.0206065148990486,1,0.627600258862538
+"118",0.0315667110616823,2,0.560348866635563
+"119",0.0400217195299996,1,0.136561803275829
+"120",-0.0429626228442264,2,0.586659396678506
+"121",-0.0185370428246429,2,0.751858555892416
+"122",0.0215459602844172,2,-0.0346520027699464
+"123",0.0641341510877936,1,-0.475034031350191
+"124",0.198787989657293,1,-0.96267443600314
+"125",-0.0388916928409625,2,-0.446966403216099
+"126",-0.0636304213223356,1,-0.105229435869263
+"127",-0.0545491159304391,2,0.111213728568517
+"128",0.0137172487396789,1,-0.225021888807548
+"129",-0.005071658967693,2,0.192382971695893
+"130",0.0105857641217836,2,0.544550640526851
+"131",-0.00475851050590347,1,0.169227048178445
+"132",-0.0107083312799046,2,0.645013058812764
+"133",0.047850431074738,1,-0.0235134031161297
+"134",-0.0717722813288634,1,-0.0630297490026158
+"135",0.000251864882729031,2,-0.371022927651655
+"136",-0.0429626228442264,2,0.481214559043027
+"137",-0.068014499787389,2,0.00232117243748586
+"138",-0.0163450035921162,2,0.603296973022765
+"139",-0.03388131745233,1,0.689463397801391
+"140",-0.0489124436182275,2,0.584785784895232
+"141",-0.00131387742621863,1,-0.362779810283891
+"142",0.0572448849284239,2,0.810287091899672
+"143",0.0444057979950531,1,0.549297270778805
+"144",0.00682798258030921,2,-0.383606471237968
+"145",0.0506687672308438,1,0.0628969594709541
+"146",-0.0326287236051719,2,0.307802130858709
+"147",0.0315667110616823,1,-0.0491288740872056
+"148",0.0234248510551544,2,-0.886174605827197
+"149",0.0481635795365275,1,-0.353063829906177
+"150",-0.0204159335953801,1,-0.373480626840549
+"151",-0.0144661128213790,2,1.00020535625734
+"152",-0.0238605666750649,2,-0.37293648383054
+"153",0.0669524872438994,1,0.970846742038665
+"154",0.0162224364339952,1,-0.288023336074307
+"155",0.0262431872112602,1,0.234872138823723
+"156",0.0863676918748504,1,-0.124107339307035
+"157",-0.0357602082230672,2,-0.860582860820529
+"158",0.0428400556861055,1,-0.297747269417959
+"159",0.0168487333575743,2,0.109903610414647
+"160",0.00714113104209875,2,-0.206224671104973
+"161",-0.0132135189742209,2,-0.327867194019532
+"162",0.131461070372543,1,-0.213564690106344
+"163",-0.0113346282034837,2,0.188385676330015
+"164",0.00557538873315109,1,-0.628807957951394
+"165",-0.0135266674360104,2,0.669583796395588
+"166",-0.043275771306016,2,-0.343884620646265
+"167",-0.0708328359434948,1,-0.190185480431738
+"168",0.00150445872988718,2,-0.320328578790684
+"169",0.063194705702425,1,0.323386845722763
+"170",-0.0160318551303266,2,-0.466837070291079
+"171",-0.0150924097449580,1,-0.443407572986743
+"172",-0.0598726397808612,2,-0.134811390846991
+"173",0.0159092879722056,1,0.482090992234558
+"174",-0.0664487574784414,1,-0.0170463331877988
+"175",-0.0946321190394993,1,-0.190324801658185
+"176",-0.0263657543693812,2,0.133819910273860
+"177",0.0259300387494707,1,0.635173662501035
+"178",0.0184144756665219,2,0.00228391995819166
+"179",0.0162224364339952,2,-0.258437031861175
+"180",0.0412743133771578,2,0.0283400108555913
+"181",0.00588853719494063,1,-0.645215565877466
+"182",0.0500424703072647,2,-0.291670337298211
+"183",0.0891860280309562,1,-0.327065894289160
+"184",-0.00162702588800815,1,0.242737144450905
+"185",-0.0260526059075917,2,0.57810653696704
+"186",-0.0248000120604336,1,-0.541941213451622
+"187",0.0575580333902134,1,-0.633212087112255
+"188",-0.082106180567918,2,0.500496715369151
+"189",0.0707102687853738,2,-0.052842886971195
+"190",0.00307020103883484,2,-0.244280532233061
+"191",-0.005071658967693,2,1.13589518632790
+"192",-0.0761563597939169,1,0.516233237416555
+"193",0.0212328118226277,1,-0.120931696200069
+"194",0.0838625041805342,1,-0.298112413451003
+"195",-0.0495387405418066,2,-0.460823957234195
+"196",0.048476727998317,1,-0.53750964944165
+"197",0.0362639379885253,2,-0.222956248715534
+"198",0.0134041002778894,1,-0.534628063085933
+"199",-0.03388131745233,2,-0.00536312114999693
+"200",-0.0157187066685371,2,-0.601310067820068
+"201",0.0491030249218961,2,0.51371538232261
+"202",-0.00788999512379879,1,-0.443235207931272
+"203",0.0910649188016934,1,-0.0545450835543364
+"204",0.0566185880048449,1,0.159594834986961
+"205",-0.00726369820021974,1,0.817680352105999
+"206",-0.0470335528474903,2,-0.920940961348847
+"207",0.038455977221052,1,0.206785551831567
+"208",-0.0138398158977999,2,0.0786089094577416
+"209",0.0378296802974729,2,-0.517512336320252
+"210",-0.0166581520539057,1,-0.69987268730616
+"211",0.0472241341511589,2,0.594013625246057
+"212",-0.0166581520539057,2,-0.832652369978527
+"213",0.0312535625998928,2,-0.646413025368303
+"214",-0.00100072896442909,2,-0.440536367839533
+"215",-0.0811667351825494,2,-0.279369474909596
+"216",-0.0320024266815928,1,-0.0452140231102436
+"217",0.0741549018650587,1,0.137324260072112
+"218",0.0368902349121043,2,0.699084005257896
+"219",0.014343545663258,2,0.809085151068957
+"220",-0.0742774690231797,2,0.605749454506367
+"221",-0.0332550205287509,1,-0.124684466736664
+"222",0.000878161806308105,2,-0.181486885774829
+"223",-0.0476598497710694,1,1.04353748120419
+"224",-0.0601857882426507,2,0.288952596833982
+"225",-0.0413968805352788,2,-0.104429039490037
+"226",-0.0435889197678055,1,0.0800869382183447
+"227",-0.0248000120604336,1,-0.144169895377154
+"228",-0.0157187066685371,1,-0.0464432100385457
+"229",0.00808057642746734,2,0.478240259012026
+"230",-0.000687580502639557,1,-0.467440941086978
+"231",0.155886650392127,1,0.239431491079654
+"232",0.00870687335104641,2,0.2562547807972
+"233",0.0572448849284239,1,0.86860230418135
+"234",-0.034507614375909,2,-0.423459070947301
+"235",-0.0241737151368545,2,0.310211050362970
+"236",-0.034507614375909,1,-0.295906130057979
+"237",0.0707102687853738,2,-0.86617486548278
+"238",-0.00100072896442909,2,-0.121778887044718
+"239",-0.00757684666200928,1,0.776213597614415
+"240",0.0387691256828415,2,0.509279639297807
+"241",-0.00225332281158722,1,0.465384478561689
+"242",0.0274957810584184,1,0.469496518921371
+"243",-0.0677013513255995,1,-0.308746203780249
+"244",-0.0160318551303266,1,-0.46235848664352
+"245",-0.0489124436182275,1,0.205409229630935
+"246",-0.058620045933703,2,0.261398866276518
+"247",0.0509819156926333,2,-0.440149176757358
+"248",-0.0185370428246429,2,-0.340825239203231
+"249",0.128016437292858,2,0.273551295992088
+"250",0.0293746718291555,2,-0.0150998906400583
+"251",-0.039204841302752,2,0.576834918553312
+"252",0.0487898764601065,1,-0.205915937224996
+"253",0.0528608064633705,2,-0.553196865177558
+"254",0.0566185880048449,2,-0.543721288333984
+"255",-0.0122740735888523,1,0.522487158063439
+"256",-0.0194764882100115,2,0.463745159249026
+"257",-0.0197896366718010,2,0.841549445924151
+"258",-0.0235474182132754,1,-0.453687910246368
+"259",0.0528608064633705,1,-0.458440156334343
+"260",0.0129343775852051,2,-0.467864695867239
+"261",-0.0313761297580137,2,-0.472283529481048
+"262",-0.0257394574458021,2,-0.186430934773366
+"263",0.0174750302811533,1,0.321642638528018
+"264",-0.0326287236051719,1,0.352069267692134
+"265",-0.00976888589453599,1,0.02668959086612
+"266",-0.00287961973516629,1,-0.556132391455717
+"267",-0.0366996536084358,1,-0.387257292601137
+"268",0.0794784257154807,2,-0.324131357308187
+"269",0.0375165318356834,1,0.0827698839729645
+"270",-0.0103951828181151,2,-0.093755609745107
+"271",-0.0473467013092799,1,0.191572236429703
+"272",-0.0210422305189592,1,-0.259424141806862
+"273",-0.0664487574784414,2,0.29937915243771
+"274",0.0328193049088404,1,0.376184708733085
+"275",-0.00319276819695581,2,-0.683575654018569
+"276",-0.0154055582067476,1,-0.64142305877968
+"277",0.0916912157252725,2,0.811986459824865
+"278",-0.078035250564654,2,-0.298077785935728
+"279",0.0196670695136800,1,-0.0758214988112154
+"280",-0.0263657543693812,1,0.827132228117798
+"281",0.0105857641217836,1,0.689895342645724
+"282",-0.0304366843726451,1,-0.184184898826604
+"283",0.102964560349696,2,0.847194957424707
+"284",-0.0363865051466462,2,0.806409840008277
+"285",-0.0451546620767532,1,0.0827048684085705
+"286",0.0212328118226277,2,0.552824579772346
+"287",-0.0864902590329714,2,-0.354242885013583
+"288",0.125198101136752,2,0.653520053265854
+"289",0.0563054395430553,1,-0.235849267757233
+"290",0.05317395492516,1,-1.15340165541335
+"291",0.0168487333575743,1,0.961697254069715
+"292",0.0428400556861055,2,0.461276319877892
+"293",-0.0686407967109681,2,-0.0341884331315262
+"294",0.0425269072243159,2,0.19050070101563
+"295",0.0177881787429428,1,-0.320894539927312
+"296",-0.0129003705124313,1,-0.687711338067914
+"297",-0.024486863598644,2,-0.0112816932009854
+"298",-0.024486863598644,2,-0.628420721133336
+"299",-0.0755300628703378,1,0.108339202697929
+"300",-0.0219816759043277,1,-0.299121148314735
+"301",-0.0135266674360104,2,0.504288281290109
+"302",0.0300009687527346,1,-0.49674221648836
+"303",0.0271826325966288,2,-0.0648277245363391
+"304",0.0202933664372591,2,0.0653229380005493
+"305",0.116429944206646,1,1.09697612700141
+"306",0.0162224364339952,1,-0.0578323225188244
+"307",-0.0248000120604336,1,-0.716688114767039
+"308",0.0356376410649462,1,0.0874474382931314
+"309",-0.0814798836443389,2,0.128350908869302
+"310",0.0700839718617947,1,-0.114604975474514
+"311",0.0149698425868371,2,-0.62242646270281
+"312",0.0606895180081088,2,0.103579664573858
+"313",-0.0141529643595894,2,0.266005125434976
+"314",0.0196670695136800,1,-0.413634930912108
+"315",-0.00100072896442909,2,0.0151321906456678
+"316",0.0206065148990486,2,-0.0673849072308246
+"317",-0.0213553789807487,1,0.0135990739864607
+"318",0.0741549018650587,2,0.324087630938248
+"319",0.00870687335104641,2,-0.427399230946266
+"320",-0.0545491159304391,2,0.042775486747467
+"321",0.092004364187062,2,-0.605344789864081
+"322",0.0365770864503148,2,-0.204436152405274
+"323",-0.0360733566848567,1,-0.226138837001874
+"324",-0.00444536204411395,1,0.170709352903985
+"325",0.077912683406533,2,0.537519459868399
+"326",0.0566185880048449,2,-0.147282475494555
+"327",0.00119131026809764,1,-0.323430494775891
+"328",0.0249905933641021,2,0.108292017818686
+"329",-0.0232342697514859,2,-0.826538205190531
+"330",-0.029184090525487,1,0.24584441334714
+"331",0.0368902349121043,1,0.573723086073314
+"332",-0.0464072559239113,1,0.79656132242823
+"333",-0.0113346282034837,2,0.00946238474567895
+"334",-0.00162702588800815,1,-0.124520035965299
+"335",-0.0576806005483345,1,-0.259878130786406
+"336",-0.00663740127664067,2,0.0555307997381935
+"337",0.0894991764927457,2,0.555424791964305
+"338",0.00714113104209875,1,-0.636112973637205
+"339",0.0240511479787335,2,0.873339312894887
+"340",0.0566185880048449,2,-0.394814482694516
+"341",-0.00381906512053488,2,0.739017674428192
+"342",0.00119131026809764,1,0.708961041328093
+"343",0.0181013272047324,1,0.00403126578142898
+"344",0.00870687335104641,2,-0.276137519375382
+"345",0.0644472995495832,2,0.502910779173363
+"346",0.057871181852003,1,-0.0156541427576098
+"347",0.127390140369279,1,-0.461785423626198
+"348",-0.0125872220506418,1,-0.169076596135421
+"349",-0.0294972389872765,2,0.350512955716197
+"350",-0.0470335528474903,1,-0.124228415607815
+"351",-0.0175975974392743,1,-0.131461613178762
+"352",-0.0695802420963367,1,-0.205628872696091
+"353",-0.0971373067338155,1,-0.0878584523532161
+"354",-0.00319276819695581,2,-0.495971604169367
+"355",0.0888728795691667,1,0.453324913491325
+"356",-0.0216685274425382,1,-0.458564307257987
+"357",0.0162224364339952,1,-0.556629174086865
+"358",-0.0301235359108556,1,0.169271197644518
+"359",-0.0341944659141195,2,0.0657618936180249
+"360",0.0174750302811533,1,1.25141355432077
+"361",-0.0132135189742209,2,0.652499667425962
+"362",-0.0482861466946485,2,0.704038829561223
+"363",-0.0266789028311707,1,0.669786704168092
+"364",-0.0282446451401184,1,-0.825099908269144
+"365",0.00494909180957202,1,0.878493590561456
+"366",0.00526224027136155,2,0.460202718189125
+"367",0.0318798595234718,1,-0.281858889818106
+"368",0.033758750294209,1,-0.235429645519174
+"369",-0.0100820343563255,1,-0.749168455422644
+"370",-0.00381906512053488,2,0.0138580627952098
+"371",-0.0125872220506418,2,-0.222636705057443
+"372",-0.0191633397482220,1,-0.102899440319366
+"373",0.0127778033543103,1,-0.364792071375576
+"374",-0.0570543036247554,2,0.418437419922108
+"375",-0.0705196874817053,2,0.148241329965757
+"376",0.0224854056697859,1,0.430891807354808
+"377",0.130208476525385,2,-0.741549127948163
+"378",0.0447189464568426,1,0.684173593258704
+"379",0.0108989125835731,1,0.72101144786046
+"380",-0.115613065979398,2,-0.657949812502163
+"381",-0.0442152166913845,2,-0.896421924067635
+"382",-0.0257394574458021,1,0.0962925069688172
+"383",-0.072711726714232,2,-1.00276025631586
+"384",-0.0288709420636975,1,-0.157806820134940
+"385",0.0869939887984295,1,-0.445362055938887
+"386",-0.0611252336280193,1,0.84021857926248
+"387",-0.0175975974392743,2,-0.251533189535103
+"388",-0.0172844489774848,2,0.758893789787943
+"389",-0.005071658967693,1,-0.395976152709988
+"390",-0.0166581520539057,1,-0.362704477405226
+"391",-0.0232342697514859,1,0.240165673609364
+"392",-0.0504781859271752,2,-0.155741439704364
+"393",0.0365770864503148,1,0.0385290544410537
+"394",-0.0232342697514859,2,-0.238860553149526
+"395",-0.0545491159304391,2,0.293301706277455
+"396",-0.0216685274425382,2,0.831706790819527
+"397",-0.0542359674686496,1,-0.440514782297251
+"398",-0.0583068974719135,2,0.218870588212521
+"399",0.0321930079852613,2,0.500744829653927
+"400",0.0118383579689417,1,0.262479865365506
+"401",-0.0354470597612776,2,0.0459955002977468
+"402",-0.05392281900686,2,-0.0247330661767469
+"403",0.0202933664372591,1,0.170742902946737
+"404",-0.0238605666750649,2,0.199286515264368
+"405",-0.0279314966783289,2,1.08912576788426
+"406",-0.10089508827529,1,0.114498290097875
+"407",-0.0370128020702253,2,-0.0846106975545163
+"408",0.0397085710682101,2,-0.341931668571862
+"409",0.0193539210518905,2,0.161218178259627
+"410",0.0729023080179005,1,0.0829112288198928
+"411",0.0372033833738938,1,0.480091172076597
+"412",-0.0723985782524425,2,-0.182281092461526
+"413",0.0130909518160999,2,0.301199977328185
+"414",0.00714113104209875,2,0.0875330300958936
+"415",0.117056241130225,1,-0.464798937851476
+"416",0.0472241341511589,2,0.0928613558403242
+"417",0.0181013272047324,2,0.518938399652306
+"418",-0.00131387742621863,2,-0.915794067370554
+"419",0.0941964034195887,2,-0.0849758660905434
+"420",-0.0573674520865449,2,-0.557819575895558
+"421",0.0346981956795776,2,0.146580008210001
+"422",0.0450320949186321,1,0.180578242378216
+"423",0.0644472995495832,1,0.207776620969095
+"424",0.0735286049414796,1,-0.392666088043916
+"425",-0.00381906512053488,1,-0.627260070295178
+"426",-0.112794729823292,2,0.260190647274243
+"427",0.0688313780146366,1,-0.386184997207579
+"428",-0.062690975936967,1,-0.503984283937765
+"429",0.0215459602844172,1,0.297983166681027
+"430",0.0415874618389473,2,-0.126484961821684
+"431",0.0453452433804217,2,0.576267745573508
+"432",-0.0470335528474903,1,-0.461945840462522
+"433",0.0447189464568426,2,-0.484434347988346
+"434",0.0199802179754696,2,-0.180198683463334
+"435",0.0108989125835731,2,-0.556213330349359
+"436",0.0046359433477825,2,-0.47603482348101
+"437",-0.0470335528474903,2,-0.290496276509039
+"438",-0.00256647127337676,1,-0.174951863141946
+"439",0.0791652772536912,1,-0.0941605505892384
+"440",-0.0138398158977999,1,0.0900586677437571
+"441",0.0152829910486266,2,0.283684348322489
+"442",0.0278089295202079,2,-0.215872199044323
diff --git a/win32/deps/library/stats/tests/simulate.R b/win32/deps/library/stats/tests/simulate.R
new file mode 100644
index 0000000..7b6d4c2
--- /dev/null
+++ b/win32/deps/library/stats/tests/simulate.R
@@ -0,0 +1,78 @@
+## tests of the simulate.lm method, added Feb 2009
+
+options(digits = 5)
+
+# recommended packages should be present
+if(!require("MASS")) q()
+
+## cases should be named
+fit1 <- lm(time ~ dist, data = hills)
+set.seed(1)
+simulate(fit1, nsim = 3)
+
+## and weights should be takedn into account
+fit2 <- lm(time ~ -1 + dist + climb, hills[-18, ], weight = 1/dist^2)
+coef(summary(fit2))
+set.seed(1)
+( ys <- simulate(fit2, nsim = 3) )
+for(i in seq_len(3))
+    print(coef(summary(update(fit2, ys[, i] ~ .))))
+
+## Poisson fit
+fit3 <- glm(Postwt ~ Prewt + Treat + offset(Prewt),
+            family = gaussian, data = anorexia)
+coef(summary(fit3))
+set.seed(1)
+simulate(fit3, nsim = 8)
+
+## two-column binomial fit
+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)
+fit4 <- glm(SF ~ sex + ldose - 1, family = binomial)
+coef(summary(fit4))
+set.seed(1)
+( ys <- simulate(fit4, nsim = 3) )
+for(i in seq_len(3))
+    print(coef(summary(update(fit4, ys[, i] ~ .))))
+
+## same via proportions
+fit5 <- glm(numdead/20 ~ sex + ldose - 1, family = binomial,
+            weights = rep(20, 12))
+set.seed(1)
+( ys <- simulate(fit5, nsim = 3) )
+for(i in seq_len(3))
+    print(coef(summary(update(fit5, ys[, i] ~ .))))
+
+
+## factor binomial fit
+bwt <- with(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+"
+    data.frame(low = factor(low), age, lwt, race,
+               smoke = (smoke > 0), ptd, ht = (ht > 0), ui = (ui > 0), ftv)
+})
+fit6 <- glm(low ~ ., family = binomial, data = bwt)
+coef(summary(fit6))
+set.seed(1)
+ys <- simulate(fit6, nsim = 3)
+ys[1:10, ]
+for(i in seq_len(3))
+    print(coef(summary(update(fit6, ys[, i] ~ .))))
+
+
+## gamma fit, from example(glm)
+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))
+fit7 <- glm(lot1 ~ log(u), data=clotting, family=Gamma)
+coef(summary(fit7))
+set.seed(1)
+( ys <- simulate(fit7, nsim = 3) )
+for(i in seq_len(3))
+    print(coef(summary(update(fit7, ys[, i] ~ .))))
+
diff --git a/win32/deps/library/stats/tests/simulate.Rout.save b/win32/deps/library/stats/tests/simulate.Rout.save
new file mode 100644
index 0000000..c5d8880
--- /dev/null
+++ b/win32/deps/library/stats/tests/simulate.Rout.save
@@ -0,0 +1,407 @@
+
+R version 2.13.0 Under development (unstable) (2011-03-04 r54667)
+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.
+
+> ## tests of the simulate.lm method, added Feb 2009
+> 
+> options(digits = 5)
+> 
+> # recommended packages should be present
+> if(!require("MASS")) q()
+Loading required package: MASS
+> 
+> ## cases should be named
+> fit1 <- lm(time ~ dist, data = hills)
+> set.seed(1)
+> simulate(fit1, nsim = 3)
+                    sim_1    sim_2    sim_3
+Greenmantle        3.4841   7.7039  25.4746
+Carnethy          48.8068  37.2737  30.9745
+Craig Dunain      28.4665  43.9584  57.3295
+Ben Rha           89.4727  79.5895  38.9971
+Ben Lomond        68.3785  77.0326  36.7858
+Goatfell          45.4299  58.5197  67.6189
+Bens of Jura     138.1736 123.3906 119.6004
+Cairnpapple       59.8758  59.0504  45.1641
+Scolty            48.3017  47.9202  38.2951
+Traprain          39.0478  31.3974  33.3777
+Lairig Ghru      258.5807 214.2935 217.0639
+Dollar            44.5912  44.0871  34.1140
+Lomonds           61.9013  89.6352  97.8082
+Cairn Table        0.9461  42.9001  14.7382
+Eildon Two        55.0951  50.2295  44.4990
+Cairngorm         77.5672  86.4083  85.1081
+Seven Hills      111.4626  99.5722 133.0006
+Knock Hill        38.9856  26.9579  14.0804
+Black Hill        49.0344  10.1091  40.0303
+Creag Beag        52.8285  69.5738  46.3069
+Kildcon Hill      38.4895  59.6709   9.3243
+Meall Ant-Suidhe  39.9240  16.9877  48.4197
+Half Ben Nevis    46.6300  24.3056  68.2987
+Cow Hill         -27.8787  23.1894  25.7935
+N Berwick Law     32.5197  17.4555  51.8170
+Creag Dubh        27.3610  76.4071  39.6261
+Burnswark         42.0330  44.3590  19.6667
+Largo Law          7.4616  50.5758  25.3716
+Criffel           39.7654  49.8660  24.8692
+Acmony            45.1519  21.9790  27.3645
+Ben Nevis        105.5773  82.2313  66.0840
+Knockfarrel       43.0908   9.1228  45.9825
+Two Breweries    152.8438 174.3537 126.9294
+Cockleroi         31.5726  35.7046  35.7999
+Moffat Chase     134.2882 205.1244 148.7057
+> 
+> ## and weights should be takedn into account
+> fit2 <- lm(time ~ -1 + dist + climb, hills[-18, ], weight = 1/dist^2)
+> coef(summary(fit2))
+       Estimate Std. Error t value   Pr(>|t|)
+dist  4.8999847  0.4737032 10.3440 9.8468e-12
+climb 0.0084718  0.0016869  5.0221 1.8636e-05
+> set.seed(1)
+> ( ys <- simulate(fit2, nsim = 3) )
+                   sim_1   sim_2   sim_3
+Greenmantle       15.754  13.355  18.247
+Carnethy          51.988  47.396  67.247
+Craig Dunain      30.614  34.000  40.672
+Ben Rha           58.825  42.959  36.719
+Ben Lomond        68.579  76.460  71.455
+Goatfell          55.088  71.287  53.926
+Bens of Jura     151.910 138.573 116.292
+Cairnpapple       41.841  34.234  38.413
+Scolty            34.958  35.733  28.443
+Traprain          32.564  39.177  34.915
+Lairig Ghru      209.113 130.333 157.652
+Dollar            43.936  36.921  37.675
+Lomonds           57.642  69.616  58.280
+Cairn Table       16.646  39.532  32.599
+Eildon Two        41.230  34.111  41.536
+Cairngorm         73.841  85.681  54.935
+Seven Hills       86.948  94.364  97.870
+Black Hill        35.952  27.000  32.437
+Creag Beag        37.808  34.432  39.509
+Kildcon Hill      19.520  12.910  16.075
+Meall Ant-Suidhe  33.970  36.271  31.514
+Half Ben Nevis    54.038  63.231  50.087
+Cow Hill          17.615  16.486  16.037
+N Berwick Law     12.152  15.778  24.416
+Creag Dubh        39.714  39.457  42.478
+Burnswark         35.747  35.141  41.549
+Largo Law         31.552  47.902  42.693
+Criffel           34.452  46.350  51.317
+Acmony            25.679  33.145  20.575
+Ben Nevis         91.620  86.634  78.946
+Knockfarrel       44.906  28.781  25.088
+Two Breweries    129.888 136.598 121.358
+Cockleroi         31.482  18.866  25.682
+Moffat Chase     138.983 177.836 141.436
+> for(i in seq_len(3))
++     print(coef(summary(update(fit2, ys[, i] ~ .))))
+       Estimate Std. Error t value   Pr(>|t|)
+dist  4.8759333  0.4295826 11.3504 9.3646e-13
+climb 0.0091824  0.0015298  6.0023 1.0781e-06
+       Estimate Std. Error t value   Pr(>|t|)
+dist  4.6969341  0.4406227   10.66 4.6417e-12
+climb 0.0099795  0.0015691    6.36 3.8442e-07
+       Estimate Std. Error t value   Pr(>|t|)
+dist  4.8215499   0.420077 11.4778 7.0162e-13
+climb 0.0090388   0.001496  6.0422 9.6065e-07
+> 
+> ## Poisson fit
+> fit3 <- glm(Postwt ~ Prewt + Treat + offset(Prewt),
++             family = gaussian, data = anorexia)
+> coef(summary(fit3))
+            Estimate Std. Error t value   Pr(>|t|)
+(Intercept) 49.77111   13.39096  3.7168 0.00041011
+Prewt       -0.56554    0.16118 -3.5087 0.00080343
+TreatCont   -4.09707    1.89349 -2.1638 0.03399931
+TreatFT      4.56306    2.13334  2.1389 0.03603508
+> set.seed(1)
+> simulate(fit3, nsim = 8)
+     sim_1   sim_2   sim_3   sim_4   sim_5   sim_6   sim_7  sim_8
+1   76.364  84.997  72.948  78.581  83.762  62.645  70.046 87.655
+2   85.796  77.997  79.276  75.769  91.529  93.684  84.340 95.638
+3   79.726  76.809 100.122  90.039  82.835  81.123  89.696 75.979
+4   88.956  79.858  77.946  77.512  80.451  74.824  76.441 76.082
+5   81.905  76.512  70.629  67.511  81.309  78.424  85.830 87.696
+6   78.312  84.045  72.589  84.052  74.084  88.309  83.858 76.262
+7   87.004  84.121  86.744  79.204  96.013  88.336  79.083 65.958
+8   83.454  74.188  78.173  75.923  79.240  82.265  82.812 71.771
+9   84.710  76.723  78.472  72.621  86.034  76.696  77.664 73.942
+10  77.605  78.792  73.251  92.318  86.401  70.223  92.105 80.067
+11  89.938  87.609  69.008  77.078  79.035  76.676  79.261 76.571
+12  86.931  73.579  76.708  73.007  82.077  86.150  90.162 85.826
+13  76.661  85.140  87.974  82.372  87.232  75.252  82.427 78.048
+14  64.151  81.929  75.270  81.442  72.297  79.125  58.615 82.216
+15  84.154  83.722  66.643  69.424  90.060  68.155  66.771 73.749
+16  78.944  77.135  92.302  59.098  76.581  79.200  76.298 87.563
+17  82.577  85.272  85.657  78.221  94.233  83.589  84.343 77.545
+18  89.624  84.902  81.372  87.019  93.590  82.020  66.690 85.066
+19  87.943  78.426  89.599  81.795  82.791  81.068  88.923 76.038
+20  84.445  88.729  86.486  79.615  84.259  92.607  76.083 81.752
+21  89.233  90.918  78.499  86.734  75.671  88.142  77.567 82.487
+22  87.800  87.229  97.737  74.063  84.597  90.098  71.487 70.588
+23  80.777  91.330  78.478  87.911  87.540  73.815  70.112 79.251
+24  65.463  83.242  69.404  79.307  80.036  80.492  79.738 87.581
+25  81.411  68.177  76.078  82.021  73.917  85.144  80.640 81.841
+26  83.949  80.341  85.789  91.557  79.765  83.947  69.702 85.341
+27  83.658  76.200 100.851  86.305  84.495  69.886  77.737 76.425
+28  76.394  83.353  87.395  80.525  94.118  89.063  90.396 94.816
+29  81.843  80.851  88.369  93.295  81.802  71.887  82.018 85.732
+30  88.574  85.951  85.119  71.700  84.813  79.997 100.768 82.505
+31  93.966  78.128  82.154  80.683  75.454  93.724  93.178 95.943
+32  87.591  89.411  88.065  86.524  91.757  92.604  92.463 82.937
+33  93.707  86.434  96.498  89.842 100.128  98.619  91.036 93.118
+34  82.545  95.253  97.402  90.041  93.367  85.060  84.870 91.865
+35  75.353  89.964  92.132  85.913  90.648  84.194  80.037 89.165
+36  81.849  91.097  93.174  87.587  71.698  78.295  89.128 82.603
+37  83.949  89.381  78.108  86.214  90.064  97.816  97.030 83.781
+38  88.111 100.264  95.391  86.797  91.708  88.839  96.085 91.003
+39  92.769  80.657  86.627  89.946  82.627  80.103  79.418 88.676
+40  88.333  79.786  72.769  91.006  84.197  89.045  71.711 83.137
+41  79.035  90.178  83.819  63.414  74.154  87.681  79.418 89.384
+42  82.934  80.161  83.594  88.698  89.442  97.930  87.778 84.242
+43  90.825  84.515  96.182  88.577  83.679  81.754  95.389 81.075
+44  89.716  83.090  80.486  82.864  74.882  83.104  76.630 89.581
+45  83.067  85.640  84.871  94.510  85.309  84.969  90.416 72.509
+46  81.416  84.405  79.890  83.637  95.874  83.731  87.982 89.088
+47  89.853  90.757  86.073  85.324  84.976  84.750  95.640 90.776
+48  88.370  81.770  85.813  88.991  88.121  80.944  82.813 81.438
+49  83.831  81.084  79.509  96.615  91.220  94.676  82.122 76.819
+50  94.065  97.289  93.711  89.801  87.947  83.049  79.914 85.160
+51  88.740  84.464  77.532  83.016  83.503  83.253  82.351 96.777
+52  80.127  83.145  77.085  76.100  80.701  88.951  81.871 79.209
+53  88.863  85.784  96.540  84.173  91.644  94.332 102.886 70.212
+54  76.995  89.849  77.787  78.317  77.455  79.488 101.948 90.544
+55  97.743  87.230  90.618  85.936  89.461  84.197  86.580 84.245
+56 104.562  90.479  88.083  93.494  88.722  94.396  83.459 87.177
+57  87.962  85.768  93.382  84.580  74.720  97.627  76.757 82.044
+58  84.412  89.435 103.483 110.184  81.867  89.945  95.289 91.540
+59  94.153  90.597 101.249  91.266  96.569  80.198  82.567 95.071
+60  91.060  87.893  89.693  99.889  90.667 103.929 107.945 87.902
+61 105.676  92.626  72.970  72.943  94.523  98.931  82.737 84.683
+62  87.470  77.149 105.173  92.915 100.915  82.787  88.520 95.397
+63 100.074  97.400  99.915  86.075 105.545  94.806 121.849 93.533
+64  86.419  75.502  90.001  92.642  90.950  73.946  78.485 85.108
+65  84.122  87.208  89.215  92.087  91.960  93.284  91.455 84.941
+66  91.104  86.100  93.346  86.942  88.441 101.037  82.062 96.070
+67  77.408  85.453  88.856  99.244 101.014  78.578  92.429 83.066
+68  98.275  87.651  90.984  83.155  92.209  82.608  81.955 93.975
+69  91.681  77.253  87.819  86.560  82.422  86.137  91.151 96.234
+70 108.553 101.603  83.831  86.407  92.306  88.639  91.321 90.129
+71  95.016  80.079  98.591  87.035  78.307  77.509  83.441 97.618
+72  87.308  89.028 102.868  98.858  90.900  95.758  92.341 99.148
+> 
+> ## two-column binomial fit
+> 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)
+> fit4 <- glm(SF ~ sex + ldose - 1, family = binomial)
+> coef(summary(fit4))
+      Estimate Std. Error z value   Pr(>|z|)
+sexF   -3.4732    0.46852 -7.4130 1.2344e-13
+sexM   -2.3724    0.38551 -6.1539 7.5579e-10
+ldose   1.0642    0.13108  8.1190 4.7015e-16
+> set.seed(1)
+> ( ys <- simulate(fit4, nsim = 3) )
+   sim_1.numdead sim_1.numalive sim_2.numdead sim_2.numalive sim_3.numdead
+1              1             19             2             18             1
+2              4             16             4             16             4
+3              9             11            10             10             4
+4             11              9            14              6            15
+5             19              1            17              3            16
+6             18              2            16              4            20
+7              2             18             0             20             0
+8              2             18             3             17             2
+9              5             15             7             13             4
+10             5             15             7             13             7
+11            15              5            13              7            12
+12            19              1            19              1            17
+   sim_3.numalive
+1              19
+2              16
+3              16
+4               5
+5               4
+6               0
+7              20
+8              18
+9              16
+10             13
+11              8
+12              3
+> for(i in seq_len(3))
++     print(coef(summary(update(fit4, ys[, i] ~ .))))
+      Estimate Std. Error z value   Pr(>|z|)
+sexF   -3.3079    0.45218 -7.3154 2.5656e-13
+sexM   -2.5067    0.39240 -6.3880 1.6812e-10
+ldose   1.0482    0.12869  8.1454 3.7800e-16
+      Estimate Std. Error z value   Pr(>|z|)
+sexF  -2.84478    0.40661 -6.9963 2.6289e-12
+sexM  -2.11845    0.35818 -5.9145 3.3286e-09
+ldose  0.90935    0.11578  7.8541 4.0273e-15
+      Estimate Std. Error z value   Pr(>|z|)
+sexF   -3.9838    0.52156 -7.6384 2.1996e-14
+sexM   -2.8717    0.43047 -6.6712 2.5376e-11
+ldose   1.1487    0.14102  8.1459 3.7655e-16
+> 
+> ## same via proportions
+> fit5 <- glm(numdead/20 ~ sex + ldose - 1, family = binomial,
++             weights = rep(20, 12))
+> set.seed(1)
+> ( ys <- simulate(fit5, nsim = 3) )
+   sim_1 sim_2 sim_3
+1   0.05  0.10  0.05
+2   0.20  0.20  0.20
+3   0.45  0.50  0.20
+4   0.55  0.70  0.75
+5   0.95  0.85  0.80
+6   0.90  0.80  1.00
+7   0.10  0.00  0.00
+8   0.10  0.15  0.10
+9   0.25  0.35  0.20
+10  0.25  0.35  0.35
+11  0.75  0.65  0.60
+12  0.95  0.95  0.85
+> for(i in seq_len(3))
++     print(coef(summary(update(fit5, ys[, i] ~ .))))
+      Estimate Std. Error z value   Pr(>|z|)
+sexF   -3.3079    0.45218 -7.3154 2.5656e-13
+sexM   -2.5067    0.39240 -6.3880 1.6812e-10
+ldose   1.0482    0.12869  8.1454 3.7800e-16
+      Estimate Std. Error z value   Pr(>|z|)
+sexF  -2.84478    0.40661 -6.9963 2.6289e-12
+sexM  -2.11845    0.35818 -5.9145 3.3286e-09
+ldose  0.90935    0.11578  7.8541 4.0273e-15
+      Estimate Std. Error z value   Pr(>|z|)
+sexF   -3.9838    0.52156 -7.6384 2.1996e-14
+sexM   -2.8717    0.43047 -6.6712 2.5376e-11
+ldose   1.1487    0.14102  8.1459 3.7655e-16
+> 
+> 
+> ## factor binomial fit
+> bwt <- with(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+"
++     data.frame(low = factor(low), age, lwt, race,
++                smoke = (smoke > 0), ptd, ht = (ht > 0), ui = (ui > 0), ftv)
++ })
+> fit6 <- glm(low ~ ., family = binomial, data = bwt)
+> coef(summary(fit6))
+             Estimate Std. Error  z value  Pr(>|z|)
+(Intercept)  0.823019  1.2447143  0.66121 0.5084769
+age         -0.037234  0.0387024 -0.96207 0.3360159
+lwt         -0.015653  0.0070804 -2.21075 0.0270532
+raceblack    1.192413  0.5359646  2.22480 0.0260948
+raceother    0.740685  0.4617443  1.60410 0.1086916
+smokeTRUE    0.755528  0.4250166  1.77764 0.0754623
+ptdTRUE      1.343763  0.4806207  2.79589 0.0051757
+htTRUE       1.913166  0.7207369  2.65446 0.0079436
+uiTRUE       0.680195  0.4643403  1.46486 0.1429580
+ftv1        -0.436380  0.4793936 -0.91027 0.3626779
+ftv2+        0.179009  0.4563778  0.39224 0.6948827
+> set.seed(1)
+> ys <- simulate(fit6, nsim = 3)
+> ys[1:10, ]
+   sim_1 sim_2 sim_3
+1      0     0     0
+2      0     0     0
+3      0     0     0
+4      1     0     1
+5      0     1     1
+6      1     0     1
+7      1     0     0
+8      0     0     0
+9      0     0     0
+10     0     0     1
+> for(i in seq_len(3))
++     print(coef(summary(update(fit6, ys[, i] ~ .))))
+             Estimate Std. Error  z value Pr(>|z|)
+(Intercept) -0.284354  1.2297301 -0.23123 0.817134
+age         -0.011485  0.0389166 -0.29513 0.767897
+lwt         -0.012314  0.0069041 -1.78353 0.074500
+raceblack    0.844051  0.5514350  1.53064 0.125857
+raceother    0.565993  0.4665978  1.21302 0.225122
+smokeTRUE    1.024337  0.4253416  2.40827 0.016028
+ptdTRUE      1.578045  0.4887012  3.22906 0.001242
+htTRUE       1.171556  0.7060321  1.65935 0.097045
+uiTRUE       0.384214  0.4835840  0.79451 0.426897
+ftv1        -0.790699  0.5271049 -1.50008 0.133594
+ftv2+        0.522245  0.4498448  1.16094 0.245665
+             Estimate Std. Error  z value   Pr(>|z|)
+(Intercept)  0.916922   1.433819  0.63950 5.2250e-01
+age          0.034662   0.041752  0.83019 4.0643e-01
+lwt         -0.036299   0.009577 -3.79021 1.5052e-04
+raceblack    2.588992   0.631372  4.10058 4.1211e-05
+raceother    1.073046   0.522576  2.05338 4.0036e-02
+smokeTRUE    0.710930   0.478870  1.48460 1.3765e-01
+ptdTRUE      0.679588   0.503299  1.35027 1.7693e-01
+htTRUE       1.988224   0.801811  2.47967 1.3151e-02
+uiTRUE       1.080176   0.489033  2.20880 2.7189e-02
+ftv1        -0.418153   0.549009 -0.76165 4.4627e-01
+ftv2+        0.657962   0.500605  1.31433 1.8873e-01
+              Estimate Std. Error   z value   Pr(>|z|)
+(Intercept)  1.4927579  1.2779154  1.168119 0.24275859
+age         -0.0986485  0.0415094 -2.376532 0.01747625
+lwt         -0.0088426  0.0070635 -1.251885 0.21061194
+raceblack    0.2106382  0.5622160  0.374657 0.70791549
+raceother    0.8608985  0.4814556  1.788116 0.07375727
+smokeTRUE    0.7884781  0.4449757  1.771958 0.07640158
+ptdTRUE      1.9686209  0.5435116  3.622040 0.00029229
+htTRUE       1.7835637  0.7279712  2.450047 0.01428375
+uiTRUE       1.4816743  0.5139743  2.882779 0.00394184
+ftv1        -0.7388479  0.5090637 -1.451386 0.14667244
+ftv2+       -0.0097438  0.4670024 -0.020865 0.98335371
+> 
+> 
+> ## gamma fit, from example(glm)
+> 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))
+> fit7 <- glm(lot1 ~ log(u), data=clotting, family=Gamma)
+> coef(summary(fit7))
+             Estimate Std. Error t value   Pr(>|t|)
+(Intercept) -0.016554 0.00092755 -17.847 4.2791e-07
+log(u)       0.015343 0.00041496  36.975 2.7512e-09
+> set.seed(1)
+> ( ys <- simulate(fit7, nsim = 3) )
+    sim_1   sim_2   sim_3
+1 119.451 118.552 123.140
+2  56.310  51.798  48.747
+3  42.193  39.456  40.843
+4  34.581  33.905  35.580
+5  26.208  26.971  27.210
+6  25.476  25.840  24.437
+7  22.287  22.151  21.375
+8  20.206  20.503  19.626
+9  18.224  19.094  17.952
+> for(i in seq_len(3))
++     print(coef(summary(update(fit7, ys[, i] ~ .))))
+             Estimate Std. Error t value   Pr(>|t|)
+(Intercept) -0.016008 0.00077887 -20.553 1.6197e-07
+log(u)       0.015044 0.00034611  43.465 8.9084e-10
+             Estimate Std. Error t value   Pr(>|t|)
+(Intercept) -0.015483 0.00050102 -30.903 9.5910e-09
+log(u)       0.014935 0.00021999  67.889 3.9547e-11
+             Estimate Std. Error t value   Pr(>|t|)
+(Intercept) -0.016850 0.00075120 -22.431 8.8554e-08
+log(u)       0.015569 0.00033659  46.256 5.7704e-10
+> 
+> 
diff --git a/win32/deps/library/stats/tests/smooth.spline.R b/win32/deps/library/stats/tests/smooth.spline.R
new file mode 100644
index 0000000..b7f47e0
--- /dev/null
+++ b/win32/deps/library/stats/tests/smooth.spline.R
@@ -0,0 +1,15 @@
+## moved from ?smooth.spline, quite system-specific.
+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, cv = TRUE,
+                     control = list(trace=TRUE, tol=1e-6,low= -3,maxit=20))
+s2. ## i386-Linux: Df ~= (even! > ) 18 : interpolating -- much smaller PRESS
+## {others, e.g., may end quite differently!}
+plot(y18)
+lines(predict(s2., xx), col = 4)
+mtext(deparse(s2.$call,200), side= 1, line= -1, cex= 0.8, col= 4)
+
+(sdf8 <- smooth.spline(y18, df = 8, control=list(trace=TRUE)))
+sdf8$df - 8
+
+try(smooth.spline(y18, spar = 50)) #>> error : spar 'way too large'
diff --git a/win32/deps/library/stats/tests/ts-tests.R b/win32/deps/library/stats/tests/ts-tests.R
new file mode 100644
index 0000000..1589982
--- /dev/null
+++ b/win32/deps/library/stats/tests/ts-tests.R
@@ -0,0 +1,143 @@
+#  File src/library/stats/tests/ts-tests.R
+#  Part of the R package, http://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
+#  http://www.r-project.org/Licenses/
+
+## tests of time-series functionality
+
+.proctime00 <- proc.time()
+library(stats)
+
+postscript("ts-test.ps")
+
+### ar
+ar(lh)
+ar(lh, method = "burg")
+ar(lh, method = "ols")
+ar(lh, FALSE, 4) # fit ar(4)
+ar.ols(lh)
+ar.ols(lh, FALSE, 4) # fit ar(4) by OLS
+
+ar(LakeHuron)
+ar(LakeHuron, method = "burg")
+ar(LakeHuron, method = "ols")
+ar(LakeHuron, method = "mle")
+
+ar(sunspot.year, method = "yw")
+ar(sunspot.year, method = "burg")
+ar(sunspot.year, method = "ols")
+ar(sunspot.year, method = "mle")
+
+
+### tests using presidents, contains missing values
+acf(presidents, na.action = na.pass)
+pacf(presidents, na.action = na.pass)
+## graphs in example(acf) suggest order 1 or 3
+(fit1 <- arima(presidents, c(1, 0, 0)))
+tsdiag(fit1)
+(fit3 <- arima(presidents, c(3, 0, 0)))  # smaller AIC
+tsdiag(fit3)
+
+
+### tests of arima:
+arima(USAccDeaths, order = c(0,1,1), seasonal = list(order=c(0,1,1)))
+arima(USAccDeaths, order = c(0,1,1), seasonal = list(order=c(0,1,1)),
+      method = "CSS") # drops first 13 observations.
+
+## test fitting with NAs
+tmp <- LakeHuron
+trend <- time(LakeHuron) - 1920
+tmp[c(17, 45, 96)] <- NA
+arima(tmp, order=c(2,0,0), xreg=trend)
+arima(tmp, order=c(1,1,1), xreg=trend)
+trend[c(20, 67)] <- NA
+arima(tmp, order=c(2,0,0), xreg=trend)
+
+## tests of prediction
+predict(arima(lh, order=c(1,0,1)), n.ahead=5)
+predict(arima(lh, order=c(1,1,0)), n.ahead=5)
+predict(arima(lh, order=c(0,2,1)), n.ahead=5)
+
+## test of init
+arima(lh, order = c(1,0,1), init = c(0.5, 0.5, NA))
+arima(lh, order = c(1,0,1), init = c(0.5, 2, NA))
+try(arima(lh, order = c(1,0,1), init = c(2, NA, NA)))
+
+## test of fixed
+arima(lh, order = c(1,0,1), fixed = c(0.5, NA, NA), trans = FALSE)
+trend <- time(LakeHuron) - 1920
+arima(LakeHuron, order=c(2,0,0), xreg=trend)
+arima(x = LakeHuron, order = c(2, 0, 0), xreg = trend,
+      fixed = c(NA, NA, 580, -0.02))
+arima(x = LakeHuron, order = c(2, 0, 0), xreg = trend,
+      fixed = c(NA, NA, 580, 0))
+
+
+### model selection from WWWusage
+aics <- matrix(, 6, 6, dimnames=list(p=0:5, q=0:5))
+for(q in 1:5) aics[1, 1+q] <- arima(WWWusage, c(0,1,q),
+    optim.control = list(maxit = 500))$aic
+for(p in 1:5)
+   for(q in 0:5) aics[1+p, 1+q] <- arima(WWWusage, c(p,1,q),
+       optim.control = list(maxit = 500))$aic
+round(aics - min(aics, na.rm=TRUE), 2)
+
+
+
+### nottem
+nott <- window(nottem, end=c(1936,12))
+fit <- arima(nott,order=c(1,0,0), list(order=c(2,1,0), period=12))
+nott.fore <- predict(fit, n.ahead=36)
+ts.plot(nott, nott.fore$pred, nott.fore$pred+2*nott.fore$se,
+        nott.fore$pred-2*nott.fore$se, gpars=list(col=c(1,1,4,4)))
+
+
+### StructTS
+(fit <- StructTS(log10(UKgas), type = "BSM"))
+(fit <- StructTS(log10(UKgas), type = "BSM", fixed=c(0, NA, NA, NA)))
+(fit <- StructTS(log10(UKgas), type = "BSM", fixed=c(NA, 0, NA, NA)))
+(fit <- StructTS(log10(UKgas), type = "BSM", fixed=c(NA, NA, NA, 0)))
+
+### from AirPassengers
+## The classic `airline model', by full ML
+(fit <- arima(log10(AirPassengers), c(0, 1, 1),
+              seasonal = list(order=c(0, 1 ,1), period=12)))
+update(fit, method = "CSS")
+update(fit, x=window(log10(AirPassengers), start = 1954))
+pred <- predict(fit, n.ahead = 24)
+tl <- pred$pred - 1.96 * pred$se
+tu <- pred$pred + 1.96 * pred$se
+ts.plot(AirPassengers, 10^tl, 10^tu, log = "y", lty = c(1,2,2))
+
+## full ML fit is the same if the series is reversed, CSS fit is not
+ap0 <- rev(log10(AirPassengers))
+attributes(ap0) <- attributes(AirPassengers)
+arima(ap0, c(0, 1, 1), seasonal = list(order=c(0, 1 ,1), period=12))
+arima(ap0, c(0, 1, 1), seasonal = list(order=c(0, 1 ,1), period=12),
+      method = "CSS")
+
+## Structural Time Series
+ap <- log10(AirPassengers) - 2
+(fit <- StructTS(ap, type= "BSM"))
+par(mfrow=c(1,2))
+plot(cbind(ap, fitted(fit)), plot.type = "single")
+plot(cbind(ap, tsSmooth(fit)), plot.type = "single")
+
+## PR14925
+a <- ts(matrix(1:36, 12), start = 2000, freq = 12)
+b <- ts(matrix(1:48, 16), start = c(1999,9), freq = 12)
+window(a, start = c(2000,6)) <- window(b, start = c(2000,6), end = c(2000,12))
+## failed in R < 2.15.1
+
+cat('Time elapsed: ', proc.time() - .proctime00,'\n')
diff --git a/win32/deps/library/stats4/DESCRIPTION b/win32/deps/library/stats4/DESCRIPTION
index 34d0a00..48c8c17 100644
--- a/win32/deps/library/stats4/DESCRIPTION
+++ b/win32/deps/library/stats4/DESCRIPTION
@@ -1,11 +1,10 @@
 Package: stats4
 Title: Statistical Functions using S4 Classes
-Version: 2.9.2
+Version: 2.15.2
 Priority: base
-Author: R Development Core Team and contributors worldwide
+Author: R Core Team and contributors worldwide
 Description: Statistical Functions using S4 classes
 Maintainer: R Core Team <R-core r-project org>
 Depends: methods, graphics, stats
-LazyLoad: yes
-License: Part of R 2.9.2
-Built: R 2.9.2; ; 2009-08-24 12:46:12 UTC; windows
+License: Part of R 2.15.2
+Built: R 2.15.2; ; 2012-10-27 03:07:58 UTC; windows
diff --git a/win32/deps/library/stats4/INDEX b/win32/deps/library/stats4/INDEX
index 86357be..871a1f9 100644
--- a/win32/deps/library/stats4/INDEX
+++ b/win32/deps/library/stats4/INDEX
@@ -1,23 +1,22 @@
-AIC-methods             Methods for Function 'AIC' in Package 'stats4'
-BIC                     Bayesian Information Criterion
 coef-methods            Methods for Function 'coef' in Package 'stats4'
 confint-methods         Methods for Function 'confint' in Package
                         'stats4'
 logLik-methods          Methods for Function 'logLik' in Package
                         'stats4'
 mle                     Maximum Likelihood Estimation
-mle-class               Class "mle" for Results of Maximum Likelihood
+mle-class               Class '"mle"' for Results of Maximum Likelihood
                         Estimation
 plot-methods            Methods for Function 'plot' in Package 'stats4'
-profile-methods         Methods for Function profile in Package
+profile-methods         Methods for Function 'profile' in Package
                         'stats4'
-profile.mle-class       Class "profile.mle"; Profiling information for
-                        "mle" object
-show-methods            Methods for Function show in Package 'stats4'
+profile.mle-class       Class '"profile.mle"'; Profiling information
+                        for '"mle"' object
+show-methods            Methods for Function 'show' in Package 'stats4'
 stats4-package          Statistical Functions using S4 Classes
-summary-methods         Methods for Function summary in Package
+summary-methods         Methods for Function 'summary' in Package
                         'stats4'
-summary.mle-class       Class "summary.mle", summary of "mle" objects
+summary.mle-class       Class '"summary.mle"', Summary of '"mle"'
+                        Objects
 update-methods          Methods for Function 'update' in Package
                         'stats4'
 vcov-methods            Methods for Function 'vcov' in Package 'stats4'
diff --git a/win32/deps/library/stats4/Meta/Rd.rds b/win32/deps/library/stats4/Meta/Rd.rds
index 42b4d1d..b766621 100644
Binary files a/win32/deps/library/stats4/Meta/Rd.rds and b/win32/deps/library/stats4/Meta/Rd.rds differ
diff --git a/win32/deps/library/stats4/Meta/hsearch.rds b/win32/deps/library/stats4/Meta/hsearch.rds
index 17f8c46..68e4b81 100644
Binary files a/win32/deps/library/stats4/Meta/hsearch.rds and b/win32/deps/library/stats4/Meta/hsearch.rds differ
diff --git a/win32/deps/library/stats4/Meta/links.rds b/win32/deps/library/stats4/Meta/links.rds
new file mode 100644
index 0000000..282664e
Binary files /dev/null and b/win32/deps/library/stats4/Meta/links.rds differ
diff --git a/win32/deps/library/stats4/Meta/nsInfo.rds b/win32/deps/library/stats4/Meta/nsInfo.rds
index 91e3ddb..53402a8 100644
Binary files a/win32/deps/library/stats4/Meta/nsInfo.rds and b/win32/deps/library/stats4/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/stats4/Meta/package.rds b/win32/deps/library/stats4/Meta/package.rds
index 72cf813..90138d7 100644
Binary files a/win32/deps/library/stats4/Meta/package.rds and b/win32/deps/library/stats4/Meta/package.rds differ
diff --git a/win32/deps/library/stats4/NAMESPACE b/win32/deps/library/stats4/NAMESPACE
index df0d269..8170874 100644
--- a/win32/deps/library/stats4/NAMESPACE
+++ b/win32/deps/library/stats4/NAMESPACE
@@ -1,13 +1,13 @@
 export(mle) # exporting methods implicitly exports the generics
-importFrom(graphics, plot)
-## need AIC to make an implicit generic from
-importFrom(stats, AIC, coef, confint, logLik, optim, profile,
-	   qchisq, update, vcov)
+importFrom("graphics", plot)
+importFrom("methods", show)
+importFrom("stats", optim, qchisq)
+## For these, we define methods or (AIC, BIC, nobs) an implicit generic:
+importFrom("stats", AIC, BIC, coef, confint, logLik, nobs, profile, update, vcov)
 
 ## S4
 exportClasses(mle, profile.mle, summary.mle)
-## All methods, for own or "foreign" generics:
-exportMethods(BIC, coef, confint, logLik, plot, profile,
-              summary, show, update, vcov)
-## implicit generic does not have any methods here (but in flexmix)
-export(AIC)
+## All methods for imported generics:
+exportMethods(coef, confint, logLik, nobs, plot, profile, summary, show, update, vcov)
+## implicit generics do not have any methods here
+export(AIC, BIC)
diff --git a/win32/deps/library/stats4/R/stats4 b/win32/deps/library/stats4/R/stats4
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/stats4/R/stats4
+++ b/win32/deps/library/stats4/R/stats4
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/stats4/R/stats4.rdb b/win32/deps/library/stats4/R/stats4.rdb
index f1c0ecf..60f3f67 100644
Binary files a/win32/deps/library/stats4/R/stats4.rdb and b/win32/deps/library/stats4/R/stats4.rdb differ
diff --git a/win32/deps/library/stats4/R/stats4.rdx b/win32/deps/library/stats4/R/stats4.rdx
index fc93321..6157e1e 100644
Binary files a/win32/deps/library/stats4/R/stats4.rdx and b/win32/deps/library/stats4/R/stats4.rdx differ
diff --git a/win32/deps/library/stats4/help/AnIndex b/win32/deps/library/stats4/help/AnIndex
index 676c074..e525ea2 100644
--- a/win32/deps/library/stats4/help/AnIndex
+++ b/win32/deps/library/stats4/help/AnIndex
@@ -1,9 +1,4 @@
 stats4-package	stats4-package
-AIC,ANY-method	AIC-methods
-AIC-methods	AIC-methods
-BIC	BIC
-BIC,ANY-method	BIC
-BIC,logLik-method	BIC
 coef,ANY-method	coef-methods
 coef,mle-method	coef-methods
 coef,summary.mle-method	coef-methods
@@ -17,6 +12,7 @@ logLik,mle-method	logLik-methods
 logLik-methods	logLik-methods
 mle	mle
 mle-class	mle-class
+nobs,mle-method	mle-class
 plot,ANY,ANY-method	plot-methods
 plot,profile.mle,missing-method	plot-methods
 plot-methods	plot-methods
diff --git a/win32/deps/library/stats4/help/aliases.rds b/win32/deps/library/stats4/help/aliases.rds
new file mode 100644
index 0000000..c485c43
Binary files /dev/null and b/win32/deps/library/stats4/help/aliases.rds differ
diff --git a/win32/deps/library/stats4/help/paths.rds b/win32/deps/library/stats4/help/paths.rds
new file mode 100644
index 0000000..444d550
Binary files /dev/null and b/win32/deps/library/stats4/help/paths.rds differ
diff --git a/win32/deps/library/stats4/help/stats4.rdb b/win32/deps/library/stats4/help/stats4.rdb
new file mode 100644
index 0000000..62e0694
Binary files /dev/null and b/win32/deps/library/stats4/help/stats4.rdb differ
diff --git a/win32/deps/library/stats4/help/stats4.rdx b/win32/deps/library/stats4/help/stats4.rdx
new file mode 100644
index 0000000..b4e5efe
Binary files /dev/null and b/win32/deps/library/stats4/help/stats4.rdx differ
diff --git a/win32/deps/library/stats4/html/00Index.html b/win32/deps/library/stats4/html/00Index.html
new file mode 100644
index 0000000..16e9324
--- /dev/null
+++ b/win32/deps/library/stats4/html/00Index.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Statistical Functions using S4 Classes</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Statistical Functions using S4 Classes
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;stats4&rsquo; version 2.15.2</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<table width="100%">
+<tr><td width="25%"><a href="stats4-package.html">stats4-package</a></td>
+<td>Statistical Functions using S4 Classes</td></tr>
+<tr><td width="25%"><a href="coef-methods.html">coef-method</a></td>
+<td>Methods for Function 'coef' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="coef-methods.html">coef-methods</a></td>
+<td>Methods for Function 'coef' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="confint-methods.html">confint-method</a></td>
+<td>Methods for Function 'confint' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="confint-methods.html">confint-methods</a></td>
+<td>Methods for Function 'confint' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="logLik-methods.html">logLik-method</a></td>
+<td>Methods for Function 'logLik' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="logLik-methods.html">logLik-methods</a></td>
+<td>Methods for Function 'logLik' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="mle.html">mle</a></td>
+<td>Maximum Likelihood Estimation</td></tr>
+<tr><td width="25%"><a href="mle-class.html">mle-class</a></td>
+<td>Class '"mle"' for Results of Maximum Likelihood Estimation</td></tr>
+<tr><td width="25%"><a href="mle-class.html">nobs-method</a></td>
+<td>Class '"mle"' for Results of Maximum Likelihood Estimation</td></tr>
+<tr><td width="25%"><a href="plot-methods.html">plot-method</a></td>
+<td>Methods for Function 'plot' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="plot-methods.html">plot-methods</a></td>
+<td>Methods for Function 'plot' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="profile-methods.html">profile-method</a></td>
+<td>Methods for Function 'profile' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="profile-methods.html">profile-methods</a></td>
+<td>Methods for Function 'profile' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="profile.mle-class.html">profile.mle-class</a></td>
+<td>Class '"profile.mle"'; Profiling information for '"mle"' object</td></tr>
+<tr><td width="25%"><a href="show-methods.html">show-method</a></td>
+<td>Methods for Function 'show' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="show-methods.html">show-methods</a></td>
+<td>Methods for Function 'show' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="stats4-package.html">stats4</a></td>
+<td>Statistical Functions using S4 Classes</td></tr>
+<tr><td width="25%"><a href="summary-methods.html">summary-method</a></td>
+<td>Methods for Function 'summary' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="summary-methods.html">summary-methods</a></td>
+<td>Methods for Function 'summary' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="summary.mle-class.html">summary.mle-class</a></td>
+<td>Class '"summary.mle"', Summary of '"mle"' Objects</td></tr>
+<tr><td width="25%"><a href="update-methods.html">update-method</a></td>
+<td>Methods for Function 'update' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="update-methods.html">update-methods</a></td>
+<td>Methods for Function 'update' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="vcov-methods.html">vcov-method</a></td>
+<td>Methods for Function 'vcov' in Package 'stats4'</td></tr>
+<tr><td width="25%"><a href="vcov-methods.html">vcov-methods</a></td>
+<td>Methods for Function 'vcov' in Package 'stats4'</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/stats4/html/R.css b/win32/deps/library/stats4/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/stats4/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/stats4/po/da/LC_MESSAGES/R-stats4.mo b/win32/deps/library/stats4/po/da/LC_MESSAGES/R-stats4.mo
new file mode 100644
index 0000000..3177c2a
Binary files /dev/null and b/win32/deps/library/stats4/po/da/LC_MESSAGES/R-stats4.mo differ
diff --git a/win32/deps/library/stats4/po/de/LC_MESSAGES/R-stats4.mo b/win32/deps/library/stats4/po/de/LC_MESSAGES/R-stats4.mo
new file mode 100644
index 0000000..3f2baa1
Binary files /dev/null and b/win32/deps/library/stats4/po/de/LC_MESSAGES/R-stats4.mo differ
diff --git a/win32/deps/library/stats4/po/en quot/LC_MESSAGES/R-stats4.mo b/win32/deps/library/stats4/po/en quot/LC_MESSAGES/R-stats4.mo
new file mode 100644
index 0000000..e7181bd
Binary files /dev/null and b/win32/deps/library/stats4/po/en quot/LC_MESSAGES/R-stats4.mo differ
diff --git a/win32/deps/library/stats4/po/fr/LC_MESSAGES/R-stats4.mo b/win32/deps/library/stats4/po/fr/LC_MESSAGES/R-stats4.mo
new file mode 100644
index 0000000..2384208
Binary files /dev/null and b/win32/deps/library/stats4/po/fr/LC_MESSAGES/R-stats4.mo differ
diff --git a/win32/deps/library/stats4/po/it/LC_MESSAGES/R-stats4.mo b/win32/deps/library/stats4/po/it/LC_MESSAGES/R-stats4.mo
new file mode 100644
index 0000000..c1f8047
Binary files /dev/null and b/win32/deps/library/stats4/po/it/LC_MESSAGES/R-stats4.mo differ
diff --git a/win32/deps/library/stats4/po/ja/LC_MESSAGES/R-stats4.mo b/win32/deps/library/stats4/po/ja/LC_MESSAGES/R-stats4.mo
new file mode 100644
index 0000000..9f00873
Binary files /dev/null and b/win32/deps/library/stats4/po/ja/LC_MESSAGES/R-stats4.mo differ
diff --git a/win32/deps/library/stats4/po/ko/LC_MESSAGES/R-stats4.mo b/win32/deps/library/stats4/po/ko/LC_MESSAGES/R-stats4.mo
new file mode 100644
index 0000000..43da42f
Binary files /dev/null and b/win32/deps/library/stats4/po/ko/LC_MESSAGES/R-stats4.mo differ
diff --git a/win32/deps/library/stats4/po/pl/LC_MESSAGES/R-stats4.mo b/win32/deps/library/stats4/po/pl/LC_MESSAGES/R-stats4.mo
new file mode 100644
index 0000000..f80e30a
Binary files /dev/null and b/win32/deps/library/stats4/po/pl/LC_MESSAGES/R-stats4.mo differ
diff --git a/win32/deps/library/stats4/po/pt_BR/LC_MESSAGES/R-stats4.mo b/win32/deps/library/stats4/po/pt_BR/LC_MESSAGES/R-stats4.mo
new file mode 100644
index 0000000..d3fe379
Binary files /dev/null and b/win32/deps/library/stats4/po/pt_BR/LC_MESSAGES/R-stats4.mo differ
diff --git a/win32/deps/library/stats4/po/ru/LC_MESSAGES/R-stats4.mo b/win32/deps/library/stats4/po/ru/LC_MESSAGES/R-stats4.mo
new file mode 100644
index 0000000..81fcecf
Binary files /dev/null and b/win32/deps/library/stats4/po/ru/LC_MESSAGES/R-stats4.mo differ
diff --git a/win32/deps/library/stats4/po/tr/LC_MESSAGES/R-stats4.mo b/win32/deps/library/stats4/po/tr/LC_MESSAGES/R-stats4.mo
new file mode 100644
index 0000000..1b66346
Binary files /dev/null and b/win32/deps/library/stats4/po/tr/LC_MESSAGES/R-stats4.mo differ
diff --git a/win32/deps/library/stats4/po/zh_CN/LC_MESSAGES/R-stats4.mo b/win32/deps/library/stats4/po/zh_CN/LC_MESSAGES/R-stats4.mo
new file mode 100644
index 0000000..97d40ba
Binary files /dev/null and b/win32/deps/library/stats4/po/zh_CN/LC_MESSAGES/R-stats4.mo differ
diff --git a/win32/deps/library/stats4/tests/confint.R b/win32/deps/library/stats4/tests/confint.R
new file mode 100644
index 0000000..105640f
--- /dev/null
+++ b/win32/deps/library/stats4/tests/confint.R
@@ -0,0 +1,23 @@
+## PR#14646
+
+library(stats4)
+minusLogL1 <- function(mu, logsigma2)
+    N*log(2*pi*exp(logsigma2))/2 + N*(var(x)+(mean(x)-mu)^2)/(2*exp(logsigma2))
+
+minusLogL2 <- function(mu) {
+    logsigma2 <- 0;
+    N*log(2*pi*exp(logsigma2))/2 + N*(var(x)+(mean(x)-mu)^2)/(2*exp(logsigma2))
+}
+
+N <- 100
+set.seed(123)
+x <- rnorm(N, 0, 1)
+
+fit <- mle(minusLogL1, start = list(mu=0, logsigma2=0))
+confint(fit)
+
+fit2 <- mle(minusLogL1, start = list(mu=0), fixed = list(logsigma2=0))
+confint(fit2) # failed
+
+fit3 <- mle(minusLogL2, start = list(mu=0))
+confint(fit3) # same
diff --git a/win32/deps/library/survival/CITATION b/win32/deps/library/survival/CITATION
new file mode 100644
index 0000000..366c43f
--- /dev/null
+++ b/win32/deps/library/survival/CITATION
@@ -0,0 +1,15 @@
+citHeader("To cite package 'survival' in publications use:")
+     
+# Grab the version and date from the DESCRIPTION file
+if(!exists("meta") || is.null(meta)) meta <- packageDescription("survival")
+year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date)
+vers <- paste("R package version", meta$Version)
+
+citEntry(entry="Manual",
+	title = "A Package for Survival Analysis in S",
+	author= personList(as.person("Terry Therneau")),
+	year =year,
+	note =vers,
+	textVersion= paste("Terry Therneau (", year, 
+	").  A Package for Survival Analysis in S. ",
+	vers, ".", sep=""))
diff --git a/win32/deps/library/survival/DESCRIPTION b/win32/deps/library/survival/DESCRIPTION
index 09fa300..f46c1a9 100644
--- a/win32/deps/library/survival/DESCRIPTION
+++ b/win32/deps/library/survival/DESCRIPTION
@@ -1,20 +1,19 @@
-Title: Survival analysis, including penalised likelihood.
-Maintainer: Thomas Lumley <tlumley u washington edu>
-Priority: recommended
-Package: survival
-Version: 2.35-4
-Date: 2009-04-01
-Depends: stats, utils, graphics, splines, R (>= 2.0.0)
-LazyData: Yes
-LazyLoad: Yes
-Author: Terry Therneau, original R port by Thomas Lumley
-Description: survival analysis: descriptive statistics, two-sample
-        tests, parametric accelerated failure models, Cox model.
-        Delayed entry (truncation) allowed for all models; interval
-        censoring for parametric models. Case-cohort designs.
-License: GPL-2
-URL: http://r-forge.r-project.org
-Packaged: Wed Apr 1 13:56:03 2009; tlumley
-Repository: CRAN
-Date/Publication: 2009-04-01 17:02:08
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 13:11:31 UTC; windows
+Title: Survival analysis, including penalised likelihood.
+Maintainer: Terry Therneau <therneau terry mayo edu>
+Priority: recommended
+Package: survival
+Version: 2.36-14
+Date: 2012-02-03
+Depends: stats, utils, graphics, splines, R (>= 2.13.0)
+LazyData: Yes
+LazyLoad: Yes
+Author: Terry Therneau, original Splus->R port by Thomas Lumley
+Description: survival analysis: descriptive statistics, two-sample
+  tests, parametric accelerated failure models, Cox model. Delayed entry
+  (truncation) allowed for all models; interval censoring for parametric
+  models. Case-cohort designs.
+License: GPL (>=2)
+URL: http://r-forge.r-project.org
+Packaged: 2012-04-25 17:11:24 UTC; therneau
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:14:03 UTC; windows
+Archs: i386, x64
diff --git a/win32/deps/library/survival/INDEX b/win32/deps/library/survival/INDEX
index 93eff05..aebf0a0 100644
--- a/win32/deps/library/survival/INDEX
+++ b/win32/deps/library/survival/INDEX
@@ -1,33 +1,88 @@
-Surv 	 	 Package a survival variable 
-clogit		 Conditional logistic regression
-cluster 	 Identify clusters. 
-cox.zph 	 Test the proportional hazards assumption of a Cox regression. 
-coxph 	 	 Proportional Hazards Regression 
-coxph.detail 	 Details of a cox model fit 
-coxph.object 	 Proportional Hazards Regression Object 
-coxph.rvar 	 Robust variance for a Cox model 
-frailty		 Frailty models by penalised likelihood
-is.ratetable 	 Verify that an object is of class ratetable. 
-lines.survfit 	 Add lines to a survival plot 
-plot.cox.zph 	 Graphical test of proportional hazards (requires splines)
-plot.survfit 	 Plot method for survfit. 
-print.survfit 	 Short summary of a survival curve 
-pspline		 Penalised (smoothing) splines
-pyears 	 	 Person Years 
-residuals.coxph  Calculate residuals for a coxph fit. 
-residuals.survreg Compute Residuals for survreg Objects
-ridge		 ridge regression 
-strata 	 	 Identify strata variables. 
-summary.survfit  Print a Survival Curve 
-survdiff 	 Test Survival Curve Differences 
-survexp 	 Compute Expected Survival 
-survexp.fit 	 Compute expected survival 
-survexp.usr      Mortality tables for US and some states (requires date)
-survfit 	 Compute a survival Curve for Censored Data 
-survfit.object 	 Survival Curve Object 
-survobrien 	 O'Brien's test for association of a variable with survival 
-survreg 	 Regression for a parametric survival model 
-survreg.object 	 Parametric Survival Model Object 
-survSplit	 Split data for creating time-dependent covariates.
-anova.survreg    ANOVA tables for survreg objects
-untangle.specials  Help process the 'specials' argument of the terms function. 
+Surv                    Create a Survival Object
+aareg                   Aalen's additive regression model for censored
+                        data
+aml                     Acute Myelogenous Leukemia survival data
+anova.coxph             Analysis of Deviance for a Cox model.
+attrassign              Create new-style "assign" attribute
+basehaz                 Compute the baseline survival curve for a Cox
+                        model
+bladder                 Bladder Cancer Recurrences
+cch                     Fits proportional hazards regression model to
+                        case-cohort data
+cgd                     Chronic Granulotomous Disease data
+clogit                  Conditional logistic regression
+cluster                 Identify clusters.
+colon                   Chemotherapy for Stage B/C colon cancer
+cox.zph                 Test the Proportional Hazards Assumption of a
+                        Cox Regression
+coxph                   Fit Proportional Hazards Regression Model
+coxph.control           Ancillary arguments for controling coxph fits
+coxph.detail            Details of a Cox Model Fit
+coxph.object            Proportional Hazards Regression Object
+dsurvreg                Distributions available in survreg.
+frailty                 Random effects terms
+heart                   Stanford Heart Transplant data
+is.ratetable            Verify that an object is of class ratetable.
+kidney                  Kidney catheter data
+lines.survfit           Add Lines or Points to a Survival Plot
+logan                   Data from the 1972-78 GSS data used by Logan
+lung                    NCCTG Lung Cancer Data
+mgus                    Monoclonal gammapothy data
+model.frame.coxph       Model.frame method for coxph objects
+model.matrix.coxph      Model.matrix method for coxph models
+nwtco                   Data from the National Wilm's Tumor Study
+ovarian                 Ovarian Cancer Survival Data
+pbc                     Mayo Clinic Primary Biliary Cirrhosis Data
+pbcseq                  Mayo Clinic Primary Biliary Cirrhosis,
+                        sequential data
+plot.aareg              Plot an aareg object.
+plot.cox.zph            Graphical Test of Proportional Hazards
+plot.survfit            Plot Method for 'survfit'
+predict.coxph           Predictions for a Cox model
+predict.survreg         Predicted Values for a 'survreg' Object
+print.aareg             Print an aareg object
+print.summary.coxph     Print method for summary.coxph objects
+print.summary.survexp   Print Survexp Summary
+print.summary.survfit   Print Survfit Summary
+print.survfit           Print a Short Summary of a Survival Curve
+pspline                 Smoothing splines using a pspline basis
+pyears                  Person Years
+quantile.survfit        Quantiles from a survfit object
+ratetable               Ratetable reference in formula
+ratetableDate           Convert date objects to ratetable form
+rats                    Rat data from Gail et al.
+residuals.coxph         Calculate Residuals for a 'coxph' Fit
+residuals.survreg       Compute Residuals for 'survreg' Objects
+ridge                   Ridge regression
+stanford2               More Stanford Heart Transplant data
+strata                  Identify Stratification Variables
+summary.aareg           Summarize an aareg fit
+summary.coxph           Summary method for Cox models
+summary.survexp         Summary function for a survexp object
+summary.survfit         Summary of a Survival Curve
+survConcordance         Compute a concordance measure.
+survSplit               Split a survival data set at specified times
+survdiff                Test Survival Curve Differences
+survexp                 Compute Expected Survival
+survexp.fit             Compute Expected Survival
+survexp.us              Census Data Sets for the Expected Survival and
+                        Person Years Functions
+survfit                 Create survival curves
+survfit.coxph           Compute a Survival Curve from a Cox model
+survfit.formula         Compute a Survival Curve for Censored Data
+survfit.object          Survival Curve Object
+survfitcoxph.fit        A direct interface to the 'computational
+                        engine' of survfit.coxph
+survobrien              O'Brien's Test for Association of a Single
+                        Variable with Survival
+survreg                 Regression for a Parametric Survival Model
+survreg.control         Package options for survreg and coxph
+survreg.distributions   Parametric Survival Distributions
+survreg.object          Parametric Survival Model Object
+survregDtest            Verify a survreg distribution
+tcut                    Factors for person-year calculations
+tobin                   Tobin's Tobit data
+tt                      Mark time tranform terms
+untangle.specials       Help Process the 'specials' Argument of the
+                        'terms' Function.
+veteran                 Veterans' Administration Lung Cancer study
diff --git a/win32/deps/library/survival/Meta/Rd.rds b/win32/deps/library/survival/Meta/Rd.rds
index 4be18c7..4ff07fd 100644
Binary files a/win32/deps/library/survival/Meta/Rd.rds and b/win32/deps/library/survival/Meta/Rd.rds differ
diff --git a/win32/deps/library/survival/Meta/data.rds b/win32/deps/library/survival/Meta/data.rds
index f01e54f..df4508e 100644
Binary files a/win32/deps/library/survival/Meta/data.rds and b/win32/deps/library/survival/Meta/data.rds differ
diff --git a/win32/deps/library/survival/Meta/hsearch.rds b/win32/deps/library/survival/Meta/hsearch.rds
index 27190ed..16f1de6 100644
Binary files a/win32/deps/library/survival/Meta/hsearch.rds and b/win32/deps/library/survival/Meta/hsearch.rds differ
diff --git a/win32/deps/library/survival/Meta/links.rds b/win32/deps/library/survival/Meta/links.rds
new file mode 100644
index 0000000..1d7715e
Binary files /dev/null and b/win32/deps/library/survival/Meta/links.rds differ
diff --git a/win32/deps/library/survival/Meta/nsInfo.rds b/win32/deps/library/survival/Meta/nsInfo.rds
index e603578..5569735 100644
Binary files a/win32/deps/library/survival/Meta/nsInfo.rds and b/win32/deps/library/survival/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/survival/Meta/package.rds b/win32/deps/library/survival/Meta/package.rds
index 032f1fd..8367e7b 100644
Binary files a/win32/deps/library/survival/Meta/package.rds and b/win32/deps/library/survival/Meta/package.rds differ
diff --git a/win32/deps/library/survival/Meta/vignette.rds b/win32/deps/library/survival/Meta/vignette.rds
new file mode 100644
index 0000000..b38ebcd
Binary files /dev/null and b/win32/deps/library/survival/Meta/vignette.rds differ
diff --git a/win32/deps/library/survival/NAMESPACE b/win32/deps/library/survival/NAMESPACE
index 4274399..6b9a9f3 100644
--- a/win32/deps/library/survival/NAMESPACE
+++ b/win32/deps/library/survival/NAMESPACE
@@ -11,11 +11,12 @@ export("Surv", "aareg", "attrassign",
      "is.na.ratetable",  "is.ratetable", 
      "labels.survreg", "match.ratetable", 
      "psurvreg", "qsurvreg", "dsurvreg",
-     "pspline", "pyears", "ratetable",  
+     "pspline", "pyears", "ratetable", "ratetableDate", 
      "ridge", "strata", "survConcordance",
      "survSplit", "survdiff", "survexp",  "survfit" ,
+     "survfitcoxph.fit",
      "survobrien",  "survreg", "survreg.control", "survreg.fit",
-     "survreg.distributions", "survregDtest", "tcut", 
+     "survreg.distributions", "survregDtest", "tcut", "tt",
      "untangle.specials")
 S3method(`[`, Surv)
 S3method(`[`, cox.zph)
@@ -43,14 +44,16 @@ S3method(attrassign, lm)
 S3method(extractAIC,coxph.penal)
 S3method(lines, aareg)
 S3method(lines, survfit)
+S3method(makepredictcall, pspline)
 S3method(model.frame, coxph)
-S3method(model.frame, survreg)
+S3method(model.matrix, coxph)
 S3method(plot, aareg)
 S3method(plot, cox.zph)
 S3method(plot, survfit)
 S3method(points, survfit)
 S3method(predict, coxph)
 S3method(predict, coxph.penal)
+S3method(predict, pspline)
 S3method(predict, survreg)
 S3method(predict, survreg.penal)
 S3method(print, Surv)
@@ -66,14 +69,17 @@ S3method(print, summary.cch)
 S3method(print, summary.coxph)
 S3method(print, summary.survfit)
 S3method(print, summary.survreg)
+S3method(print, survConcordance)
 S3method(print, survdiff)
 S3method(print, survexp)
 S3method(print, survfit)
 S3method(print, survreg)
 S3method(print, survreg.penal)
+S3method(quantile, survfit)
 S3method(ratetableDate, POSIXt)
+S3method(ratetableDate, Date)
 S3method(ratetableDate, date)
-S3method(ratetableDate, timeDate)
+S3method(ratetableDate, chron)
 S3method(residuals, coxph)
 S3method(residuals, coxph.null)
 S3method(residuals, coxph.penal)
@@ -83,11 +89,11 @@ S3method(summary, aareg)
 S3method(summary, coxph)
 S3method(summary, coxph.penal)
 S3method(summary, ratetable)
+S3method(summary, pyears)
 S3method(summary, survfit)
 S3method(summary, survreg)
 S3method(summary,cch)
 S3method(survfit, coxph)
-S3method(survfit, coxph.null)
 S3method(survfit, formula)
 S3method(vcov, cch)
 S3method(vcov, coxph)
diff --git a/win32/deps/library/survival/NEWS.Rd b/win32/deps/library/survival/NEWS.Rd
new file mode 100644
index 0000000..dab613f
--- /dev/null
+++ b/win32/deps/library/survival/NEWS.Rd
@@ -0,0 +1,702 @@
+\name{NEWS}
+\title{NEWS file for the survival package}
+\section{Changes in version 2.36-14}{
+  \itemize{
+    \item A supposedly cosmetic change to coxph in the last release
+    caused formulas with a "." on the right hand side to fail.  Fix this
+    and add a case with "." to the test suite.
+    }}
+
+\section{Changes in version 2.36-13}{
+  \itemize{
+    \item Add the anova.coxmelist function.  This is in the survival
+    package rather than in coxme since "anova(fit1, fit2)" is valid when
+    fit1 is a coxph and fit2 a coxme object, a case which will cause this
+    function to be called by way of anova.coxph.
+    
+    \item More work on "predvars" handling for the pspline function,
+    when used in predict calls.  Add a new test of this to the suite,
+    and the makepredictcall method to the namespace.
+    Fixes a bug pointed out by C Crowson.  
+
+    \item Deprecate the "robust" option of coxph.  When there are
+    multiple observations per subject it is almost surely the wrong
+    thing to do, while adding a "cluster(id)" term does the correct
+    thing. When there is only one obs per subject both methods work
+    correctly.
+
+    \item Add documentation of the output structure to the aareg help
+    file.
+
+    \item Change ratetableDate so that it still allows use of chron
+    objects, but doesn't need the chron library.  This eliminates a
+    warning messge from the package checks, but is also a reasonable
+    support strategy for a moribund package.  (Some of the local users keep
+    datasets for a long long time.)
+
+    \item Fix a bug in summary.survfit for a multiple-strata survival
+    object.  If one of the curves had no data after application of the
+    times argument, an output label was the wrong length.
+    
+    \item Fix a bug pointed out by Charles Berry: predict for a Cox
+    model which has strata, and the strata is a factor with not all its
+    levels represented in the data.  I had a mistake in the subscripting
+    logic: number of groups is not equal to max(as.integer(strata)).
+    
+    \item Changes to avoid overflow in the exponent made in 2.36-6
+    caused failure for one special usage: in case-cohort designs a dummy
+    offset of -100 could be added to some observations.  This was being
+    rounded away.  The solution is to 1: have coxsafe not truncate small
+    exponents and 2: do not recenter user provided offset values.
+
+    \item Fix bug in survfit.coxph.  Due to an indexing error I would
+    sometimes create a huge scratch vector midway through the
+    calculations (size = max value of "id"); the final result was always
+    correct however.  Data set provided by Cindy Crowson which had a
+    user id in the billions.
+
+    \item Fix bug pointed out by Nicholas Horton: predictions of
+    type expected, with newdata, from a Cox model without a strata
+    statement would fail with "x not found".  A misplaced parenthesis
+    from an earlier update caused it to not recreate the X matrix even
+    though it was needed later.  Also add some further information to
+    the predict manual page to clarify an issue when there is a frailty term.
+    }}
+
+\section{Changes in version 2.36-12}{
+  \itemize{
+    \item Fix a bug in the new fast subsets code.  The test suite had no
+    examples of strata + lots of tied times, so of course that's the
+    case where I had an indexing error.  Add a test case using the
+    clogit function, which exercises this.
+
+    \item Further memory tuning for survexp.
+    }}
+
+    \section{Changes in version 2.36-11}{
+  \itemize{
+    \item Make survexp more efficient.  The X matrix was being modified
+    in several places, leading to multiple copies of the data.  When the
+    data set was large this would lead to a memory shortage.
+
+    \item Cause anova.coxph to call anova.coxme when a list of models
+    has both coxph and coxme objects.
+
+    \item Add the quantile.survfit function.  This allows a user to
+    extract arbitrary quantiles from a fitted curve (and std err).
+
+    \item Fix an error in predict.coxph.  When the model had a strata
+    and the newdata and reference="sample" arguments were used, it
+    would (incorrectly) ask for a strata variable in the new data set.
+
+    \item Incorporate the fast subsets algorithm of Gail et al, when 
+    using coxph with the "exact" option.  The speed increase is profound 
+    though at the cost of some memory.    Reflect this in the
+    documentation for the clogit routine.
+    Note that the fast computation is not yet implemented for
+    (start,stop) coxph models.
+
+    \item Change the C routine used by coxph.fit from .C to .Call
+    semantics to improve memory efficiency, in particular fewer copies
+    of the X matrix.
+
+    \item Add scaling to the above routine.  This was prompted by a user
+    who had some variables with a 0-1 range and others that were
+    0 - 10^7, resulting in 0 digits of accuracy in the variance matrix.
+    (Economics data).
+
+    \item Comment out some code sections that are specific to Splus.
+    This reduced the number of "function not found" warnings from R CMD check.
+}}
+
+\section{Changes in version 2.36-10}{
+  \itemize{
+    \item 30 Sept 2011: The na.action argument was being ignored in
+    predict.coxph; pointed out by Cindy Crowson.
+
+    \item The log-likelihood for survreg was incorrect when there are
+    case weights in the model.  The error is a fixed constant for any
+    given data set, so had no impact on tests or inferences.  The error
+    and correction were pointed out by Robert Kusher.
+    
+    \item A variable name was incorrect in survpenal.fit.  This was in a
+    program path that had never been traversed until Carina Salt used
+    survreg with a psline(..., method='aic') call, leading to a
+    "variable not found" message.
+
+    \item Punctuation error in psline made it impossible for a user to
+    specify the boundary.knots argument.  Pointed out by Brandon
+    Stewart.
+
+    \item Add an "id" variable to the output of survobrien.
+
+    \item The survfitCI routine would fail for a curve with only one
+    jump point (a matrix collapsed into a vector).
+
+    \item Fix an error in survfit.coxph when the coxph model has both a
+    strata by covariate interaction and a cluster statement.  The
+    cluster term was not dropped from the Terms object as it should have
+    been, led to a spurious "variable not found" error.   Pointed out
+    by Eva Bouguen.
+
+    \item If a coxph model with penalized terms (frailty, pspline) also
+    had a redundant covariate, the linear predictor would be returned as
+    NA.  Pointed out by Pavel Krivitsky.
+}}
+
+\section{Changes in version 2.36-9}{
+  \itemize{
+    \item Due to a mistake in my script that submits to CRAN, the fix in
+    2.36-8 below was actually not propogated to the CRAN submission.
+
+    \item Fix an error in the Cauchy example found in the survreg.distributions
+    help page, pointed out by James Price.
+
+    \item Update the coxph.getdata routine to use the model.frame.coxph
+    and model.matrix.coxph methods.
+
+    \item Add the concordance statistic to the printout for penalized models.
+}}
+
+\section{Changes in version 2.36-8}{
+  \itemize{
+    \item Unitialized variable in calcuation of the variance of the
+    concordance.  Found on platform cross-checking by Brian Ripley.
+    \item Changed testci to use a fixed file of results from cmprsk
+    rather than invoking that package on-the-fly.  Suggested by the CRAN
+    maintainers.
+  }
+  }
+\section{Changes in version 2.36-7}{
+  \itemize{
+    \item Due to changes in R 2.13 default printout, the results of many of
+    the test programs change in trivial way (one more or fewer digits).
+    Update the necessary test/___.Rout.save files.  Per the core team's
+    suggestion the dependency for the package is marked as >=2.13.
+  }}
+  
+\section{Changes in version 2.36-6}{
+  \itemize{
+    \item An example from A Drummond caused iteration failure in
+    coxph: x=c(1,1,1,0,1, rep(0,35)), time=1:40, status=1.  The first
+    iteration overshoots the solution and lands on an almost perfectly
+    linear part of the loglik surface, which made the second iteration
+    go to a huge number and exp() overflows.  A sanity check routine
+    coxsafe is now invoked on all values of the linear predictor.
+    
+    \item 1 April: Fix minor bug in survfit.  For left censored data
+    where all the left censored are on the very left, it would give a
+    spurious warning message when trying to create a 0 row matrix that
+    it didn't need or use.  Pointed out by Steve Su.
+    
+    \item 31 March 2011: One of the plots in the r_sas test was wrong
+    (it's been a long time since I visually checked these).  The error
+    was in predict.survreg; it had not taken into account a change in
+    R2.7.1: the intercept attribute is reset to 1 whenever one
+    subscripts a terms object, leading to incorrect results for a model
+    with "-1" in the formula and a strata(): the intercept returned
+    when removing the strata.  I used this opportunity to move most of
+    the logic into model.frame.survreg and model.matrix.survreg
+    functions.  Small change to the model.frame.coxph and
+    model.matrix.coxph functions due to a better understanding of
+    xlevels processing.
+    
+    \item Round off error issue in survfit: it used both unique(time)
+    and table(time), and the resulting number of unique values is not
+    guarranteed to be the same for times that differ by a tiny amount.
+    Now times are coverted to a factor first.  Peter Savicky from the R
+    core team provided a nice discussion of the issue and helped me
+    clarify how best to deal with it.  The prior fix of first rounding
+    to 15 digits was good enough for almost every data set -- except the
+    one found by a local user just last week.
+    
+    \item Round off error in print.survfit pointed out by Micheal Faye.
+    If a survival value was .5 in truth, but .5- eps due to round off
+    the printed median was wrong. But it was ok for .5+eps. Simple
+    if-then logic error.
+    
+    \item Re-fix a bug in survfit.  It uses both unique and table in
+    various places, which do not round the same; I had added a
+    pre-rounding step to the code.  A data set from Fan Chun showed that
+    I didn't round quite enough. But the prior rounding did work for a
+    time of 2 vs (sqrt(2))^2: this bug is very hard to produce.  I now
+    use as.numeric(as.character(factor(x))), which induces exactly the
+    same rounding as table, since it is the same compuation path.
+
+    \item Further changes to pspline.  The new Boundary.knots argument
+    allows a user to set the boundary knots inside the range of data.
+    Code for extrapolation outside that range was needed,
+    essentially a copy of the code found in ns() for the same issue.
+    Also added a psplineinverse function, which may be useful with
+    certain tt() calls in coxph.
+    
+    \item 10 Mar 2011: Add the capablilty for time-dependent
+    transformations to coxph, along with a small vignette describing use
+    of the feature.  This code is still incompletely incorporated in
+    that the models work but other methods (residuals, predict, etc) are
+    not yet defined.
+    
+    \item 8 Mar 2011: Expand the survConcordance function.  The function
+    now correctly handles strata and  time dependent covariates, and
+    computes a standard error for the estimate.  All computation is based
+    on a balanced binary tree strucure, which leads to computation in
+    \eqn{O(n \log_2(n))}{O(n log(n))} time.
+    The \code{coxph} function now adds concordance to its output, and
+    \code{summary.coxph} displays the result.
+
+    \item 8 Mar 2011: Add the "reference" option to predict.coxph, a
+    feature and need pointed out by Stephen Bond.
+
+    \item 4 Mar 2011: Add a makepredictcall method for pspline(), which
+    in turn required addition of a Boundary.knots argument to the
+    function.
+    
+    \item 25 Feb 2011: Bug in pyears pointed out by Norm Phillips.  If a
+    subject started out with "off table" time, their age was not
+    incremented by that amount as they moved forward to the next "in
+    table" cell of the result.  This could lead to using the wrong
+    expected rate from the rate table.
+  }
+}
+
+\section{Changes in version 2.36-5}{
+  \itemize{
+    \item 20 Feb 2011: Update survConcordance to correctly handle case
+    weights, time dependent covariates, and strata.
+
+    \item 18 Feb 2011: Bug in predict.coxph found by a user (1 day after
+    36-4!).  If the coxph call had a subset and predict used newdata,
+    the subset clause was "remembered" in the newdata construction,
+    which is not appropriate.
+}}
+
+\section{Changes in version 2.36-4}{
+\itemize{
+  \item 17 Feb 2011: Fix to predict.coxph.  A small typo that only was
+  exercised if the coxph model had x=T.  Discovered via induced error in
+  the rankhazard package.  Added lines to the test suite to test for
+  this in the future.
+
+  \item Removed some files from test and src that are no longer needed.
+
+  \item Update the configure script per suggestion from Kurt H.
+  }}
+\section{Changes in version 2.36-3}{
+  \itemize{
+
+    \item 13 Feb 2011: Add the rmap argument to pyears, as was done for
+    survexp, and update the manual pages and examples. Fix one last bug
+    in predict.coxph (na.action use).  Passes all the
+    tests for inclusion on the next R release.
+
+    \item 8 Feb 2011: Change the name of the new survfit.coxph.fit routine to
+     survfitcoxph.fit; R was mistaking it for a survfit method.  Fix
+     errors in predict.coxph when there is a newdata argument, including
+     adding yet another test program.
+
+   \item 1 Feb 2011: Fix bugs in coxph and survreg pointed out by Heinz
+    Tuechler and dtdenes cogpsyphy hu, independently, that were the same
+    wrong line in both programs.  With interactions, a non-penalized
+    term could be marked as penalized due to a mismatched vector length,
+    leading to a spurious error message later in the code.
+  
+  \item 1 Feb 2011: Update survfit.coxph to handle the case of a strata by
+    covariate interaction.  All prior releases of the code did this
+    wrong, but it is a very rare case (found by Frank Harrell).  Added a
+    new test routine coxsurv4.  Also found a bug in [.survfit; for a
+    curve with both strata and multiple columns, as produced by
+    survfit.coxph, it could drop the n.censored item when subscripting.
+    A minor issue was fixed in coxph: when iter=0 the output coefficient
+    vector should be equal to the input even when the variance is
+    singular. 
+
+  \item 30 Jan 2011: Move the noweb files to a top level directory, out of
+    inst/.  They don't need to be copied to binary installs.
+    
+  \item 22 Jan 2011: Convert the Changelog files to the new inst/NEWS.Rd
+    format.
+  
+  \item 1 Jan 202011: The match.ratetable would fail when passed a data
+    frame with a character variable.  This was pointed out by Heinz
+    Tuechler, who also did most of the legwork to find it.  It was
+    triggered by the first few lines of tests/jasa.R (expect <- ....)
+    when options(stringsAsFactors=FALSE) is set. 
+ }
+}
+
+\section{Changes in version 2.36-2}{
+\itemize{
+  \item 20 Dec 2010: Add more test cases for survfit.coxph,
+    which led to significant updates in the code. 
+
+  \item 18 Nov 2010: Add nevent to the coxph output and printout in
+    response to a long standing user request.
+
+  \item 14 Dec 2010: Add an as.matrix method for Surv objects. 
+
+  \item 11 Nov 2010: The prior changes broke 5 packages: the dependencies form a bigger
+test suite than mine!  1. Survival curve for a coxph model with sparse
+frailty fit; fixed and added a new test case.  2. survexp could fail if 
+called from within a function due to a scoping error.  3. "Tsiatis" was once
+a valid type (alias for 'aalen')  for survfit.coxph; now removed from the 
+documentation but the code needed to be backwards compatable.  The other two
+conflicts were fixed in the packages that call survival.  There are still
+issues with the rms package which I am working out with Frank H.
+ }
+}
+
+\section{Changes in version 2.36-1}{
+ \itemize{
+  \item{27 Oct 2010: Finish corrections and test to the new code. It now passes
+the checks.  The predict.coxph routine now does strata and standard errors
+correctly, factors propogate through to predictions, and numerous small 
+errors are addressed.  Predicted survival curves for a Cox model has been
+rewritten in noweb and expanded. Change the version number to 2.36-1.}
+
+  \item{17 Oct 2010: Per a request from Frank Harrell (interaction with his library),
+survfit.coxph no longer reconstructs the model frame unless it really needs
+it: in some cases the 'x' and 'y' matrices may be sufficient, and may be
+saved in the result.  Add an argument "mf" to model.matrix.coxph for more 
+efficient interaction when a parent routine has already recovered the model 
+frame.
+  In general, we are trying to make use of model.matrix.coxph in many of the
+routines, so that the logic contained there (remove cluster() calls, pull
+out strata, how to handle intercepts) need not be replicated in multiple 
+places.}
+
+  \item{12 Oct 2010: Fix a bug in the modified lower limits for survfit (Dory & Korn).
+A logical vector was being inadvertently converted to numeric.  Pointed out
+by Andy Mugglin.  A new case was added to the test suite. }
+ }
+}
+
+\section{Changes in version 2.35}{ 
+ \itemize{
+  \item{15 July 2010: Add a coxph method for the logLik function.  This is used by
+the AIC function and was requested by a user.}
+
+  \item{29 July 2010: Fix 2 bugs in pyears.  The check for a US rate table was off
+(minor effect on calculations), and there was a call to julian which assumed
+that the origin argument could be a vector.  }
+
+  \item{21 July 2010: Fix a problem pointed out by a user: calling survfit with almost
+tied times, e.g., c(2, sqrt(2)^2), could lead to an inconsistent result.  Some
+parts of the code saw these as 2 unique values per the unique() function, some
+as a single value using the results of table().  We now pre-round the input
+times to one less decimal digit than the max from .Machine$double.digits.
+  Also added the noweb.R processing function from the coxme package, so that
+the noweb code can be extracted "on the fly" during installation using
+commands in the configure and cleanup scripts.  }
+
+  \item{11 July 2010: A rewrite of the majority of the survfit.coxph code.  The primary
+benefits are 1: finally tracked down and eliminated the bug for standard errors
+of case weights + Cox survival + Efron method; 2: the individual=TRUE and FALSE
+options now use the same underlying code for curves, before there were some
+options valid only for one or the other; 3: code was rewritten using noweb 
+with a considerable increase in documentation; 4: during the verification
+process some errors were found in the test suite and corrected, e.g., a 
+typo in my book led to failure of an all.equal test in book4.R.  Similar
+to the rewrite for survfit several years ago, the new code has far less use
+of .C to help transparency.}
+
+  \item{21 May 2010: Fix bug in summary.survfit.  For a survival curve from a Cox model
+with start,stop data, the 'times' argument would generate an error.}
+
+  \item{24 May 2010: Fix an annoyance in summary.survfit.  When the survival data 
+had an event or censor at time 0 and summary is called with a times argument,
+then my constructed call to approx() would have duplicate x values.  The answer
+was always right, but approx has begun to print a bothersome warning message.  
+A small change to the constructed argument vector avoids it.}
+
+  \item{7 April 2010: Minor bug pointed out by Fredrik Lundgren.  In survfit if the
+method was KM (default) and error = Tsiatis an error message results.  Simple
+fix: code went down the wrong branch.}
+
+  \item{24 Feb 2010: Serious bug pointed out by Kevin Buhr.  In Surv(time1, time2,stat)
+if there were i) missing values in time1 and/or time2, ii) illegal value
+sets with time1 >=time2, and iii) all the instances of ii do not preceed all
+the instances of i, then the wrong observation (not the illegal) will be 
+thrown out.  Repaired, and a new test added.
+  Minor updates to 3 test files: survreg2, testci, ratetable.}
+
+  \item{8 Feb 2010: Bug pointed out by Heinz Tuechler -- if a subscript was dropped from
+a rate table the 'type' attribute got dropped, e.g. survexp.usr[,1,,].}
+
+  \item{26 Jan 2010: At the request of Alex Bokov, added the xmax, xscale, and fun
+arguments to points.survfit.}
+
+  \item{26 Jan 2010: Fix bug pointed out by Thomas Lumley -- with case weights <1 a Cox 
+model with (start, stop) input would inappropriately decide it needed to do
+step halving to find a solution, eventually failing to converge.  It was
+treating a loglik >0 as an indication of failure, but such values arise for
+small case weights. Let L(w) be the loglik for a data set where everyone is
+given a weight of w, then L(w)= wL(1) - d log(w) where d=number of deaths in
+the data.  For small enough w positivity of L(w) is certain.}
+
+  \item{25 Jan 2010: Fix bug in summary.ratetable pointed out by Heinze Tuechler.  Added
+a call to the function to the test suite as well.}
+
+  \item{15 Dec 2009: Two users pointed out a bug that crept into survreg() with a
+cluster statement, when a t(x)%*%x was replaced with crossprod.  A trivial
+fix, but in response I added another test that more formally checks the
+dfbeta residuals and found a major oversight for the case of multiple
+strata.  }
+
+  \item{14 Dec 2009: 1.Fix bug in frailty.xxx, if there is a missing value in the levels
+it gets counted by "length(unique(x))" (frailty is called before NA
+removal.)  2.SurvfitCI had an incorrect CI with case weights, and 3. in
+survreg a call to resid instead of residuals.survreg, before the class
+was attached.}
+
+  \item{11 Nov 2009: The 'type' argument does not make sense for plot.survfit.  (If 
+type='p', should one plot the tops of the step function, the bottoms, or
+both?).  Make it explicitly disallowed in response to an R-help query,
+rather than the confusing error message that currently arose.}
+
+  \item{28 Oct 2009: The basehaz function would reorder the labels of the strata
+factor.  Not a bug really, but a "why do this?"  Unintended consequence of
+a character -> factor conversion.}
+
+  \item{1 Oct 2009: Fix a bug pointed out by Ben Domingue.  There was one if-then-else
+path into step-halving in the frailty.controldf routine that would refer to
+a non-existent variable.  A very rarely followed path, obviously, and with
+the obvious fix. The mathematics of the update was fine.}
+
+  \item{30 Sep 2009: For coxph and model.matrix.coxph, re-attach the
+attributues lost from the X matrix when the intercept is removed,
+i.e., X <- X[,1].  In particular, some downstream libraries depend on
+the assign attribute. 
+  For predict.coxph remove an earlier edit so that a single variable model
++ type='terms' returns a matrix, not a vector.  This is expected by the 
+termplot() function.  It led to a whole lot of changes in the test suite
+results, though, due to more "matrix" printouts.}
+
+  \item{4 Sep 2009: Added a model.matrix.coxph and model.frame.coxph methods.  The
+model.matrix.default function ceased to work for coxph models sometime
+between R 2.9 and 2.9.2 (best guess).  This wasn't picked up in the test
+suite but rather by failure of 3 packages that depend on survival.  Also added
+a test.  Update CRAN since this broke other's packages.}
+
+  \item{20 Aug 2009: One more fix to predict.coxph.  It needed to use 
+delete.response(Terms) rather than Terms, so as to not look for (unnecessarily)
+the response variable when the newdata argment is used.  Pointed out by Michael
+Conklin.}
+
+  \item{17 Aug 2009: Small bug in survfit.coxph.null pointed out by Frank Harrell.  The
+'n' component would be missing if the input data included strata, i.e., the
+initial model had used x=TRUE.  He also pointed out the fix.}
+
+  \item{10 June 2009: Fix an error pointed out by Nick Reich, who was the first to use
+interval censored data + user defined distribution in survreg, jointly.  There
+was no test case and creating one uncovered several errors (but only for this
+combination).  All the error cases led to catastrophic failure, highlighting
+the extreme rarity of a user requesting this combination.}
+
+  \item{2 June 2009: Surv(time1, time2, status, type='interval') would fail for an NA
+status code.  Pointed out by Achim Zeilus.}
+
+  \item{22 May 2009: Allow single subscripts to rate tables, e.g. survexp[1:10: .  
+Returns a simple vector of values.  The str() function does this to print out
+a short summary.  Problem pointed out by Heinz Tuechler.}
+
+  \item{21 May 2009: Create a test case for factor variables/newdata/predict for coxph 
+and survreg.  This led to a set of minor fixes; the code is now in line with
+the R standard for model functions.  One consequence is that model.frame.coxph
+and model.frame.survreg are no longer needed, so have been removed.}
+
+  \item{20 May 2009: The manual page for survfit was confusing, since it tries to 
+document both the standard KM (formula method) and the coxph method.  I've
+split them out so that now survfit documents only the basic method and points 
+a user the appropriate specialized page.}
+
+  \item{1 May 2009: The anova.coxph function was incorrect for models with a strata
+term.  Fixed this, and made chisquare tests the default.}
+
+  \item{22 April 2009: The coxph code had an override to iter and eps, making both of
+them more strict for a penalized model.  However, the overall default values
+have changed over time, so that these lines actually decreased accuracy - the
+opposite of their intent.  Removed the lines.  Also removed the iter.miss and
+eps.miss components (on which this check depended) from coxph.control, which
+makes that function match its documentation.}
+
+ }
+}
+
+\section{Changes in version 2.34 and earlier}{
+\subsection{Merge of the TMT source code tree with the Lumley code tree}{
+ \itemize{
+
+  \item Issues/decisions in remerging the Mayo and R code: 
+  For most of routines, it was easier to start with the Lumley code and add
+the Therneau fixes.  This is because Tom had expanded a lot of partial 
+matches, e.g., fit$coef in the TT code vs fit$coefficients.  Routines with
+substantial changes were, of course, a special case.
+  The most common change is an is.R() construct to choose class vs oldClass.
+  \item xtras.R: Move anova.coxph and anova.coxphlist to their own
+  source files.
+  The remainder of the code is R only.
+
+  \item survsum: removed from package
+
+  \item survreg.old: has been removed from the package
+
+  \item survfit.s: 
+   Depreciate the "formula with no ~1" option
+   Mayo code for [ allows for reordering curves
+   Separate out the R "basehaz" function as a separate source file
+
+  \item survfit.km.s: The major change of did not get copied into R, so lots of
+changes.  R had "new.time" and Splus 'start.time' for the same argument.  Allow
+them both as synonyms.
+   The output structure also changed: adapt the new one.  This is mostly some
+name changes in the components, removing unneeded redundancies created by
+a different programmer. 
+
+  \item survfit.coxph.s:  TMT code finally fixed the "Can't (yet) to case weights" 
+problem.  There must have been 10 years been the intent and execution. 
+
+  \item survexp.s:  Add "bareterms" function from R, which replaces a prior use of
+  terms.inner (in Splus but not R). 
+
+  \item survdiff.s: R code had the old (incorrect) expected <- sum(1-offset), since
+corrected to sum(-log(offset)) . 
+
+  \item{summary.coxph.s: This was a mess, since Tom and I had independently made the
+ addition of a print.summary.coxph function.  Below, TMT means that it was the
+ choice in the Splus code, TL means that it was the choice in R
+	1. Put the coef=T argument in the print function, not summary (TMT)
+	2. Change the output's name from coef to coefficients (suggestion of
+  Peter Dalgaard).  Also change one column name to Pr(>|z|) for R.
+	3. Remove last vestiges of a reference to the 'icc' component (TMT)
+	4. Do not include score, rscore, naive.var in the result (TL)
+	5. Do include loglik in the result (TMT)
+	6. Compute the test statistics (loglik, Wald, etc) in the summary
+   function rather than in the print.summary function (TL)
+	7. Remove the digits option from summary, it belongs in print.summary.
+   (neither)}
+
+  \item{strata.s: R code added a sep argument, this is ok
+     R changed the character string NA to as.character(NA).  Not okay
+          1. won't work with Splus, 
+          2. This is a label, designed for printing, 
+	          and so it should be a character string.  }
+
+  \item{residuals.coxph.s: R had added type='partial'.  (Which I'm not very partial to,
+  from their statistical properties.  But they are legal, and I assume that
+  someone requested them).}
+
+  \item{print.survfit.s: Rewritten as a part of the general survival rewrite.  Created
+the function 'survmean' which does most of the work, and is shared by print and
+summary, so that the values from 'print' are now available.
+   Fix the minmin function: min(NULL) gives NA in Splus, which is the right
+answer for a non-estimable median, but Inf in R.  Explicitly deal with this
+case, and add a bunch of comments.
+   R had the print.rmean option, this has been expanded to a more general
+rmean option that allows setting the cutoff point.
+   R added a print.n option with 3 choices, my code includes all 3 in the 
+output.  }
+
+  \item{lines.survfit.s: 
+    The S version has a new block of code for guessing "firstx" more
+intellegently when it is missing.  (Or, one hopes is is more intellegent!)}
+
+  \item{coxph.control.s: 
+   The R code had tighter tolerances (eps= 1e-9) than Splus (1e-4) and
+a higher iterationn count (20 vs 10). 
+   Set eps to 1e-8 and iter to 15, mostly bending to the world.  The tighter
+iteration is defensible, but I still maintain that a Cox model that takes >10 
+iterations is not going to finish if you give it 100.  The likelihood surface
+is almost perfectly quadratic near the minimum.  (Not true for survreg by the
+way).}
+
+  \item{: In Surv, the Mayo code creates NA's out of invalid status values or
+start,stop pairs, rather than a stop and error message.  This is to
+allow for example
+       coxph(Surv(time1,time2, status).... , subset=(goodlines))
+succeed, when "goodlines" is the subset with correct values.}
+}
+}
+
+\subsection{Older changes}{
+ \itemize{
+  \item{25SepO7: How embarrassing -- someone pointed out that I had Dave Harrington's
+name spelled wrong in the options to survfit.coxph!}
+
+  \item{9Jul07: In a model with offsets, survreg mistakenly omitted the offset
+from the returned linear.predictor component.}
+
+  \item{10May07: Change summary.coxph so that it returns an object of class
+summary.coxph, and add a print method for that object.}
+
+  \item{22Jun06: Update match.ratetable, so that more liberal matches are now
+allowed.  For instance,  'F', 'f', 'female', 'fem', 'FEMA', etc are 
+now all considered matches to the dimname "female" in survexp.us.}
+
+  \item{26Apr06: Fix bug in summary.survfit, pointed out by Bob Treder.  With
+the times option, the value of n.risk would be wrong for "in between"
+times; e.g., the data had events and/or censoring at times 10,
+20,... and we asked for printout at time 15.  It should give n.risk at time
+20, it was returning the value at time 10. Interestingly, the code had
+a very careful treatment of this case, along with an example in the
+comments, and the "the right answer is" part of the comment was wrong!
+So the code correctly computed an incorrect answer.  Added another
+test case to the test suite, survtest2.}
+
+  \item{21Apr06: Fix problem in [.survfit, pointed out by Thomas Lumley.  If
+fit <- survfit(Surv(time, status) ~ ph.ecog, lung), then fit[2:1] did
+not reorder the output correctly.  I had never tested putting the 
+subscripts in non-increasing order.}
+
+  \item{7Feb06: Fix a problem in the coxph iteration (coxfit2.c, coxfit5, agfit3,
+agfit5, agexact).  It will likely never catch anyone again, even if I 
+didn't fix it.  In a particular data set, beta overshot and step halving
+was invoked.  During step halving, a loglik happened to occur that was
+within eps of the prior step's loglik --- and the routine decided, erroneously,
+that it had converged!  (A nice quadratic curve, a first guess b1 to the 
+left of  the desired max of the curve.  The next guess b2 overshot and ends 
+up with a lower loglik, on the right side of the max.  Back up to the 
+midpoint of b1 and b2, and this guess, still to the right of the max (still
+too large) has EXACTLY the same value of y as b1 did, but on the other side
+of the max from b1.  "Last two guesses give the same answer, I'm done" said
+the routine).}
+
+  \item{27Sep05: Found and fixed a nasty bug in survfit.  When method='fh2' and
+there were multiple groups I had a subscripting bug, leading to vectors
+that were supposed to be the same length, but weren't, passed into C.
+The resulting curves were obviously wrong -- survival precipitously drops 
+to zero.}
+
+  \item{5May05: Add the drop=F arg to one subscripting selection in survfit.coxph.
+	        temp <- (matrix(surv$y, ncol=3))[ntime,,drop=F] 
+If you selected only 1 time point (1 row) in the final output, the code
+would fail.  Pointed out by Cindy Crowson.}
+
+  \item{18Apr05: Bug in survfit.turnbull.  The strata variable was not being
+filled in (number of points per curve).  So if multiple curves were
+generated at once, i.e., with something on the right hand side of ~ in
+the formula, all the downstream print/plot functions would not work
+with the result.}
+
+  \item{8Feb05: Fix small typo in is.ratetable, introduced on 24Nov04: (Today
+was the first time I added to the standard library, and thus ended
+up using the non-verbose mode.)}
+
+  \item{8Feb05: Add the data.frame argument to pyears.  This causes the output
+to contain a dataframe rather than a set of arrays.  It is useful for
+further processing of the data using Poisson regression.}
+
+  \item{7Feb05: Modified print.ratetable to be more useful.  It now tells 
+about the ratetable, rather than printing all of its values.}
+
+  \item{8Dec04: Fix a small bug in survfit.turnbull. If there are people left 
+censored before the first
+time point of any other kind (interval, exact, or right censored),
+the the plotted height of the curve from "rightmost left censoring time"
+to "leftmost event time", that is the flat tail on the left, was at
+the wrong height.
+  Added another test to testreg/reliability.s for this.}
+
+  \item{24Nov04: Change is.ratetable to give longer messages}
+}
+}
+}
diff --git a/win32/deps/library/survival/R/survival b/win32/deps/library/survival/R/survival
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/survival/R/survival
+++ b/win32/deps/library/survival/R/survival
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/survival/R/survival.rdb b/win32/deps/library/survival/R/survival.rdb
index b2cae16..9b73f54 100644
Binary files a/win32/deps/library/survival/R/survival.rdb and b/win32/deps/library/survival/R/survival.rdb differ
diff --git a/win32/deps/library/survival/R/survival.rdx b/win32/deps/library/survival/R/survival.rdx
index d1ac08c..78ba92b 100644
Binary files a/win32/deps/library/survival/R/survival.rdx and b/win32/deps/library/survival/R/survival.rdx differ
diff --git a/win32/deps/library/survival/data/Rdata.rdb b/win32/deps/library/survival/data/Rdata.rdb
index 56aa883..d365f62 100644
Binary files a/win32/deps/library/survival/data/Rdata.rdb and b/win32/deps/library/survival/data/Rdata.rdb differ
diff --git a/win32/deps/library/survival/data/Rdata.rds b/win32/deps/library/survival/data/Rdata.rds
index 0c13cba..e8c9b02 100644
Binary files a/win32/deps/library/survival/data/Rdata.rds and b/win32/deps/library/survival/data/Rdata.rds differ
diff --git a/win32/deps/library/survival/data/Rdata.rdx b/win32/deps/library/survival/data/Rdata.rdx
index ddbc442..76c18ea 100644
Binary files a/win32/deps/library/survival/data/Rdata.rdx and b/win32/deps/library/survival/data/Rdata.rdx differ
diff --git a/win32/deps/library/survival/doc/index.html b/win32/deps/library/survival/doc/index.html
new file mode 100644
index 0000000..6923ac9
--- /dev/null
+++ b/win32/deps/library/survival/doc/index.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Vignettes</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
+<img class="toplogo" src="/doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="/doc/html/index.html"><img src="/doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div>
+<h2>Vignettes from package 'survival'</h2>
+<table width="100%">
+<col width="22%">
+<col width="2%">
+<col width="50%">
+<col width="8%">
+<col width="8%">
+<col width="8%">
+<tr><td align="right" valign="top"><a href="../../../library/survival/doc/timedep.pdf">survival::timedep</a></td>
+<td></td><td valign="top">Using Time Dependent Covariates</td>
+<td valign="top"><a href="../../../library/survival/doc/timedep.pdf">PDF</a></td>
+<td valign="top"><a href="../../../library/survival/doc/timedep.Rnw">source</a></td>
+<td valign="top" nowrap><a href="../../../library/survival/doc/timedep.R">R code</a></td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/survival/doc/timedep.R b/win32/deps/library/survival/doc/timedep.R
new file mode 100644
index 0000000..1fe59de
--- /dev/null
+++ b/win32/deps/library/survival/doc/timedep.R
@@ -0,0 +1,121 @@
+### R code from vignette source 'timedep.Rnw'
+
+###################################################
+### code chunk number 1: preamble
+###################################################
+options(width=60, continue=" ")
+makefig <- function(file, top=1, right=1, left=4) {
+    pdf(file, width=9.5, height=7, pointsize=18)
+    par(mar=c(4, left, top, right) +.1)
+    }
+library(survival)
+
+
+###################################################
+### code chunk number 2: timedep.Rnw:75-77 (eval = FALSE)
+###################################################
+## fit <- coxph(Surv(time1, time2, status) ~ age + creatinine, 
+##              data=mydata)
+
+
+###################################################
+### code chunk number 3: timedep.Rnw:153-186
+###################################################
+cgdname <- c("id", "center", "random.dt", "trt", "sex", "age", 
+             "height", "weight", "inheritance", "steroids", 
+             "antibiotic", "inst", "futime", paste("e", 1:7, sep=''))
+cgd1 <- read.table('cgd.dat', header=F, fill=T, col.names=cgdname,
+                   colClasses=c("integer", "integer", "character",
+                                rep("integer", 3), rep("numeric",2),
+                                rep("integer", 12)))
+
+cgd1$ninfect <- rowSums(!is.na(as.matrix(cgd1[,14:20])))
+cgd1$random.dt <- as.Date(cgd1$random.dt, format="%m%d%y")
+cgd1$sex <- factor(cgd1$sex, labels=c("M", "F"))
+cgd1$inst <- factor(cgd1$inst, labels=c("NIH", "US-Other", 
+                          "Amsterdam", "Europe-Other"))
+
+temp <- apply(as.matrix(cgd1[,13:20]), 1, function(x) {
+    z <- as.vector(x[!is.na(x)])
+    if (length(z)==1) cbind(0, z, 0)
+    else {
+        temp <- cbind(c(0, z[-1]), 
+                      c(z[-1], z[1]), 
+                      c(rep(1, length(z)-1), 0))
+        if (z[1]== z[length(z)]) temp[-nrow(temp),]
+        else temp
+    }})
+
+index <- rep(1:nrow(cgd1), unlist(lapply(temp, nrow)))
+cgd2 <- data.frame( cgd1[index, 1:12], 
+                   time1= unlist(lapply(temp, function(x) x[,1])), 
+                   time2= unlist(lapply(temp, function(x) x[,2])), 
+                   event= unlist(lapply(temp, function(x) x[,3])), 
+                   enum = unlist(lapply(temp, function(x) 1:nrow(x))))
+cfit <- coxph(Surv(time1, time2, event) ~ trt + sex + age +
+               inheritance + cluster(id), data=cgd2)
+
+
+###################################################
+### code chunk number 4: timedep.Rnw:260-268
+###################################################
+load('raheart.rda')
+age2 <- tcut(raheart$agechf*365.25, 0:110* 365.25, labels=0:109)
+rowid <- 1:nrow(raheart)
+pfit <- pyears(Surv(startday, stopday, hospevt) ~ age2 + rowid,
+               data=raheart, data.frame=TRUE, scale=1)
+print(pfit$offtable)
+pdata <- pfit$data
+print(pdata[1:6,])
+
+
+###################################################
+### code chunk number 5: timedep.Rnw:297-314
+###################################################
+index <- as.integer(pdata$rowid)
+lagtime <- c(0, pdata$pyears[-nrow(pdata)])
+lagtime[1+ which(diff(index)==0)] <- 0 #starts at 0 for each subject
+temp <- raheart$startday[index] + lagtime  #start of each new interval
+data2 <- data.frame(raheart[index,], 
+                    time1= temp,
+                    time2= temp + pdata$pyears,
+                    event= pdata$event,
+                    age2=  1+ as.numeric(pdata$age2) )
+
+afit1 <- coxph(Surv(startday, stopday, hospevt) ~ male + pspline(agechf), 
+               data=raheart)
+afit2 <- coxph(Surv(time1, time2, event) ~ male + pspline(age2), data2)
+#termplot(afit1, terms=2, se=TRUE, xlab="Age at Diagnosis of CHF")
+#termplot(afit2, terms=2, se=TRUE, xlab="Current Age")
+
+table(with(raheart, tapply(hospevt, patid, sum)))
+
+
+###################################################
+### code chunk number 6: timedep.Rnw:330-334
+###################################################
+afit2b <- coxph(Surv(startday, stopday, hospevt) ~ male + tt(agechf),
+                data=raheart, 
+                tt=function(x, t, ...) pspline(x + t/365.25))
+afit2b
+
+
+###################################################
+### code chunk number 7: timedep.Rnw:360-367
+###################################################
+function(x, t, riskset, weights){ 
+    obrien <- function(x) {
+        r <- rank(x)
+        (r-.5)/(.5+length(r)-r)
+    }
+    unlist(tapply(x, riskset, obrien))
+}
+
+
+###################################################
+### code chunk number 8: timedep.Rnw:377-379
+###################################################
+function(x, t, riskset, weights) 
+    unlist(tapply(x, riskset, rank))
+
+
diff --git a/win32/deps/library/survival/doc/timedep.Rnw b/win32/deps/library/survival/doc/timedep.Rnw
new file mode 100644
index 0000000..10b60f3
--- /dev/null
+++ b/win32/deps/library/survival/doc/timedep.Rnw
@@ -0,0 +1,419 @@
+\documentclass{article}
+\usepackage{amsmath}
+\usepackage{Sweave}
+\addtolength{\textwidth}{1in}
+\addtolength{\oddsidemargin}{-.5in}
+\setlength{\evensidemargin}{\oddsidemargin}
+
+%\VignetteIndexEntry{Using Time Dependent Covariates}
+
+\title{Using Time Dependent Covariates and Time Dependent Coefficients 
+  in the Cox Model}
+\author{Terry Therneau \and Cindy Crowson\\ Mayo Clinic}
+
+\begin{document}
+\maketitle
+
+\SweaveOpts{keep.source=TRUE}
+<<preamble, echo=F>>=
+options(width=60, continue=" ")
+makefig <- function(file, top=1, right=1, left=4) {
+    pdf(file, width=9.5, height=7, pointsize=18)
+    par(mar=c(4, left, top, right) +.1)
+    }
+library(survival)
+@ 
+
+\section{Introduction}
+One of the strengths of the Cox model is its ability to encompass covariates
+that change over time, due to the theoretical foundation in martigales.
+A \emph{martingale} (original definition) is a betting strategy in games of
+chance.  One of the simplest and best known is doubling the bet each time
+you lose.  For instance consider the following game of roulette:
+\begin{equation*}
+  \begin{tabular}{rcc|c}
+    Bet & Outcome & Win  & Running total \\ \hline
+    R \$1 & Red   &  2   & 1 \\ &&&\\
+    R \$1 & Black &  0   & 0 \\
+    R \$2 & Black &  0   & -2 \\
+    B \$4 & Red   &  0   & -6 \\
+    R \$8 & Black &  0   & -14  \\
+    B \$16& Black & 32   & 2 \\ &&&\\
+    B \$1 & Red   &  0   & 1 \\
+    B \$2 & Black &  4   & 3 \\&&&\\
+    \vdots & \vdots & \vdots &\vdots
+  \end{tabular}
+\end{equation*}
+At the end of each cycle of bets the player is another \$1 ahead.
+The problem is that a modest sequence of losses will exhaust their stake.
+
+The rule for time dependent covariates in a Cox model is simple
+and essentially the same as that for gambling: you cannot look into
+the future.
+A covariate may change in any way based on past data or outcomes, but it
+may not reach ``forward'' in time.
+One of the more well known examples of this error is analysis by response:
+at the end of a trial a survival curve is made comparing those who had an
+early response to treatment (shrinkage of tumor, lowering of cholesterol,
+or whatever), and it discovered that response predicts survival.
+The problem arises because  subjects are classified as responders or 
+non-responders from the beginning of the study, i.e., they are placed into
+group A or B before the response has occurred.  
+As a consequence, any early deaths that occur before response can be
+assessed will be assigned to the non-responder group, even deaths that have
+nothing to do with the condition under study.
+
+There are many variations on the error: interpolation of the values of a
+laboratory test linearly between observation times, removing subjects who do
+not finish the treatment plan, imputing the date of an adverse event midway
+between observation times, etc.  
+All of these are similar to running a red light in your car: 
+disaster is not guarranteed --- but it is likely.
+
+The most common way to encode time-dependent covariates is to use the
+(start, stop] form of the model.
+<<echo=TRUE, eval=FALSE>>=
+fit <- coxph(Surv(time1, time2, status) ~ age + creatinine, 
+             data=mydata)
+@ 
+In this data set a patient might have the following observations
+\begin{center}
+  \begin{tabular}{ccccccc}
+    subject  & time1 & time2 & status & age & creatinine & \ldots \\ \hline
+    1 & 0 & 15 & 0 & 25 & 1.3 \\
+    1 & 15& 46 & 0 & 25 & 1.5 \\
+    1 & 46& 73 & 0 & 25 & 1.4 \\
+    1 & 73& 100& 1 & 25 & 1.6 \\
+\end{tabular}
+\end{center}
+In this case the variable \emph{age} = age at entry to the study stays the
+same from line to line, while the value of creatinine varies and is treated as
+1.3 over the interval $(0, 15]$, 1.5 over $(15, 46]$, etc.  The intervals are
+open on the left and closed on the right, which means that the creatinine
+is taken to be 1.3 on day 15.
+The status variable describes whether or not each interval ended in an event.
+
+One commmon question with this data setup is whether we need to worry about
+correlated data, since a given subject has multiple observations.
+The answer is no, we do not.  The reason is that this representation is
+simply a bookkeeping trick; the likelihood equations at any time point
+use only one copy of any subject, the program picks out the correct
+row of data at any given time.
+There are two exceptions to this rule, in which case the cluster variance
+is necessary:
+\begin{itemize}
+  \item When subjects have multiple events.
+  \item When a subject appears in overlapping intervals.  This however is 
+    almost always a data error, since it corresponds to two copies of the
+    subject being present at the same time, e.g., they could meet themselves
+    on the sidewalk.
+\end{itemize}
+
+
+\section{Examples}
+\subsection{Multiple events}
+Chronic granulomatous disease (CGD) is a heterogenous group of uncommon
+inherited disorders characterized by recurrent pyogenic infections that
+usually begin early in life and may lead to death in childhood. Interferon
+gamma is a principal macrophage-activating factor shown to partially correct
+the metabolic defect in phagocytes.
+It was hypothesized that treatment with interferon might reduce
+the frequency of serious
+infections in patients with CGD.
+In 1986, Genentech, Inc. conducted a
+randomized, double-blind, placebo-controlled trial in 128 CGD patients who
+received Genentech's humanized interferon gamma (rIFN-g) or placebo three %'
+times daily for a year. The primary endpoint of the study was the time to
+the first serious infection. However, data were collected on all serious
+infections until the end of followup,
+which occurred before day 400 for most
+patients. Thirty of the 65 patients in the placebo group and 14 of the 63
+patients in the rIFN-g group had at least one serious infection.
+The total number of infections was 56 and 20 in the placebo and treatment
+groups, respectively.
+   One patient was taken off on the day of his last infection; all others
+have some followup after their last episode.
+Below are the first 10 observations, but with the listing truncatated 
+beyond the fourth infection.  Subject 2 has 7 infections, no one in the
+study has more.
+\small\begin{verbatim}
+  1 204 082888 1 2 12 147.0  62.0 2 2 2 2 414 219 373
+  2 204 082888 0 1 15 159.0  47.5 2 2 1 2 439   8  26 152 241 249 322 350
+  3 204 082988 1 1 19 171.0  72.7 1 2 1 2 382
+  4 204 091388 1 1 12 142.0  34.0 1 2 1 2 388
+  5 238 092888 0 1 17 162.5  52.7 1 2 1 1 383 246 253
+  6 245 093088 1 2 44 153.3  45.0 2 2 2 2 364
+  7 245 093088 0 1 22 175.0  59.7 1 2 1 2 364 292
+  8 245 093088 1 1  7 111.0  17.4 1 2 1 2 363
+  9 238 100488 0 1 27 176.0  82.8 2 2 1 1 349 294
+ 10 238 100488 1 1  5 113.0  19.5 1 2 1 1 371
+\end{verbatim}
+\normalsize
+
+<<>>=
+cgdname <- c("id", "center", "random.dt", "trt", "sex", "age", 
+             "height", "weight", "inheritance", "steroids", 
+             "antibiotic", "inst", "futime", paste("e", 1:7, sep=''))
+cgd1 <- read.table('cgd.dat', header=F, fill=T, col.names=cgdname,
+                   colClasses=c("integer", "integer", "character",
+                                rep("integer", 3), rep("numeric",2),
+                                rep("integer", 12)))
+
+cgd1$ninfect <- rowSums(!is.na(as.matrix(cgd1[,14:20])))
+cgd1$random.dt <- as.Date(cgd1$random.dt, format="%m%d%y")
+cgd1$sex <- factor(cgd1$sex, labels=c("M", "F"))
+cgd1$inst <- factor(cgd1$inst, labels=c("NIH", "US-Other", 
+                          "Amsterdam", "Europe-Other"))
+
+temp <- apply(as.matrix(cgd1[,13:20]), 1, function(x) {
+    z <- as.vector(x[!is.na(x)])
+    if (length(z)==1) cbind(0, z, 0)
+    else {
+        temp <- cbind(c(0, z[-1]), 
+                      c(z[-1], z[1]), 
+                      c(rep(1, length(z)-1), 0))
+        if (z[1]== z[length(z)]) temp[-nrow(temp),]
+        else temp
+    }})
+
+index <- rep(1:nrow(cgd1), unlist(lapply(temp, nrow)))
+cgd2 <- data.frame( cgd1[index, 1:12], 
+                   time1= unlist(lapply(temp, function(x) x[,1])), 
+                   time2= unlist(lapply(temp, function(x) x[,2])), 
+                   event= unlist(lapply(temp, function(x) x[,3])), 
+                   enum = unlist(lapply(temp, function(x) 1:nrow(x))))
+cfit <- coxph(Surv(time1, time2, event) ~ trt + sex + age +
+               inheritance + cluster(id), data=cgd2)
+@ 
+
+The logic for creating the time variables is
+\begin{itemize}
+  \item If a subject has no events there is a single interval from 0 to
+    last follow-up, with a status of 0.
+  \item If there are events
+    \begin{itemize}
+      \item There is an interval for each event (0, event1], (event1, event2],
+	  etc. each with status =1.
+       \item If the follow-up time exceeds the last event there will be a 
+	 final interval with status =0.
+    \end{itemize}
+\end{itemize}
+
+The result of the \texttt{apply} function above will be a list with one
+item per patient, each item being a 3 column matrix with time1, 
+time2, and status.
+The as.vector command removes names, which can speed the operation.
+The resulting data frame \texttt{cgd2} is in the proper format for the
+analysis. 
+
+
+\subsection{Changing lab tests}
+ To be filled in.
+ 
+\subsection{Predictable time-dependent covariates}
+Occasionaly one has a time-dependent covariate whose values in the future
+are predictable.
+The most obvious of these is patient age, occasionally this may also be
+true for the cumulative dose of a drug.
+If age is entered as a linear term in the model, then the effect of changing
+age can be ignored in a Cox model, due to the structure of the partial
+likelihood.  Assume that subject $i$ has an event at time $t_i$, with other
+subject $j \in R_i$ at risk at that time, with $a$ denoting age.
+The partial likelihood term is
+\begin{equation*}
+  \frac{e^{\beta * a_i}}{\sum_{j \in R_i} e^{\beta* a_j}} =
+  \frac{e^{\beta * (a_i + t_i)}}{\sum_{j \in R_i} e^{\beta* (a_j + t_i)}} 
+\end{equation*}
+We see that using time-dependent age (the right hand version) or age at
+baseline (left hand), the partial likelihood term is identical since
+$\exp(\beta t_i)$ cancels out of the fraction.
+Howevever, if the effect of age on risk is \emph{non-linear}, this
+cancellation does not occur.
+
+Since age changes continuously, we would in theory need a very large
+(start, stop] data set to completely capture the effect --- an interval
+per day to match the usual resolution for death times.
+In practice this level of resolution is not necessary; though we all
+grow older, risk does not increase so rapidly that we need to know
+out age to the day!  
+For most medical applications year is sufficient, but this still leads
+to a large data set.
+One useful way to generate this data set is through use of the \texttt{pyears}
+function.
+The following example uses data on rehospitalization for cohort of 
+rheumatoid arthritis
+patients who also have conjestive heart failure (CHF)\cite{Nicola05}.
+The variables are
+\begin{itemize}
+  \item patid: patient identifier
+  \item agechf: age at onset of CHF 
+  \item yearchf calendar year of CHF, relative to the start of the study
+  \item startday, stopday: an interval of risk
+  \item hospevt: =1 if the interval ends with a hospitalization
+  \item prevhosp: number of prior hosptializations
+  \item duration: duration of RA prior to CHF
+  \item male sex: 1 for male, 0 for female
+\end{itemize}
+The age and duration variables have been rounded to .1 year to 
+maintain patient privacy.
+
+<<>>=
+load('raheart.rda')
+age2 <- tcut(raheart$agechf*365.25, 0:110* 365.25, labels=0:109)
+rowid <- 1:nrow(raheart)
+pfit <- pyears(Surv(startday, stopday, hospevt) ~ age2 + rowid,
+               data=raheart, data.frame=TRUE, scale=1)
+print(pfit$offtable)
+pdata <- pfit$data
+print(pdata[1:6,])
+@
+The \texttt{tcut} function attaches a set of cutpoints to the starting age
+for each subject, it's primary job is to mark the variable as time-increasing%'
+for the \texttt{pyears} function.
+In the \texttt{pyears} call we set scale=1 to prevent the age intervals from
+being rescaled to years, this is not critical.
+Printing out the value of offtable is important, however.  One of them
+most common mistakes in using \texttt{pyears} is mismatched scales, for
+instance if the age were in years and the follow-up time in days, and
+a common result of that error is to have follow-up time that fits into
+none of the categories.
+This will give a large amount of time that is outside the boundaries of the
+table.
+In the resulting data frame the first observation has 7 days of follow-up,
+exactly as in the starting data.
+The second observation has been broken into 4 rows, 109.6 days at age 92,
+then a year each at age 93 and 94, and a final 234.9 days at age 95
+ending with a hospitalization.
+(The odd fractions of a day like .575 are a consequence of rounding the
+age values to 1 digit.)
+
+Now we combine this with the original data set using the same indexing
+trick found in the first example.
+We also need a variable containing the end time for the prior row of
+each subject and zero for the first row of each subject, which is
+\texttt{lagtime} below.
+We then fit two models.  The first looks at the effect of age at
+diagnosis of CHF, the second at the effect of current age.
+<<>>=
+index <- as.integer(pdata$rowid)
+lagtime <- c(0, pdata$pyears[-nrow(pdata)])
+lagtime[1+ which(diff(index)==0)] <- 0 #starts at 0 for each subject
+temp <- raheart$startday[index] + lagtime  #start of each new interval
+data2 <- data.frame(raheart[index,], 
+                    time1= temp,
+                    time2= temp + pdata$pyears,
+                    event= pdata$event,
+                    age2=  1+ as.numeric(pdata$age2) )
+
+afit1 <- coxph(Surv(startday, stopday, hospevt) ~ male + pspline(agechf), 
+               data=raheart)
+afit2 <- coxph(Surv(time1, time2, event) ~ male + pspline(age2), data2)
+#termplot(afit1, terms=2, se=TRUE, xlab="Age at Diagnosis of CHF")
+#termplot(afit2, terms=2, se=TRUE, xlab="Current Age")
+
+table(with(raheart, tapply(hospevt, patid, sum)))
+@ 
+In this particular case the two fits are quite similar.  
+In retrospect this perhaps should have been expected: the mean age
+for onset of CHF in this group is 75 years, which does leave a lot
+of time for aging.
+(This analysis is very preliminary, however. As shown by the last line
+above there are a few patients with a very large number of admissions,
+sometimes referred to as ``entering a revolving door'' near the end of
+their disease.  These have an untoward influence on the fit.)
+
+
+\subsection{Predictable covariates, method 2}
+
+Another method to create a time-changing covariate is to use the
+\emph{time-transform} feature of coxph.
+<<>>=
+afit2b <- coxph(Surv(startday, stopday, hospevt) ~ male + tt(agechf),
+                data=raheart, 
+                tt=function(x, t, ...) pspline(x + t/365.25))
+afit2b
+@ 
+
+If there are one or more terms on the right hand side of the equation
+marked with the tt() operator, the program will pre-compute the values
+of that variable for each unique event time and strata combination.
+A user-defined function is called with arguments of
+\begin{itemize}
+  \item the covariate: whatever is inside the tt() call
+  \item the event time
+  \item the event number: if there are multiple strata and the same event
+    time occurs in two of them, they are treated separately
+  \item the weight for the observation, if the call used weights
+\end{itemize}
+There is a single call to the function with a very large $x$ vector, 
+it contains an element for each subject at risk at each event time.
+If there are multiple tt() terms in the formula, then the tt argument
+should be a list of functions with the requisite number of elements.
+
+There are other interesting uses for the time-transform capability.
+One example is O'Brien's logit-rank test procedure \cite{obrien78}.
+He proposed replacing the covariate at each event time with a logit
+transform of its ranks.  
+This removes the influence of any outliers in the predictor $x$.
+For this case we ingore the event time argument and concentrate on the
+groupings.
+<<>>=
+function(x, t, riskset, weights){ 
+    obrien <- function(x) {
+        r <- rank(x)
+        (r-.5)/(.5+length(r)-r)
+    }
+    unlist(tapply(x, riskset, obrien))
+}
+@ 
+This relies on the fact that the input argments to tt() are ordered by the 
+event number or riskset.
+This function is used as a default if no tt argument is present in the
+coxph call, but there are tt terms in the model formula.
+(Doing so allowed me to depreciate the survobrien function).
+
+Another interesting useage is to replace the data by simple ranks, not
+rescaled to 0--1.
+<<>>=
+function(x, t, riskset, weights) 
+    unlist(tapply(x, riskset, rank))
+@ 
+The score statistic for this model is $(C-D)/2$, where $C$ and $D$ are the
+number of concordant and discordant pairs, see the
+survConcordance function.  
+The score statistic from this fit is then a test for significance of the
+concordance statistics, and is in fact the basis for the standard error
+reported by survConcordance.  
+The O'Brien test can be viewed as concordance statistic that gives equal  %'
+weight to each event time, whereas the standard concordance weights each
+event proportionally to the size of the risk set.
+(The Cox score statistic depends on the mean $x$ at each event time;
+since ranks go from 1 to number at risk the mean also scales.)
+
+Although handy, the computational impact of the tt argument should be
+considered before using it.
+The Cox model requires computation of a weighted mean and variance of
+the covariates at each event time, a process that is inherently 
+$O(ndp^2)$ where $n$ = the sample size, $d$ = the number of events and $p$=
+the number of covariates.  
+Much of the algorithmic effort in coxph() is to use updating methods for
+the mean and variance matrices, reducing the compute time to $O((n+d) p^2)$.
+When a tt term appears updating is not possible; for even moderate size
+data sets the impact of $nd$ versus $n+d$ can be surprising.
+
+
+The time-transform is a new addition and still has some rough edges.
+At this moment the $x=T$ argment is needed to get proper residuals and
+predicted values, and termplot is unable to properly reconstruct the
+data to plot the spline fit.
+Please communicate any concerns or interesting examples to the author.
+
+\begin{thebibliography}{9}
+  \bibitem{Nicola05} Nicola PJ, Maradit-Kremers H, Roger VL, Jacobsen SJ, 
+    Crowson CS, Ballman KV, Gabriel SE. ``The risk of Congestive Heart Failure
+    in Rheumatoid Arthritis: a Population-Based Study Over 46 Years.''
+    \emph{Arthritis Rheum} 52: 412--20, 2005.
+  \bibitem{obrien78} O'Brien, Peter, ``A non-parametric test for           %'
+    association with censored data'', \emph{Biometrics} 34:243--250, 1978.
+\end{thebibliography}
+\end{document}
diff --git a/win32/deps/library/survival/doc/timedep.pdf b/win32/deps/library/survival/doc/timedep.pdf
new file mode 100644
index 0000000..f0083c8
Binary files /dev/null and b/win32/deps/library/survival/doc/timedep.pdf differ
diff --git a/win32/deps/library/survival/doc/validate.pdf b/win32/deps/library/survival/doc/validate.pdf
new file mode 100644
index 0000000..72bea60
Binary files /dev/null and b/win32/deps/library/survival/doc/validate.pdf differ
diff --git a/win32/deps/library/survival/help/AnIndex b/win32/deps/library/survival/help/AnIndex
index f7a12f1..5a09688 100644
--- a/win32/deps/library/survival/help/AnIndex
+++ b/win32/deps/library/survival/help/AnIndex
@@ -55,6 +55,7 @@ kidney	kidney
 labels.survreg	survreg
 leukemia	aml
 lines.survfit	lines.survfit
+logan	logan
 lung	lung
 match.ratetable	survival-internal
 Math.ratetable	is.ratetable
@@ -62,9 +63,9 @@ Math.Surv	Surv
 mgus	mgus
 mgus1	mgus
 mgus2	mgus
-model.frame.coxph	coxph
+model.frame.coxph	model.frame.coxph
 model.frame.survreg	survreg
-model.newframe	survival-internal
+model.matrix.coxph	model.matrix.coxph
 nwtco	nwtco
 Ops.ratetable	is.ratetable
 Ops.Surv	Surv
@@ -86,6 +87,7 @@ print.coxph.null	coxph
 print.coxph.penal	coxph
 print.ratetable	ratetable
 print.summary.coxph	print.summary.coxph
+print.summary.survexp	print.summary.survexp
 print.summary.survfit	print.summary.survfit
 print.summary.survreg	survreg
 print.Surv	Surv
@@ -95,10 +97,13 @@ print.survfit	print.survfit
 print.survreg	survreg.object
 print.survreg.penal	survreg
 pspline	pspline
+psplineinverse	pspline
 psurvreg	dsurvreg
 pyears	pyears
 qsurvreg	dsurvreg
+quantile.survfit	quantile.survfit
 ratetable	ratetable
+ratetableDate	ratetableDate
 rats	rats
 residuals.coxph	residuals.coxph
 residuals.coxph.null	residuals.coxph
@@ -113,6 +118,7 @@ summary.coxph	summary.coxph
 summary.coxph.penal	coxph
 summary.ratetable	ratetable
 Summary.Surv	Surv
+summary.survexp	summary.survexp
 summary.survfit	summary.survfit
 summary.survreg	survreg.object
 Surv	Surv
@@ -132,8 +138,11 @@ survexp.usr	survexp.us
 survexp.wnc	survexp.us
 survfit	survfit
 survfit.coxph	survfit.coxph
-survfit.formula	survfit
+survfit.formula	survfit.formula
 survfit.object	survfit.object
+survfitCI	survival-internal
+survfitcoxph.fit	survfitcoxph.fit
+survfitKM	survival-internal
 survival-internal	survival-internal
 survobrien	survobrien
 survpenal.fit	survival-internal
@@ -147,6 +156,7 @@ survregDtest	survregDtest
 survSplit	survSplit
 tcut	tcut
 tobin	tobin
+tt	tt
 untangle.specials	untangle.specials
 vcov.coxph	coxph
 vcov.survreg	survreg
@@ -156,5 +166,5 @@ veteran	veteran
 [.ratetable	ratetable
 [.ratetable2	ratetable
 [.Surv	Surv
-[.survfit	survfit
+[.survfit	survfit.formula
 [.tcut	tcut
diff --git a/win32/deps/library/survival/help/aliases.rds b/win32/deps/library/survival/help/aliases.rds
new file mode 100644
index 0000000..7625ccc
Binary files /dev/null and b/win32/deps/library/survival/help/aliases.rds differ
diff --git a/win32/deps/library/survival/help/paths.rds b/win32/deps/library/survival/help/paths.rds
new file mode 100644
index 0000000..9e46db1
Binary files /dev/null and b/win32/deps/library/survival/help/paths.rds differ
diff --git a/win32/deps/library/survival/help/survival.rdb b/win32/deps/library/survival/help/survival.rdb
new file mode 100644
index 0000000..f19940e
Binary files /dev/null and b/win32/deps/library/survival/help/survival.rdb differ
diff --git a/win32/deps/library/survival/help/survival.rdx b/win32/deps/library/survival/help/survival.rdx
new file mode 100644
index 0000000..5dced7b
Binary files /dev/null and b/win32/deps/library/survival/help/survival.rdx differ
diff --git a/win32/deps/library/survival/html/00Index.html b/win32/deps/library/survival/html/00Index.html
new file mode 100644
index 0000000..c907da7
--- /dev/null
+++ b/win32/deps/library/survival/html/00Index.html
@@ -0,0 +1,463 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Survival analysis, including penalised likelihood.</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Survival analysis, including penalised likelihood.
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;survival&rsquo; version 2.36-14</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../doc/index.html">Overview of user guides and package vignettes</a>; browse <a href="../doc">directory</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p 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="#H">H</a>
+<a href="#I">I</a>
+<a href="#J">J</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="#misc">misc</a>
+</p>
+
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="aareg.html">aareg</a></td>
+<td>Aalen's additive regression model for censored data</td></tr>
+<tr><td width="25%"><a href="aml.html">aml</a></td>
+<td>Acute Myelogenous Leukemia survival data</td></tr>
+<tr><td width="25%"><a href="anova.coxph.html">anova.coxph</a></td>
+<td>Analysis of Deviance for a Cox model.</td></tr>
+<tr><td width="25%"><a href="anova.coxph.html">anova.coxphlist</a></td>
+<td>Analysis of Deviance for a Cox model.</td></tr>
+<tr><td width="25%"><a href="survreg.html">anova.survreg</a></td>
+<td>Regression for a Parametric Survival Model</td></tr>
+<tr><td width="25%"><a href="survreg.html">anova.survreglist</a></td>
+<td>Regression for a Parametric Survival Model</td></tr>
+<tr><td width="25%"><a href="Surv.html">as.character.Surv</a></td>
+<td>Create a Survival Object</td></tr>
+<tr><td width="25%"><a href="Surv.html">as.data.frame.Surv</a></td>
+<td>Create a Survival Object</td></tr>
+<tr><td width="25%"><a href="Surv.html">as.matrix.Surv</a></td>
+<td>Create a Survival Object</td></tr>
+<tr><td width="25%"><a href="attrassign.html">attrassign</a></td>
+<td>Create new-style "assign" attribute</td></tr>
+<tr><td width="25%"><a href="attrassign.html">attrassign.default</a></td>
+<td>Create new-style "assign" attribute</td></tr>
+<tr><td width="25%"><a href="attrassign.html">attrassign.lm</a></td>
+<td>Create new-style "assign" attribute</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="basehaz.html">basehaz</a></td>
+<td>Compute the baseline survival curve for a Cox model</td></tr>
+<tr><td width="25%"><a href="bladder.html">bladder</a></td>
+<td>Bladder Cancer Recurrences</td></tr>
+<tr><td width="25%"><a href="bladder.html">bladder1</a></td>
+<td>Bladder Cancer Recurrences</td></tr>
+<tr><td width="25%"><a href="bladder.html">bladder2</a></td>
+<td>Bladder Cancer Recurrences</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="lung.html">cancer</a></td>
+<td>NCCTG Lung Cancer Data</td></tr>
+<tr><td width="25%"><a href="cch.html">cch</a></td>
+<td>Fits proportional hazards regression model to case-cohort data</td></tr>
+<tr><td width="25%"><a href="cgd.html">cgd</a></td>
+<td>Chronic Granulotomous Disease data</td></tr>
+<tr><td width="25%"><a href="clogit.html">clogit</a></td>
+<td>Conditional logistic regression</td></tr>
+<tr><td width="25%"><a href="cluster.html">cluster</a></td>
+<td>Identify clusters.</td></tr>
+<tr><td width="25%"><a href="colon.html">colon</a></td>
+<td>Chemotherapy for Stage B/C colon cancer</td></tr>
+<tr><td width="25%"><a href="cox.zph.html">cox.zph</a></td>
+<td>Test the Proportional Hazards Assumption of a Cox Regression</td></tr>
+<tr><td width="25%"><a href="coxph.html">coxph</a></td>
+<td>Fit Proportional Hazards Regression Model</td></tr>
+<tr><td width="25%"><a href="coxph.control.html">coxph.control</a></td>
+<td>Ancillary arguments for controling coxph fits</td></tr>
+<tr><td width="25%"><a href="coxph.detail.html">coxph.detail</a></td>
+<td>Details of a Cox Model Fit</td></tr>
+<tr><td width="25%"><a href="coxph.html">coxph.getdata</a></td>
+<td>Fit Proportional Hazards Regression Model</td></tr>
+<tr><td width="25%"><a href="coxph.object.html">coxph.object</a></td>
+<td>Proportional Hazards Regression Object</td></tr>
+<tr><td width="25%"><a href="coxph.html">coxph.penalty</a></td>
+<td>Fit Proportional Hazards Regression Model</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="dsurvreg.html">dsurvreg</a></td>
+<td>Distributions available in survreg.</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="coxph.object.html">extractAIC.coxph.penal</a></td>
+<td>Proportional Hazards Regression Object</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Surv.html">format.Surv</a></td>
+<td>Create a Survival Object</td></tr>
+<tr><td width="25%"><a href="frailty.html">frailty</a></td>
+<td>Random effects terms</td></tr>
+<tr><td width="25%"><a href="frailty.html">frailty.gamma</a></td>
+<td>Random effects terms</td></tr>
+<tr><td width="25%"><a href="frailty.html">frailty.gaussian</a></td>
+<td>Random effects terms</td></tr>
+<tr><td width="25%"><a href="frailty.html">frailty.t</a></td>
+<td>Random effects terms</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="heart.html">heart</a></td>
+<td>Stanford Heart Transplant data</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="ratetable.html">is.na.ratetable</a></td>
+<td>Ratetable reference in formula</td></tr>
+<tr><td width="25%"><a href="Surv.html">is.na.Surv</a></td>
+<td>Create a Survival Object</td></tr>
+<tr><td width="25%"><a href="is.ratetable.html">is.ratetable</a></td>
+<td>Verify that an object is of class ratetable.</td></tr>
+<tr><td width="25%"><a href="Surv.html">is.Surv</a></td>
+<td>Create a Survival Object</td></tr>
+</table>
+
+<h2><a name="J">-- J --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="heart.html">jasa</a></td>
+<td>Stanford Heart Transplant data</td></tr>
+<tr><td width="25%"><a href="heart.html">jasa1</a></td>
+<td>Stanford Heart Transplant data</td></tr>
+</table>
+
+<h2><a name="K">-- K --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="kidney.html">kidney</a></td>
+<td>Kidney catheter data</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="survreg.html">labels.survreg</a></td>
+<td>Regression for a Parametric Survival Model</td></tr>
+<tr><td width="25%"><a href="aml.html">leukemia</a></td>
+<td>Acute Myelogenous Leukemia survival data</td></tr>
+<tr><td width="25%"><a href="lines.survfit.html">lines.survfit</a></td>
+<td>Add Lines or Points to a Survival Plot</td></tr>
+<tr><td width="25%"><a href="logan.html">logan</a></td>
+<td>Data from the 1972-78 GSS data used by Logan</td></tr>
+<tr><td width="25%"><a href="lung.html">lung</a></td>
+<td>NCCTG Lung Cancer Data</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="is.ratetable.html">Math.ratetable</a></td>
+<td>Verify that an object is of class ratetable.</td></tr>
+<tr><td width="25%"><a href="Surv.html">Math.Surv</a></td>
+<td>Create a Survival Object</td></tr>
+<tr><td width="25%"><a href="mgus.html">mgus</a></td>
+<td>Monoclonal gammapothy data</td></tr>
+<tr><td width="25%"><a href="mgus.html">mgus1</a></td>
+<td>Monoclonal gammapothy data</td></tr>
+<tr><td width="25%"><a href="mgus.html">mgus2</a></td>
+<td>Monoclonal gammapothy data</td></tr>
+<tr><td width="25%"><a href="model.frame.coxph.html">model.frame.coxph</a></td>
+<td>Model.frame method for coxph objects</td></tr>
+<tr><td width="25%"><a href="survreg.html">model.frame.survreg</a></td>
+<td>Regression for a Parametric Survival Model</td></tr>
+<tr><td width="25%"><a href="model.matrix.coxph.html">model.matrix.coxph</a></td>
+<td>Model.matrix method for coxph models</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="nwtco.html">nwtco</a></td>
+<td>Data from the National Wilm's Tumor Study</td></tr>
+</table>
+
+<h2><a name="O">-- O --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="is.ratetable.html">Ops.ratetable</a></td>
+<td>Verify that an object is of class ratetable.</td></tr>
+<tr><td width="25%"><a href="Surv.html">Ops.Surv</a></td>
+<td>Create a Survival Object</td></tr>
+<tr><td width="25%"><a href="ovarian.html">ovarian</a></td>
+<td>Ovarian Cancer Survival Data</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="pbc.html">pbc</a></td>
+<td>Mayo Clinic Primary Biliary Cirrhosis Data</td></tr>
+<tr><td width="25%"><a href="pbcseq.html">pbcseq</a></td>
+<td>Mayo Clinic Primary Biliary Cirrhosis, sequential data</td></tr>
+<tr><td width="25%"><a href="plot.aareg.html">plot.aareg</a></td>
+<td>Plot an aareg object.</td></tr>
+<tr><td width="25%"><a href="plot.cox.zph.html">plot.cox.zph</a></td>
+<td>Graphical Test of Proportional Hazards</td></tr>
+<tr><td width="25%"><a href="plot.survfit.html">plot.survfit</a></td>
+<td>Plot Method for 'survfit'</td></tr>
+<tr><td width="25%"><a href="lines.survfit.html">points.survfit</a></td>
+<td>Add Lines or Points to a Survival Plot</td></tr>
+<tr><td width="25%"><a href="predict.coxph.html">predict.coxph</a></td>
+<td>Predictions for a Cox model</td></tr>
+<tr><td width="25%"><a href="predict.coxph.html">predict.coxph.penal</a></td>
+<td>Predictions for a Cox model</td></tr>
+<tr><td width="25%"><a href="predict.survreg.html">predict.survreg</a></td>
+<td>Predicted Values for a 'survreg' Object</td></tr>
+<tr><td width="25%"><a href="predict.survreg.html">predict.survreg.penal</a></td>
+<td>Predicted Values for a 'survreg' Object</td></tr>
+<tr><td width="25%"><a href="print.aareg.html">print.aareg</a></td>
+<td>Print an aareg object</td></tr>
+<tr><td width="25%"><a href="cox.zph.html">print.cox.zph</a></td>
+<td>Test the Proportional Hazards Assumption of a Cox Regression</td></tr>
+<tr><td width="25%"><a href="coxph.object.html">print.coxph</a></td>
+<td>Proportional Hazards Regression Object</td></tr>
+<tr><td width="25%"><a href="coxph.html">print.coxph.null</a></td>
+<td>Fit Proportional Hazards Regression Model</td></tr>
+<tr><td width="25%"><a href="coxph.html">print.coxph.penal</a></td>
+<td>Fit Proportional Hazards Regression Model</td></tr>
+<tr><td width="25%"><a href="ratetable.html">print.ratetable</a></td>
+<td>Ratetable reference in formula</td></tr>
+<tr><td width="25%"><a href="print.summary.coxph.html">print.summary.coxph</a></td>
+<td>Print method for summary.coxph objects</td></tr>
+<tr><td width="25%"><a href="print.summary.survexp.html">print.summary.survexp</a></td>
+<td>Print Survexp Summary</td></tr>
+<tr><td width="25%"><a href="print.summary.survfit.html">print.summary.survfit</a></td>
+<td>Print Survfit Summary</td></tr>
+<tr><td width="25%"><a href="survreg.html">print.summary.survreg</a></td>
+<td>Regression for a Parametric Survival Model</td></tr>
+<tr><td width="25%"><a href="Surv.html">print.Surv</a></td>
+<td>Create a Survival Object</td></tr>
+<tr><td width="25%"><a href="survdiff.html">print.survdiff</a></td>
+<td>Test Survival Curve Differences</td></tr>
+<tr><td width="25%"><a href="survexp.html">print.survexp</a></td>
+<td>Compute Expected Survival</td></tr>
+<tr><td width="25%"><a href="print.survfit.html">print.survfit</a></td>
+<td>Print a Short Summary of a Survival Curve</td></tr>
+<tr><td width="25%"><a href="survreg.object.html">print.survreg</a></td>
+<td>Parametric Survival Model Object</td></tr>
+<tr><td width="25%"><a href="survreg.html">print.survreg.penal</a></td>
+<td>Regression for a Parametric Survival Model</td></tr>
+<tr><td width="25%"><a href="pspline.html">pspline</a></td>
+<td>Smoothing splines using a pspline basis</td></tr>
+<tr><td width="25%"><a href="pspline.html">psplineinverse</a></td>
+<td>Smoothing splines using a pspline basis</td></tr>
+<tr><td width="25%"><a href="dsurvreg.html">psurvreg</a></td>
+<td>Distributions available in survreg.</td></tr>
+<tr><td width="25%"><a href="pyears.html">pyears</a></td>
+<td>Person Years</td></tr>
+</table>
+
+<h2><a name="Q">-- Q --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="dsurvreg.html">qsurvreg</a></td>
+<td>Distributions available in survreg.</td></tr>
+<tr><td width="25%"><a href="quantile.survfit.html">quantile.survfit</a></td>
+<td>Quantiles from a survfit object</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="ratetable.html">ratetable</a></td>
+<td>Ratetable reference in formula</td></tr>
+<tr><td width="25%"><a href="ratetableDate.html">ratetableDate</a></td>
+<td>Convert date objects to ratetable form</td></tr>
+<tr><td width="25%"><a href="rats.html">rats</a></td>
+<td>Rat data from Gail et al.</td></tr>
+<tr><td width="25%"><a href="residuals.coxph.html">residuals.coxph</a></td>
+<td>Calculate Residuals for a 'coxph' Fit</td></tr>
+<tr><td width="25%"><a href="residuals.coxph.html">residuals.coxph.null</a></td>
+<td>Calculate Residuals for a 'coxph' Fit</td></tr>
+<tr><td width="25%"><a href="residuals.coxph.html">residuals.coxph.penal</a></td>
+<td>Calculate Residuals for a 'coxph' Fit</td></tr>
+<tr><td width="25%"><a href="residuals.survreg.html">residuals.survreg</a></td>
+<td>Compute Residuals for 'survreg' Objects</td></tr>
+<tr><td width="25%"><a href="residuals.survreg.html">residuals.survreg.penal</a></td>
+<td>Compute Residuals for 'survreg' Objects</td></tr>
+<tr><td width="25%"><a href="ridge.html">ridge</a></td>
+<td>Ridge regression</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="stanford2.html">stanford2</a></td>
+<td>More Stanford Heart Transplant data</td></tr>
+<tr><td width="25%"><a href="strata.html">strata</a></td>
+<td>Identify Stratification Variables</td></tr>
+<tr><td width="25%"><a href="summary.aareg.html">summary.aareg</a></td>
+<td>Summarize an aareg fit</td></tr>
+<tr><td width="25%"><a href="summary.coxph.html">summary.coxph</a></td>
+<td>Summary method for Cox models</td></tr>
+<tr><td width="25%"><a href="coxph.html">summary.coxph.penal</a></td>
+<td>Fit Proportional Hazards Regression Model</td></tr>
+<tr><td width="25%"><a href="ratetable.html">summary.ratetable</a></td>
+<td>Ratetable reference in formula</td></tr>
+<tr><td width="25%"><a href="Surv.html">Summary.Surv</a></td>
+<td>Create a Survival Object</td></tr>
+<tr><td width="25%"><a href="summary.survexp.html">summary.survexp</a></td>
+<td>Summary function for a survexp object</td></tr>
+<tr><td width="25%"><a href="summary.survfit.html">summary.survfit</a></td>
+<td>Summary of a Survival Curve</td></tr>
+<tr><td width="25%"><a href="survreg.object.html">summary.survreg</a></td>
+<td>Parametric Survival Model Object</td></tr>
+<tr><td width="25%"><a href="Surv.html">Surv</a></td>
+<td>Create a Survival Object</td></tr>
+<tr><td width="25%"><a href="survConcordance.html">survConcordance</a></td>
+<td>Compute a concordance measure.</td></tr>
+<tr><td width="25%"><a href="survdiff.html">survdiff</a></td>
+<td>Test Survival Curve Differences</td></tr>
+<tr><td width="25%"><a href="survexp.html">survexp</a></td>
+<td>Compute Expected Survival</td></tr>
+<tr><td width="25%"><a href="survexp.us.html">survexp.az</a></td>
+<td>Census Data Sets for the Expected Survival and Person Years Functions</td></tr>
+<tr><td width="25%"><a href="survexp.us.html">survexp.azr</a></td>
+<td>Census Data Sets for the Expected Survival and Person Years Functions</td></tr>
+<tr><td width="25%"><a href="survexp.fit.html">survexp.fit</a></td>
+<td>Compute Expected Survival</td></tr>
+<tr><td width="25%"><a href="survexp.us.html">survexp.fl</a></td>
+<td>Census Data Sets for the Expected Survival and Person Years Functions</td></tr>
+<tr><td width="25%"><a href="survexp.us.html">survexp.flr</a></td>
+<td>Census Data Sets for the Expected Survival and Person Years Functions</td></tr>
+<tr><td width="25%"><a href="survexp.us.html">survexp.mn</a></td>
+<td>Census Data Sets for the Expected Survival and Person Years Functions</td></tr>
+<tr><td width="25%"><a href="survexp.us.html">survexp.mnwhite</a></td>
+<td>Census Data Sets for the Expected Survival and Person Years Functions</td></tr>
+<tr><td width="25%"><a href="survexp.us.html">survexp.us</a></td>
+<td>Census Data Sets for the Expected Survival and Person Years Functions</td></tr>
+<tr><td width="25%"><a href="survexp.us.html">survexp.usr</a></td>
+<td>Census Data Sets for the Expected Survival and Person Years Functions</td></tr>
+<tr><td width="25%"><a href="survexp.us.html">survexp.wnc</a></td>
+<td>Census Data Sets for the Expected Survival and Person Years Functions</td></tr>
+<tr><td width="25%"><a href="survfit.html">survfit</a></td>
+<td>Create survival curves</td></tr>
+<tr><td width="25%"><a href="survfit.coxph.html">survfit.coxph</a></td>
+<td>Compute a Survival Curve from a Cox model</td></tr>
+<tr><td width="25%"><a href="survfit.formula.html">survfit.formula</a></td>
+<td>Compute a Survival Curve for Censored Data</td></tr>
+<tr><td width="25%"><a href="survfit.object.html">survfit.object</a></td>
+<td>Survival Curve Object</td></tr>
+<tr><td width="25%"><a href="survfitcoxph.fit.html">survfitcoxph.fit</a></td>
+<td>A direct interface to the 'computational engine' of survfit.coxph</td></tr>
+<tr><td width="25%"><a href="survobrien.html">survobrien</a></td>
+<td>O'Brien's Test for Association of a Single Variable with Survival</td></tr>
+<tr><td width="25%"><a href="survreg.html">survReg</a></td>
+<td>Regression for a Parametric Survival Model</td></tr>
+<tr><td width="25%"><a href="survreg.html">survreg</a></td>
+<td>Regression for a Parametric Survival Model</td></tr>
+<tr><td width="25%"><a href="survreg.control.html">survreg.control</a></td>
+<td>Package options for survreg and coxph</td></tr>
+<tr><td width="25%"><a href="survreg.distributions.html">survreg.distributions</a></td>
+<td>Parametric Survival Distributions</td></tr>
+<tr><td width="25%"><a href="survreg.object.html">survreg.object</a></td>
+<td>Parametric Survival Model Object</td></tr>
+<tr><td width="25%"><a href="survregDtest.html">survregDtest</a></td>
+<td>Verify a survreg distribution</td></tr>
+<tr><td width="25%"><a href="survSplit.html">survSplit</a></td>
+<td>Split a survival data set at specified times</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="tcut.html">tcut</a></td>
+<td>Factors for person-year calculations</td></tr>
+<tr><td width="25%"><a href="tobin.html">tobin</a></td>
+<td>Tobin's Tobit data</td></tr>
+<tr><td width="25%"><a href="tt.html">tt</a></td>
+<td>Mark time tranform terms</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="untangle.specials.html">untangle.specials</a></td>
+<td>Help Process the 'specials' Argument of the 'terms' Function.</td></tr>
+</table>
+
+<h2><a name="V">-- V --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="coxph.html">vcov.coxph</a></td>
+<td>Fit Proportional Hazards Regression Model</td></tr>
+<tr><td width="25%"><a href="survreg.html">vcov.survreg</a></td>
+<td>Regression for a Parametric Survival Model</td></tr>
+<tr><td width="25%"><a href="veteran.html">veteran</a></td>
+<td>Veterans' Administration Lung Cancer study</td></tr>
+</table>
+
+<h2><a name="misc">-- misc --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="cox.zph.html">[.cox.zph</a></td>
+<td>Test the Proportional Hazards Assumption of a Cox Regression</td></tr>
+<tr><td width="25%"><a href="coxph.html">[.coxph.penalty</a></td>
+<td>Fit Proportional Hazards Regression Model</td></tr>
+<tr><td width="25%"><a href="ratetable.html">[.ratetable</a></td>
+<td>Ratetable reference in formula</td></tr>
+<tr><td width="25%"><a href="ratetable.html">[.ratetable2</a></td>
+<td>Ratetable reference in formula</td></tr>
+<tr><td width="25%"><a href="Surv.html">[.Surv</a></td>
+<td>Create a Survival Object</td></tr>
+<tr><td width="25%"><a href="survfit.formula.html">[.survfit</a></td>
+<td>Compute a Survival Curve for Censored Data</td></tr>
+<tr><td width="25%"><a href="tcut.html">[.tcut</a></td>
+<td>Factors for person-year calculations</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/survival/html/R.css b/win32/deps/library/survival/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/survival/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/survival/libs/i386/survival.dll b/win32/deps/library/survival/libs/i386/survival.dll
new file mode 100644
index 0000000..e06d51f
Binary files /dev/null and b/win32/deps/library/survival/libs/i386/survival.dll differ
diff --git a/win32/deps/library/survival/tests/aareg.R b/win32/deps/library/survival/tests/aareg.R
new file mode 100644
index 0000000..02a309e
--- /dev/null
+++ b/win32/deps/library/survival/tests/aareg.R
@@ -0,0 +1,210 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Test aareg, for some simple data where the answers can be computed
+#  in closed form
+#
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+   
+test1 <- data.frame(time=  c(4, 3,1,1,2,2,3),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0),
+		    wt=    c(1, 1:6))
+
+tfit  <- aareg(Surv(time, status) ~ x, test1)
+aeq(tfit$times, c(1,2,2))
+aeq(tfit$nrisk, c(6,4,4))
+aeq(tfit$coefficient, matrix(c(0,0,1/3, 1/3, 1, -1/3), ncol=2))
+aeq(tfit$tweight, matrix(c(3,3,3, 3/2, 3/4, 3/4), ncol=2))
+aeq(tfit$test.statistic, c(1,1))
+aeq(tfit$test.var,       c(1, -1/4, -1/4, 1/4 + 9/16 + 1/16))
+
+tfit <- aareg(Surv(time, status) ~ x, test1, test='nrisk')
+aeq(tfit$tweight, matrix(c(3,3,3, 3/2, 3/4, 3/4), ncol=2)) #should be as before
+aeq(tfit$test.statistic, c(4/3, 6/3+ 4 - 4/3))
+aeq(tfit$test.var,       c(16/9, -16/9, -16/9, 36/9 + 16 + 16/9))
+
+# In the 1-variable case, this is the same as the default Aalen weight
+tfit <- aareg(Surv(time, status) ~ x, test1, test='variance')
+aeq(tfit$test.statistic, c(1,1))
+aeq(tfit$test.var,       c(1, -1/4, -1/4, 1/4 + 9/16 + 1/16))
+
+#
+# Repeat the above, with case weights
+#
+tfit <- aareg(Surv(time, status) ~x, test1, weights=wt)  
+aeq(tfit$times, c(1,2,2))
+aeq(tfit$nrisk, c(21,16,16))
+aeq(tfit$coefficient, matrix(c(0,0,5/12, 2/9, 1, -5/12), ncol=2))
+aeq(tfit$tweight, matrix(c(12,12,12, 36/7, 3,3), ncol=2))
+aeq(tfit$test.statistic, c(5, 72/63 + 3 - 15/12))
+aeq(tfit$test.var,       c(25, -25/4, -25/4, (72/63)^2 + 9 + (5/4)^2))
+
+tfit <- aareg(Surv(time, status) ~x, test1, weights=wt, test='nrisk')
+aeq(tfit$test.statistic, c(20/3,  42/9 + 16 - 16*5/12))
+aeq(tfit$test.var,       c(400/9, -400/9, -400/9, 
+			    (42/9)^2 + 16^2 + (16*5/12)^2))
+
+#
+# Make a test data set with no NAs, in sorted order, no ties,
+#   15 observations
+tdata <- lung[15:29, c('time', 'status', 'age', 'sex', 'ph.ecog')]
+tdata$status <- tdata$status -1
+tdata <- tdata[order(tdata$time, tdata$status),]
+row.names(tdata) <- 1:15
+tdata$status[8] <- 0      #for some variety
+
+afit <- aareg(Surv(time, status) ~ age + sex + ph.ecog, tdata, nmin=6)
+#
+# Now, do it "by hand"
+cfit <- coxph(Surv(time, status) ~ age + sex + ph.ecog, tdata, iter=0,
+               method='breslow')
+dt1   <- coxph.detail(cfit)
+sch1  <- resid(cfit, type='schoen')
+
+# First estimate of Aalen: from the Cox computations, first 9
+#  The first and last cols of the ninth are somewhat unstable (approx =0)
+mine <- rbind(solve(dt1$imat[,,1], sch1[1,]),
+              solve(dt1$imat[,,2], sch1[2,]),
+              solve(dt1$imat[,,3], sch1[3,]),
+              solve(dt1$imat[,,4], sch1[4,]),
+              solve(dt1$imat[,,5], sch1[5,]),
+              solve(dt1$imat[,,6], sch1[6,]),
+              solve(dt1$imat[,,7], sch1[7,]),
+              solve(dt1$imat[,,8], sch1[8,]),
+              solve(dt1$imat[,,9], sch1[9,])) 
+mine <- diag(1/dt1$nrisk[1:9]) %*% mine
+
+aeq(mine, afit$coef[1:9, -1])
+
+rm(tfit, afit, mine, dt1, cfit, sch1)
+
+#
+# Check out the dfbeta matrix from aareg
+#   Note that it is kept internally in time order, not data set order
+# Those who want residuals should use the resid function!
+
+#
+# First, the simple test case where I know the anwers
+#
+afit <- aareg(Surv(time, status) ~ x, test1, dfbeta=T)
+temp <- c(rep(0,6),             #intercepts at time 1
+          c(2,-1,-1,0,0,0)/9,   #alpha at time 1
+          c(0,0,0,2, -1, -1)/9, #intercepts at time 2
+          c(0,0,0,-2,1,1)/9)    #alpha at time 2
+aeq(afit$dfbeta, temp)
+
+#
+#Now a multivariate data set
+#
+afit <- aareg(Surv(time, status) ~ age + sex + ph.ecog, lung, dfbeta=T)
+
+ord <- order(lung$time, -lung$status)
+cfit <- coxph(Surv(time, status) ~ age + sex + ph.ecog, lung[ord,],
+	        method='breslow', iter=0, x=T)
+cdt  <- coxph.detail(cfit, riskmat=T)
+
+# an arbitrary list of times
+acoef <- rowsum(afit$coef, afit$times) #per death time coefs
+indx <- match(cdt$time, afit$times)
+for (i in c(2,5,27,54,101, 135)) {
+    lwho <- (cdt$riskmat[,i]==1)
+    lmx <- cfit$x[lwho,]
+    lmy <- 1*( cfit$y[lwho,2]==1 & cfit$y[lwho,1] == cdt$time[i])
+    fit <- lm(lmy~ lmx)
+    cat("i=", i, "coef=", aeq(fit$coef, acoef[i,]))
+
+    rr <- diag(resid(fit))
+    zz <- cbind(1,lmx)
+    zzinv <- solve(t(zz) %*% zz)
+    cat(" twt=", aeq(1/(diag(zzinv)), afit$tweight[indx[i],]))
+
+    df <- t(zzinv %*% t(zz)  %*% rr)
+    cat(" dfbeta=", aeq(df, afit$dfbeta[lwho,,i]), "\n")
+    }
+	  
+rm(afit, cfit, cdt, lwho, lmx, lmy, fit, rr, zz, df)
+
+
+# Repeat it with case weights
+ww <- rep(1:5, length=nrow(lung))/ 3.0
+afit <- aareg(Surv(time, status) ~ age + sex + ph.ecog, lung, dfbeta=T,
+	      weights=ww)
+cfit <- coxph(Surv(time, status) ~ age + sex + ph.ecog, lung[ord,],
+	        method='breslow', iter=0, x=T, weight=ww[ord])
+cdt  <- coxph.detail(cfit, riskmat=T)
+
+acoef <- rowsum(afit$coef, afit$times) #per death time coefs
+for (i in c(2,5,27,54,101, 135)) {
+    who <- (cdt$riskmat[,i]==1)
+    x <- cfit$x[who,]
+    y <- 1*( cfit$y[who,2]==1 & cfit$y[who,1] == cdt$time[i])
+    w <- cfit$weight[who]
+    fit <- lm(y~x, weights=w)
+    cat("i=", i, "coef=", aeq(fit$coef, acoef[i,]))
+
+    rr <- diag(resid(fit))
+    zz <- cbind(1,x)
+    zzinv <- solve(t(zz)%*% (w*zz))
+    cat(" twt=", aeq(1/(diag(zzinv)), afit$tweight[indx[i],]))
+ 
+    df <- t(zzinv %*% t(zz) %*% (w*rr))
+    cat(" dfbeta=", aeq(df, afit$dfbeta[who,,i]), "\n")
+    }
+	  
+rm(afit, cfit, cdt, who, x, y, fit, rr, zz, df)
+rm(ord, acoef)
+    
+#
+# Check that the test statistic computed within aareg and
+#  the one recomputed within summary.aareg are the same.
+# Of course, they could both be wrong, but at least they'll agree!
+# If the maxtime argument is used in summary, it recomputes the test,
+#  even if we know that it wouldn't have had to.
+#
+# Because the 1-variable and >1 variable case have different code, test
+#  them both.
+#
+afit <- aareg(Surv(time, status) ~ age, lung, dfbeta=T)
+asum <- summary(afit, maxtime=max(afit$times))
+aeq(afit$test.stat, asum$test.stat)
+aeq(afit$test.var,  asum$test.var)
+aeq(afit$test.var2, asum$test.var2)
+
+print(afit)
+
+afit <- aareg(Surv(time, status) ~ age, lung, dfbeta=T, test='nrisk')
+asum <- summary(afit, maxtime=max(afit$times))
+aeq(afit$test.stat, asum$test.stat)
+aeq(afit$test.var,  asum$test.var)
+aeq(afit$test.var2, asum$test.var2)
+
+summary(afit)
+
+#
+# Mulitvariate
+#
+afit <- aareg(Surv(time, status) ~ age + sex + ph.karno + pat.karno, lung,
+	      dfbeta=T)
+asum <- summary(afit, maxtime=max(afit$times))
+aeq(afit$test.stat, asum$test.stat)
+aeq(afit$test.var,  asum$test.var)
+aeq(afit$test.var2, asum$test.var2)
+
+print(afit)
+
+afit <- aareg(Surv(time, status) ~ age + sex + ph.karno + pat.karno, lung,
+	      dfbeta=T, test='nrisk')
+asum <- summary(afit, maxtime=max(afit$times))
+aeq(afit$test.stat, asum$test.stat)
+aeq(afit$test.var,  asum$test.var)
+aeq(afit$test.var2, asum$test.var2)
+
+summary(afit)
+
+# Weights play no role in the final computation of the test statistic, given
+#  the coefficient matrix, nrisk, and dfbeta as inputs.  (Weights do
+#  change the inputs).  So there is no need to reprise the above with
+#  case weights.
diff --git a/win32/deps/library/survival/tests/aareg.Rout.save b/win32/deps/library/survival/tests/aareg.Rout.save
new file mode 100644
index 0000000..894a49e
--- /dev/null
+++ b/win32/deps/library/survival/tests/aareg.Rout.save
@@ -0,0 +1,381 @@
+
+R version 2.14.0 Under development (unstable) (2011-04-10 r55401)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Test aareg, for some simple data where the answers can be computed
+> #  in closed form
+> #
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+>    
+> test1 <- data.frame(time=  c(4, 3,1,1,2,2,3),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0),
++ 		    wt=    c(1, 1:6))
+> 
+> tfit  <- aareg(Surv(time, status) ~ x, test1)
+> aeq(tfit$times, c(1,2,2))
+[1] TRUE
+> aeq(tfit$nrisk, c(6,4,4))
+[1] TRUE
+> aeq(tfit$coefficient, matrix(c(0,0,1/3, 1/3, 1, -1/3), ncol=2))
+[1] TRUE
+> aeq(tfit$tweight, matrix(c(3,3,3, 3/2, 3/4, 3/4), ncol=2))
+[1] TRUE
+> aeq(tfit$test.statistic, c(1,1))
+[1] TRUE
+> aeq(tfit$test.var,       c(1, -1/4, -1/4, 1/4 + 9/16 + 1/16))
+[1] TRUE
+> 
+> tfit <- aareg(Surv(time, status) ~ x, test1, test='nrisk')
+> aeq(tfit$tweight, matrix(c(3,3,3, 3/2, 3/4, 3/4), ncol=2)) #should be as before
+[1] TRUE
+> aeq(tfit$test.statistic, c(4/3, 6/3+ 4 - 4/3))
+[1] TRUE
+> aeq(tfit$test.var,       c(16/9, -16/9, -16/9, 36/9 + 16 + 16/9))
+[1] TRUE
+> 
+> # In the 1-variable case, this is the same as the default Aalen weight
+> tfit <- aareg(Surv(time, status) ~ x, test1, test='variance')
+> aeq(tfit$test.statistic, c(1,1))
+[1] TRUE
+> aeq(tfit$test.var,       c(1, -1/4, -1/4, 1/4 + 9/16 + 1/16))
+[1] TRUE
+> 
+> #
+> # Repeat the above, with case weights
+> #
+> tfit <- aareg(Surv(time, status) ~x, test1, weights=wt)  
+> aeq(tfit$times, c(1,2,2))
+[1] TRUE
+> aeq(tfit$nrisk, c(21,16,16))
+[1] TRUE
+> aeq(tfit$coefficient, matrix(c(0,0,5/12, 2/9, 1, -5/12), ncol=2))
+[1] TRUE
+> aeq(tfit$tweight, matrix(c(12,12,12, 36/7, 3,3), ncol=2))
+[1] TRUE
+> aeq(tfit$test.statistic, c(5, 72/63 + 3 - 15/12))
+[1] TRUE
+> aeq(tfit$test.var,       c(25, -25/4, -25/4, (72/63)^2 + 9 + (5/4)^2))
+[1] TRUE
+> 
+> tfit <- aareg(Surv(time, status) ~x, test1, weights=wt, test='nrisk')
+> aeq(tfit$test.statistic, c(20/3,  42/9 + 16 - 16*5/12))
+[1] TRUE
+> aeq(tfit$test.var,       c(400/9, -400/9, -400/9, 
++ 			    (42/9)^2 + 16^2 + (16*5/12)^2))
+[1] TRUE
+> 
+> #
+> # Make a test data set with no NAs, in sorted order, no ties,
+> #   15 observations
+> tdata <- lung[15:29, c('time', 'status', 'age', 'sex', 'ph.ecog')]
+> tdata$status <- tdata$status -1
+> tdata <- tdata[order(tdata$time, tdata$status),]
+> row.names(tdata) <- 1:15
+> tdata$status[8] <- 0      #for some variety
+> 
+> afit <- aareg(Surv(time, status) ~ age + sex + ph.ecog, tdata, nmin=6)
+> #
+> # Now, do it "by hand"
+> cfit <- coxph(Surv(time, status) ~ age + sex + ph.ecog, tdata, iter=0,
++                method='breslow')
+> dt1   <- coxph.detail(cfit)
+> sch1  <- resid(cfit, type='schoen')
+> 
+> # First estimate of Aalen: from the Cox computations, first 9
+> #  The first and last cols of the ninth are somewhat unstable (approx =0)
+> mine <- rbind(solve(dt1$imat[,,1], sch1[1,]),
++               solve(dt1$imat[,,2], sch1[2,]),
++               solve(dt1$imat[,,3], sch1[3,]),
++               solve(dt1$imat[,,4], sch1[4,]),
++               solve(dt1$imat[,,5], sch1[5,]),
++               solve(dt1$imat[,,6], sch1[6,]),
++               solve(dt1$imat[,,7], sch1[7,]),
++               solve(dt1$imat[,,8], sch1[8,]),
++               solve(dt1$imat[,,9], sch1[9,])) 
+> mine <- diag(1/dt1$nrisk[1:9]) %*% mine
+> 
+> aeq(mine, afit$coef[1:9, -1])
+[1] TRUE
+> 
+> rm(tfit, afit, mine, dt1, cfit, sch1)
+> 
+> #
+> # Check out the dfbeta matrix from aareg
+> #   Note that it is kept internally in time order, not data set order
+> # Those who want residuals should use the resid function!
+> 
+> #
+> # First, the simple test case where I know the anwers
+> #
+> afit <- aareg(Surv(time, status) ~ x, test1, dfbeta=T)
+> temp <- c(rep(0,6),             #intercepts at time 1
++           c(2,-1,-1,0,0,0)/9,   #alpha at time 1
++           c(0,0,0,2, -1, -1)/9, #intercepts at time 2
++           c(0,0,0,-2,1,1)/9)    #alpha at time 2
+> aeq(afit$dfbeta, temp)
+[1] TRUE
+> 
+> #
+> #Now a multivariate data set
+> #
+> afit <- aareg(Surv(time, status) ~ age + sex + ph.ecog, lung, dfbeta=T)
+> 
+> ord <- order(lung$time, -lung$status)
+> cfit <- coxph(Surv(time, status) ~ age + sex + ph.ecog, lung[ord,],
++ 	        method='breslow', iter=0, x=T)
+> cdt  <- coxph.detail(cfit, riskmat=T)
+> 
+> # an arbitrary list of times
+> acoef <- rowsum(afit$coef, afit$times) #per death time coefs
+> indx <- match(cdt$time, afit$times)
+> for (i in c(2,5,27,54,101, 135)) {
++     lwho <- (cdt$riskmat[,i]==1)
++     lmx <- cfit$x[lwho,]
++     lmy <- 1*( cfit$y[lwho,2]==1 & cfit$y[lwho,1] == cdt$time[i])
++     fit <- lm(lmy~ lmx)
++     cat("i=", i, "coef=", aeq(fit$coef, acoef[i,]))
++ 
++     rr <- diag(resid(fit))
++     zz <- cbind(1,lmx)
++     zzinv <- solve(t(zz) %*% zz)
++     cat(" twt=", aeq(1/(diag(zzinv)), afit$tweight[indx[i],]))
++ 
++     df <- t(zzinv %*% t(zz)  %*% rr)
++     cat(" dfbeta=", aeq(df, afit$dfbeta[lwho,,i]), "\n")
++     }
+i= 2 coef= TRUE twt= TRUE dfbeta= TRUE 
+i= 5 coef= TRUE twt= TRUE dfbeta= TRUE 
+i= 27 coef= TRUE twt= TRUE dfbeta= TRUE 
+i= 54 coef= TRUE twt= TRUE dfbeta= TRUE 
+i= 101 coef= TRUE twt= TRUE dfbeta= TRUE 
+i= 135 coef= TRUE twt= TRUE dfbeta= TRUE 
+> 	  
+> rm(afit, cfit, cdt, lwho, lmx, lmy, fit, rr, zz, df)
+> 
+> 
+> # Repeat it with case weights
+> ww <- rep(1:5, length=nrow(lung))/ 3.0
+> afit <- aareg(Surv(time, status) ~ age + sex + ph.ecog, lung, dfbeta=T,
++ 	      weights=ww)
+> cfit <- coxph(Surv(time, status) ~ age + sex + ph.ecog, lung[ord,],
++ 	        method='breslow', iter=0, x=T, weight=ww[ord])
+> cdt  <- coxph.detail(cfit, riskmat=T)
+> 
+> acoef <- rowsum(afit$coef, afit$times) #per death time coefs
+> for (i in c(2,5,27,54,101, 135)) {
++     who <- (cdt$riskmat[,i]==1)
++     x <- cfit$x[who,]
++     y <- 1*( cfit$y[who,2]==1 & cfit$y[who,1] == cdt$time[i])
++     w <- cfit$weight[who]
++     fit <- lm(y~x, weights=w)
++     cat("i=", i, "coef=", aeq(fit$coef, acoef[i,]))
++ 
++     rr <- diag(resid(fit))
++     zz <- cbind(1,x)
++     zzinv <- solve(t(zz)%*% (w*zz))
++     cat(" twt=", aeq(1/(diag(zzinv)), afit$tweight[indx[i],]))
++  
++     df <- t(zzinv %*% t(zz) %*% (w*rr))
++     cat(" dfbeta=", aeq(df, afit$dfbeta[who,,i]), "\n")
++     }
+i= 2 coef= TRUE twt= TRUE dfbeta= TRUE 
+i= 5 coef= TRUE twt= TRUE dfbeta= TRUE 
+i= 27 coef= TRUE twt= TRUE dfbeta= TRUE 
+i= 54 coef= TRUE twt= TRUE dfbeta= TRUE 
+i= 101 coef= TRUE twt= TRUE dfbeta= TRUE 
+i= 135 coef= TRUE twt= TRUE dfbeta= TRUE 
+> 	  
+> rm(afit, cfit, cdt, who, x, y, fit, rr, zz, df)
+> rm(ord, acoef)
+>     
+> #
+> # Check that the test statistic computed within aareg and
+> #  the one recomputed within summary.aareg are the same.
+> # Of course, they could both be wrong, but at least they'll agree!
+> # If the maxtime argument is used in summary, it recomputes the test,
+> #  even if we know that it wouldn't have had to.
+> #
+> # Because the 1-variable and >1 variable case have different code, test
+> #  them both.
+> #
+> afit <- aareg(Surv(time, status) ~ age, lung, dfbeta=T)
+> asum <- summary(afit, maxtime=max(afit$times))
+> aeq(afit$test.stat, asum$test.stat)
+[1] TRUE
+> aeq(afit$test.var,  asum$test.var)
+[1] TRUE
+> aeq(afit$test.var2, asum$test.var2)
+[1] TRUE
+> 
+> print(afit)
+Call:
+aareg(formula = Surv(time, status) ~ age, data = lung, dfbeta = T)
+
+  n= 228 
+    139 out of 139 unique event times used
+
+              slope      coef se(coef) robust se      z      p
+Intercept -0.000872 -0.000905 4.26e-03  4.13e-03 -0.219 0.8270
+age        0.000110  0.000142 6.96e-05  6.75e-05  2.110 0.0351
+
+Chisq=4.44 on 1 df, p=0.035; test weights=aalen
+> 
+> afit <- aareg(Surv(time, status) ~ age, lung, dfbeta=T, test='nrisk')
+> asum <- summary(afit, maxtime=max(afit$times))
+> aeq(afit$test.stat, asum$test.stat)
+[1] TRUE
+> aeq(afit$test.var,  asum$test.var)
+[1] TRUE
+> aeq(afit$test.var2, asum$test.var2)
+[1] TRUE
+> 
+> summary(afit)
+$table
+                  slope        coef    se(coef)   robust se         z
+Intercept -0.0009538483 -0.11693804 0.534885651 0.533148054 -0.219335
+age        0.0001053024  0.01795521 0.008746523 0.008734005  2.055782
+                   p
+Intercept 0.82638908
+age       0.03980352
+
+$test
+[1] "nrisk"
+
+$test.statistic
+Intercept       age 
+-19.29478   2.96261 
+
+$test.var
+          [,1]        [,2]
+[1,] 7789.1449 -126.055872
+[2,] -126.0559    2.082758
+
+$test.var2
+          [,1]      [,2]
+[1,] 7738.6204 -125.5077
+[2,] -125.5077    2.0768
+
+$chisq
+        [,1]
+[1,] 4.22624
+
+$n
+[1] 228 139 139
+
+attr(,"class")
+[1] "summary.aareg"
+> 
+> #
+> # Mulitvariate
+> #
+> afit <- aareg(Surv(time, status) ~ age + sex + ph.karno + pat.karno, lung,
++ 	      dfbeta=T)
+> asum <- summary(afit, maxtime=max(afit$times))
+> aeq(afit$test.stat, asum$test.stat)
+[1] TRUE
+> aeq(afit$test.var,  asum$test.var)
+[1] TRUE
+> aeq(afit$test.var2, asum$test.var2)
+[1] TRUE
+> 
+> print(afit)
+Call:
+aareg(formula = Surv(time, status) ~ age + sex + ph.karno + pat.karno, 
+    data = lung, dfbeta = T)
+
+  n=224 (4 observations deleted due to missingness)
+    132 out of 136 unique event times used
+
+              slope      coef se(coef) robust se     z       p
+Intercept  2.15e-02  0.025000 8.45e-03  7.72e-03  3.25 0.00117
+age        3.09e-05  0.000076 7.32e-05  6.49e-05  1.17 0.24100
+sex       -2.96e-03 -0.004020 1.25e-03  1.23e-03 -3.27 0.00109
+ph.karno  -6.77e-05 -0.000083 6.69e-05  8.30e-05 -1.00 0.31700
+pat.karno -1.01e-04 -0.000112 5.59e-05  5.70e-05 -1.96 0.05010
+
+Chisq=23.36 on 4 df, p=0.00011; test weights=aalen
+> 
+> afit <- aareg(Surv(time, status) ~ age + sex + ph.karno + pat.karno, lung,
++ 	      dfbeta=T, test='nrisk')
+> asum <- summary(afit, maxtime=max(afit$times))
+> aeq(afit$test.stat, asum$test.stat)
+[1] TRUE
+> aeq(afit$test.var,  asum$test.var)
+[1] TRUE
+> aeq(afit$test.var2, asum$test.var2)
+[1] TRUE
+> 
+> summary(afit)
+$table
+                  slope        coef    se(coef)   robust se         z
+Intercept  2.119015e-02  3.05872822 1.044992929 0.955953617  3.199662
+age        3.181122e-05  0.01071085 0.009280348 0.008182931  1.308926
+sex       -2.985556e-03 -0.49368373 0.153217001 0.151559500 -3.257359
+ph.karno  -8.371983e-05 -0.01131957 0.007825769 0.009654398 -1.172478
+pat.karno -8.501076e-05 -0.01328844 0.007241150 0.007669582 -1.732617
+                   p
+Intercept 0.00137589
+age       0.19055946
+sex       0.00112454
+ph.karno  0.24100515
+pat.karno 0.08316385
+
+$test
+[1] "nrisk"
+
+$test.statistic
+ Intercept        age        sex   ph.karno  pat.karno 
+480.220330   1.681604 -77.508345  -1.777173  -2.086286 
+
+$test.var
+            b0                                                   
+b0 26916.95995 -177.3767597 -791.4141458 -103.5540756 -69.1210402
+    -177.37676    2.1228915    0.1752574    0.4055099   0.1622945
+    -791.41415    0.1752574  578.6463538   -0.9726495  -0.6320578
+    -103.55408    0.4055099   -0.9726495    1.5095704  -0.5793466
+     -69.12104    0.1622945   -0.6320578   -0.5793466   1.2924520
+
+$test.var2
+            [,1]         [,2]         [,3]         [,4]        [,5]
+[1,] 22525.42254 -109.0376340 -1294.620657 -135.7477106 -24.1718358
+[2,]  -109.03763    1.6505060     2.562655    0.1774270  -0.1206339
+[3,] -1294.62066    2.5626546   566.194480    7.4865489  -4.7691882
+[4,]  -135.74771    0.1774270     7.486549    2.2974694  -0.9877341
+[5,]   -24.17184   -0.1206339    -4.769188   -0.9877341   1.4499155
+
+$chisq
+        [,1]
+[1,] 22.3874
+
+$n
+[1] 224 132 136
+
+attr(,"class")
+[1] "summary.aareg"
+> 
+> # Weights play no role in the final computation of the test statistic, given
+> #  the coefficient matrix, nrisk, and dfbeta as inputs.  (Weights do
+> #  change the inputs).  So there is no need to reprise the above with
+> #  case weights.
+> 
diff --git a/win32/deps/library/survival/tests/anova.R b/win32/deps/library/survival/tests/anova.R
new file mode 100644
index 0000000..18b9b32
--- /dev/null
+++ b/win32/deps/library/survival/tests/anova.R
@@ -0,0 +1,31 @@
+#
+# Test out anova, with strata terms
+#
+options(na.action=na.omit)
+library(survival)
+
+fit1 <- coxph(Surv(time, status) ~ ph.ecog + wt.loss + strata(sex) + 
+              poly(age,3), lung)
+ztemp <- anova(fit1)
+
+tdata <- na.omit(lung[, c('time', 'status', 'ph.ecog', 'wt.loss', 'sex', 'age')])
+fit2 <- coxph(Surv(time, status)~ ph.ecog + wt.loss + poly(age,3) + strata(sex),
+              data=tdata)
+ztemp2 <- anova(fit2)
+all.equal(ztemp, ztemp2)
+
+
+fit2 <-  coxph(Surv(time, status) ~ ph.ecog + wt.loss + strata(sex), tdata)
+fit3 <-  coxph(Surv(time, status) ~ ph.ecog + strata(sex), tdata)
+
+all.equal(ztemp$loglik, c(fit1$loglik[1], fit3$loglik[2], fit2$loglik[2],
+                         fit1$loglik[2]))
+all.equal(ztemp$Chisq[-1], 2* diff(ztemp$loglik))
+all.equal(ztemp$Df[-1], c(1,1,3))
+
+ztemp2 <- anova(fit3, fit2, fit1)
+all.equal(ztemp2$loglik, ztemp$loglik[-1])
+all.equal(ztemp2$Chisq[2:3], ztemp$Chisq[3:4])
+all.equal(ztemp2$P[2:3], ztemp$P[3:4])
+
+
diff --git a/win32/deps/library/survival/tests/anova.Rout.save b/win32/deps/library/survival/tests/anova.Rout.save
new file mode 100644
index 0000000..b39e4f4
--- /dev/null
+++ b/win32/deps/library/survival/tests/anova.Rout.save
@@ -0,0 +1,57 @@
+
+R version 2.9.0 (2009-04-17)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> #
+> # Test out anova, with strata terms
+> #
+> options(na.action=na.omit)
+> library(survival)
+Loading required package: splines
+> 
+> fit1 <- coxph(Surv(time, status) ~ ph.ecog + wt.loss + strata(sex) + 
++               poly(age,3), lung)
+> ztemp <- anova(fit1)
+> 
+> tdata <- na.omit(lung[, c('time', 'status', 'ph.ecog', 'wt.loss', 'sex', 'age')])
+> fit2 <- coxph(Surv(time, status)~ ph.ecog + wt.loss + poly(age,3) + strata(sex),
++               data=tdata)
+> ztemp2 <- anova(fit2)
+> all.equal(ztemp, ztemp2)
+[1] TRUE
+> 
+> 
+> fit2 <-  coxph(Surv(time, status) ~ ph.ecog + wt.loss + strata(sex), tdata)
+> fit3 <-  coxph(Surv(time, status) ~ ph.ecog + strata(sex), tdata)
+> 
+> all.equal(ztemp$loglik, c(fit1$loglik[1], fit3$loglik[2], fit2$loglik[2],
++                          fit1$loglik[2]))
+[1] TRUE
+> all.equal(ztemp$Chisq[-1], 2* diff(ztemp$loglik))
+[1] TRUE
+> all.equal(ztemp$Df[-1], c(1,1,3))
+[1] TRUE
+> 
+> ztemp2 <- anova(fit3, fit2, fit1)
+> all.equal(ztemp2$loglik, ztemp$loglik[-1])
+[1] TRUE
+> all.equal(ztemp2$Chisq[2:3], ztemp$Chisq[3:4])
+[1] TRUE
+> all.equal(ztemp2$P[2:3], ztemp$P[3:4])
+[1] TRUE
+> 
+> 
+> 
diff --git a/win32/deps/library/survival/tests/bladder.R b/win32/deps/library/survival/tests/bladder.R
new file mode 100644
index 0000000..4dabeaa
--- /dev/null
+++ b/win32/deps/library/survival/tests/bladder.R
@@ -0,0 +1,37 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Fit the models found in Wei et. al.
+#
+wfit <- coxph(Surv(stop, event) ~ (rx + size + number)* strata(enum) +
+		 cluster(id), bladder, method='breslow')
+wfit
+
+# Check the rx coefs versus Wei, et al, JASA 1989
+rx <- c(1,4,5,6)  # the treatment coefs above
+cmat <- diag(4); cmat[1,] <- 1;          #contrast matrix
+wfit$coef[rx] %*% cmat                   # the coefs in their paper (table 5)
+t(cmat) %*% wfit$var[rx,rx] %*% cmat  # var matrix (eqn 3.2)
+
+# Anderson-Gill fit
+fita <- coxph(Surv(start, stop, event) ~ rx + size + number + cluster(id),
+		  bladder2,  method='breslow')
+summary(fita)
+
+# Prentice fits.  Their model 1 a and b are the same
+fit1p  <- coxph(Surv(stop, event) ~ rx + size + number, bladder2,
+		subset=(enum==1), method='breslow')
+fit2pa <- coxph(Surv(stop, event) ~ rx + size + number, bladder2,
+		subset=(enum==2), method='breslow')
+fit2pb <- coxph(Surv(stop-start,  event) ~ rx + size + number, bladder2,
+		   subset=(enum==2), method='breslow')
+fit3pa <- coxph(Surv(stop, event) ~ rx + size + number, bladder2,
+		subset=(enum==3), method='breslow')
+ #and etc.
+fit1p
+fit2pa
+fit2pb
+fit3pa
+rm(rx, cmat, wfit, fita, fit1p, fit2pa, fit2pb, fit3pa)
diff --git a/win32/deps/library/survival/tests/bladder.Rout.save b/win32/deps/library/survival/tests/bladder.Rout.save
new file mode 100644
index 0000000..2038b8e
--- /dev/null
+++ b/win32/deps/library/survival/tests/bladder.Rout.save
@@ -0,0 +1,154 @@
+
+R version 2.14.0 Under development (unstable) (2011-04-10 r55401)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Fit the models found in Wei et. al.
+> #
+> wfit <- coxph(Surv(stop, event) ~ (rx + size + number)* strata(enum) +
++ 		 cluster(id), bladder, method='breslow')
+> wfit
+Call:
+coxph(formula = Surv(stop, event) ~ (rx + size + number) * strata(enum) + 
+    cluster(id), data = bladder, method = "breslow")
+
+
+                             coef exp(coef) se(coef) robust se      z      p
+rx                        -0.5176     0.596   0.3158    0.3075 -1.683 0.0920
+size                       0.0679     1.070   0.1012    0.0853  0.796 0.4300
+number                     0.2360     1.266   0.0761    0.0721  3.274 0.0011
+rx:strata(enum)enum=2     -0.1018     0.903   0.5043    0.3265 -0.312 0.7600
+rx:strata(enum)enum=3     -0.1823     0.833   0.5579    0.3916 -0.465 0.6400
+rx:strata(enum)enum=4     -0.1332     0.875   0.6581    0.4968 -0.268 0.7900
+size:strata(enum)enum=2   -0.1440     0.866   0.1680    0.1119 -1.287 0.2000
+size:strata(enum)enum=3   -0.2792     0.756   0.2086    0.1511 -1.847 0.0650
+size:strata(enum)enum=4   -0.2711     0.763   0.2515    0.1856 -1.460 0.1400
+number:strata(enum)enum=2 -0.0984     0.906   0.1193    0.1144 -0.861 0.3900
+number:strata(enum)enum=3 -0.0662     0.936   0.1298    0.1167 -0.567 0.5700
+number:strata(enum)enum=4  0.0928     1.097   0.1466    0.1175  0.790 0.4300
+
+Likelihood ratio test=29.4  on 12 df, p=0.00344  n= 340, number of events= 112 
+> 
+> # Check the rx coefs versus Wei, et al, JASA 1989
+> rx <- c(1,4,5,6)  # the treatment coefs above
+> cmat <- diag(4); cmat[1,] <- 1;          #contrast matrix
+> wfit$coef[rx] %*% cmat                   # the coefs in their paper (table 5)
+           [,1]       [,2]       [,3]       [,4]
+[1,] -0.5176209 -0.6194404 -0.6998771 -0.6507935
+> t(cmat) %*% wfit$var[rx,rx] %*% cmat  # var matrix (eqn 3.2)
+           [,1]       [,2]       [,3]      [,4]
+[1,] 0.09455501 0.06017669 0.05677331 0.0437777
+[2,] 0.06017669 0.13242834 0.13011557 0.1160420
+[3,] 0.05677331 0.13011557 0.17235879 0.1590865
+[4,] 0.04377770 0.11604200 0.15908650 0.2398112
+> 
+> # Anderson-Gill fit
+> fita <- coxph(Surv(start, stop, event) ~ rx + size + number + cluster(id),
++ 		  bladder2,  method='breslow')
+> summary(fita)
+Call:
+coxph(formula = Surv(start, stop, event) ~ rx + size + number + 
+    cluster(id), data = bladder2, method = "breslow")
+
+  n= 178, number of events= 112 
+
+           coef exp(coef) se(coef) robust se      z Pr(>|z|)   
+rx     -0.45979   0.63142  0.19996   0.25801 -1.782  0.07474 . 
+size   -0.04256   0.95833  0.06903   0.07555 -0.563  0.57317   
+number  0.17164   1.18726  0.04733   0.06131  2.799  0.00512 **
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
+
+       exp(coef) exp(-coef) lower .95 upper .95
+rx        0.6314     1.5837    0.3808     1.047
+size      0.9583     1.0435    0.8264     1.111
+number    1.1873     0.8423    1.0528     1.339
+
+Concordance= 0.634  (se = 0.03 )
+Rsquare= 0.09   (max possible= 0.994 )
+Likelihood ratio test= 16.77  on 3 df,   p=0.000787
+Wald test            = 11.76  on 3 df,   p=0.008256
+Score (logrank) test = 18.57  on 3 df,   p=0.0003355,   Robust = 11.44  p=0.009588
+
+  (Note: the likelihood ratio and score tests assume independence of
+     observations within a cluster, the Wald and robust score tests do not).
+> 
+> # Prentice fits.  Their model 1 a and b are the same
+> fit1p  <- coxph(Surv(stop, event) ~ rx + size + number, bladder2,
++ 		subset=(enum==1), method='breslow')
+> fit2pa <- coxph(Surv(stop, event) ~ rx + size + number, bladder2,
++ 		subset=(enum==2), method='breslow')
+> fit2pb <- coxph(Surv(stop-start,  event) ~ rx + size + number, bladder2,
++ 		   subset=(enum==2), method='breslow')
+> fit3pa <- coxph(Surv(stop, event) ~ rx + size + number, bladder2,
++ 		subset=(enum==3), method='breslow')
+>  #and etc.
+> fit1p
+Call:
+coxph(formula = Surv(stop, event) ~ rx + size + number, data = bladder2, 
+    subset = (enum == 1), method = "breslow")
+
+
+          coef exp(coef) se(coef)      z      p
+rx     -0.5176     0.596   0.3158 -1.639 0.1000
+size    0.0679     1.070   0.1012  0.671 0.5000
+number  0.2360     1.266   0.0761  3.102 0.0019
+
+Likelihood ratio test=9.66  on 3 df, p=0.0216  n= 85, number of events= 47 
+> fit2pa
+Call:
+coxph(formula = Surv(stop, event) ~ rx + size + number, data = bladder2, 
+    subset = (enum == 2), method = "breslow")
+
+
+           coef exp(coef) se(coef)       z    p
+rx     -0.42421     0.654   0.4022 -1.0547 0.29
+size   -0.12503     0.882   0.1171 -1.0679 0.29
+number  0.00199     1.002   0.0938  0.0212 0.98
+
+Likelihood ratio test=2.02  on 3 df, p=0.569  n= 46, number of events= 29 
+> fit2pb
+Call:
+coxph(formula = Surv(stop - start, event) ~ rx + size + number, 
+    data = bladder2, subset = (enum == 2), method = "breslow")
+
+
+           coef exp(coef) se(coef)       z    p
+rx     -0.25911     0.772   0.4051 -0.6396 0.52
+size   -0.11636     0.890   0.1192 -0.9759 0.33
+number -0.00571     0.994   0.0967 -0.0591 0.95
+
+Likelihood ratio test=1.27  on 3 df, p=0.735  n= 46, number of events= 29 
+> fit3pa
+Call:
+coxph(formula = Surv(stop, event) ~ rx + size + number, data = bladder2, 
+    subset = (enum == 3), method = "breslow")
+
+
+          coef exp(coef) se(coef)      z    p
+rx     -0.8985     0.407    0.554 -1.623 0.10
+size    0.0850     1.089    0.209  0.407 0.68
+number -0.0172     0.983    0.128 -0.134 0.89
+
+Likelihood ratio test=4.16  on 3 df, p=0.245  n= 27, number of events= 22 
+> rm(rx, cmat, wfit, fita, fit1p, fit2pa, fit2pb, fit3pa)
+> 
diff --git a/win32/deps/library/survival/tests/book1.R b/win32/deps/library/survival/tests/book1.R
new file mode 100644
index 0000000..b36aa83
--- /dev/null
+++ b/win32/deps/library/survival/tests/book1.R
@@ -0,0 +1,106 @@
+library(survival)
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+
+#
+# Tests from the appendix of Therneau and Grambsch
+#  a. Data set 1 and Breslow estimate
+#  The data below is not in time order, to also test sorting, and has 1 NA
+#
+test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0))
+
+# Breslow estimate
+byhand1 <- function(beta, newx=0) {
+    r <- exp(beta)
+    loglik <- 2*beta - (log(3*r+3) + 2*log(r+3))
+    u <- (6 + 3*r - r^2) / ((r+1)*(r+3))
+    imat <- r/(r+1)^2 + 6*r/(r+3)^2
+
+    x <- c(1,1,1,0,0,0)
+    status <- c(1,0,1,1,0,1)
+    xbar <- c(r/(r+1), r/(r+3), 0, 0)  # at times 1, 6, 8 and 9
+    haz <- c(1/(3*r+3), 2/(r+3), 0, 1 )
+    ties <- c(1,1,2,2,3,4)
+    wt <- c(r,r,r,1,1,1)
+    mart <- c(1,0,1,1,0,1) -  wt* (cumsum(haz))[ties]  #martingale residual
+
+    a <- 3*(r+1)^2; b<- (r+3)^2
+    score <- c((2*r+3)/a, -r/a, -r/a + 3*(3-r)/b,  r/a - r*(r+1)/b,
+               r/a + 2*r/b, r/a + 2*r/b)
+
+    # Schoenfeld residual
+    scho <- c(1/(r+1), 1- (r/(3+r)), 0-(r/(3+r)) , 0)
+
+    surv  <- exp(-cumsum(haz)* exp(beta*newx))
+    varhaz.g <- cumsum(c(1/(3*r+3)^2, 2/(r+3)^2, 0, 1 ))
+
+    varhaz.d <- cumsum((newx-xbar) * haz)
+
+    varhaz <- (varhaz.g + varhaz.d^2/ imat) * exp(2*beta*newx)
+
+    names(xbar) <- names(haz) <- 1:4
+    names(surv) <- names(varhaz) <- 1:4
+    list(loglik=loglik, u=u, imat=imat, xbar=xbar, haz=haz,
+	     mart=mart,  score=score,
+		scho=scho, surv=surv, var=varhaz,
+		varhaz.g=varhaz.g, varhaz.d=varhaz.d)
+    }
+
+
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+
+fit0 <-coxph(Surv(time, status) ~x, test1, iter=0, method='breslow')
+truth0 <- byhand1(0,0)
+aeq(truth0$loglik, fit0$loglik[1])
+aeq(1/truth0$imat, fit0$var)
+aeq(truth0$mart, fit0$resid[c(2:6,1)])
+aeq(truth0$scho, resid(fit0, 'schoen'))
+aeq(truth0$score, resid(fit0, 'score')[c(3:7,1)])
+sfit <- survfit(fit0, list(x=0))
+aeq(sfit$std.err^2, c(7/180, 2/9, 2/9, 11/9))
+aeq(resid(fit0, 'score'), c(5/24, NA, 5/12, -1/12, 7/24, -1/24, 5/24))
+
+fit1 <- coxph(Surv(time, status) ~x, test1, iter=1, method='breslow')
+aeq(fit1$coef, 8/5)
+
+# This next gives an ignorable warning message
+fit2 <- coxph(Surv(time, status) ~x, test1, method='breslow', iter=2)
+aeq(round(fit2$coef, 6), 1.472724)
+
+fit <- coxph(Surv(time, status) ~x, test1, method='breslow', eps=1e-8)
+aeq(round(fit$coef,7), 1.4752849)
+truth <- byhand1(fit$coef, 0)
+aeq(truth$loglik, fit$loglik[2])
+aeq(1/truth$imat, fit$var)
+aeq(truth$mart, fit$resid[c(2:6,1)])
+aeq(truth$scho, resid(fit, 'schoen'))
+aeq(truth$score, resid(fit, 'score')[c(3:7,1)])
+
+sfit <- survfit(fit, list(x=0), censor=FALSE)
+aeq(sfit$std.err^2, truth$var[c(1,2,4)]) # sfit skips time 8 (no events there)
+aeq(-log(sfit$surv), (cumsum(truth$haz))[c(1,2,4)])
+sfit <- survfit(fit, list(x=0), censor=TRUE)
+aeq(sfit$std.err^2, truth$var) 
+aeq(-log(sfit$surv), (cumsum(truth$haz)))
+
+
+# 
+# Done with the formal test, now print out lots of bits
+#
+resid(fit)
+resid(fit, 'scor')
+resid(fit, 'scho')
+
+predict(fit, type='lp')
+predict(fit, type='risk')
+predict(fit, type='expected')
+predict(fit, type='terms')
+predict(fit, type='lp', se.fit=T)
+predict(fit, type='risk', se.fit=T)
+predict(fit, type='expected', se.fit=T)
+predict(fit, type='terms', se.fit=T)
+
+summary(survfit(fit))
+summary(survfit(fit, list(x=2)))
diff --git a/win32/deps/library/survival/tests/book1.Rout.save b/win32/deps/library/survival/tests/book1.Rout.save
new file mode 100644
index 0000000..b65ce26
--- /dev/null
+++ b/win32/deps/library/survival/tests/book1.Rout.save
@@ -0,0 +1,222 @@
+
+R version 2.11.1 (2010-05-31)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(survival)
+Loading required package: splines
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> 
+> #
+> # Tests from the appendix of Therneau and Grambsch
+> #  a. Data set 1 and Breslow estimate
+> #  The data below is not in time order, to also test sorting, and has 1 NA
+> #
+> test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0))
+> 
+> # Breslow estimate
+> byhand1 <- function(beta, newx=0) {
++     r <- exp(beta)
++     loglik <- 2*beta - (log(3*r+3) + 2*log(r+3))
++     u <- (6 + 3*r - r^2) / ((r+1)*(r+3))
++     imat <- r/(r+1)^2 + 6*r/(r+3)^2
++ 
++     x <- c(1,1,1,0,0,0)
++     status <- c(1,0,1,1,0,1)
++     xbar <- c(r/(r+1), r/(r+3), 0, 0)  # at times 1, 6, 8 and 9
++     haz <- c(1/(3*r+3), 2/(r+3), 0, 1 )
++     ties <- c(1,1,2,2,3,4)
++     wt <- c(r,r,r,1,1,1)
++     mart <- c(1,0,1,1,0,1) -  wt* (cumsum(haz))[ties]  #martingale residual
++ 
++     a <- 3*(r+1)^2; b<- (r+3)^2
++     score <- c((2*r+3)/a, -r/a, -r/a + 3*(3-r)/b,  r/a - r*(r+1)/b,
++                r/a + 2*r/b, r/a + 2*r/b)
++ 
++     # Schoenfeld residual
++     scho <- c(1/(r+1), 1- (r/(3+r)), 0-(r/(3+r)) , 0)
++ 
++     surv  <- exp(-cumsum(haz)* exp(beta*newx))
++     varhaz.g <- cumsum(c(1/(3*r+3)^2, 2/(r+3)^2, 0, 1 ))
++ 
++     varhaz.d <- cumsum((newx-xbar) * haz)
++ 
++     varhaz <- (varhaz.g + varhaz.d^2/ imat) * exp(2*beta*newx)
++ 
++     names(xbar) <- names(haz) <- 1:4
++     names(surv) <- names(varhaz) <- 1:4
++     list(loglik=loglik, u=u, imat=imat, xbar=xbar, haz=haz,
++ 	     mart=mart,  score=score,
++ 		scho=scho, surv=surv, var=varhaz,
++ 		varhaz.g=varhaz.g, varhaz.d=varhaz.d)
++     }
+> 
+> 
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> 
+> fit0 <-coxph(Surv(time, status) ~x, test1, iter=0, method='breslow')
+> truth0 <- byhand1(0,0)
+> aeq(truth0$loglik, fit0$loglik[1])
+[1] TRUE
+> aeq(1/truth0$imat, fit0$var)
+[1] TRUE
+> aeq(truth0$mart, fit0$resid[c(2:6,1)])
+[1] TRUE
+> aeq(truth0$scho, resid(fit0, 'schoen'))
+[1] TRUE
+> aeq(truth0$score, resid(fit0, 'score')[c(3:7,1)])
+[1] TRUE
+> sfit <- survfit(fit0, list(x=0))
+> aeq(sfit$std.err^2, c(7/180, 2/9, 2/9, 11/9))
+[1] TRUE
+> aeq(resid(fit0, 'score'), c(5/24, NA, 5/12, -1/12, 7/24, -1/24, 5/24))
+[1] TRUE
+> 
+> fit1 <- coxph(Surv(time, status) ~x, test1, iter=1, method='breslow')
+> aeq(fit1$coef, 8/5)
+[1] TRUE
+> 
+> # This next gives an ignorable warning message
+> fit2 <- coxph(Surv(time, status) ~x, test1, method='breslow', iter=2)
+Warning message:
+In fitter(X, Y, strats, offset, init, control, weights = weights,  :
+  Ran out of iterations and did not converge
+> aeq(round(fit2$coef, 6), 1.472724)
+[1] TRUE
+> 
+> fit <- coxph(Surv(time, status) ~x, test1, method='breslow', eps=1e-8)
+> aeq(round(fit$coef,7), 1.4752849)
+[1] TRUE
+> truth <- byhand1(fit$coef, 0)
+> aeq(truth$loglik, fit$loglik[2])
+[1] TRUE
+> aeq(1/truth$imat, fit$var)
+[1] TRUE
+> aeq(truth$mart, fit$resid[c(2:6,1)])
+[1] TRUE
+> aeq(truth$scho, resid(fit, 'schoen'))
+[1] TRUE
+> aeq(truth$score, resid(fit, 'score')[c(3:7,1)])
+[1] TRUE
+> 
+> sfit <- survfit(fit, list(x=0), censor=FALSE)
+> aeq(sfit$std.err^2, truth$var[c(1,2,4)]) # sfit skips time 8 (no events there)
+[1] TRUE
+> aeq(-log(sfit$surv), (cumsum(truth$haz))[c(1,2,4)])
+[1] TRUE
+> sfit <- survfit(fit, list(x=0), censor=TRUE)
+> aeq(sfit$std.err^2, truth$var) 
+[1] TRUE
+> aeq(-log(sfit$surv), (cumsum(truth$haz)))
+[1] TRUE
+> 
+> 
+> # 
+> # Done with the formal test, now print out lots of bits
+> #
+> resid(fit)
+         1          2          3          4          5          6          7 
+-0.3333333         NA  0.7287136 -0.2712864 -0.4574271  0.6666667 -0.3333333 
+> resid(fit, 'scor')
+          1           2           3           4           5           6 
+ 0.21138938          NA  0.13564322 -0.05049744 -0.12624360 -0.38168095 
+          7 
+ 0.21138938 
+> resid(fit, 'scho')
+         1          6          6          9 
+ 0.1861407  0.4069297 -0.5930703  0.0000000 
+> 
+> predict(fit, type='lp')
+[1] -0.7376425         NA  0.7376425  0.7376425  0.7376425 -0.7376425 -0.7376425
+> predict(fit, type='risk')
+[1] 0.4782401        NA 2.0910001 2.0910001 2.0910001 0.4782401 0.4782401
+> predict(fit, type='expected')
+        1         2         3         4         5         6         7 
+1.3333333        NA 0.2712864 0.2712864 1.4574271 0.3333333 0.3333333 
+> predict(fit, type='terms')
+           x
+1 -0.7376425
+2         NA
+3  0.7376425
+4  0.7376425
+5  0.7376425
+6 -0.7376425
+7 -0.7376425
+> predict(fit, type='lp', se.fit=T)
+$fit
+         1          2          3          4          5          6          7 
+-0.7376425         NA  0.7376425  0.7376425  0.7376425 -0.7376425 -0.7376425 
+
+$se.fit
+        1         2         3         4         5         6         7 
+0.6278672        NA 0.6278672 0.6278672 0.6278672 0.6278672 0.6278672 
+
+> predict(fit, type='risk', se.fit=T)
+$fit
+        1         2         3         4         5         6         7 
+0.4782401        NA 2.0910001 2.0910001 2.0910001 0.4782401 0.4782401 
+
+$se.fit
+        1         2         3         4         5         6         7 
+0.4342009        NA 0.9079142 0.9079142 0.9079142 0.4342009 0.4342009 
+
+> predict(fit, type='expected', se.fit=T)
+$fit
+        1         2         3         4         5         6         7 
+1.3333333        NA 0.2712864 0.2712864 1.4574271 0.3333333 0.3333333 
+
+$se.fit
+[1] 1.0540926        NA 0.2785989 0.2785989 1.1069433 0.3333333 0.3333333
+
+> predict(fit, type='terms', se.fit=T)
+$fit
+           x
+1 -0.7376425
+2         NA
+3  0.7376425
+4  0.7376425
+5  0.7376425
+6 -0.7376425
+7 -0.7376425
+
+$se.fit
+          x
+1 0.6278672
+2        NA
+3 0.6278672
+4 0.6278672
+5 0.6278672
+6 0.6278672
+7 0.6278672
+
+> 
+> summary(survfit(fit))
+Call: survfit(formula = fit)
+
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+    1      6       1   0.8783   0.122      0.66827            1
+    6      4       2   0.4981   0.218      0.21125            1
+    9      1       1   0.0615   0.150      0.00051            1
+> summary(survfit(fit, list(x=2)))
+Call: survfit(formula = fit, newdata = list(x = 2))
+
+ time n.risk n.event survival  std.err lower 95% CI upper 95% CI
+    1      6       1 3.05e-01 6.50e-01     4.72e-03            1
+    6      4       2 1.71e-03 1.98e-02     2.33e-13            1
+    9      1       1 8.52e-12 5.29e-10     1.22e-64            1
+> 
diff --git a/win32/deps/library/survival/tests/book2.R b/win32/deps/library/survival/tests/book2.R
new file mode 100644
index 0000000..9da9ca0
--- /dev/null
+++ b/win32/deps/library/survival/tests/book2.R
@@ -0,0 +1,105 @@
+library(survival)
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+
+#
+# Tests from the appendix of Therneau and Grambsch
+#  b. Data set 1 and Efron estimate
+#
+test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0))
+
+byhand <- function(beta, newx=0) {
+    r <- exp(beta)
+    loglik <- 2*beta - (log(3*r +3) + log((r+5)/2) + log(r+3))
+    u <- (30 + 23*r - r^3)/ ((r+1)*(r+3)*(r+5))
+    tfun <- function(x)  x - x^2
+    imat <- tfun(r/(r+1)) + tfun(r/(r+5)) + tfun(r/(r+3))
+
+    # The matrix of weights, one row per obs, one col per time
+    #  Time of 1, 6, 6+0 (second death), and 9  
+    wtmat <- matrix(c(1,1,1,1,1,1,
+                      0,0,1,1,1,1,
+                      0,0,.5, .5, 1,1,
+                      0,0,0,0,0,1), ncol=4)
+    wtmat <- diag(c(r,r,r,1,1,1)) %*% wtmat
+
+    x <- c(1,1,1,0,0,0)
+    status <- c(1,0,1,1,0,1)
+    xbar <- colSums(wtmat*x)/ colSums(wtmat)
+    haz <-  1/ colSums(wtmat)  # one death at each of the times
+
+    hazmat <- wtmat %*% diag(haz) #each subject's hazard over time
+    mart <- status - rowSums(hazmat)
+
+    a <- r+1; b<- r+3; d<- r+5  # 'c' in the book, 'd' here
+    score <- c((2*r + 3)/ (3*a^2),
+               -r/ (3*a^2),
+               (675+ r*(1305 +r*(756 + r*(-4 +r*(-79 -13*r)))))/(3*(a*b*d)^2),
+               r*(1/(3*a^2) - a/(2*b^2) - b/(2*d^2)), 
+               2*r*(177 + r*(282 +r*(182 + r*(50 + 5*r)))) /(3*(a*b*d)^2), 
+               2*r*(177 + r*(282 +r*(182 + r*(50 + 5*r)))) /(3*(a*b*d)^2))
+
+    # Schoenfeld residual
+    d <- mean(xbar[2:3])
+    scho <- c(1/(r+1), 1- d, 0- d , 0)
+
+    surv  <- exp(-cumsum(haz)* exp(beta*newx))[c(1,3,4)]
+    varhaz.g <- cumsum(haz^2)  # since all numerators are 1
+
+    varhaz.d <- cumsum((newx-xbar) * haz)
+
+    varhaz <- (varhaz.g + varhaz.d^2/ imat) * exp(2*beta*newx)
+
+    list(loglik=loglik, u=u, imat=imat, xbar=xbar, haz=haz,
+	     mart=mart,  score=score, var.g=varhaz.g, var.d=varhaz.d,
+		scho=scho, surv=surv, var=varhaz[c(1,3,4)])
+    }
+
+
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+
+fit0 <-coxph(Surv(time, status) ~x, test1, iter=0)
+truth0 <- byhand(0,0)
+aeq(truth0$loglik, fit0$loglik[1])
+aeq(1/truth0$imat, fit0$var)
+aeq(truth0$mart, fit0$resid[c(2:6,1)])
+aeq(resid(fit0), c(-3/4, NA, 5/6, -1/6, 5/12, 5/12, -3/4))
+aeq(truth0$scho, resid(fit0, 'schoen'))
+aeq(truth0$score, resid(fit0, 'score')[c(3:7,1)])
+sfit <- survfit(fit0, list(x=0), censor=FALSE)
+aeq(sfit$std.err^2, truth0$var)
+aeq(sfit$surv, truth0$surv)
+
+fit <- coxph(Surv(time, status) ~x, test1, eps=1e-8)
+aeq(round(fit$coef,6), 1.676857)
+truth <- byhand(fit$coef, 0)
+aeq(truth$loglik, fit$loglik[2])
+aeq(1/truth$imat, fit$var)
+aeq(truth$mart, fit$resid[c(2:6,1)])
+aeq(truth$scho, resid(fit, 'schoen'))
+aeq(truth$score, resid(fit, 'score')[c(3:7,1)])
+
+sfit <- survfit(fit, list(x=0), censor=FALSE)
+aeq(sfit$surv, truth$surv)
+aeq(sfit$std.err^2, truth$var)
+
+# 
+# Done with the formal test, now print out lots of bits
+#
+resid(fit)
+resid(fit, 'scor')
+resid(fit, 'scho')
+
+predict(fit, type='lp')
+predict(fit, type='risk')
+predict(fit, type='expected')
+predict(fit, type='terms')
+predict(fit, type='lp', se.fit=T)
+predict(fit, type='risk', se.fit=T)
+predict(fit, type='expected', se.fit=T)
+predict(fit, type='terms', se.fit=T)
+
+summary(survfit(fit))
+summary(survfit(fit, list(x=2)))
diff --git a/win32/deps/library/survival/tests/book2.Rout.save b/win32/deps/library/survival/tests/book2.Rout.save
new file mode 100644
index 0000000..b4461b5
--- /dev/null
+++ b/win32/deps/library/survival/tests/book2.Rout.save
@@ -0,0 +1,214 @@
+
+R version 2.14.0 Under development (unstable) (2011-04-10 r55401)
+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(survival)
+Loading required package: splines
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> 
+> #
+> # Tests from the appendix of Therneau and Grambsch
+> #  b. Data set 1 and Efron estimate
+> #
+> test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0))
+> 
+> byhand <- function(beta, newx=0) {
++     r <- exp(beta)
++     loglik <- 2*beta - (log(3*r +3) + log((r+5)/2) + log(r+3))
++     u <- (30 + 23*r - r^3)/ ((r+1)*(r+3)*(r+5))
++     tfun <- function(x)  x - x^2
++     imat <- tfun(r/(r+1)) + tfun(r/(r+5)) + tfun(r/(r+3))
++ 
++     # The matrix of weights, one row per obs, one col per time
++     #  Time of 1, 6, 6+0 (second death), and 9  
++     wtmat <- matrix(c(1,1,1,1,1,1,
++                       0,0,1,1,1,1,
++                       0,0,.5, .5, 1,1,
++                       0,0,0,0,0,1), ncol=4)
++     wtmat <- diag(c(r,r,r,1,1,1)) %*% wtmat
++ 
++     x <- c(1,1,1,0,0,0)
++     status <- c(1,0,1,1,0,1)
++     xbar <- colSums(wtmat*x)/ colSums(wtmat)
++     haz <-  1/ colSums(wtmat)  # one death at each of the times
++ 
++     hazmat <- wtmat %*% diag(haz) #each subject's hazard over time
++     mart <- status - rowSums(hazmat)
++ 
++     a <- r+1; b<- r+3; d<- r+5  # 'c' in the book, 'd' here
++     score <- c((2*r + 3)/ (3*a^2),
++                -r/ (3*a^2),
++                (675+ r*(1305 +r*(756 + r*(-4 +r*(-79 -13*r)))))/(3*(a*b*d)^2),
++                r*(1/(3*a^2) - a/(2*b^2) - b/(2*d^2)), 
++                2*r*(177 + r*(282 +r*(182 + r*(50 + 5*r)))) /(3*(a*b*d)^2), 
++                2*r*(177 + r*(282 +r*(182 + r*(50 + 5*r)))) /(3*(a*b*d)^2))
++ 
++     # Schoenfeld residual
++     d <- mean(xbar[2:3])
++     scho <- c(1/(r+1), 1- d, 0- d , 0)
++ 
++     surv  <- exp(-cumsum(haz)* exp(beta*newx))[c(1,3,4)]
++     varhaz.g <- cumsum(haz^2)  # since all numerators are 1
++ 
++     varhaz.d <- cumsum((newx-xbar) * haz)
++ 
++     varhaz <- (varhaz.g + varhaz.d^2/ imat) * exp(2*beta*newx)
++ 
++     list(loglik=loglik, u=u, imat=imat, xbar=xbar, haz=haz,
++ 	     mart=mart,  score=score, var.g=varhaz.g, var.d=varhaz.d,
++ 		scho=scho, surv=surv, var=varhaz[c(1,3,4)])
++     }
+> 
+> 
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> 
+> fit0 <-coxph(Surv(time, status) ~x, test1, iter=0)
+> truth0 <- byhand(0,0)
+> aeq(truth0$loglik, fit0$loglik[1])
+[1] TRUE
+> aeq(1/truth0$imat, fit0$var)
+[1] TRUE
+> aeq(truth0$mart, fit0$resid[c(2:6,1)])
+[1] TRUE
+> aeq(resid(fit0), c(-3/4, NA, 5/6, -1/6, 5/12, 5/12, -3/4))
+[1] TRUE
+> aeq(truth0$scho, resid(fit0, 'schoen'))
+[1] TRUE
+> aeq(truth0$score, resid(fit0, 'score')[c(3:7,1)])
+[1] TRUE
+> sfit <- survfit(fit0, list(x=0), censor=FALSE)
+> aeq(sfit$std.err^2, truth0$var)
+[1] TRUE
+> aeq(sfit$surv, truth0$surv)
+[1] TRUE
+> 
+> fit <- coxph(Surv(time, status) ~x, test1, eps=1e-8)
+> aeq(round(fit$coef,6), 1.676857)
+[1] TRUE
+> truth <- byhand(fit$coef, 0)
+> aeq(truth$loglik, fit$loglik[2])
+[1] TRUE
+> aeq(1/truth$imat, fit$var)
+[1] TRUE
+> aeq(truth$mart, fit$resid[c(2:6,1)])
+[1] TRUE
+> aeq(truth$scho, resid(fit, 'schoen'))
+[1] TRUE
+> aeq(truth$score, resid(fit, 'score')[c(3:7,1)])
+[1] TRUE
+> 
+> sfit <- survfit(fit, list(x=0), censor=FALSE)
+> aeq(sfit$surv, truth$surv)
+[1] TRUE
+> aeq(sfit$std.err^2, truth$var)
+[1] TRUE
+> 
+> # 
+> # Done with the formal test, now print out lots of bits
+> #
+> resid(fit)
+         1          2          3          4          5          6          7 
+-0.3655434         NA  0.7191707 -0.2808293 -0.4383414  0.7310869 -0.3655434 
+> resid(fit, 'scor')
+         1          2          3          4          5          6          7 
+ 0.2208584         NA  0.1132780 -0.0442340 -0.1029199 -0.4078409  0.2208584 
+> resid(fit, 'scho')
+        1         6         6         9 
+ 0.157512  0.421244 -0.578756  0.000000 
+> 
+> predict(fit, type='lp')
+[1] -0.8384287         NA  0.8384287  0.8384287  0.8384287 -0.8384287 -0.8384287
+> predict(fit, type='risk')
+[1] 0.4323894        NA 2.3127302 2.3127302 2.3127302 0.4323894 0.4323894
+> predict(fit, type='expected')
+        1         2         3         4         5         6         7 
+1.3655434        NA 0.2808293 0.2808293 1.4383414 0.2689131 0.3655434 
+> predict(fit, type='terms')
+           x
+1 -0.8384287
+2         NA
+3  0.8384287
+4  0.8384287
+5  0.8384287
+6 -0.8384287
+7 -0.8384287
+> predict(fit, type='lp', se.fit=T)
+$fit
+         1          2          3          4          5          6          7 
+-0.8384287         NA  0.8384287  0.8384287  0.8384287 -0.8384287 -0.8384287 
+
+$se.fit
+        1         2         3         4         5         6         7 
+0.6388078        NA 0.6388078 0.6388078 0.6388078 0.6388078 0.6388078 
+
+> predict(fit, type='risk', se.fit=T)
+$fit
+        1         2         3         4         5         6         7 
+0.4323894        NA 2.3127302 2.3127302 2.3127302 0.4323894 0.4323894 
+
+$se.fit
+        1         2         3         4         5         6         7 
+0.4200565        NA 0.9714774 0.9714774 0.9714774 0.4200565 0.4200565 
+
+> predict(fit, type='expected', se.fit=T)
+$fit
+        1         2         3         4         5         6         7 
+1.3655434        NA 0.2808293 0.2808293 1.4383414 0.2689131 0.3655434 
+
+$se.fit
+[1] 1.0649293        NA 0.2864593 0.2864593 1.5922983 0.3661617 0.3661617
+
+> predict(fit, type='terms', se.fit=T)
+$fit
+           x
+1 -0.8384287
+2         NA
+3  0.8384287
+4  0.8384287
+5  0.8384287
+6 -0.8384287
+7 -0.8384287
+
+$se.fit
+          x
+1 0.6388078
+2        NA
+3 0.6388078
+4 0.6388078
+5 0.6388078
+6 0.6388078
+7 0.6388078
+
+> 
+> summary(survfit(fit))
+Call: survfit(formula = fit)
+
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+    1      6       1   0.8857   0.117     0.683036            1
+    6      4       2   0.4294   0.237     0.145743            1
+    9      1       1   0.0425   0.116     0.000198            1
+> summary(survfit(fit, list(x=2)))
+Call: survfit(formula = fit, newdata = list(x = 2))
+
+ time n.risk n.event survival  std.err lower 95% CI upper 95% CI
+    1      6       1 2.23e-01 5.97e-01     1.16e-03            1
+    6      4       2 2.87e-05 5.69e-04     3.96e-22            1
+    9      1       1 1.08e-17 1.04e-15     1.07e-99            1
+> 
diff --git a/win32/deps/library/survival/tests/book3.R b/win32/deps/library/survival/tests/book3.R
new file mode 100644
index 0000000..25b1233
--- /dev/null
+++ b/win32/deps/library/survival/tests/book3.R
@@ -0,0 +1,109 @@
+library(survival)
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+
+#
+# Tests from the appendix of Therneau and Grambsch
+#  c. Data set 2 and Breslow estimate
+#
+test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
+                    stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
+                    event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
+                    x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+
+byhand <- function(beta, newx=0) {
+    r <- exp(beta)
+    loglik <- 4*beta - log(r+1) - log(r+2) - 3*log(3*r+2) - 2*log(3*r+1)
+    u <- 1/(r+1) +  1/(3*r+1) + 4/(3*r+2) -
+                 ( r/(r+2) +3*r/(3*r+2) + 3*r/(3*r+1))
+    imat <- r/(r+1)^2 + 2*r/(r+2)^2 + 6*r/(3*r+2)^2 +
+            3*r/(3*r+1)^2 + 3*r/(3*r+1)^2 + 12*r/(3*r+2)^2
+
+    hazard <-c( 1/(r+1), 1/(r+2), 1/(3*r+2), 1/(3*r+1), 1/(3*r+1), 2/(3*r+2) )
+    xbar <- c(r/(r+1), r/(r+2), 3*r/(3*r+2), 3*r/(3*r+1), 3*r/(3*r+1),
+                3*r/(3*r+2))
+
+    # The matrix of weights, one row per obs, one col per time
+    #   deaths at 2,3,6,7,8,9
+    wtmat <- matrix(c(1,0,0,0,1,0,0,0,0,0,
+                      0,1,0,1,1,0,0,0,0,0,
+                      0,0,1,1,1,0,1,1,0,0,
+                      0,0,0,1,1,0,1,1,0,0,
+                      0,0,0,0,1,1,1,1,0,0,
+                      0,0,0,0,0,1,1,1,1,1), ncol=6)
+    wtmat <- diag(c(r,1,1,r,1,r,r,r,1,1)) %*% wtmat
+
+    x      <- c(1,0,0,1,0,1,1,1,0,0)
+    status <- c(1,1,1,1,1,1,1,0,0,0)
+    xbar <- colSums(wtmat*x)/ colSums(wtmat)
+    n <- length(x)
+
+   # Table of sums for score and Schoenfeld resids
+    hazmat <- wtmat %*% diag(hazard) #each subject's hazard over time
+    dM <- -hazmat  #Expected part
+    for (i in 1:6) dM[i,i] <- dM[i,i] +1  #observed
+    dM[7,6] <- dM[7,6] +1  # observed
+    mart <- rowSums(dM)
+
+    # Table of sums for score and Schoenfeld resids
+    #  Looks like the last table of appendix E.2.1 of the book
+    resid <- dM * outer(x, xbar, '-')
+    score <- rowSums(resid)
+    scho <- colSums(resid)
+    # We need to split the two tied times up, to match coxph
+    scho <- c(scho[1:5], scho[6]/2, scho[6]/2)
+    var.g <- cumsum(hazard*hazard /c(1,1,1,1,1,2))
+    var.d <- cumsum( (xbar-newx)*hazard)
+
+    surv <- exp(-cumsum(hazard) * exp(beta*newx))
+    varhaz <- (var.g + var.d^2/imat)* exp(2*beta*newx)
+
+    list(loglik=loglik, u=u, imat=imat, xbar=xbar, haz=hazard,
+	     mart=mart,  score=score, rmat=resid,
+		scho=scho, surv=surv, var=varhaz)
+    }
+
+
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+
+fit0 <-coxph(Surv(start, stop, event) ~x, test2, iter=0, method='breslow')
+truth0 <- byhand(0,0)
+aeq(truth0$loglik, fit0$loglik[1])
+aeq(1/truth0$imat, fit0$var)
+aeq(truth0$mart, fit0$resid)
+aeq(truth0$scho, resid(fit0, 'schoen'))
+aeq(truth0$score, resid(fit0, 'score')) 
+sfit <- survfit(fit0, list(x=0), censor=FALSE)
+aeq(sfit$std.err^2, truth0$var)
+aeq(sfit$surv, truth0$surv)
+
+fit <- coxph(Surv(start, stop, event) ~x, test2, eps=1e-8, method='breslow')
+truth <- byhand(fit$coef, 0)
+aeq(truth$loglik, fit$loglik[2])
+aeq(1/truth$imat, fit$var)
+aeq(truth$mart, fit$resid)
+aeq(truth$scho, resid(fit, 'schoen'))
+aeq(truth$score, resid(fit, 'score'))
+
+sfit <- survfit(fit, list(x=0), censor=FALSE)
+aeq(sfit$std.err^2, truth$var) 
+aeq(-log(sfit$surv), (cumsum(truth$haz)))
+
+# 
+# Done with the formal test, now print out lots of bits
+#
+resid(fit)
+resid(fit, 'scor')
+resid(fit, 'scho')
+
+predict(fit, type='lp')
+predict(fit, type='risk')
+predict(fit, type='expected')
+predict(fit, type='terms')
+predict(fit, type='lp', se.fit=T)
+predict(fit, type='risk', se.fit=T)
+predict(fit, type='expected', se.fit=T)
+predict(fit, type='terms', se.fit=T)
+
+summary(survfit(fit))
+summary(survfit(fit, list(x=2)))
diff --git a/win32/deps/library/survival/tests/book3.Rout.save b/win32/deps/library/survival/tests/book3.Rout.save
new file mode 100644
index 0000000..7514b92
--- /dev/null
+++ b/win32/deps/library/survival/tests/book3.Rout.save
@@ -0,0 +1,254 @@
+
+R version 2.14.0 Under development (unstable) (2011-04-10 r55401)
+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(survival)
+Loading required package: splines
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> 
+> #
+> # Tests from the appendix of Therneau and Grambsch
+> #  c. Data set 2 and Breslow estimate
+> #
+> test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
++                     stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
++                     event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
++                     x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+> 
+> byhand <- function(beta, newx=0) {
++     r <- exp(beta)
++     loglik <- 4*beta - log(r+1) - log(r+2) - 3*log(3*r+2) - 2*log(3*r+1)
++     u <- 1/(r+1) +  1/(3*r+1) + 4/(3*r+2) -
++                  ( r/(r+2) +3*r/(3*r+2) + 3*r/(3*r+1))
++     imat <- r/(r+1)^2 + 2*r/(r+2)^2 + 6*r/(3*r+2)^2 +
++             3*r/(3*r+1)^2 + 3*r/(3*r+1)^2 + 12*r/(3*r+2)^2
++ 
++     hazard <-c( 1/(r+1), 1/(r+2), 1/(3*r+2), 1/(3*r+1), 1/(3*r+1), 2/(3*r+2) )
++     xbar <- c(r/(r+1), r/(r+2), 3*r/(3*r+2), 3*r/(3*r+1), 3*r/(3*r+1),
++                 3*r/(3*r+2))
++ 
++     # The matrix of weights, one row per obs, one col per time
++     #   deaths at 2,3,6,7,8,9
++     wtmat <- matrix(c(1,0,0,0,1,0,0,0,0,0,
++                       0,1,0,1,1,0,0,0,0,0,
++                       0,0,1,1,1,0,1,1,0,0,
++                       0,0,0,1,1,0,1,1,0,0,
++                       0,0,0,0,1,1,1,1,0,0,
++                       0,0,0,0,0,1,1,1,1,1), ncol=6)
++     wtmat <- diag(c(r,1,1,r,1,r,r,r,1,1)) %*% wtmat
++ 
++     x      <- c(1,0,0,1,0,1,1,1,0,0)
++     status <- c(1,1,1,1,1,1,1,0,0,0)
++     xbar <- colSums(wtmat*x)/ colSums(wtmat)
++     n <- length(x)
++ 
++    # Table of sums for score and Schoenfeld resids
++     hazmat <- wtmat %*% diag(hazard) #each subject's hazard over time
++     dM <- -hazmat  #Expected part
++     for (i in 1:6) dM[i,i] <- dM[i,i] +1  #observed
++     dM[7,6] <- dM[7,6] +1  # observed
++     mart <- rowSums(dM)
++ 
++     # Table of sums for score and Schoenfeld resids
++     #  Looks like the last table of appendix E.2.1 of the book
++     resid <- dM * outer(x, xbar, '-')
++     score <- rowSums(resid)
++     scho <- colSums(resid)
++     # We need to split the two tied times up, to match coxph
++     scho <- c(scho[1:5], scho[6]/2, scho[6]/2)
++     var.g <- cumsum(hazard*hazard /c(1,1,1,1,1,2))
++     var.d <- cumsum( (xbar-newx)*hazard)
++ 
++     surv <- exp(-cumsum(hazard) * exp(beta*newx))
++     varhaz <- (var.g + var.d^2/imat)* exp(2*beta*newx)
++ 
++     list(loglik=loglik, u=u, imat=imat, xbar=xbar, haz=hazard,
++ 	     mart=mart,  score=score, rmat=resid,
++ 		scho=scho, surv=surv, var=varhaz)
++     }
+> 
+> 
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> 
+> fit0 <-coxph(Surv(start, stop, event) ~x, test2, iter=0, method='breslow')
+> truth0 <- byhand(0,0)
+> aeq(truth0$loglik, fit0$loglik[1])
+[1] TRUE
+> aeq(1/truth0$imat, fit0$var)
+[1] TRUE
+> aeq(truth0$mart, fit0$resid)
+[1] TRUE
+> aeq(truth0$scho, resid(fit0, 'schoen'))
+[1] TRUE
+> aeq(truth0$score, resid(fit0, 'score')) 
+[1] TRUE
+> sfit <- survfit(fit0, list(x=0), censor=FALSE)
+> aeq(sfit$std.err^2, truth0$var)
+[1] TRUE
+> aeq(sfit$surv, truth0$surv)
+[1] TRUE
+> 
+> fit <- coxph(Surv(start, stop, event) ~x, test2, eps=1e-8, method='breslow')
+> truth <- byhand(fit$coef, 0)
+> aeq(truth$loglik, fit$loglik[2])
+[1] TRUE
+> aeq(1/truth$imat, fit$var)
+[1] TRUE
+> aeq(truth$mart, fit$resid)
+[1] TRUE
+> aeq(truth$scho, resid(fit, 'schoen'))
+[1] TRUE
+> aeq(truth$score, resid(fit, 'score'))
+[1] TRUE
+> 
+> sfit <- survfit(fit, list(x=0), censor=FALSE)
+> aeq(sfit$std.err^2, truth$var) 
+[1] TRUE
+> aeq(-log(sfit$surv), (cumsum(truth$haz)))
+[1] TRUE
+> 
+> # 
+> # Done with the formal test, now print out lots of bits
+> #
+> resid(fit)
+          1           2           3           4           5           6 
+ 0.52111895  0.65741078  0.78977654  0.24738772 -0.60629349  0.36902492 
+          7           8           9          10 
+-0.06876579 -1.06876579 -0.42044692 -0.42044692 
+> resid(fit, 'scor')
+          1           2           3           4           5           6 
+ 0.27156496 -0.20696709 -0.45771743 -0.09586133  0.13608234  0.19288983 
+          7           8           9          10 
+ 0.04655651 -0.37389040  0.24367131  0.24367131 
+> resid(fit, 'scho')
+         2          3          6          7          8          9          9 
+ 0.5211189 -0.3148216 -0.5795531  0.2661809 -0.7338191  0.4204469  0.4204469 
+> 
+> predict(fit, type='lp')
+ [1] -0.04226304  0.04226304  0.04226304 -0.04226304  0.04226304 -0.04226304
+ [7] -0.04226304 -0.04226304  0.04226304  0.04226304
+> predict(fit, type='risk')
+ [1] 0.9586176 1.0431688 1.0431688 0.9586176 1.0431688 0.9586176 0.9586176
+ [8] 0.9586176 1.0431688 1.0431688
+> predict(fit, type='expected')
+        1         2         3         4         5         6         7         8 
+0.4788811 0.3425892 0.2102235 0.7526123 1.6062935 0.6309751 1.0687658 1.0687658 
+        9        10 
+0.4204469 0.4204469 
+> predict(fit, type='terms')
+             x
+1  -0.04226304
+2   0.04226304
+3   0.04226304
+4  -0.04226304
+5   0.04226304
+6  -0.04226304
+7  -0.04226304
+8  -0.04226304
+9   0.04226304
+10  0.04226304
+attr(,"constant")
+[1] -0.04226304
+> predict(fit, type='lp', se.fit=T)
+$fit
+          1           2           3           4           5           6 
+-0.04226304  0.04226304  0.04226304 -0.04226304  0.04226304 -0.04226304 
+          7           8           9          10 
+-0.04226304 -0.04226304  0.04226304  0.04226304 
+
+$se.fit
+        1         2         3         4         5         6         7         8 
+0.3969086 0.3969086 0.3969086 0.3969086 0.3969086 0.3969086 0.3969086 0.3969086 
+        9        10 
+0.3969086 0.3969086 
+
+> predict(fit, type='risk', se.fit=T)
+$fit
+        1         2         3         4         5         6         7         8 
+0.9586176 1.0431688 1.0431688 0.9586176 1.0431688 0.9586176 0.9586176 0.9586176 
+        9        10 
+1.0431688 1.0431688 
+
+$se.fit
+        1         2         3         4         5         6         7         8 
+0.3886094 0.4053852 0.4053852 0.3886094 0.4053852 0.3886094 0.3886094 0.3886094 
+        9        10 
+0.4053852 0.4053852 
+
+> predict(fit, type='expected', se.fit=T)
+$fit
+        1         2         3         4         5         6         7         8 
+0.4788811 0.3425892 0.2102235 0.7526123 1.6062935 0.6309751 1.0687658 1.0687658 
+        9        10 
+0.4204469 0.4204469 
+
+$se.fit
+ [1] 0.5182381 0.3982700 0.3292830 0.6266797 1.0255146 0.5852364 0.7341340
+ [8] 0.7341340 0.6268550 0.6268550
+
+> predict(fit, type='terms', se.fit=T)
+$fit
+             x
+1  -0.04226304
+2   0.04226304
+3   0.04226304
+4  -0.04226304
+5   0.04226304
+6  -0.04226304
+7  -0.04226304
+8  -0.04226304
+9   0.04226304
+10  0.04226304
+attr(,"constant")
+[1] -0.04226304
+
+$se.fit
+           x
+1  0.3969086
+2  0.3969086
+3  0.3969086
+4  0.3969086
+5  0.3969086
+6  0.3969086
+7  0.3969086
+8  0.3969086
+9  0.3969086
+10 0.3969086
+
+> 
+> summary(survfit(fit))
+Call: survfit(formula = fit)
+
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+    2      2       1    0.607   0.303       0.2279        1.000
+    3      3       1    0.437   0.262       0.1347        1.000
+    6      5       1    0.357   0.226       0.1034        1.000
+    7      4       1    0.277   0.188       0.0729        1.000
+    8      4       1    0.214   0.156       0.0514        0.894
+    9      5       2    0.143   0.112       0.0308        0.667
+> summary(survfit(fit, list(x=2)))
+Call: survfit(formula = fit, newdata = list(x = 2))
+
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+    2      2       1    0.644   0.444      0.16657            1
+    3      3       1    0.482   0.511      0.06055            1
+    6      5       1    0.404   0.504      0.03491            1
+    7      4       1    0.322   0.475      0.01801            1
+    8      4       1    0.258   0.437      0.00928            1
+    9      5       2    0.181   0.377      0.00302            1
+> 
diff --git a/win32/deps/library/survival/tests/book4.R b/win32/deps/library/survival/tests/book4.R
new file mode 100644
index 0000000..7491c4e
--- /dev/null
+++ b/win32/deps/library/survival/tests/book4.R
@@ -0,0 +1,101 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Tests from the appendix of Therneau and Grambsch
+#  d. Data set 2 and Efron estimate
+#
+test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
+                    stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
+                    event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
+                    x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+
+byhand <- function(beta, newx=0) {
+    r <- exp(beta)
+    loglik <- 4*beta - (log(r+1) + log(r+2) + 2*log(3*r+2) + 2*log(3*r+1) +
+        log(2*r +2))
+    u <- 1/(r+1) +  1/(3*r+1) + 2*(1/(3*r+2) + 1/(2*r+2)) -
+                 ( r/(r+2) +3*r/(3*r+2) + 3*r/(3*r+1))
+    imat <- r*(1/(r+1)^2 + 2/(r+2)^2 + 6/(3*r+2)^2 +
+            6/(3*r+1)^2 + 6/(3*r+2)^2 + 4/(2*r +2)^2)
+
+    hazard <-c( 1/(r+1), 1/(r+2), 1/(3*r+2), 1/(3*r+1), 1/(3*r+1),
+               1/(3*r+2), 1/(2*r +2) )
+
+
+    # The matrix of weights, one row per obs, one col per time
+    #   deaths at 2,3,6,7,8,9
+    wtmat <- matrix(c(1,0,0,0,1, 0, 0,0,0,0,
+                      0,1,0,1,1, 0, 0,0,0,0,
+                      0,0,1,1,1, 0, 1,1,0,0,
+                      0,0,0,1,1, 0, 1,1,0,0,
+                      0,0,0,0,1, 1, 1,1,0,0,
+                      0,0,0,0,0, 1, 1,1,1,1,
+                      0,0,0,0,0,.5,.5,1,1,1), ncol=7)
+    wtmat <- diag(c(r,1,1,r,1,r,r,r,1,1)) %*% wtmat
+
+    x      <- c(1,0,0,1,0,1,1,1,0,0)
+    status <- c(1,1,1,1,1,1,1,0,0,0)
+    xbar <- colSums(wtmat*x)/ colSums(wtmat)
+    n <- length(x)
+
+   # Table of sums for score and Schoenfeld resids
+    hazmat <- wtmat %*% diag(hazard) #each subject's hazard over time
+    dM <- -hazmat  #Expected part
+    for (i in 1:5) dM[i,i] <- dM[i,i] +1  #observed
+    dM[6:7,6:7] <- dM[6:7,6:7] +.5  # observed
+    mart <- rowSums(dM)
+
+    # Table of sums for score and Schoenfeld resids
+    #  Looks like the last table of appendix E.2.1 of the book
+    resid <- dM * outer(x, xbar, '-')
+    score <- rowSums(resid)
+    scho <- colSums(resid)
+
+    # We need to add the ties back up (they are symmetric)
+    scho[6:7] <- rep(mean(scho[6:7]), 2)
+
+    list(loglik=loglik, u=u, imat=imat, xbar=xbar, haz=hazard,
+	     mart=mart,  score=score, rmat=resid,
+		scho=scho)
+    }
+
+
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+
+fit0 <-coxph(Surv(start, stop, event) ~x, test2, iter=0)
+truth0 <- byhand(0,0)
+aeq(truth0$loglik, fit0$loglik[1])
+aeq(1/truth0$imat, fit0$var)
+aeq(truth0$mart, fit0$resid)
+aeq(truth0$scho, resid(fit0, 'schoen'))
+aeq(truth0$score, resid(fit0, 'score')) 
+
+
+fit <- coxph(Surv(start, stop, event) ~x, test2, eps=1e-8)
+truth <- byhand(fit$coef, 0)
+aeq(truth$loglik, fit$loglik[2])
+aeq(1/truth$imat, fit$var)
+aeq(truth$mart, fit$resid)
+aeq(truth$scho, resid(fit, 'schoen'))
+aeq(truth$score, resid(fit, 'score'))
+
+# 
+# Done with the formal test, now print out lots of bits
+#
+resid(fit)
+resid(fit, 'scor')
+resid(fit, 'scho')
+
+predict(fit, type='lp')
+predict(fit, type='risk')
+predict(fit, type='expected')
+predict(fit, type='terms')
+predict(fit, type='lp', se.fit=T)
+predict(fit, type='risk', se.fit=T)
+predict(fit, type='expected', se.fit=T)
+predict(fit, type='terms', se.fit=T)
+
+summary(survfit(fit))
+summary(survfit(fit, list(x=2)))
diff --git a/win32/deps/library/survival/tests/book4.Rout.save b/win32/deps/library/survival/tests/book4.Rout.save
new file mode 100644
index 0000000..a646e11
--- /dev/null
+++ b/win32/deps/library/survival/tests/book4.Rout.save
@@ -0,0 +1,242 @@
+
+R version 2.14.0 Under development (unstable) (2011-04-10 r55401)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Tests from the appendix of Therneau and Grambsch
+> #  d. Data set 2 and Efron estimate
+> #
+> test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
++                     stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
++                     event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
++                     x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+> 
+> byhand <- function(beta, newx=0) {
++     r <- exp(beta)
++     loglik <- 4*beta - (log(r+1) + log(r+2) + 2*log(3*r+2) + 2*log(3*r+1) +
++         log(2*r +2))
++     u <- 1/(r+1) +  1/(3*r+1) + 2*(1/(3*r+2) + 1/(2*r+2)) -
++                  ( r/(r+2) +3*r/(3*r+2) + 3*r/(3*r+1))
++     imat <- r*(1/(r+1)^2 + 2/(r+2)^2 + 6/(3*r+2)^2 +
++             6/(3*r+1)^2 + 6/(3*r+2)^2 + 4/(2*r +2)^2)
++ 
++     hazard <-c( 1/(r+1), 1/(r+2), 1/(3*r+2), 1/(3*r+1), 1/(3*r+1),
++                1/(3*r+2), 1/(2*r +2) )
++ 
++ 
++     # The matrix of weights, one row per obs, one col per time
++     #   deaths at 2,3,6,7,8,9
++     wtmat <- matrix(c(1,0,0,0,1, 0, 0,0,0,0,
++                       0,1,0,1,1, 0, 0,0,0,0,
++                       0,0,1,1,1, 0, 1,1,0,0,
++                       0,0,0,1,1, 0, 1,1,0,0,
++                       0,0,0,0,1, 1, 1,1,0,0,
++                       0,0,0,0,0, 1, 1,1,1,1,
++                       0,0,0,0,0,.5,.5,1,1,1), ncol=7)
++     wtmat <- diag(c(r,1,1,r,1,r,r,r,1,1)) %*% wtmat
++ 
++     x      <- c(1,0,0,1,0,1,1,1,0,0)
++     status <- c(1,1,1,1,1,1,1,0,0,0)
++     xbar <- colSums(wtmat*x)/ colSums(wtmat)
++     n <- length(x)
++ 
++    # Table of sums for score and Schoenfeld resids
++     hazmat <- wtmat %*% diag(hazard) #each subject's hazard over time
++     dM <- -hazmat  #Expected part
++     for (i in 1:5) dM[i,i] <- dM[i,i] +1  #observed
++     dM[6:7,6:7] <- dM[6:7,6:7] +.5  # observed
++     mart <- rowSums(dM)
++ 
++     # Table of sums for score and Schoenfeld resids
++     #  Looks like the last table of appendix E.2.1 of the book
++     resid <- dM * outer(x, xbar, '-')
++     score <- rowSums(resid)
++     scho <- colSums(resid)
++ 
++     # We need to add the ties back up (they are symmetric)
++     scho[6:7] <- rep(mean(scho[6:7]), 2)
++ 
++     list(loglik=loglik, u=u, imat=imat, xbar=xbar, haz=hazard,
++ 	     mart=mart,  score=score, rmat=resid,
++ 		scho=scho)
++     }
+> 
+> 
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> 
+> fit0 <-coxph(Surv(start, stop, event) ~x, test2, iter=0)
+> truth0 <- byhand(0,0)
+> aeq(truth0$loglik, fit0$loglik[1])
+[1] TRUE
+> aeq(1/truth0$imat, fit0$var)
+[1] TRUE
+> aeq(truth0$mart, fit0$resid)
+[1] TRUE
+> aeq(truth0$scho, resid(fit0, 'schoen'))
+[1] TRUE
+> aeq(truth0$score, resid(fit0, 'score')) 
+[1] TRUE
+> 
+> 
+> fit <- coxph(Surv(start, stop, event) ~x, test2, eps=1e-8)
+> truth <- byhand(fit$coef, 0)
+> aeq(truth$loglik, fit$loglik[2])
+[1] TRUE
+> aeq(1/truth$imat, fit$var)
+[1] TRUE
+> aeq(truth$mart, fit$resid)
+[1] TRUE
+> aeq(truth$scho, resid(fit, 'schoen'))
+[1] TRUE
+> aeq(truth$score, resid(fit, 'score'))
+[1] TRUE
+> 
+> # 
+> # Done with the formal test, now print out lots of bits
+> #
+> resid(fit)
+          1           2           3           4           5           6 
+ 0.50527611  0.66432995  0.79746211  0.22435805 -0.55144018  0.42933697 
+          7           8           9          10 
+-0.01764508 -1.14132605 -0.45517594 -0.45517594 
+> resid(fit, 'scor')
+         1          2          3          4          5          6          7 
+ 0.2553039 -0.2183386 -0.4744295 -0.1101520  0.1137126  0.2491954  0.1057078 
+         8          9         10 
+-0.4119611  0.2454808  0.2454808 
+> resid(fit, 'scho')
+         2          3          6          7          8          9          9 
+ 0.5052761 -0.3286599 -0.5949242  0.2539781 -0.7460219  0.4551759  0.4551759 
+> 
+> predict(fit, type='lp')
+ [1] -0.0105526  0.0105526  0.0105526 -0.0105526  0.0105526 -0.0105526
+ [7] -0.0105526 -0.0105526  0.0105526  0.0105526
+> predict(fit, type='risk')
+ [1] 0.9895029 1.0106085 1.0106085 0.9895029 1.0106085 0.9895029 0.9895029
+ [8] 0.9895029 1.0106085 1.0106085
+> predict(fit, type='expected')
+        1         2         3         4         5         6         7         8 
+0.4947239 0.3356701 0.2025379 0.7756420 1.5514402 0.5706630 1.0176451 1.1413261 
+        9        10 
+0.4551759 0.4551759 
+> predict(fit, type='terms')
+            x
+1  -0.0105526
+2   0.0105526
+3   0.0105526
+4  -0.0105526
+5   0.0105526
+6  -0.0105526
+7  -0.0105526
+8  -0.0105526
+9   0.0105526
+10  0.0105526
+attr(,"constant")
+[1] -0.0105526
+> predict(fit, type='lp', se.fit=T)
+$fit
+         1          2          3          4          5          6          7 
+-0.0105526  0.0105526  0.0105526 -0.0105526  0.0105526 -0.0105526 -0.0105526 
+         8          9         10 
+-0.0105526  0.0105526  0.0105526 
+
+$se.fit
+        1         2         3         4         5         6         7         8 
+0.3975884 0.3975884 0.3975884 0.3975884 0.3975884 0.3975884 0.3975884 0.3975884 
+        9        10 
+0.3975884 0.3975884 
+
+> predict(fit, type='risk', se.fit=T)
+$fit
+        1         2         3         4         5         6         7         8 
+0.9895029 1.0106085 1.0106085 0.9895029 1.0106085 0.9895029 0.9895029 0.9895029 
+        9        10 
+1.0106085 1.0106085 
+
+$se.fit
+        1         2         3         4         5         6         7         8 
+0.3954962 0.3996918 0.3996918 0.3954962 0.3996918 0.3954962 0.3954962 0.3954962 
+        9        10 
+0.3996918 0.3996918 
+
+> predict(fit, type='expected', se.fit=T)
+$fit
+        1         2         3         4         5         6         7         8 
+0.4947239 0.3356701 0.2025379 0.7756420 1.5514402 0.5706630 1.0176451 1.1413261 
+        9        10 
+0.4551759 0.4551759 
+
+$se.fit
+ [1] 0.5331623 0.3940109 0.3241963 0.6388491 1.0026838 0.6453101 0.7848594
+ [8] 0.7848594 0.6401915 0.6401915
+
+> predict(fit, type='terms', se.fit=T)
+$fit
+            x
+1  -0.0105526
+2   0.0105526
+3   0.0105526
+4  -0.0105526
+5   0.0105526
+6  -0.0105526
+7  -0.0105526
+8  -0.0105526
+9   0.0105526
+10  0.0105526
+attr(,"constant")
+[1] -0.0105526
+
+$se.fit
+           x
+1  0.3975884
+2  0.3975884
+3  0.3975884
+4  0.3975884
+5  0.3975884
+6  0.3975884
+7  0.3975884
+8  0.3975884
+9  0.3975884
+10 0.3975884
+
+> 
+> summary(survfit(fit))
+Call: survfit(formula = fit)
+
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+    2      2       1    0.607   0.303       0.2277        1.000
+    3      3       1    0.435   0.262       0.1337        1.000
+    6      5       1    0.356   0.226       0.1029        1.000
+    7      4       1    0.277   0.189       0.0729        1.000
+    8      4       1    0.215   0.157       0.0516        0.899
+    9      5       2    0.137   0.109       0.0288        0.655
+> summary(survfit(fit, list(x=2)))
+Call: survfit(formula = fit, newdata = list(x = 2))
+
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+    2      2       1    0.616   0.465      0.14013            1
+    3      3       1    0.447   0.519      0.04568            1
+    6      5       1    0.368   0.504      0.02512            1
+    7      4       1    0.288   0.464      0.01232            1
+    8      4       1    0.226   0.418      0.00603            1
+    9      5       2    0.146   0.343      0.00147            1
+> 
diff --git a/win32/deps/library/survival/tests/book5.R b/win32/deps/library/survival/tests/book5.R
new file mode 100644
index 0000000..4792624
--- /dev/null
+++ b/win32/deps/library/survival/tests/book5.R
@@ -0,0 +1,124 @@
+library(survival)
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+
+# Tests of the weighted Cox model
+#  This is section 1.3 of my appendix -- no yet found in any of the
+#  printings though, it awaits the next edition
+#
+# Similar data set to test1, but add weights,
+#                                    a double-death/censor tied time
+#                                    a censored last subject
+# The latter two are cases covered only feebly elsewhere.
+# 
+# The data set testw2 has the same data, but done via replication
+#
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+
+testw1 <- data.frame(time=  c(1,1,2,2,2,2,3,4,5),
+		    status= c(1,0,1,1,1,0,0,1,0),
+		    x=      c(2,0,1,1,0,1,0,1,0),
+		    wt =    c(1,2,3,4,3,2,1,2,1))
+xx <- testw1$wt
+testw2 <- data.frame(time=   rep(c(1,1,2,2,2,2,3,4,5), xx),
+		     status= rep(c(1,0,1,1,1,0,0,1,0), xx),
+		     x=      rep(c(2,0,1,1,0,1,0,1,0), xx),
+		     id=     rep(1:9, xx))
+indx <- match(1:9, testw2$id)
+
+# Breslow estimate
+byhand <- function(beta, newx=0) {
+    r <- exp(beta)
+    loglik <- 11*beta - (log(r^2 + 11*r +7) + 10*log(11*r +5) +2*log(2*r+1))
+    hazard <- c(1/(r^2 + 11*r +7), 10/(11*r +5), 2/(2*r+1))
+    xbar <- c((2*r^2 + 11*r)*hazard[1], 11*r/(11*r +5), r*hazard[3])
+    imat <- (4*r^2 + 11*r)*hazard[1] - xbar[1]^2 +
+            10*(xbar[2] - xbar[2]^2) + 2*(xbar[3] - xbar[3]^2)
+
+    temp <- cumsum(hazard)
+    risk <- c(r^2, 1,r,r,1,r,1,r,1)
+    expected <- risk* temp[c(1,1,2,2,2,2,2,3,3)]
+    
+    # The matrix of weights, one row per obs, one col per death
+    #   deaths at 1,2,2,2, and 4
+    riskmat <- matrix(c(1,1,1,1,1,1,1,1,1,
+                        0,0,1,1,1,1,1,1,1,
+                        0,0,1,1,1,1,1,1,1,
+                        0,0,1,1,1,1,1,1,1,
+                        0,0,0,0,0,0,0,1,1), ncol=5)
+    wtmat <- diag(c(r^2, 2, 3*r, 4*r, 3, 2*r, 1, 2*r, 1)) %*% riskmat
+
+    x      <- c(2,0,1,1,0,1,0,1,0)
+    status <- c(1,0,1,1,1,0,0,1,0)
+    wt     <- c(1,2,3,4,3,2,1,2,1)
+   # Table of sums for score and Schoenfeld resids
+    hazmat <- riskmat %*% diag(c(1,3,4,3,2)/colSums(wtmat)) 
+    dM <- -risk*hazmat  #Expected part
+    dM[1,1] <- dM[1,1] +1  # deaths at time 1
+    for (i in 2:4) dM[i+1, i] <- dM[i+1,i] +1
+    dM[8,5] <- dM[8,5] +1
+    mart <- rowSums(dM)
+    resid <-dM * outer(x, xbar[c(1,2,2,2,3)] ,'-')
+
+    # Increments to the variance of the hazard
+    var.g <- cumsum(hazard^2/ c(1,10,2))
+    var.d <- cumsum((xbar-newx)*hazard)
+
+    list(loglik=loglik, imat=imat, hazard=hazard, xbar=xbar,
+         mart=c(1,0,1,1,1,0,0,1,0)-expected, expected=expected,
+         score=rowSums(resid), schoen=c(2,1,1,0,1) - xbar[c(1,2,2,2,3)],
+         varhaz=(var.g + var.d^2/imat)* exp(2*beta*newx))
+    }
+
+aeq(byhand(0)$expected, c(1/19, 1/19, rep(103/152, 5), rep(613/456,2))) #verify 
+
+fit0 <- coxph(Surv(time, status) ~x, testw1, weights=wt,
+		    method='breslow', iter=0)
+fit0b <- coxph(Surv(time, status) ~x, testw2, method='breslow', iter=0)
+fit  <- coxph(Surv(time, status) ~x, testw1, weights=wt, method='breslow')
+fitb <- coxph(Surv(time, status) ~x, testw2, method='breslow')
+
+aeq(resid(fit0, type='mart'), (resid(fit0b, type='mart'))[indx])
+aeq(resid(fit0, type='scor'), (resid(fit0b, type='scor'))[indx])
+aeq(unique(resid(fit0, type='scho')), unique(resid(fit0b, type='scho')))
+
+truth0 <- byhand(0,pi)
+aeq(fit0$loglik[1], truth0$loglik)
+aeq(1/truth0$imat, fit0$var)
+aeq(truth0$mart, fit0$resid)
+aeq(truth0$scho, resid(fit0, 'schoen'))
+aeq(truth0$score, resid(fit0, 'score')) 
+sfit <- survfit(fit0, list(x=pi), censor=FALSE)
+aeq(sfit$std.err^2, truth0$var)
+aeq(-log(sfit$surv), cumsum(truth0$haz))
+
+truth <- byhand(fit$coef, .3)
+aeq(truth$loglik, fit$loglik[2])
+aeq(1/truth$imat, fit$var)
+aeq(truth$mart, fit$resid)
+aeq(truth$scho, resid(fit, 'schoen'))
+aeq(truth$score, resid(fit, 'score'))
+
+sfit <- survfit(fit, list(x=.3), censor=FALSE)
+aeq(sfit$std.err^2, truth$var) 
+aeq(-log(sfit$surv), (cumsum(truth$haz)* exp(fit$coef*.3)))
+
+
+fit0
+summary(fit)
+resid(fit0, type='score')
+resid(fit0, type='scho')
+
+resid(fit, type='score')
+resid(fit, type='scho')
+aeq(resid(fit, type='mart'), (resid(fitb, type='mart'))[indx])
+aeq(resid(fit, type='scor'), (resid(fitb, type='scor'))[indx])
+aeq(unique(resid(fit, type='scho')), unique(resid(fitb, type='scho')))
+rr1 <- resid(fit, type='mart')
+rr2 <- resid(fit, type='mart', weighted=T)
+aeq(rr2/rr1, testw1$wt)
+
+rr1 <- resid(fit, type='score')
+rr2 <- resid(fit, type='score', weighted=T)
+aeq(rr2/rr1, testw1$wt)
+
diff --git a/win32/deps/library/survival/tests/book5.Rout.save b/win32/deps/library/survival/tests/book5.Rout.save
new file mode 100644
index 0000000..0e17a35
--- /dev/null
+++ b/win32/deps/library/survival/tests/book5.Rout.save
@@ -0,0 +1,206 @@
+
+R version 2.12.2 (2011-02-25)
+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(survival)
+Loading required package: splines
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> 
+> # Tests of the weighted Cox model
+> #  This is section 1.3 of my appendix -- no yet found in any of the
+> #  printings though, it awaits the next edition
+> #
+> # Similar data set to test1, but add weights,
+> #                                    a double-death/censor tied time
+> #                                    a censored last subject
+> # The latter two are cases covered only feebly elsewhere.
+> # 
+> # The data set testw2 has the same data, but done via replication
+> #
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> 
+> testw1 <- data.frame(time=  c(1,1,2,2,2,2,3,4,5),
++ 		    status= c(1,0,1,1,1,0,0,1,0),
++ 		    x=      c(2,0,1,1,0,1,0,1,0),
++ 		    wt =    c(1,2,3,4,3,2,1,2,1))
+> xx <- testw1$wt
+> testw2 <- data.frame(time=   rep(c(1,1,2,2,2,2,3,4,5), xx),
++ 		     status= rep(c(1,0,1,1,1,0,0,1,0), xx),
++ 		     x=      rep(c(2,0,1,1,0,1,0,1,0), xx),
++ 		     id=     rep(1:9, xx))
+> indx <- match(1:9, testw2$id)
+> 
+> # Breslow estimate
+> byhand <- function(beta, newx=0) {
++     r <- exp(beta)
++     loglik <- 11*beta - (log(r^2 + 11*r +7) + 10*log(11*r +5) +2*log(2*r+1))
++     hazard <- c(1/(r^2 + 11*r +7), 10/(11*r +5), 2/(2*r+1))
++     xbar <- c((2*r^2 + 11*r)*hazard[1], 11*r/(11*r +5), r*hazard[3])
++     imat <- (4*r^2 + 11*r)*hazard[1] - xbar[1]^2 +
++             10*(xbar[2] - xbar[2]^2) + 2*(xbar[3] - xbar[3]^2)
++ 
++     temp <- cumsum(hazard)
++     risk <- c(r^2, 1,r,r,1,r,1,r,1)
++     expected <- risk* temp[c(1,1,2,2,2,2,2,3,3)]
++     
++     # The matrix of weights, one row per obs, one col per death
++     #   deaths at 1,2,2,2, and 4
++     riskmat <- matrix(c(1,1,1,1,1,1,1,1,1,
++                         0,0,1,1,1,1,1,1,1,
++                         0,0,1,1,1,1,1,1,1,
++                         0,0,1,1,1,1,1,1,1,
++                         0,0,0,0,0,0,0,1,1), ncol=5)
++     wtmat <- diag(c(r^2, 2, 3*r, 4*r, 3, 2*r, 1, 2*r, 1)) %*% riskmat
++ 
++     x      <- c(2,0,1,1,0,1,0,1,0)
++     status <- c(1,0,1,1,1,0,0,1,0)
++     wt     <- c(1,2,3,4,3,2,1,2,1)
++    # Table of sums for score and Schoenfeld resids
++     hazmat <- riskmat %*% diag(c(1,3,4,3,2)/colSums(wtmat)) 
++     dM <- -risk*hazmat  #Expected part
++     dM[1,1] <- dM[1,1] +1  # deaths at time 1
++     for (i in 2:4) dM[i+1, i] <- dM[i+1,i] +1
++     dM[8,5] <- dM[8,5] +1
++     mart <- rowSums(dM)
++     resid <-dM * outer(x, xbar[c(1,2,2,2,3)] ,'-')
++ 
++     # Increments to the variance of the hazard
++     var.g <- cumsum(hazard^2/ c(1,10,2))
++     var.d <- cumsum((xbar-newx)*hazard)
++ 
++     list(loglik=loglik, imat=imat, hazard=hazard, xbar=xbar,
++          mart=c(1,0,1,1,1,0,0,1,0)-expected, expected=expected,
++          score=rowSums(resid), schoen=c(2,1,1,0,1) - xbar[c(1,2,2,2,3)],
++          varhaz=(var.g + var.d^2/imat)* exp(2*beta*newx))
++     }
+> 
+> aeq(byhand(0)$expected, c(1/19, 1/19, rep(103/152, 5), rep(613/456,2))) #verify 
+[1] TRUE
+> 
+> fit0 <- coxph(Surv(time, status) ~x, testw1, weights=wt,
++ 		    method='breslow', iter=0)
+> fit0b <- coxph(Surv(time, status) ~x, testw2, method='breslow', iter=0)
+> fit  <- coxph(Surv(time, status) ~x, testw1, weights=wt, method='breslow')
+> fitb <- coxph(Surv(time, status) ~x, testw2, method='breslow')
+> 
+> aeq(resid(fit0, type='mart'), (resid(fit0b, type='mart'))[indx])
+[1] TRUE
+> aeq(resid(fit0, type='scor'), (resid(fit0b, type='scor'))[indx])
+[1] TRUE
+> aeq(unique(resid(fit0, type='scho')), unique(resid(fit0b, type='scho')))
+[1] TRUE
+> 
+> truth0 <- byhand(0,pi)
+> aeq(fit0$loglik[1], truth0$loglik)
+[1] TRUE
+> aeq(1/truth0$imat, fit0$var)
+[1] TRUE
+> aeq(truth0$mart, fit0$resid)
+[1] TRUE
+> aeq(truth0$scho, resid(fit0, 'schoen'))
+[1] TRUE
+> aeq(truth0$score, resid(fit0, 'score')) 
+[1] TRUE
+> sfit <- survfit(fit0, list(x=pi), censor=FALSE)
+> aeq(sfit$std.err^2, truth0$var)
+[1] TRUE
+> aeq(-log(sfit$surv), cumsum(truth0$haz))
+[1] TRUE
+> 
+> truth <- byhand(fit$coef, .3)
+> aeq(truth$loglik, fit$loglik[2])
+[1] TRUE
+> aeq(1/truth$imat, fit$var)
+[1] TRUE
+> aeq(truth$mart, fit$resid)
+[1] TRUE
+> aeq(truth$scho, resid(fit, 'schoen'))
+[1] TRUE
+> aeq(truth$score, resid(fit, 'score'))
+[1] TRUE
+> 
+> sfit <- survfit(fit, list(x=.3), censor=FALSE)
+> aeq(sfit$std.err^2, truth$var) 
+[1] TRUE
+> aeq(-log(sfit$surv), (cumsum(truth$haz)* exp(fit$coef*.3)))
+[1] TRUE
+> 
+> 
+> fit0
+Call:
+coxph(formula = Surv(time, status) ~ x, data = testw1, weights = wt, 
+    method = "breslow", iter = 0)
+
+
+  coef exp(coef) se(coef) z p
+x    0         1    0.586 0 1
+
+Likelihood ratio test=0  on 1 df, p=1  n= 9, number of events= 5 
+> summary(fit)
+Call:
+coxph(formula = Surv(time, status) ~ x, data = testw1, weights = wt, 
+    method = "breslow")
+
+  n= 9, number of events= 5 
+
+    coef exp(coef) se(coef)     z Pr(>|z|)
+x 0.8596    2.3621   0.7131 1.205    0.228
+
+  exp(coef) exp(-coef) lower .95 upper .95
+x     2.362     0.4233    0.5839     9.556
+
+Concordance= 0.638  (se = 0.159 )
+Rsquare= 0.171   (max possible= 0.999 )
+Likelihood ratio test= 1.69  on 1 df,   p=0.1932
+Wald test            = 1.45  on 1 df,   p=0.2281
+Score (logrank) test = 1.52  on 1 df,   p=0.217
+
+> resid(fit0, type='score')
+          1           2           3           4           5           6 
+ 1.24653740  0.03601108  0.10056700  0.10056700 -0.22180142 -0.21193300 
+          7           8           9 
+ 0.46569858 -0.10082189  0.91014302 
+> resid(fit0, type='scho')
+         1          2          2          2          4 
+ 1.3157895  0.3125000  0.3125000 -0.6875000  0.3333333 
+> 
+> resid(fit, type='score')
+          1           2           3           4           5           6 
+ 0.88681615  0.02497653  0.03608964  0.03608964 -0.54297652 -0.12528780 
+          7           8           9 
+ 0.29564605 -0.09476911  0.58400064 
+> resid(fit, type='scho')
+         1          2          2          2          4 
+ 1.0368337  0.1613774  0.1613774 -0.8386226  0.1746960 
+> aeq(resid(fit, type='mart'), (resid(fitb, type='mart'))[indx])
+[1] TRUE
+> aeq(resid(fit, type='scor'), (resid(fitb, type='scor'))[indx])
+[1] TRUE
+> aeq(unique(resid(fit, type='scho')), unique(resid(fitb, type='scho')))
+[1] TRUE
+> rr1 <- resid(fit, type='mart')
+> rr2 <- resid(fit, type='mart', weighted=T)
+> aeq(rr2/rr1, testw1$wt)
+[1] TRUE
+> 
+> rr1 <- resid(fit, type='score')
+> rr2 <- resid(fit, type='score', weighted=T)
+> aeq(rr2/rr1, testw1$wt)
+[1] TRUE
+> 
+> 
diff --git a/win32/deps/library/survival/tests/book6.R b/win32/deps/library/survival/tests/book6.R
new file mode 100644
index 0000000..8bcad17
--- /dev/null
+++ b/win32/deps/library/survival/tests/book6.R
@@ -0,0 +1,114 @@
+library(survival)
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+
+# Tests of the weighted Cox model
+#  This is section 1.3 of my appendix -- no yet found in any of the
+#  printings though, it awaits the next edition
+#
+# Efron approximation
+#
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+
+testw1 <- data.frame(time=  c(1,1,2,2,2,2,3,4,5),
+		    status= c(1,0,1,1,1,0,0,1,0),
+		    x=      c(2,0,1,1,0,1,0,1,0),
+		    wt =    c(1,2,3,4,3,2,1,2,1))
+xx <- testw1$wt
+
+# Efron estimate
+byhand <- function(beta, newx=0) {
+    r <- exp(beta)
+    a <- 7*r +3; b<- 4*r+2
+    loglik <- 11*beta - (log(r^2 + 11*r +7) + 10*log(11*r +5)/3 +
+                         10*log(a*2/3 +b)/3 + 10*log(a/3 +b)/3 +2*log(2*r+1))
+
+    hazard <- c(1/(r^2 + 11*r +7), 
+                10/(3*c(11*r +5, a*2/3 +b, a/3+b)), 2/(2*r+1))
+    temp <- c(hazard[1], hazard[1]+hazard[2] + hazard[3]*2/3 + hazard[4]/3,
+              cumsum(hazard)[4:5])
+    risk <- c(r^2, 1,r,r,1,r,1,r,1)
+    expected <- risk* temp[c(1,1,2,2,2,3,3,4,4)]
+    
+    # The matrix of weights, one row per obs, one col per death
+    #   deaths at 1,2,2,2, and 4
+    riskmat <- matrix(c(1,1,1,1,1,1,1,1,1,
+                        0,0,1,1,1,1,1,1,1,
+                        0,0,2/3,2/3,2/3,1,1,1,1,
+                        0,0,1/3,1/3,1/3,1,1,1,1,
+                        0,0,0,0,0,0,0,1,1), ncol=5)
+    wtmat <- diag(c(r^2, 2, 3*r, 4*r, 3, 2*r, 1, 2*r, 1)) %*% riskmat
+
+    x      <- c(2,0,1,1,0,1,0,1,0)
+    xbar   <- colSums(x*wtmat)/ colSums(wtmat)
+    imat   <- (4*r^2 + 11*r)*hazard[1] - xbar[1]^2  +
+              10* mean(xbar[2:4] - xbar[2:4]^2) + 2*(xbar[5] - xbar[5]^2)
+
+    status <- c(1,0,1,1,1,0,0,1,0)
+    wt     <- c(1,2,3,4,3,2,1,2,1)
+   # Table of sums for score  resids
+    hazmat <- riskmat %*% diag(c(1,10/3,10/3, 10/3,2)/colSums(wtmat)) 
+    dM <- -risk*hazmat  #Expected part
+    dM[1,1] <- dM[1,1] +1  # deaths at time 1
+    for (i in 2:4) dM[3:5, i] <- dM[3:5,i] + 1/3
+    dM[8,5] <- dM[8,5] +1
+    mart <- rowSums(dM)
+    resid <-dM * outer(x, xbar ,'-')
+
+    # Increments to the variance of the hazard
+    var.g <- cumsum(hazard^2* c(1,3/10, 3/10, 3/10, 1/2))
+    var.d <- cumsum((xbar-newx)*hazard)
+
+    sxbar <- c(xbar[1], mean(xbar[2:4]), xbar[5])  #xbar for Schoen
+    list(loglik=loglik, imat=imat, hazard=hazard, xbar=xbar,
+         mart=status-expected, expected=expected,
+         score=rowSums(resid), schoen=c(2,1,1,0,1) - sxbar[c(1,2,2,2,3)],
+         varhaz=((var.g + var.d^2/imat)* exp(2*beta*newx))[c(1,4,5)])
+    }
+
+# Verify
+temp <- byhand(0,0)
+aeq(temp$xbar, c(13/19, 11/16, 26/38, 19/28, 2/3))
+aeq(temp$hazard, c(1/19, 5/24, 5/19, 5/14, 2/3))
+
+fit0 <- coxph(Surv(time, status) ~x, testw1, weights=wt, iter=0)
+fit  <- coxph(Surv(time, status) ~x, testw1, weights=wt)
+
+truth0 <- byhand(0,pi)
+aeq(fit0$loglik[1], truth0$loglik)
+aeq(1/truth0$imat, fit0$var)
+aeq(truth0$mart, fit0$resid)
+aeq(truth0$scho, resid(fit0, 'schoen'))
+aeq(truth0$score, resid(fit0, 'score')) 
+sfit <- survfit(fit0, list(x=pi), censor=FALSE)
+aeq(sfit$std.err^2, truth0$var)  
+aeq(-log(sfit$surv), cumsum(truth0$hazard)[c(1,4,5)]) 
+
+truth <- byhand(fit$coef, .3)
+aeq(truth$loglik, fit$loglik[2])
+aeq(1/truth$imat, fit$var)
+aeq(truth$mart, fit$resid)
+aeq(truth$scho, resid(fit, 'schoen'))
+aeq(truth$score, resid(fit, 'score'))
+
+sfit <- survfit(fit, list(x=.3), censor=FALSE)
+aeq(sfit$std.err^2, truth$var)  
+aeq(-log(sfit$surv), (cumsum(truth$hazard)* exp(fit$coef*.3))[c(1,4,5)]) 
+
+
+fit0
+summary(fit)
+resid(fit0, type='score')
+resid(fit0, type='scho')
+
+resid(fit, type='score')
+resid(fit, type='scho')
+
+rr1 <- resid(fit, type='mart')
+rr2 <- resid(fit, type='mart', weighted=T)
+aeq(rr2/rr1, testw1$wt)
+
+rr1 <- resid(fit, type='score')
+rr2 <- resid(fit, type='score', weighted=T)
+aeq(rr2/rr1, testw1$wt)
+
diff --git a/win32/deps/library/survival/tests/book6.Rout.save b/win32/deps/library/survival/tests/book6.Rout.save
new file mode 100644
index 0000000..66e543e
--- /dev/null
+++ b/win32/deps/library/survival/tests/book6.Rout.save
@@ -0,0 +1,190 @@
+
+R version 2.12.2 (2011-02-25)
+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(survival)
+Loading required package: splines
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> 
+> # Tests of the weighted Cox model
+> #  This is section 1.3 of my appendix -- no yet found in any of the
+> #  printings though, it awaits the next edition
+> #
+> # Efron approximation
+> #
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> 
+> testw1 <- data.frame(time=  c(1,1,2,2,2,2,3,4,5),
++ 		    status= c(1,0,1,1,1,0,0,1,0),
++ 		    x=      c(2,0,1,1,0,1,0,1,0),
++ 		    wt =    c(1,2,3,4,3,2,1,2,1))
+> xx <- testw1$wt
+> 
+> # Efron estimate
+> byhand <- function(beta, newx=0) {
++     r <- exp(beta)
++     a <- 7*r +3; b<- 4*r+2
++     loglik <- 11*beta - (log(r^2 + 11*r +7) + 10*log(11*r +5)/3 +
++                          10*log(a*2/3 +b)/3 + 10*log(a/3 +b)/3 +2*log(2*r+1))
++ 
++     hazard <- c(1/(r^2 + 11*r +7), 
++                 10/(3*c(11*r +5, a*2/3 +b, a/3+b)), 2/(2*r+1))
++     temp <- c(hazard[1], hazard[1]+hazard[2] + hazard[3]*2/3 + hazard[4]/3,
++               cumsum(hazard)[4:5])
++     risk <- c(r^2, 1,r,r,1,r,1,r,1)
++     expected <- risk* temp[c(1,1,2,2,2,3,3,4,4)]
++     
++     # The matrix of weights, one row per obs, one col per death
++     #   deaths at 1,2,2,2, and 4
++     riskmat <- matrix(c(1,1,1,1,1,1,1,1,1,
++                         0,0,1,1,1,1,1,1,1,
++                         0,0,2/3,2/3,2/3,1,1,1,1,
++                         0,0,1/3,1/3,1/3,1,1,1,1,
++                         0,0,0,0,0,0,0,1,1), ncol=5)
++     wtmat <- diag(c(r^2, 2, 3*r, 4*r, 3, 2*r, 1, 2*r, 1)) %*% riskmat
++ 
++     x      <- c(2,0,1,1,0,1,0,1,0)
++     xbar   <- colSums(x*wtmat)/ colSums(wtmat)
++     imat   <- (4*r^2 + 11*r)*hazard[1] - xbar[1]^2  +
++               10* mean(xbar[2:4] - xbar[2:4]^2) + 2*(xbar[5] - xbar[5]^2)
++ 
++     status <- c(1,0,1,1,1,0,0,1,0)
++     wt     <- c(1,2,3,4,3,2,1,2,1)
++    # Table of sums for score  resids
++     hazmat <- riskmat %*% diag(c(1,10/3,10/3, 10/3,2)/colSums(wtmat)) 
++     dM <- -risk*hazmat  #Expected part
++     dM[1,1] <- dM[1,1] +1  # deaths at time 1
++     for (i in 2:4) dM[3:5, i] <- dM[3:5,i] + 1/3
++     dM[8,5] <- dM[8,5] +1
++     mart <- rowSums(dM)
++     resid <-dM * outer(x, xbar ,'-')
++ 
++     # Increments to the variance of the hazard
++     var.g <- cumsum(hazard^2* c(1,3/10, 3/10, 3/10, 1/2))
++     var.d <- cumsum((xbar-newx)*hazard)
++ 
++     sxbar <- c(xbar[1], mean(xbar[2:4]), xbar[5])  #xbar for Schoen
++     list(loglik=loglik, imat=imat, hazard=hazard, xbar=xbar,
++          mart=status-expected, expected=expected,
++          score=rowSums(resid), schoen=c(2,1,1,0,1) - sxbar[c(1,2,2,2,3)],
++          varhaz=((var.g + var.d^2/imat)* exp(2*beta*newx))[c(1,4,5)])
++     }
+> 
+> # Verify
+> temp <- byhand(0,0)
+> aeq(temp$xbar, c(13/19, 11/16, 26/38, 19/28, 2/3))
+[1] TRUE
+> aeq(temp$hazard, c(1/19, 5/24, 5/19, 5/14, 2/3))
+[1] TRUE
+> 
+> fit0 <- coxph(Surv(time, status) ~x, testw1, weights=wt, iter=0)
+> fit  <- coxph(Surv(time, status) ~x, testw1, weights=wt)
+> 
+> truth0 <- byhand(0,pi)
+> aeq(fit0$loglik[1], truth0$loglik)
+[1] TRUE
+> aeq(1/truth0$imat, fit0$var)
+[1] TRUE
+> aeq(truth0$mart, fit0$resid)
+[1] TRUE
+> aeq(truth0$scho, resid(fit0, 'schoen'))
+[1] TRUE
+> aeq(truth0$score, resid(fit0, 'score')) 
+[1] TRUE
+> sfit <- survfit(fit0, list(x=pi), censor=FALSE)
+> aeq(sfit$std.err^2, truth0$var)  
+[1] TRUE
+> aeq(-log(sfit$surv), cumsum(truth0$hazard)[c(1,4,5)]) 
+[1] TRUE
+> 
+> truth <- byhand(fit$coef, .3)
+> aeq(truth$loglik, fit$loglik[2])
+[1] TRUE
+> aeq(1/truth$imat, fit$var)
+[1] TRUE
+> aeq(truth$mart, fit$resid)
+[1] TRUE
+> aeq(truth$scho, resid(fit, 'schoen'))
+[1] TRUE
+> aeq(truth$score, resid(fit, 'score'))
+[1] TRUE
+> 
+> sfit <- survfit(fit, list(x=.3), censor=FALSE)
+> aeq(sfit$std.err^2, truth$var)  
+[1] TRUE
+> aeq(-log(sfit$surv), (cumsum(truth$hazard)* exp(fit$coef*.3))[c(1,4,5)]) 
+[1] TRUE
+> 
+> 
+> fit0
+Call:
+coxph(formula = Surv(time, status) ~ x, data = testw1, weights = wt, 
+    iter = 0)
+
+
+  coef exp(coef) se(coef) z p
+x    0         1    0.584 0 1
+
+Likelihood ratio test=0  on 1 df, p=1  n= 9, number of events= 5 
+> summary(fit)
+Call:
+coxph(formula = Surv(time, status) ~ x, data = testw1, weights = wt)
+
+  n= 9, number of events= 5 
+
+    coef exp(coef) se(coef)     z Pr(>|z|)
+x 0.8726    2.3931   0.7126 1.225    0.221
+
+  exp(coef) exp(-coef) lower .95 upper .95
+x     2.393     0.4179    0.5921     9.672
+
+Concordance= 0.638  (se = 0.159 )
+Rsquare= 0.177   (max possible= 0.999 )
+Likelihood ratio test= 1.75  on 1 df,   p=0.1858
+Wald test            = 1.5  on 1 df,   p=0.2207
+Score (logrank) test = 1.58  on 1 df,   p=0.2094
+
+> resid(fit0, type='score')
+          1           2           3           4           5           6 
+ 1.24653740  0.03601108  0.14118105  0.14118105 -0.30336782 -0.27962308 
+          7           8           9 
+ 0.60164259 -0.16851197  1.04608703 
+> resid(fit0, type='scho')
+         1          2          2          2          4 
+ 1.3157895  0.3165727  0.3165727 -0.6834273  0.3333333 
+> 
+> resid(fit, type='score')
+          1           2           3           4           5           6 
+ 0.88116056  0.02477248  0.06057806  0.06057806 -0.59724033 -0.16737066 
+          7           8           9 
+ 0.38040295 -0.13750290  0.66631324 
+> resid(fit, type='scho')
+         1          2          2          2          4 
+ 1.0325955  0.1621759  0.1621759 -0.8378241  0.1728229 
+> 
+> rr1 <- resid(fit, type='mart')
+> rr2 <- resid(fit, type='mart', weighted=T)
+> aeq(rr2/rr1, testw1$wt)
+[1] TRUE
+> 
+> rr1 <- resid(fit, type='score')
+> rr2 <- resid(fit, type='score', weighted=T)
+> aeq(rr2/rr1, testw1$wt)
+[1] TRUE
+> 
+> 
diff --git a/win32/deps/library/survival/tests/book7.R b/win32/deps/library/survival/tests/book7.R
new file mode 100644
index 0000000..8d0431b
--- /dev/null
+++ b/win32/deps/library/survival/tests/book7.R
@@ -0,0 +1,55 @@
+library(survival)
+options(na.action=na.exclude)
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+
+#
+# Tests from the appendix of Therneau and Grambsch
+#  Data set 1 + exact method
+
+test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0))
+
+byhand7 <- function(beta) {
+    r <- exp(beta)
+    loglik <- 2*(beta - log(3*r + 3))
+    u <- 2/(r+1)
+    imat <- 2*r/(r+1)^2
+    haz <- c(1/(3*r+3), 2/(r+3), 0, 1 )
+                 
+    ties <- c(1,1,2,2,3,4)
+    wt <- c(r,r,r,1,1,1)
+    mart <- c(1,0,1,1,0,1) -  wt* (cumsum(haz))[ties]  #martingale residual
+
+    list(loglik=loglik, u=u, imat=imat, mart=mart)
+}
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+
+fit0 <-coxph(Surv(time, status) ~x, test1, iter=0, method='exact')
+truth0 <- byhand7(0)
+aeq(truth0$loglik, fit0$loglik[1])
+aeq(1/truth0$imat, fit0$var)
+aeq(truth0$mart, fit0$resid[c(2:6,1)])
+
+fit1 <- coxph(Surv(time, status) ~x, test1, iter=1, method='exact')
+aeq(fit1$coef, truth0$u*fit0$var)
+truth1 <- byhand7(fit1$coef)
+aeq(fit1$loglik[2], truth1$loglik)
+aeq(1/truth1$imat, fit1$var)
+aeq(truth1$mart, resid(fit1)[c(3:7,1)])
+
+fit2 <-  coxph(Surv(time, status) ~x, test1, method='exact')
+aeq(resid(fit2)[-2], c(0, 2/3, -1/3, -4/3,  1, 0))  #values from the book
+
+
+#
+# Now a multivariate case: start/stop data uses a different C routine
+#
+zz <- rep(0, nrow(lung))
+fit1 <- coxph(Surv(time, status) ~ age + ph.ecog + sex, lung, method="exact")
+fit2 <- coxph(Surv(zz, time, status) ~ age + ph.ecog + sex, lung,
+              method="exact")
+aeq(fit1$loglik, fit2$loglik)
+aeq(fit1$var, fit2$var)
+aeq(fit1$score, fit2$score)
+aeq(fit1$resid, fit2$resid)
diff --git a/win32/deps/library/survival/tests/book7.Rout.save b/win32/deps/library/survival/tests/book7.Rout.save
new file mode 100644
index 0000000..2fcaf56
--- /dev/null
+++ b/win32/deps/library/survival/tests/book7.Rout.save
@@ -0,0 +1,90 @@
+
+R version 2.14.0 (2011-10-31)
+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.
+
+> library(survival)
+Loading required package: splines
+> options(na.action=na.exclude)
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> 
+> #
+> # Tests from the appendix of Therneau and Grambsch
+> #  Data set 1 + exact method
+> 
+> test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0))
+> 
+> byhand7 <- function(beta) {
++     r <- exp(beta)
++     loglik <- 2*(beta - log(3*r + 3))
++     u <- 2/(r+1)
++     imat <- 2*r/(r+1)^2
++     haz <- c(1/(3*r+3), 2/(r+3), 0, 1 )
++                  
++     ties <- c(1,1,2,2,3,4)
++     wt <- c(r,r,r,1,1,1)
++     mart <- c(1,0,1,1,0,1) -  wt* (cumsum(haz))[ties]  #martingale residual
++ 
++     list(loglik=loglik, u=u, imat=imat, mart=mart)
++ }
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> 
+> fit0 <-coxph(Surv(time, status) ~x, test1, iter=0, method='exact')
+> truth0 <- byhand7(0)
+> aeq(truth0$loglik, fit0$loglik[1])
+[1] TRUE
+> aeq(1/truth0$imat, fit0$var)
+[1] TRUE
+> aeq(truth0$mart, fit0$resid[c(2:6,1)])
+[1] TRUE
+> 
+> fit1 <- coxph(Surv(time, status) ~x, test1, iter=1, method='exact')
+> aeq(fit1$coef, truth0$u*fit0$var)
+[1] TRUE
+> truth1 <- byhand7(fit1$coef)
+> aeq(fit1$loglik[2], truth1$loglik)
+[1] TRUE
+> aeq(1/truth1$imat, fit1$var)
+[1] TRUE
+> aeq(truth1$mart, resid(fit1)[c(3:7,1)])
+[1] TRUE
+> 
+> fit2 <-  coxph(Surv(time, status) ~x, test1, method='exact')
+Warning message:
+In fitter(X, Y, strats, offset, init, control, weights = weights,  :
+  Loglik converged before variable  1 ; beta may be infinite. 
+> aeq(resid(fit2)[-2], c(0, 2/3, -1/3, -4/3,  1, 0))  #values from the book
+[1] TRUE
+> 
+> 
+> #
+> # Now a multivariate case: start/stop data uses a different C routine
+> #
+> zz <- rep(0, nrow(lung))
+> fit1 <- coxph(Surv(time, status) ~ age + ph.ecog + sex, lung, method="exact")
+> fit2 <- coxph(Surv(zz, time, status) ~ age + ph.ecog + sex, lung,
++               method="exact")
+> aeq(fit1$loglik, fit2$loglik)
+[1] TRUE
+> aeq(fit1$var, fit2$var)
+[1] TRUE
+> aeq(fit1$score, fit2$score)
+[1] TRUE
+> aeq(fit1$resid, fit2$resid)
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/cancer.R b/win32/deps/library/survival/tests/cancer.R
new file mode 100644
index 0000000..3a4bcf9
--- /dev/null
+++ b/win32/deps/library/survival/tests/cancer.R
@@ -0,0 +1,34 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Test out all of the routines on a more complex data set
+#
+temp <- survfit(Surv(time, status) ~ ph.ecog, lung)
+summary(temp, times=c(30*1:11, 365*1:3))
+print(temp[2:3])
+
+temp <- survfit(Surv(time, status)~1, lung, type='fleming',
+		   conf.int=.9, conf.type='log-log', error='tsiatis')
+summary(temp, times=30 *1:5)
+
+temp <- survdiff(Surv(time, status) ~ inst, lung, rho=.5)
+print(temp, digits=6)
+
+temp <- coxph(Surv(time, status) ~ ph.ecog + ph.karno + pat.karno + wt.loss 
+	      + sex + age + meal.cal + strata(inst), lung)
+summary(temp)
+cox.zph(temp)
+cox.zph(temp, transform='identity')
+
+coxph(Surv(rep(0,length(time)), time, status) ~ ph.ecog + ph.karno + pat.karno
+		+ wt.loss + sex + age + meal.cal + strata(inst), lung)
+
+#
+# Tests of using "."
+#
+fit1 <- coxph(Surv(time, status) ~ . - meal.cal - wt.loss - inst, lung)
+fit2 <- update(fit1, .~. - ph.karno)
+fit3 <- coxph(Surv(time, status) ~ age + sex + ph.ecog + pat.karno, lung)
+all.equal(fit2, fit3)
diff --git a/win32/deps/library/survival/tests/cancer.Rout.save b/win32/deps/library/survival/tests/cancer.Rout.save
new file mode 100644
index 0000000..de03a3a
--- /dev/null
+++ b/win32/deps/library/survival/tests/cancer.Rout.save
@@ -0,0 +1,224 @@
+
+R version 2.15.0 (2012-03-30)
+Copyright (C) 2012 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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Test out all of the routines on a more complex data set
+> #
+> temp <- survfit(Surv(time, status) ~ ph.ecog, lung)
+> summary(temp, times=c(30*1:11, 365*1:3))
+Call: survfit(formula = Surv(time, status) ~ ph.ecog, data = lung)
+
+1 observation deleted due to missingness 
+                ph.ecog=0 
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+   30     60       3    0.952  0.0268       0.9012        1.000
+   60     58       2    0.921  0.0341       0.8562        0.990
+   90     56       2    0.889  0.0396       0.8146        0.970
+  120     56       0    0.889  0.0396       0.8146        0.970
+  150     55       1    0.873  0.0419       0.7946        0.959
+  180     52       2    0.841  0.0461       0.7553        0.936
+  210     48       2    0.808  0.0498       0.7164        0.912
+  240     45       0    0.808  0.0498       0.7164        0.912
+  270     38       2    0.770  0.0543       0.6709        0.884
+  300     33       2    0.727  0.0591       0.6203        0.853
+  330     29       2    0.681  0.0637       0.5670        0.818
+  365     22       6    0.535  0.0728       0.4100        0.699
+  730      5      11    0.193  0.0707       0.0943        0.396
+
+                ph.ecog=1 
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+   30    111       2    0.982  0.0124       0.9583        1.000
+   60    110       3    0.956  0.0193       0.9186        0.994
+   90    104       4    0.920  0.0255       0.8718        0.972
+  120     99       5    0.876  0.0310       0.8174        0.939
+  150     93       6    0.823  0.0359       0.7556        0.896
+  180     82       8    0.751  0.0407       0.6756        0.836
+  210     68       9    0.666  0.0450       0.5831        0.760
+  240     57       6    0.604  0.0474       0.5176        0.704
+  270     53       4    0.561  0.0487       0.4729        0.665
+  300     46       3    0.527  0.0495       0.4384        0.633
+  330     40       4    0.480  0.0504       0.3903        0.589
+  365     34       4    0.431  0.0509       0.3417        0.543
+  730      7      21    0.114  0.0388       0.0582        0.222
+
+                ph.ecog=2 
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+   30     46       5   0.9000  0.0424      0.82057        0.987
+   60     43       2   0.8600  0.0491      0.76900        0.962
+   90     40       3   0.8000  0.0566      0.69647        0.919
+  120     34       4   0.7174  0.0641      0.60216        0.855
+  150     31       3   0.6541  0.0680      0.53342        0.802
+  180     26       6   0.5275  0.0719      0.40385        0.689
+  210     21       4   0.4431  0.0717      0.32266        0.608
+  240     17       3   0.3766  0.0705      0.26100        0.543
+  270     17       0   0.3766  0.0705      0.26100        0.543
+  300     13       3   0.3102  0.0677      0.20223        0.476
+  330     11       2   0.2624  0.0651      0.16135        0.427
+  365      9       2   0.2147  0.0614      0.12258        0.376
+  730      1       6   0.0371  0.0345      0.00601        0.229
+
+                ph.ecog=3 
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+   30      1       0        1       0            1            1
+   60      1       0        1       0            1            1
+   90      1       0        1       0            1            1
+
+> print(temp[2:3])
+Call: survfit(formula = Surv(time, status) ~ ph.ecog, data = lung)
+
+   1 observation deleted due to missingness 
+          records n.max n.start events median 0.95LCL 0.95UCL
+ph.ecog=1     113   113     113     82    306     268     429
+ph.ecog=2      50    50      50     44    199     156     288
+> 
+> temp <- survfit(Surv(time, status)~1, lung, type='fleming',
++ 		   conf.int=.9, conf.type='log-log', error='tsiatis')
+> summary(temp, times=30 *1:5)
+Call: survfit(formula = Surv(time, status) ~ 1, data = lung, type = "fleming", 
+    conf.int = 0.9, conf.type = "log-log", error = "tsiatis")
+
+ time n.risk n.event survival std.err lower 90% CI upper 90% CI
+   30    219      10    0.956  0.0135        0.928        0.974
+   60    213       7    0.926  0.0173        0.891        0.950
+   90    201      10    0.882  0.0213        0.842        0.913
+  120    189      10    0.838  0.0244        0.793        0.874
+  150    179      10    0.794  0.0268        0.745        0.834
+> 
+> temp <- survdiff(Surv(time, status) ~ inst, lung, rho=.5)
+> print(temp, digits=6)
+Call:
+survdiff(formula = Surv(time, status) ~ inst, data = lung, rho = 0.5)
+
+n=227, 1 observation deleted due to missingness.
+
+         N  Observed  Expected   (O-E)^2/E   (O-E)^2/V
+inst=1  36 21.190058 17.455181 0.799149708 1.171232977
+inst=2   5  3.173330  1.964395 0.744007932 0.860140808
+inst=3  19 10.663476 11.958755 0.140294489 0.200472362
+inst=4   4  2.245347  3.559344 0.485085848 0.677874608
+inst=5   9  5.010883  4.500982 0.057765161 0.077128402
+inst=6  14  8.862602  7.078516 0.449665221 0.582743947
+inst=7   8  4.445647  4.416133 0.000197254 0.000253632
+inst=10  4  2.901923  2.223283 0.207150016 0.249077097
+inst=11 18  7.807867  9.525163 0.309611863 0.422142221
+inst=12 23 14.009656 12.216768 0.263117640 0.365712493
+inst=13 20  9.140983 11.863298 0.624699853 0.874238212
+inst=15  6  3.170744  3.558447 0.042241456 0.057938955
+inst=16 16  8.870360  9.992612 0.126038005 0.175170113
+inst=21 13  9.263733  4.460746 5.171484268 6.149354145
+inst=22 17  8.278566 11.971473 1.139171459 1.645863937
+inst=26  6  1.627074  3.542694 1.035821659 1.286365543
+inst=32  7  1.792468  2.679904 0.293869782 0.343966668
+inst=33  2  0.929177  0.416202 0.632249272 0.676682390
+
+ Chisq= 15.1  on 17 degrees of freedom, p= 0.590384 
+> 
+> temp <- coxph(Surv(time, status) ~ ph.ecog + ph.karno + pat.karno + wt.loss 
++ 	      + sex + age + meal.cal + strata(inst), lung)
+> summary(temp)
+Call:
+coxph(formula = Surv(time, status) ~ ph.ecog + ph.karno + pat.karno + 
+    wt.loss + sex + age + meal.cal + strata(inst), data = lung)
+
+  n= 167, number of events= 120 
+   (61 observations deleted due to missingness)
+
+                coef  exp(coef)   se(coef)      z Pr(>|z|)   
+ph.ecog    0.7299987  2.0750779  0.2689397  2.714  0.00664 **
+ph.karno   0.0130512  1.0131368  0.0137362  0.950  0.34204   
+pat.karno -0.0140955  0.9860034  0.0093680 -1.505  0.13242   
+wt.loss   -0.0148821  0.9852281  0.0084811 -1.755  0.07931 . 
+sex       -0.6612534  0.5162039  0.2339979 -2.826  0.00471 **
+age        0.0050920  1.0051050  0.0137288  0.371  0.71071   
+meal.cal  -0.0002398  0.9997602  0.0003019 -0.794  0.42701   
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
+
+          exp(coef) exp(-coef) lower .95 upper .95
+ph.ecog      2.0751     0.4819    1.2249    3.5153
+ph.karno     1.0131     0.9870    0.9862    1.0408
+pat.karno    0.9860     1.0142    0.9681    1.0043
+wt.loss      0.9852     1.0150    0.9690    1.0017
+sex          0.5162     1.9372    0.3263    0.8166
+age          1.0051     0.9949    0.9784    1.0325
+meal.cal     0.9998     1.0002    0.9992    1.0004
+
+Concordance= 0.696  (se = 0.115 )
+Rsquare= 0.167   (max possible= 0.912 )
+Likelihood ratio test= 30.6  on 7 df,   p=7.377e-05
+Wald test            = 28.15  on 7 df,   p=0.0002066
+Score (logrank) test = 30.72  on 7 df,   p=7e-05
+
+> cox.zph(temp)
+              rho  chisq      p
+ph.ecog    0.0276 0.1078 0.7427
+ph.karno   0.1331 2.0018 0.1571
+pat.karno  0.0250 0.0841 0.7718
+wt.loss   -0.0386 0.2122 0.6451
+sex        0.0399 0.1800 0.6713
+age        0.0639 0.5600 0.4543
+meal.cal   0.1611 3.6945 0.0546
+GLOBAL         NA 9.0115 0.2518
+> cox.zph(temp, transform='identity')
+              rho   chisq     p
+ph.ecog    0.0221  0.0688 0.793
+ph.karno   0.1217  1.6743 0.196
+pat.karno  0.0302  0.1227 0.726
+wt.loss   -0.0516  0.3790 0.538
+sex        0.0449  0.2280 0.633
+age        0.0719  0.7085 0.400
+meal.cal   0.1808  4.6537 0.031
+GLOBAL         NA 10.0537 0.186
+> 
+> coxph(Surv(rep(0,length(time)), time, status) ~ ph.ecog + ph.karno + pat.karno
++ 		+ wt.loss + sex + age + meal.cal + strata(inst), lung)
+Call:
+coxph(formula = Surv(rep(0, length(time)), time, status) ~ ph.ecog + 
+    ph.karno + pat.karno + wt.loss + sex + age + meal.cal + strata(inst), 
+    data = lung)
+
+
+              coef exp(coef) se(coef)      z      p
+ph.ecog    0.73000     2.075 0.268940  2.714 0.0066
+ph.karno   0.01305     1.013 0.013736  0.950 0.3400
+pat.karno -0.01410     0.986 0.009368 -1.505 0.1300
+wt.loss   -0.01488     0.985 0.008481 -1.755 0.0790
+sex       -0.66125     0.516 0.233998 -2.826 0.0047
+age        0.00509     1.005 0.013729  0.371 0.7100
+meal.cal  -0.00024     1.000 0.000302 -0.794 0.4300
+
+Likelihood ratio test=30.6  on 7 df, p=7.38e-05  n= 167, number of events= 120 
+   (61 observations deleted due to missingness)
+> 
+> #
+> # Tests of using "."
+> #
+> fit1 <- coxph(Surv(time, status) ~ . - meal.cal - wt.loss - inst, lung)
+> fit2 <- update(fit1, .~. - ph.karno)
+> fit3 <- coxph(Surv(time, status) ~ age + sex + ph.ecog + pat.karno, lung)
+> all.equal(fit2, fit3)
+[1] TRUE
+> 
+> proc.time()
+   user  system elapsed 
+  0.412   0.076   0.526 
diff --git a/win32/deps/library/survival/tests/clogit.R b/win32/deps/library/survival/tests/clogit.R
new file mode 100644
index 0000000..3a09b47
--- /dev/null
+++ b/win32/deps/library/survival/tests/clogit.R
@@ -0,0 +1,28 @@
+library(survival)
+#
+# Test of the clogit function, and indirectly of the exact option
+#
+# Data set logan has the occupation of fathers, we create a 
+#  multinomial response
+#
+nresp <- length(levels(logan$occupation))
+n <- nrow(logan)
+indx <- rep(1:n, nresp)
+logan2 <- data.frame(logan[indx,],
+                     id = indx,
+                     occ2 = factor(rep(levels(logan$occupation), each=n)))
+logan2$y <- (logan2$occupation == logan2$occ2)
+
+#We expect two NA coefficients, so ignore the warning
+fit1 <- clogit(y ~ occ2 + occ2:education + occ2:race + strata(id), logan2)
+
+#since there is only one death per group, all methods are equal
+dummy <- rep(1, nrow(logan2))
+fit2 <- coxph(Surv(dummy, y) ~ occ2 + occ2:education + occ2:race + strata(id),
+                   logan2, method='breslow')
+
+all.equal(fit1$coef, fit2$coef)
+all.equal(fit1$loglik, fit2$loglik)
+all.equal(fit1$var, fit2$var)
+all.equal(fit1$resid, fit2$resid)
+
diff --git a/win32/deps/library/survival/tests/clogit.Rout.save b/win32/deps/library/survival/tests/clogit.Rout.save
new file mode 100644
index 0000000..e6a1f47
--- /dev/null
+++ b/win32/deps/library/survival/tests/clogit.Rout.save
@@ -0,0 +1,58 @@
+
+R version 2.14.0 (2011-10-31)
+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.
+
+> library(survival)
+Loading required package: splines
+> #
+> # Test of the clogit function, and indirectly of the exact option
+> #
+> # Data set logan has the occupation of fathers, we create a 
+> #  multinomial response
+> #
+> nresp <- length(levels(logan$occupation))
+> n <- nrow(logan)
+> indx <- rep(1:n, nresp)
+> logan2 <- data.frame(logan[indx,],
++                      id = indx,
++                      occ2 = factor(rep(levels(logan$occupation), each=n)))
+> logan2$y <- (logan2$occupation == logan2$occ2)
+> 
+> #We expect two NA coefficients, so ignore the warning
+> fit1 <- clogit(y ~ occ2 + occ2:education + occ2:race + strata(id), logan2)
+Warning message:
+In coxph(formula = Surv(rep(1, 4190L), y) ~ occ2 + occ2:education +  :
+  X matrix deemed to be singular; variable 9 14
+> 
+> #since there is only one death per group, all methods are equal
+> dummy <- rep(1, nrow(logan2))
+> fit2 <- coxph(Surv(dummy, y) ~ occ2 + occ2:education + occ2:race + strata(id),
++                    logan2, method='breslow')
+Warning message:
+In coxph(Surv(dummy, y) ~ occ2 + occ2:education + occ2:race + strata(id),  :
+  X matrix deemed to be singular; variable 9 14
+> 
+> all.equal(fit1$coef, fit2$coef)
+[1] TRUE
+> all.equal(fit1$loglik, fit2$loglik)
+[1] TRUE
+> all.equal(fit1$var, fit2$var)
+[1] TRUE
+> all.equal(fit1$resid, fit2$resid)
+[1] TRUE
+> 
+> 
diff --git a/win32/deps/library/survival/tests/concordance.R b/win32/deps/library/survival/tests/concordance.R
new file mode 100644
index 0000000..a3a8c30
--- /dev/null
+++ b/win32/deps/library/survival/tests/concordance.R
@@ -0,0 +1,109 @@
+library(survival)
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+
+#
+# Simple tests of concordance.  These numbers were derived in multiple
+#   codes.
+#
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+
+grank <- function(x, time, grp, wt) 
+    unlist(tapply(x, grp, rank))
+grank2 <- function(x, time, grp, wt) {  #for case weights
+    if (length(wt)==0) wt <- rep(1, length(x))
+    z <- double(length(x))
+    for (i in unique(grp)) {
+        indx <- which(grp==i)
+        temp <- tapply(wt[indx], x[indx], sum)
+        temp <- temp/2  + c(0, cumsum(temp)[-length(temp)])
+        z[indx] <- temp[match(x[indx], names(temp))]
+    }
+    z
+}
+
+
+tdata <- aml[aml$x=='Maintained',]
+tdata$y <- c(1,6,2,7,3,7,3,8,4,4,5)
+tdata$wt <- c(1,2,3,2,1,2,3,4,3,2,1)
+fit <- survConcordance(Surv(time, status) ~y, tdata)
+aeq(fit$stats[1:4], c(14,24,2,0))
+cfit <- coxph(Surv(time, status) ~ tt(y), tdata, tt=grank, method='breslow',
+              iter=0, x=T)
+cdt <- coxph.detail(cfit)
+aeq(4*sum(cdt$imat),fit$stats[5]^2) 
+aeq(2*sum(cdt$score), diff(fit$stats[2:1]))
+
+
+# Lots of ties
+tempx <- Surv(c(1,2,2,2,3,4,4,4,5,2), c(1,0,1,0,1,0,1,1,0,1))
+tempy <- c(5,5,4,4,3,3,7,6,5,4)
+fit2 <- survConcordance(tempx ~ tempy)
+aeq(fit2$stats[1:4], c(13,13,5,2))
+cfit2 <-  coxph(tempx ~ tt(tempy), tt=grank, method='breslow', iter=0)
+aeq(4/cfit2$var, fit2$stats[5]^2)
+
+# Bigger data
+fit3 <- survConcordance(Surv(time, status) ~ age, lung)
+aeq(fit3$stats[1:4], c(10717, 8706, 591, 28))
+cfit3 <- coxph(Surv(time, status) ~ tt(age), lung, 
+               iter=0, method='breslow', tt=grank, x=T)
+cdt <- coxph.detail(cfit3)
+aeq(4*sum(cdt$imat),fit3$stats[5]^2) 
+aeq(2*sum(cdt$score), diff(fit3$stats[2:1]))
+
+
+# More ties
+fit4 <- survConcordance(Surv(time, status) ~ ph.ecog, lung)
+aeq(fit4$stats[1:4], c(8392, 4258, 7137, 28))
+cfit4 <- coxph(Surv(time, status) ~ tt(ph.ecog), lung, 
+               iter=0, method='breslow', tt=grank)
+aeq(4/cfit4$var, fit4$stats[5]^2)
+
+# Case weights
+fit5 <- survConcordance(Surv(time, status) ~ y, tdata, weight=wt)
+fit6 <- survConcordance(Surv(time, status) ~y, tdata[rep(1:11,tdata$wt),])
+aeq(fit5$stats[1:4], c(70, 91, 7, 0))  # checked by hand
+aeq(fit5$stats[1:3], fit6$stats[1:3])  #spurious "tied on time" value, ignore
+aeq(fit5$std, fit6$std)
+cfit5 <- coxph(Surv(time, status) ~ tt(y), tdata, weight=wt, 
+               iter=0, method='breslow', tt=grank2)
+cfit6 <- coxph(Surv(time, status) ~ tt(y), tdata[rep(1:11,tdata$wt),], 
+               iter=0, method='breslow', tt=grank)
+aeq(4/cfit6$var, fit6$stats[5]^2)
+aeq(cfit5$var, cfit6$var)
+
+# Start, stop simplest cases
+fit7 <- survConcordance(Surv(rep(0,11), time, status) ~ y, tdata)
+aeq(fit7$stats, fit$stats)
+aeq(fit7$std.err, fit$std.err)
+fit7 <- survConcordance(Surv(rep(0,11), time, status) ~ y, tdata, weight=wt)
+aeq(fit5$stats, fit7$stats)
+
+# Multiple intervals for some, but same risk sets as tdata
+tdata2 <- data.frame(time1=c(0,3, 5,  6,7,   0,  4,17,  7,  0,16,  2,  0, 
+                             0,9, 5),
+                     time2=c(3,9, 13, 7,13, 18, 17,23, 28, 16,31, 34, 45, 
+                             9,48, 60),
+                     status=c(0,1, 1, 0,0,  1,  0,1, 0, 0,1, 1, 0, 0,1, 0),
+                     y = c(1,1, 6, 2,2, 7, 3,3, 7, 3,3, 8, 4, 4,4, 5),
+                     wt= c(1,1, 2, 3,3, 2, 1,1, 2, 3,3, 4, 3, 2,2, 1))
+fit8 <- survConcordance(Surv(time1, time2, status) ~y, tdata2, weight=wt)
+aeq(fit5$stats, fit8$stats)
+aeq(fit5$std.err, fit8$std.err)
+cfit8 <- coxph(Surv(time1, time2, status) ~ tt(y), tdata2, weight=wt, 
+               iter=0, method='breslow', tt=grank2)
+aeq(4/cfit8$var, fit8$stats[5]^2)
+aeq(fit8$stats[5]/(2*sum(fit8$stats[1:3])), fit8$std.err)
+
+# Stratified
+tdata3 <- data.frame(time1=c(tdata2$time1, rep(0, nrow(lung))),
+                     time2=c(tdata2$time2, lung$time),
+                     status = c(tdata2$status, lung$status -1),
+                     x = c(tdata2$y, lung$ph.ecog),
+                     wt= c(tdata2$wt, rep(1, nrow(lung))),
+                     grp=rep(1:2, c(nrow(tdata2), nrow(lung))))
+fit9 <- survConcordance(Surv(time1, time2, status) ~x + strata(grp),
+                        data=tdata3, weight=wt)
+aeq(fit9$stats[1,], fit5$stats)
+aeq(fit9$stats[2,], fit4$stats)
diff --git a/win32/deps/library/survival/tests/concordance.Rout.save b/win32/deps/library/survival/tests/concordance.Rout.save
new file mode 100644
index 0000000..138ea39
--- /dev/null
+++ b/win32/deps/library/survival/tests/concordance.Rout.save
@@ -0,0 +1,153 @@
+
+R version 2.12.2 (2011-02-25)
+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(survival)
+Loading required package: splines
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> 
+> #
+> # Simple tests of concordance.  These numbers were derived in multiple
+> #   codes.
+> #
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> grank <- function(x, time, grp, wt) 
++     unlist(tapply(x, grp, rank))
+> grank2 <- function(x, time, grp, wt) {  #for case weights
++     if (length(wt)==0) wt <- rep(1, length(x))
++     z <- double(length(x))
++     for (i in unique(grp)) {
++         indx <- which(grp==i)
++         temp <- tapply(wt[indx], x[indx], sum)
++         temp <- temp/2  + c(0, cumsum(temp)[-length(temp)])
++         z[indx] <- temp[match(x[indx], names(temp))]
++     }
++     z
++ }
+> 
+> 
+> tdata <- aml[aml$x=='Maintained',]
+> tdata$y <- c(1,6,2,7,3,7,3,8,4,4,5)
+> tdata$wt <- c(1,2,3,2,1,2,3,4,3,2,1)
+> fit <- survConcordance(Surv(time, status) ~y, tdata)
+> aeq(fit$stats[1:4], c(14,24,2,0))
+[1] TRUE
+> cfit <- coxph(Surv(time, status) ~ tt(y), tdata, tt=grank, method='breslow',
++               iter=0, x=T)
+> cdt <- coxph.detail(cfit)
+> aeq(4*sum(cdt$imat),fit$stats[5]^2) 
+[1] TRUE
+> aeq(2*sum(cdt$score), diff(fit$stats[2:1]))
+[1] TRUE
+> 
+> 
+> # Lots of ties
+> tempx <- Surv(c(1,2,2,2,3,4,4,4,5,2), c(1,0,1,0,1,0,1,1,0,1))
+> tempy <- c(5,5,4,4,3,3,7,6,5,4)
+> fit2 <- survConcordance(tempx ~ tempy)
+> aeq(fit2$stats[1:4], c(13,13,5,2))
+[1] TRUE
+> cfit2 <-  coxph(tempx ~ tt(tempy), tt=grank, method='breslow', iter=0)
+> aeq(4/cfit2$var, fit2$stats[5]^2)
+[1] TRUE
+> 
+> # Bigger data
+> fit3 <- survConcordance(Surv(time, status) ~ age, lung)
+> aeq(fit3$stats[1:4], c(10717, 8706, 591, 28))
+[1] TRUE
+> cfit3 <- coxph(Surv(time, status) ~ tt(age), lung, 
++                iter=0, method='breslow', tt=grank, x=T)
+> cdt <- coxph.detail(cfit3)
+> aeq(4*sum(cdt$imat),fit3$stats[5]^2) 
+[1] TRUE
+> aeq(2*sum(cdt$score), diff(fit3$stats[2:1]))
+[1] TRUE
+> 
+> 
+> # More ties
+> fit4 <- survConcordance(Surv(time, status) ~ ph.ecog, lung)
+> aeq(fit4$stats[1:4], c(8392, 4258, 7137, 28))
+[1] TRUE
+> cfit4 <- coxph(Surv(time, status) ~ tt(ph.ecog), lung, 
++                iter=0, method='breslow', tt=grank)
+> aeq(4/cfit4$var, fit4$stats[5]^2)
+[1] TRUE
+> 
+> # Case weights
+> fit5 <- survConcordance(Surv(time, status) ~ y, tdata, weight=wt)
+> fit6 <- survConcordance(Surv(time, status) ~y, tdata[rep(1:11,tdata$wt),])
+> aeq(fit5$stats[1:4], c(70, 91, 7, 0))  # checked by hand
+[1] TRUE
+> aeq(fit5$stats[1:3], fit6$stats[1:3])  #spurious "tied on time" value, ignore
+[1] TRUE
+> aeq(fit5$std, fit6$std)
+[1] TRUE
+> cfit5 <- coxph(Surv(time, status) ~ tt(y), tdata, weight=wt, 
++                iter=0, method='breslow', tt=grank2)
+> cfit6 <- coxph(Surv(time, status) ~ tt(y), tdata[rep(1:11,tdata$wt),], 
++                iter=0, method='breslow', tt=grank)
+> aeq(4/cfit6$var, fit6$stats[5]^2)
+[1] TRUE
+> aeq(cfit5$var, cfit6$var)
+[1] TRUE
+> 
+> # Start, stop simplest cases
+> fit7 <- survConcordance(Surv(rep(0,11), time, status) ~ y, tdata)
+> aeq(fit7$stats, fit$stats)
+[1] TRUE
+> aeq(fit7$std.err, fit$std.err)
+[1] TRUE
+> fit7 <- survConcordance(Surv(rep(0,11), time, status) ~ y, tdata, weight=wt)
+> aeq(fit5$stats, fit7$stats)
+[1] TRUE
+> 
+> # Multiple intervals for some, but same risk sets as tdata
+> tdata2 <- data.frame(time1=c(0,3, 5,  6,7,   0,  4,17,  7,  0,16,  2,  0, 
++                              0,9, 5),
++                      time2=c(3,9, 13, 7,13, 18, 17,23, 28, 16,31, 34, 45, 
++                              9,48, 60),
++                      status=c(0,1, 1, 0,0,  1,  0,1, 0, 0,1, 1, 0, 0,1, 0),
++                      y = c(1,1, 6, 2,2, 7, 3,3, 7, 3,3, 8, 4, 4,4, 5),
++                      wt= c(1,1, 2, 3,3, 2, 1,1, 2, 3,3, 4, 3, 2,2, 1))
+> fit8 <- survConcordance(Surv(time1, time2, status) ~y, tdata2, weight=wt)
+> aeq(fit5$stats, fit8$stats)
+[1] TRUE
+> aeq(fit5$std.err, fit8$std.err)
+[1] TRUE
+> cfit8 <- coxph(Surv(time1, time2, status) ~ tt(y), tdata2, weight=wt, 
++                iter=0, method='breslow', tt=grank2)
+> aeq(4/cfit8$var, fit8$stats[5]^2)
+[1] TRUE
+> aeq(fit8$stats[5]/(2*sum(fit8$stats[1:3])), fit8$std.err)
+[1] TRUE
+> 
+> # Stratified
+> tdata3 <- data.frame(time1=c(tdata2$time1, rep(0, nrow(lung))),
++                      time2=c(tdata2$time2, lung$time),
++                      status = c(tdata2$status, lung$status -1),
++                      x = c(tdata2$y, lung$ph.ecog),
++                      wt= c(tdata2$wt, rep(1, nrow(lung))),
++                      grp=rep(1:2, c(nrow(tdata2), nrow(lung))))
+> fit9 <- survConcordance(Surv(time1, time2, status) ~x + strata(grp),
++                         data=tdata3, weight=wt)
+> aeq(fit9$stats[1,], fit5$stats)
+[1] TRUE
+> aeq(fit9$stats[2,], fit4$stats)
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/counting.R b/win32/deps/library/survival/tests/counting.R
new file mode 100644
index 0000000..ff25354
--- /dev/null
+++ b/win32/deps/library/survival/tests/counting.R
@@ -0,0 +1,47 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+# Create a "counting process" version of the simplest test data set
+#
+test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0))
+
+test1b<- list(start= c(0, 3,  0,  0, 5,  0, 6,14,  0,  0, 10,20,30, 0),
+	      stop = c(3,10, 10,  5,20,  6,14,20, 30,  10,20,30,40, 10),
+	      status=c(0, 1,  0,  0, 1,  0, 0, 1,  0,   0, 0, 0, 1,  0),
+	      x=     c(1, 1,  1,  1, 1,  0, 0, 0,  0,   0, 0, 0, 0,  NA),
+	      id =   c(3, 3,  4,  5, 5,  6, 6, 6,  7,   1, 1, 1, 1,   2))
+
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+#
+#  Check out the various residuals under an Efron approximation
+#
+fit0 <- coxph(Surv(time, status)~ x, test1, iter=0)
+fit  <- coxph(Surv(time, status) ~x, test1)
+fit0b <- coxph(Surv(start, stop, status) ~ x, test1b, iter=0)
+fitb  <- coxph(Surv(start, stop, status) ~x, test1b)
+fitc  <- coxph(Surv(time, status) ~ offset(fit$coef*x), test1)
+fitd  <- coxph(Surv(start, stop, status) ~ offset(fit$coef*x), test1b)
+
+aeq(fit0b$coef, fit0$coef)
+
+aeq(resid(fit0), resid(fit0b, collapse=test1b$id))
+aeq(resid(fit), resid(fitb, collapse=test1b$id))
+aeq(resid(fitc), resid(fitd, collapse=test1b$id))
+aeq(resid(fitc), resid(fit))
+
+aeq(resid(fit0, type='score'), resid(fit0b, type='score', collapse=test1b$id))
+aeq(resid(fit, type='score'), resid(fitb, type='score', collapse=test1b$id))
+
+aeq(resid(fit0, type='scho'), resid(fit0b, type='scho', collapse=test1b$id))
+aeq(resid(fit, type='scho'), resid(fitb, type='scho', collapse=test1b$id))
+
+# The two survivals will have different censoring times
+#  nrisk, nevent, surv, and std should be the same
+temp1 <- survfit(fit, list(x=1), censor=FALSE)
+temp2 <- survfit(fitb, list(x=1), censor=FALSE)
+all.equal(unclass(temp1)[c(3,4,6,8)], unclass(temp2)[c(3,4,6,8)])
+
+
diff --git a/win32/deps/library/survival/tests/counting.Rout.save b/win32/deps/library/survival/tests/counting.Rout.save
new file mode 100644
index 0000000..c90bcad
--- /dev/null
+++ b/win32/deps/library/survival/tests/counting.Rout.save
@@ -0,0 +1,76 @@
+
+R version 2.10.0 (2009-10-26)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> # Create a "counting process" version of the simplest test data set
+> #
+> test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0))
+> 
+> test1b<- list(start= c(0, 3,  0,  0, 5,  0, 6,14,  0,  0, 10,20,30, 0),
++ 	      stop = c(3,10, 10,  5,20,  6,14,20, 30,  10,20,30,40, 10),
++ 	      status=c(0, 1,  0,  0, 1,  0, 0, 1,  0,   0, 0, 0, 1,  0),
++ 	      x=     c(1, 1,  1,  1, 1,  0, 0, 0,  0,   0, 0, 0, 0,  NA),
++ 	      id =   c(3, 3,  4,  5, 5,  6, 6, 6,  7,   1, 1, 1, 1,   2))
+> 
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> #
+> #  Check out the various residuals under an Efron approximation
+> #
+> fit0 <- coxph(Surv(time, status)~ x, test1, iter=0)
+> fit  <- coxph(Surv(time, status) ~x, test1)
+> fit0b <- coxph(Surv(start, stop, status) ~ x, test1b, iter=0)
+> fitb  <- coxph(Surv(start, stop, status) ~x, test1b)
+> fitc  <- coxph(Surv(time, status) ~ offset(fit$coef*x), test1)
+> fitd  <- coxph(Surv(start, stop, status) ~ offset(fit$coef*x), test1b)
+> 
+> aeq(fit0b$coef, fit0$coef)
+[1] TRUE
+> 
+> aeq(resid(fit0), resid(fit0b, collapse=test1b$id))
+[1] TRUE
+> aeq(resid(fit), resid(fitb, collapse=test1b$id))
+[1] TRUE
+> aeq(resid(fitc), resid(fitd, collapse=test1b$id))
+[1] TRUE
+> aeq(resid(fitc), resid(fit))
+[1] TRUE
+> 
+> aeq(resid(fit0, type='score'), resid(fit0b, type='score', collapse=test1b$id))
+[1] TRUE
+> aeq(resid(fit, type='score'), resid(fitb, type='score', collapse=test1b$id))
+[1] TRUE
+> 
+> aeq(resid(fit0, type='scho'), resid(fit0b, type='scho', collapse=test1b$id))
+[1] TRUE
+> aeq(resid(fit, type='scho'), resid(fitb, type='scho', collapse=test1b$id))
+[1] TRUE
+> 
+> # The two survivals will have different censoring times
+> #  nrisk, nevent, surv, and std should be the same
+> temp1 <- survfit(fit, list(x=1), censor=FALSE)
+> temp2 <- survfit(fitb, list(x=1), censor=FALSE)
+> all.equal(unclass(temp1)[c(3,4,6,8)], unclass(temp2)[c(3,4,6,8)])
+[1] TRUE
+> 
+> 
+> 
diff --git a/win32/deps/library/survival/tests/coxsurv.R b/win32/deps/library/survival/tests/coxsurv.R
new file mode 100644
index 0000000..fabc295
--- /dev/null
+++ b/win32/deps/library/survival/tests/coxsurv.R
@@ -0,0 +1,80 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Test out subscripting in the case of a coxph survival curve
+#
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+
+fit <- coxph(Surv(time, status) ~ age + sex + meal.cal + strata(ph.ecog),
+		data=cancer)
+
+surv1 <- survfit(fit)
+temp <- surv1[2:3]
+
+which <- cumsum(surv1$strata)
+zed   <- (which[1]+1):(which[3])
+aeq(surv1$surv[zed], temp$surv)
+aeq(surv1$time[zed], temp$time)
+
+# This call should not create a model frame in the code -- so same
+#  answer but a different path through the underlying code
+fit <- coxph(Surv(time, status) ~ age + sex + meal.cal + strata(ph.ecog),
+		x=T, data=cancer)
+surv2 <- survfit(fit)
+all.equal(surv1, surv2)
+
+#
+# Now a result with a matrix of survival curves
+#
+dummy <- data.frame(age=c(30,40,60), sex=c(1,2,2), meal.cal=c(500, 1000, 1500))
+surv2 <- survfit(fit, newdata=dummy)
+
+zed <- 1:which[1]
+aeq(surv2$surv[zed,1], surv2[1,1]$surv)
+aeq(surv2$surv[zed,2], surv2[1,2]$surv)
+aeq(surv2$surv[zed,3], surv2[1,3]$surv)
+aeq(surv2$surv[zed, ], surv2[1,1:3]$surv)
+aeq(surv2$surv[zed],   (surv2[1]$surv)[,1])
+aeq(surv2$surv[zed, ], surv2[1, ]$surv)
+
+fit <- coxph(Surv(time, status) ~ age + sex + meal.cal + strata(ph.ecog),
+		data=cancer)
+
+surv1 <- survfit(fit)
+temp <- surv1[2:3]
+
+which <- cumsum(surv1$strata)
+zed   <- (which[1]+1):(which[3])
+aeq(surv1$surv[zed], temp$surv)
+aeq(surv1$time[zed], temp$time)
+
+# This call should not create a model frame in the code -- so same
+#  answer but a different path through the underlying code
+fit <- coxph(Surv(time, status) ~ age + sex + meal.cal + strata(ph.ecog),
+		x=T, data=cancer)
+surv2 <- survfit(fit)
+all.equal(surv1, surv2)
+
+#
+# Now a result with a matrix of survival curves
+#
+dummy <- data.frame(age=c(30,40,60), sex=c(1,2,2), meal.cal=c(500, 1000, 1500))
+surv2 <- survfit(fit, newdata=dummy)
+
+zed <- 1:which[1]
+aeq(surv2$surv[zed,1], surv2[1,1]$surv)
+aeq(surv2$surv[zed,2], surv2[1,2]$surv)
+aeq(surv2$surv[zed,3], surv2[1,3]$surv)
+aeq(surv2$surv[zed, ], surv2[1,1:3]$surv)
+aeq(surv2$surv[zed],   (surv2[1]$surv)[,1])
+aeq(surv2$surv[zed, ], surv2[1, ]$surv)
+
+# And the depreciated form - call with a named vector as 'newdata'
+#  the resulting $call component  won't match so delete it before comparing
+surv3 <- survfit(fit, c(age=40, sex=2, meal.cal=1000))
+all.equal(unclass(surv2[,2])[-length(surv3)], unclass(surv3)[-length(surv3)])
+
+rm(fit, surv1, temp, which, zed,dummy, surv2, surv3)
+
diff --git a/win32/deps/library/survival/tests/coxsurv.Rout.save b/win32/deps/library/survival/tests/coxsurv.Rout.save
new file mode 100644
index 0000000..ef2f7a1
--- /dev/null
+++ b/win32/deps/library/survival/tests/coxsurv.Rout.save
@@ -0,0 +1,119 @@
+
+R version 2.12.1 (2010-12-16)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Test out subscripting in the case of a coxph survival curve
+> #
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> fit <- coxph(Surv(time, status) ~ age + sex + meal.cal + strata(ph.ecog),
++ 		data=cancer)
+> 
+> surv1 <- survfit(fit)
+> temp <- surv1[2:3]
+> 
+> which <- cumsum(surv1$strata)
+> zed   <- (which[1]+1):(which[3])
+> aeq(surv1$surv[zed], temp$surv)
+[1] TRUE
+> aeq(surv1$time[zed], temp$time)
+[1] TRUE
+> 
+> # This call should not create a model frame in the code -- so same
+> #  answer but a different path through the underlying code
+> fit <- coxph(Surv(time, status) ~ age + sex + meal.cal + strata(ph.ecog),
++ 		x=T, data=cancer)
+> surv2 <- survfit(fit)
+> all.equal(surv1, surv2)
+[1] TRUE
+> 
+> #
+> # Now a result with a matrix of survival curves
+> #
+> dummy <- data.frame(age=c(30,40,60), sex=c(1,2,2), meal.cal=c(500, 1000, 1500))
+> surv2 <- survfit(fit, newdata=dummy)
+> 
+> zed <- 1:which[1]
+> aeq(surv2$surv[zed,1], surv2[1,1]$surv)
+[1] TRUE
+> aeq(surv2$surv[zed,2], surv2[1,2]$surv)
+[1] TRUE
+> aeq(surv2$surv[zed,3], surv2[1,3]$surv)
+[1] TRUE
+> aeq(surv2$surv[zed, ], surv2[1,1:3]$surv)
+[1] TRUE
+> aeq(surv2$surv[zed],   (surv2[1]$surv)[,1])
+[1] TRUE
+> aeq(surv2$surv[zed, ], surv2[1, ]$surv)
+[1] TRUE
+> 
+> fit <- coxph(Surv(time, status) ~ age + sex + meal.cal + strata(ph.ecog),
++ 		data=cancer)
+> 
+> surv1 <- survfit(fit)
+> temp <- surv1[2:3]
+> 
+> which <- cumsum(surv1$strata)
+> zed   <- (which[1]+1):(which[3])
+> aeq(surv1$surv[zed], temp$surv)
+[1] TRUE
+> aeq(surv1$time[zed], temp$time)
+[1] TRUE
+> 
+> # This call should not create a model frame in the code -- so same
+> #  answer but a different path through the underlying code
+> fit <- coxph(Surv(time, status) ~ age + sex + meal.cal + strata(ph.ecog),
++ 		x=T, data=cancer)
+> surv2 <- survfit(fit)
+> all.equal(surv1, surv2)
+[1] TRUE
+> 
+> #
+> # Now a result with a matrix of survival curves
+> #
+> dummy <- data.frame(age=c(30,40,60), sex=c(1,2,2), meal.cal=c(500, 1000, 1500))
+> surv2 <- survfit(fit, newdata=dummy)
+> 
+> zed <- 1:which[1]
+> aeq(surv2$surv[zed,1], surv2[1,1]$surv)
+[1] TRUE
+> aeq(surv2$surv[zed,2], surv2[1,2]$surv)
+[1] TRUE
+> aeq(surv2$surv[zed,3], surv2[1,3]$surv)
+[1] TRUE
+> aeq(surv2$surv[zed, ], surv2[1,1:3]$surv)
+[1] TRUE
+> aeq(surv2$surv[zed],   (surv2[1]$surv)[,1])
+[1] TRUE
+> aeq(surv2$surv[zed, ], surv2[1, ]$surv)
+[1] TRUE
+> 
+> # And the depreciated form - call with a named vector as 'newdata'
+> #  the resulting $call component  won't match so delete it before comparing
+> surv3 <- survfit(fit, c(age=40, sex=2, meal.cal=1000))
+> all.equal(unclass(surv2[,2])[-length(surv3)], unclass(surv3)[-length(surv3)])
+[1] TRUE
+> 
+> rm(fit, surv1, temp, which, zed,dummy, surv2, surv3)
+> 
+> 
diff --git a/win32/deps/library/survival/tests/coxsurv2.R b/win32/deps/library/survival/tests/coxsurv2.R
new file mode 100644
index 0000000..21ff309
--- /dev/null
+++ b/win32/deps/library/survival/tests/coxsurv2.R
@@ -0,0 +1,58 @@
+library(survival)
+#
+# Check that the survival curves from a Cox model with beta=0 
+#  match ordinary survival
+#
+#  Aalen
+surv1 <- survfit(Surv(time,status) ~ sex, data=lung, type='fleming',
+                 error='tsiatis')
+fit1 <- coxph(Surv(time, status) ~ age + strata(sex), data=lung, iter=0,
+              method='breslow')
+fit1$var <- 0*fit1$var   #sneaky, causes the extra term in the Cox variance
+                         # calculation to be zero
+surv2 <- survfit(fit1, type='aalen', vartype='tsiatis')
+surv3 <- survfit(fit1)
+
+arglist <- c('n', 'time', 'n.risk','n.event', 'n.censor', 'surv', 'strata',
+             'std.err', 'upper', 'lower')
+all.equal(unclass(surv1)[arglist], unclass(surv2)[arglist])
+all.equal(unclass(surv1)[arglist], unclass(surv3)[arglist])
+
+
+# Efron method
+surv1 <- survfit(Surv(time,status) ~ sex, data=lung, type='fh2',
+                 error='tsiatis')
+surv2 <- survfit(fit1, type='efron', vartype='efron')
+all.equal(unclass(surv1)[arglist], unclass(surv2)[arglist])
+
+# Kaplan-Meier
+surv1 <- survfit(Surv(time,status) ~ sex, data=lung)
+surv2 <- survfit(fit1, type='kalb', vartype='green')
+all.equal(unclass(surv1)[arglist], unclass(surv2)[arglist])
+
+
+# Now add some random weights
+rwt <- runif(nrow(lung), .5, 3)
+surv1 <- survfit(Surv(time,status) ~ sex, data=lung, type='fleming',
+                 error='tsiatis', weight=rwt)
+fit1 <- coxph(Surv(time, status) ~ age + strata(sex), data=lung, iter=0,
+              method='breslow', weight=rwt)
+fit1$var <- 0*fit1$var   #sneaky
+surv2 <- survfit(fit1, type='aalen', vartype='tsiatis')
+surv3 <- survfit(fit1)
+
+all.equal(unclass(surv1)[arglist], unclass(surv2)[arglist])
+all.equal(unclass(surv1)[arglist], unclass(surv3)[arglist])
+
+
+# Efron method
+surv1 <- survfit(Surv(time,status) ~ sex, data=lung, type='fh2',
+                 error='tsiatis', weight=rwt)
+surv2 <- survfit(fit1, type='efron', vartype='efron')
+all.equal(unclass(surv1)[arglist], unclass(surv2)[arglist])
+
+# Kaplan-Meier
+surv1 <- survfit(Surv(time,status) ~ sex, data=lung, weight=rwt)
+surv2 <- survfit(fit1, type='kalb', vartype='green')
+all.equal(unclass(surv1)[arglist], unclass(surv2)[arglist])
+
diff --git a/win32/deps/library/survival/tests/coxsurv2.Rout.save b/win32/deps/library/survival/tests/coxsurv2.Rout.save
new file mode 100644
index 0000000..226a5d7
--- /dev/null
+++ b/win32/deps/library/survival/tests/coxsurv2.Rout.save
@@ -0,0 +1,85 @@
+
+R version 2.11.1 (2010-05-31)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(survival)
+Loading required package: splines
+> #
+> # Check that the survival curves from a Cox model with beta=0 
+> #  match ordinary survival
+> #
+> #  Aalen
+> surv1 <- survfit(Surv(time,status) ~ sex, data=lung, type='fleming',
++                  error='tsiatis')
+> fit1 <- coxph(Surv(time, status) ~ age + strata(sex), data=lung, iter=0,
++               method='breslow')
+> fit1$var <- 0*fit1$var   #sneaky, causes the extra term in the Cox variance
+>                          # calculation to be zero
+> surv2 <- survfit(fit1, type='aalen', vartype='tsiatis')
+> surv3 <- survfit(fit1)
+> 
+> arglist <- c('n', 'time', 'n.risk','n.event', 'n.censor', 'surv', 'strata',
++              'std.err', 'upper', 'lower')
+> all.equal(unclass(surv1)[arglist], unclass(surv2)[arglist])
+[1] TRUE
+> all.equal(unclass(surv1)[arglist], unclass(surv3)[arglist])
+[1] TRUE
+> 
+> 
+> # Efron method
+> surv1 <- survfit(Surv(time,status) ~ sex, data=lung, type='fh2',
++                  error='tsiatis')
+> surv2 <- survfit(fit1, type='efron', vartype='efron')
+> all.equal(unclass(surv1)[arglist], unclass(surv2)[arglist])
+[1] TRUE
+> 
+> # Kaplan-Meier
+> surv1 <- survfit(Surv(time,status) ~ sex, data=lung)
+> surv2 <- survfit(fit1, type='kalb', vartype='green')
+> all.equal(unclass(surv1)[arglist], unclass(surv2)[arglist])
+[1] TRUE
+> 
+> 
+> # Now add some random weights
+> rwt <- runif(nrow(lung), .5, 3)
+> surv1 <- survfit(Surv(time,status) ~ sex, data=lung, type='fleming',
++                  error='tsiatis', weight=rwt)
+> fit1 <- coxph(Surv(time, status) ~ age + strata(sex), data=lung, iter=0,
++               method='breslow', weight=rwt)
+> fit1$var <- 0*fit1$var   #sneaky
+> surv2 <- survfit(fit1, type='aalen', vartype='tsiatis')
+> surv3 <- survfit(fit1)
+> 
+> all.equal(unclass(surv1)[arglist], unclass(surv2)[arglist])
+[1] TRUE
+> all.equal(unclass(surv1)[arglist], unclass(surv3)[arglist])
+[1] TRUE
+> 
+> 
+> # Efron method
+> surv1 <- survfit(Surv(time,status) ~ sex, data=lung, type='fh2',
++                  error='tsiatis', weight=rwt)
+> surv2 <- survfit(fit1, type='efron', vartype='efron')
+> all.equal(unclass(surv1)[arglist], unclass(surv2)[arglist])
+[1] TRUE
+> 
+> # Kaplan-Meier
+> surv1 <- survfit(Surv(time,status) ~ sex, data=lung, weight=rwt)
+> surv2 <- survfit(fit1, type='kalb', vartype='green')
+> all.equal(unclass(surv1)[arglist], unclass(surv2)[arglist])
+[1] TRUE
+> 
+> 
diff --git a/win32/deps/library/survival/tests/coxsurv3.R b/win32/deps/library/survival/tests/coxsurv3.R
new file mode 100644
index 0000000..902130e
--- /dev/null
+++ b/win32/deps/library/survival/tests/coxsurv3.R
@@ -0,0 +1,98 @@
+library(survival)
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+# One more test on coxph survival curves, to test out the individual
+#  option.  First fit a model with a time dependent covariate
+#
+test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
+                    stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
+                    event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
+                    x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+
+# True hazard function, from the validation document
+lambda <- function(beta, x=0, method='efron') {
+    r <- exp(beta)
+    lambda <- c(1/(r+1), 1/(r+2), 1/(3*r +2), 1/(3*r+1),
+                1/(3*r+1), 1/(3*r+2) + 1/(2*r +2))
+    if (method == 'breslow') lambda[9] <- 2/(3*r +2)
+    list(time=c(2,3,6,7,8,9), lambda=lambda)
+    }
+
+fit <- coxph(Surv(start, stop, event) ~x, test2)
+# A curve for someone who never changes
+surv1 <-survfit(fit, newdata=list(x=0), censor=FALSE)
+
+true <- lambda(fit$coef, 0)
+
+aeq(true$time, surv1$time)
+aeq(-log(surv1$surv), cumsum(true$lambda))
+
+# Reprise it with a time dependent subject who doesn't change
+data2 <- data.frame(start=c(0, 4, 9, 11), stop=c(4, 9, 11, 17),
+                      event=c(0,0,0,0), x=c(0,0,0,0))
+surv2 <- survfit(fit, newdata=data2, individual=TRUE, censor=FALSE)
+aeq(surv2$surv, surv1$surv)
+
+
+#
+# Now a more complex data set with multiple strata
+#
+test3 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8,
+                            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
+                    stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17,
+                            1:11),
+                    event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0,
+                            0, 1, 1, 0, 0, 1, 1, 0, 1, 0,1),
+                    x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0,
+                            1, 2, 3, 2, 1, 1, 1, 0, 2, 1,0),
+                    grp = c(rep('a', 10), rep('b', 11)))
+
+fit2 <- coxph(Surv(start, stop, event) ~ x + strata(grp), test3)
+
+# The above tests show the program works for a simple case, use it to
+#  get a true baseline for strata 2
+fit2b <- coxph(Surv(start, stop, event) ~x, test3,
+               subset=(grp=='b'), init=fit2$coef, iter=0)
+temp <- survfit(fit2b,  newdata=list(x=0), censor=F)
+true2 <- list(time=temp$time, lambda=diff(c(0, -log(temp$surv))))
+true1 <- lambda(fit2$coef, x=0)
+
+# Separate strata, one value
+surv3 <- survfit(fit2, list(x=0), censor=FALSE)
+aeq(true1$time, (surv3[1])$time)
+aeq(-log(surv3[1]$surv), cumsum(true1$lambda))
+
+data4 <- data.frame(start=c(0, 4, 9, 11), stop=c(4, 9, 11, 17),
+                      event=c(0,0,0,0), x=c(0,0,0,0), grp=rep('a', 4))
+surv4a <- survfit(fit2, newdata=data4, individual=T, censor=FALSE)
+aeq(-log(surv4a$surv), cumsum(true1$lambda))
+
+data4$grp <- rep('b',4)
+surv4b <- survfit(fit2, newdata=data4, individual=T, censor=FALSE)
+aeq(-log(surv4b$surv), cumsum(true2$lambda))
+
+
+# Now for something more complex
+# Subject 1 skips day 4.  Since there were no events that day the survival
+#  will be the same, but the times will be different.
+# Subject 2 spends some time in strata 1, some in strata 2, with
+#   moving covariates
+#
+data5 <- data.frame(start=c(0,5,9,11,
+                             0, 4, 3),
+                    stop =c(4,9,11,17, 4,8,7),
+                    event=rep(0,7),
+                    x=c(1,1,1,1, 0,1,2),
+                    grp=c('a', 'a', 'a', 'a', 'a', 'a', 'b'),
+                    subject=c(1,1,1,1, 2,2,2))
+surv5 <- survfit(fit2, newdata=data5, censor=FALSE, id=subject)
+
+aeq(surv5[1]$time, c(2,3,5,6,7,8))  #surv1 has 2, 3, 6, 7, 8, 9
+aeq(surv5[1]$surv, surv3[1]$surv ^ exp(fit2$coef))
+
+tlam <- c(true1$lambda[1:2]* exp(fit2$coef * data5$x[5]),
+          true1$lambda[3:5]* exp(fit2$coef * data5$x[6]),      
+          true2$lambda[3:4]* exp(fit2$coef * data5$x[7]))
+aeq(-log(surv5[2]$surv), cumsum(tlam))
+
+                          
+                          
diff --git a/win32/deps/library/survival/tests/coxsurv3.Rout.save b/win32/deps/library/survival/tests/coxsurv3.Rout.save
new file mode 100644
index 0000000..bc1b1cc
--- /dev/null
+++ b/win32/deps/library/survival/tests/coxsurv3.Rout.save
@@ -0,0 +1,127 @@
+
+R version 2.11.0 (2010-04-22)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(survival)
+Loading required package: splines
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> # One more test on coxph survival curves, to test out the individual
+> #  option.  First fit a model with a time dependent covariate
+> #
+> test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
++                     stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
++                     event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
++                     x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+> 
+> # True hazard function, from the validation document
+> lambda <- function(beta, x=0, method='efron') {
++     r <- exp(beta)
++     lambda <- c(1/(r+1), 1/(r+2), 1/(3*r +2), 1/(3*r+1),
++                 1/(3*r+1), 1/(3*r+2) + 1/(2*r +2))
++     if (method == 'breslow') lambda[9] <- 2/(3*r +2)
++     list(time=c(2,3,6,7,8,9), lambda=lambda)
++     }
+> 
+> fit <- coxph(Surv(start, stop, event) ~x, test2)
+> # A curve for someone who never changes
+> surv1 <-survfit(fit, newdata=list(x=0), censor=FALSE)
+> 
+> true <- lambda(fit$coef, 0)
+> 
+> aeq(true$time, surv1$time)
+[1] TRUE
+> aeq(-log(surv1$surv), cumsum(true$lambda))
+[1] TRUE
+> 
+> # Reprise it with a time dependent subject who doesn't change
+> data2 <- data.frame(start=c(0, 4, 9, 11), stop=c(4, 9, 11, 17),
++                       event=c(0,0,0,0), x=c(0,0,0,0))
+> surv2 <- survfit(fit, newdata=data2, individual=TRUE, censor=FALSE)
+> aeq(surv2$surv, surv1$surv)
+[1] TRUE
+> 
+> 
+> #
+> # Now a more complex data set with multiple strata
+> #
+> test3 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8,
++                             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
++                     stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17,
++                             1:11),
++                     event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0,
++                             0, 1, 1, 0, 0, 1, 1, 0, 1, 0,1),
++                     x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0,
++                             1, 2, 3, 2, 1, 1, 1, 0, 2, 1,0),
++                     grp = c(rep('a', 10), rep('b', 11)))
+> 
+> fit2 <- coxph(Surv(start, stop, event) ~ x + strata(grp), test3)
+> 
+> # The above tests show the program works for a simple case, use it to
+> #  get a true baseline for strata 2
+> fit2b <- coxph(Surv(start, stop, event) ~x, test3,
++                subset=(grp=='b'), init=fit2$coef, iter=0)
+> temp <- survfit(fit2b,  newdata=list(x=0), censor=F)
+> true2 <- list(time=temp$time, lambda=diff(c(0, -log(temp$surv))))
+> true1 <- lambda(fit2$coef, x=0)
+> 
+> # Separate strata, one value
+> surv3 <- survfit(fit2, list(x=0), censor=FALSE)
+> aeq(true1$time, (surv3[1])$time)
+[1] TRUE
+> aeq(-log(surv3[1]$surv), cumsum(true1$lambda))
+[1] TRUE
+> 
+> data4 <- data.frame(start=c(0, 4, 9, 11), stop=c(4, 9, 11, 17),
++                       event=c(0,0,0,0), x=c(0,0,0,0), grp=rep('a', 4))
+> surv4a <- survfit(fit2, newdata=data4, individual=T, censor=FALSE)
+> aeq(-log(surv4a$surv), cumsum(true1$lambda))
+[1] TRUE
+> 
+> data4$grp <- rep('b',4)
+> surv4b <- survfit(fit2, newdata=data4, individual=T, censor=FALSE)
+> aeq(-log(surv4b$surv), cumsum(true2$lambda))
+[1] TRUE
+> 
+> 
+> # Now for something more complex
+> # Subject 1 skips day 4.  Since there were no events that day the survival
+> #  will be the same, but the times will be different.
+> # Subject 2 spends some time in strata 1, some in strata 2, with
+> #   moving covariates
+> #
+> data5 <- data.frame(start=c(0,5,9,11,
++                              0, 4, 3),
++                     stop =c(4,9,11,17, 4,8,7),
++                     event=rep(0,7),
++                     x=c(1,1,1,1, 0,1,2),
++                     grp=c('a', 'a', 'a', 'a', 'a', 'a', 'b'),
++                     subject=c(1,1,1,1, 2,2,2))
+> surv5 <- survfit(fit2, newdata=data5, censor=FALSE, id=subject)
+> 
+> aeq(surv5[1]$time, c(2,3,5,6,7,8))  #surv1 has 2, 3, 6, 7, 8, 9
+[1] TRUE
+> aeq(surv5[1]$surv, surv3[1]$surv ^ exp(fit2$coef))
+[1] TRUE
+> 
+> tlam <- c(true1$lambda[1:2]* exp(fit2$coef * data5$x[5]),
++           true1$lambda[3:5]* exp(fit2$coef * data5$x[6]),      
++           true2$lambda[3:4]* exp(fit2$coef * data5$x[7]))
+> aeq(-log(surv5[2]$surv), cumsum(tlam))
+[1] TRUE
+> 
+>                           
+>                           
+> 
diff --git a/win32/deps/library/survival/tests/coxsurv4.R b/win32/deps/library/survival/tests/coxsurv4.R
new file mode 100644
index 0000000..d6f82bc
--- /dev/null
+++ b/win32/deps/library/survival/tests/coxsurv4.R
@@ -0,0 +1,49 @@
+library(survival)
+
+# Strata by covariate interactions, a case pointed out in early 2011
+#  by Frank Harrell, which as it turns out had never been computed
+#  correctly by any version of the package.  This shows how often this
+#  case arises in practice.
+#
+
+fit1 <- coxph(Surv(time, status) ~ wt.loss + age*strata(sex) + strata(ph.ecog),
+              data=lung)
+surv1 <- survfit(fit1, newdata=list(wt.loss=c(10,5), age=c(50,60)))
+
+fit2 <- coxph(Surv(time, status) ~ wt.loss + age + I(age*0), data=lung, 
+              init=fit1$coef, iter=0, subset=(sex==1 & ph.ecog==0))
+fit2$var <- fit1$var
+
+surv2 <- survfit(fit2, newdata=list(wt.loss=c(10,5), age=c(50,60)))
+
+nocall <- length(surv2)  # the calls won't be the same
+all.equal(unclass(surv1[1,])[-nocall], unclass(surv2)[-nocall])
+
+fit3 <- coxph(Surv(time, status) ~ wt.loss + age + I(age*0),
+              data=lung, init=fit1$coef, iter=0,
+              subset=(sex==1 & ph.ecog==1))
+fit3$var <- fit1$var
+surv3 <- survfit(fit3, newdata=list(wt.loss=c(10,5), age=c(50,60)))
+all.equal(surv1[2,]$surv, surv3$surv)
+all.equal(surv1[2,]$std, surv3$std)
+
+fit4 <- coxph(Surv(time, status) ~ wt.loss + age + I(age),
+              data=lung, init=fit1$coef, iter=0,
+              subset=(sex==2 & ph.ecog==1))
+fit4$var <- fit1$var
+surv4 <- survfit(fit4, newdata=list(wt.loss=c(10,5), age=c(50,60)))
+
+all.equal(surv1[6,]$surv, surv4$surv)
+all.equal(surv1[6,]$std.err, surv4$std.err)
+             
+fit5 <- coxph(Surv(time, status) ~ wt.loss + age + I(age) + strata(ph.ecog),
+              data=lung, init=fit1$coef, iter=0,
+              subset=(sex==2))
+fit5$var <- fit1$var
+surv5 <- survfit(fit5, newdata=list(wt.loss=c(10,5), age=c(50,60)))
+temp1 <- surv1[5:7,]
+temp2 <- surv5[1:3,]
+all.equal(temp1$strata, temp2$strata, check.attributes=FALSE)
+nlist <- c('n', 'time', 'n.risk', 'n.event', 'n.censor', 'surv', 
+           'std.err')
+all.equal(unclass(temp1)[nlist], unclass(temp2)[nlist])
diff --git a/win32/deps/library/survival/tests/coxsurv4.Rout.save b/win32/deps/library/survival/tests/coxsurv4.Rout.save
new file mode 100644
index 0000000..19c9e66
--- /dev/null
+++ b/win32/deps/library/survival/tests/coxsurv4.Rout.save
@@ -0,0 +1,75 @@
+
+R version 2.11.0 (2010-04-22)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(survival)
+Loading required package: splines
+> 
+> # Strata by covariate interactions, a case pointed out in early 2011
+> #  by Frank Harrell, which as it turns out had never been computed
+> #  correctly by any version of the package.  This shows how often this
+> #  case arises in practice.
+> #
+> 
+> fit1 <- coxph(Surv(time, status) ~ wt.loss + age*strata(sex) + strata(ph.ecog),
++               data=lung)
+> surv1 <- survfit(fit1, newdata=list(wt.loss=c(10,5), age=c(50,60)))
+> 
+> fit2 <- coxph(Surv(time, status) ~ wt.loss + age + I(age*0), data=lung, 
++               init=fit1$coef, iter=0, subset=(sex==1 & ph.ecog==0))
+> fit2$var <- fit1$var
+> 
+> surv2 <- survfit(fit2, newdata=list(wt.loss=c(10,5), age=c(50,60)))
+> 
+> nocall <- length(surv2)  # the calls won't be the same
+> all.equal(unclass(surv1[1,])[-nocall], unclass(surv2)[-nocall])
+[1] TRUE
+> 
+> fit3 <- coxph(Surv(time, status) ~ wt.loss + age + I(age*0),
++               data=lung, init=fit1$coef, iter=0,
++               subset=(sex==1 & ph.ecog==1))
+> fit3$var <- fit1$var
+> surv3 <- survfit(fit3, newdata=list(wt.loss=c(10,5), age=c(50,60)))
+> all.equal(surv1[2,]$surv, surv3$surv)
+[1] TRUE
+> all.equal(surv1[2,]$std, surv3$std)
+[1] TRUE
+> 
+> fit4 <- coxph(Surv(time, status) ~ wt.loss + age + I(age),
++               data=lung, init=fit1$coef, iter=0,
++               subset=(sex==2 & ph.ecog==1))
+> fit4$var <- fit1$var
+> surv4 <- survfit(fit4, newdata=list(wt.loss=c(10,5), age=c(50,60)))
+> 
+> all.equal(surv1[6,]$surv, surv4$surv)
+[1] TRUE
+> all.equal(surv1[6,]$std.err, surv4$std.err)
+[1] TRUE
+>              
+> fit5 <- coxph(Surv(time, status) ~ wt.loss + age + I(age) + strata(ph.ecog),
++               data=lung, init=fit1$coef, iter=0,
++               subset=(sex==2))
+> fit5$var <- fit1$var
+> surv5 <- survfit(fit5, newdata=list(wt.loss=c(10,5), age=c(50,60)))
+> temp1 <- surv1[5:7,]
+> temp2 <- surv5[1:3,]
+> all.equal(temp1$strata, temp2$strata, check.attributes=FALSE)
+[1] TRUE
+> nlist <- c('n', 'time', 'n.risk', 'n.event', 'n.censor', 'surv', 
++            'std.err')
+> all.equal(unclass(temp1)[nlist], unclass(temp2)[nlist])
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/data.capacitor b/win32/deps/library/survival/tests/data.capacitor
new file mode 100644
index 0000000..0cbea67
--- /dev/null
+++ b/win32/deps/library/survival/tests/data.capacitor
@@ -0,0 +1,125 @@
+  1 300.00     0      20
+  2 300.00     0      20
+  3 300.00     0      20
+  4 300.00     0      20
+  5 300.00     0      20
+  6 300.00     0      20
+  7 300.00     0      20
+  8 300.00     0      20
+  9 300.00     0      20
+ 10 300.00     0      20
+ 11 300.00     0      20
+ 12 300.00     0      20
+ 13 300.00     0      20
+ 14 300.00     0      20
+ 15 300.00     0      20
+ 16 300.00     0      20
+ 17 300.00     0      20
+ 18 300.00     0      20
+ 19 300.00     0      20
+ 20 300.00     0      20
+ 21 300.00     0      20
+ 22 300.00     0      20
+ 23 300.00     0      20
+ 24 300.00     0      20
+ 25 300.00     0      20
+ 26 277.33     1      26
+ 27 187.80     1      26
+ 28 214.28     1      26
+ 29  12.95     1      26
+ 30  63.10     1      26
+ 31 271.73     1      26
+ 32 201.28     1      26
+ 33 179.02     1      26
+ 34 139.37     1      26
+ 35 136.33     1      26
+ 36  28.41     1      26
+ 37 300.00     0      26
+ 38 300.00     0      26
+ 39 300.00     0      26
+ 40 300.00     0      26
+ 41 300.00     0      26
+ 42 300.00     0      26
+ 43 300.00     0      26
+ 44 300.00     0      26
+ 45 300.00     0      26
+ 46 300.00     0      26
+ 47 300.00     0      26
+ 48 300.00     0      26
+ 49 300.00     0      26
+ 50 300.00     0      26
+ 51 300.00     0      26
+ 52 300.00     0      26
+ 53 300.00     0      26
+ 54 300.00     0      26
+ 55 300.00     0      26
+ 56 300.00     0      26
+ 57 300.00     0      26
+ 58 300.00     0      26
+ 59 300.00     0      26
+ 60 300.00     0      26
+ 61 300.00     0      26
+ 62 300.00     0      26
+ 63 300.00     0      26
+ 64 300.00     0      26
+ 65 300.00     0      26
+ 66 300.00     0      26
+ 67 300.00     0      26
+ 68 300.00     0      26
+ 69 300.00     0      26
+ 70 300.00     0      26
+ 71 300.00     0      26
+ 72 300.00     0      26
+ 73 300.00     0      26
+ 74 300.00     0      26
+ 75 300.00     0      26
+ 76  45.85     1      29
+ 77 220.70     1      29
+ 78  73.87     1      29
+ 79  91.81     1      29
+ 80  40.69     1      29
+ 81 108.62     1      29
+ 82  55.73     1      29
+ 83  10.21     1      29
+ 84 102.64     1      29
+ 85 257.88     1      29
+ 86  50.41     1      29
+ 87 164.20     1      29
+ 88 112.15     1      29
+ 89 300.00     0      29
+ 90 300.00     0      29
+ 91 300.00     0      29
+ 92 300.00     0      29
+ 93 300.00     0      29
+ 94 300.00     0      29
+ 95 300.00     0      29
+ 96 118.37     1      32
+ 97  17.19     1      32
+ 98  11.51     1      32
+ 99   4.65     1      32
+100   1.95     1      32
+101 149.20     1      32
+102  65.79     1      32
+103   5.95     1      32
+104   5.72     1      32
+105  10.61     1      32
+106   0.68     1      32
+107   3.96     1      32
+108   9.56     1      32
+109 172.05     1      32
+110   2.81     1      32
+111   2.07     1      32
+112  19.98     1      32
+113  84.63     1      32
+114 132.52     1      32
+115 156.37     1      32
+116  11.81     1      32
+117  20.86     1      32
+118  66.33     1      32
+119  21.64     1      32
+120  65.90     1      32
+121  14.64     1      32
+122   6.26     1      32
+123  94.08     1      32
+124   5.45     1      32
+125  15.16     1      32
diff --git a/win32/deps/library/survival/tests/data.cracks b/win32/deps/library/survival/tests/data.cracks
new file mode 100644
index 0000000..48041a7
--- /dev/null
+++ b/win32/deps/library/survival/tests/data.cracks
@@ -0,0 +1,9 @@
+NA 	6.12 	5
+6.12 	19.92	16
+19.92	29.64	12
+29.64	35.40	18
+35.40	39.72	18
+39.72	45.24	2
+45.24	52.32	6
+52.32	63.48	17
+63.48	NA	73
diff --git a/win32/deps/library/survival/tests/data.donnell b/win32/deps/library/survival/tests/data.donnell
new file mode 100644
index 0000000..5eaf8d1
--- /dev/null
+++ b/win32/deps/library/survival/tests/data.donnell
@@ -0,0 +1,210 @@
+0.558521561 1.000000000 0.000000000
+1.059548255 1.000000000 0.000000000
+1.659137577 1.000000000 0.000000000
+0.561259411 1.000000000 0.000000000
+1.108829569 1.000000000 0.000000000
+1.530458590 1.000000000 0.000000000
+0.550308008 1.000000000 0.000000000
+1.065023956 1.000000000 0.000000000
+1.546885695 1.000000000 0.000000000
+0.668035592 1.000000000 0.000000000
+1.048596851 1.000000000 0.000000000
+1.549623546 1.000000000 0.000000000
+0.594113621 1.000000000 0.000000000
+1.010266940 1.000000000 0.000000000
+1.577002053 1.000000000 0.000000000
+0.569472964 1.000000000 0.000000000
+1.045859001 1.000000000 0.000000000
+1.555099247 1.000000000 0.000000000
+0.605065024 1.000000000 0.000000000
+1.054072553 1.000000000 0.000000000
+1.566050650 1.000000000 0.000000000
+0.544832307 1.000000000 0.000000000
+1.048596851 1.000000000 0.000000000
+1.544147844 1.000000000 0.000000000
+0.550308008 1.000000000 0.000000000
+1.065023956 1.000000000 0.000000000
+1.568788501 1.000000000 0.000000000
+0.528405202 1.000000000 0.000000000
+1.070499658 1.000000000 0.000000000
+1.546885695 1.000000000 0.000000000
+0.813141684 1.000000000 0.000000000
+1.226557153 1.000000000 0.000000000
+1.744010951 1.000000000 0.000000000
+0.520191650 1.000000000 0.000000000
+1.075975359 1.000000000 0.000000000
+1.557837098 1.000000000 0.000000000
+0.577686516 1.000000000 0.000000000
+1.067761807 1.000000000 0.000000000
+1.590691307 1.000000000 0.000000000
+0.580424367 1.000000000 0.000000000
+1.043121150 1.000000000 0.000000000
+1.560574949 1.000000000 0.000000000
+0.539356605 1.000000000 0.000000000
+1.097878166 1.000000000 0.000000000
+1.557837098 1.000000000 0.000000000
+0.613278576 1.000000000 0.000000000
+1.065023956 1.000000000 0.000000000
+1.629021218 1.000000000 0.000000000
+0.542094456 1.000000000 0.000000000
+1.021218344 1.000000000 0.000000000
+1.535934292 1.000000000 0.000000000
+0.542094456 1.000000000 0.000000000
+1.084188912 1.000000000 0.000000000
+1.541409993 1.000000000 0.000000000
+0.479123888 1.000000000 0.000000000
+1.166324435 1.000000000 0.000000000
+1.609856263 1.000000000 0.000000000
+0.574948665 1.000000000 0.000000000
+1.032169747 1.000000000 0.000000000
+1.511293634 1.000000000 0.000000000
+0.580424367 1.000000000 0.000000000
+1.015742642 1.000000000 0.000000000
+1.593429158 1.000000000 0.000000000
+0.580424367 1.000000000 0.000000000
+0.580424367 1.059548255 3.000000000
+0.555783710 1.000000000 0.000000000
+1.073237509 1.000000000 0.000000000
+1.552361396 1.000000000 0.000000000
+0.558521561 1.000000000 0.000000000
+1.048596851 1.000000000 0.000000000
+1.549623546 1.000000000 0.000000000
+0.569472964 1.000000000 0.000000000
+1.048596851 1.000000000 0.000000000
+1.546885695 1.000000000 0.000000000
+0.591375770 1.000000000 0.000000000
+1.147159480 1.000000000 0.000000000
+1.549623546 1.000000000 0.000000000
+0.673511294 1.000000000 0.000000000
+1.111567420 1.000000000 0.000000000
+1.609856263 1.000000000 0.000000000
+0.574948665 1.000000000 0.000000000
+1.051334702 1.000000000 0.000000000
+1.566050650 1.000000000 0.000000000
+0.558521561 1.000000000 0.000000000
+1.034907598 1.000000000 0.000000000
+1.555099247 1.000000000 0.000000000
+0.539356605 1.000000000 0.000000000
+1.040383299 1.000000000 0.000000000
+1.615331964 1.000000000 0.000000000
+0.572210815 1.000000000 0.000000000
+1.056810404 1.000000000 0.000000000
+1.552361396 1.000000000 0.000000000
+0.550308008 1.000000000 0.000000000
+1.125256674 1.000000000 0.000000000
+ 1.596167009 1.000000000 0.000000000
+ 0.514715948 1.000000000 0.000000000
+ 1.010266940 1.000000000 0.000000000
+ 1.585215606 1.000000000 0.000000000
+ 0.555783710 1.000000000 0.000000000
+ 1.054072553 1.000000000 0.000000000
+ 1.566050650 1.000000000 0.000000000
+ 0.632443532 1.000000000 0.000000000
+ 1.073237509 1.000000000 0.000000000
+ 1.585215606 1.000000000 0.000000000
+ 0.569472964 1.000000000 0.000000000
+ 1.067761807 1.000000000 0.000000000
+ 1.612594114 1.000000000 0.000000000
+ 0.566735113 1.000000000 0.000000000
+ 1.125256674 1.000000000 0.000000000
+ 1.607118412 1.000000000 0.000000000
+ 0.728268309 1.000000000 0.000000000
+ 1.095140315 1.000000000 0.000000000
+ 1.634496920 1.000000000 0.000000000
+ 0.550308008 1.000000000 0.000000000
+ 1.149897331 1.000000000 0.000000000
+ 1.508555784 1.000000000 0.000000000
+ 0.553045859 1.000000000 0.000000000
+ 1.029431896 1.000000000 0.000000000
+ 1.546885695 1.000000000 0.000000000
+ 0.547570157 1.000000000 0.000000000
+ 1.070499658 1.000000000 0.000000000
+ 1.549623546 1.000000000 0.000000000
+ 0.607802875 1.000000000 0.000000000
+ 1.007529090 1.000000000 0.000000000
+ 1.508555784 1.000000000 0.000000000
+ 0.528405202 1.000000000 0.000000000
+ 1.056810404 1.000000000 0.000000000
+ 1.549623546 1.000000000 0.000000000
+ 0.522929500 1.000000000 0.000000000
+ 0.544832307 1.000000000 0.000000000
+ 1.084188912 1.000000000 0.000000000
+ 1.519507187 1.000000000 0.000000000
+ 0.563997262 1.000000000 0.000000000
+ 0.999315537 1.000000000 0.000000000
+ 1.503080082 1.000000000 0.000000000
+ 0.536618754 1.000000000 0.000000000
+ 1.103353867 1.000000000 0.000000000
+ 1.601642710 1.000000000 0.000000000
+ 0.520191650 1.000000000 0.000000000
+ 1.056810404 1.000000000 0.000000000
+ 1.541409993 1.000000000 0.000000000
+ 0.522929500 1.000000000 0.000000000
+ 1.095140315 1.000000000 0.000000000
+ 1.697467488 1.000000000 0.000000000
+ 0.659822040 1.000000000 0.000000000
+ 1.122518823 1.000000000 0.000000000
+ 1.648186174 1.000000000 0.000000000
+ 0.536618754 1.000000000 0.000000000
+ 1.078713210 1.000000000 0.000000000
+ 1.557837098 1.000000000 0.000000000
+ 0.517453799 1.000000000 0.000000000
+ 1.125256674 1.000000000 0.000000000
+ 1.571526352 1.000000000 0.000000000
+ 0.520191650 1.000000000 0.000000000
+ 1.026694045 1.000000000 0.000000000
+ 1.609856263 1.000000000 0.000000000
+ 0.561259411 1.000000000 0.000000000
+ 1.059548255 1.000000000 0.000000000
+ 1.538672142 1.000000000 0.000000000
+ 0.536618754 1.000000000 0.000000000
+ 1.021218344 1.000000000 0.000000000
+ 1.560574949 1.000000000 0.000000000
+ 0.613278576 1.000000000 0.000000000
+ 1.092402464 1.000000000 0.000000000
+ 1.596167009 1.000000000 0.000000000
+ 0.525667351 1.000000000 0.000000000
+ 1.023956194 1.000000000 0.000000000
+ 1.738535250 1.000000000 0.000000000
+ 0.542094456 1.000000000 0.000000000
+ 1.021218344 1.000000000 0.000000000
+ 1.524982888 1.000000000 0.000000000
+ 0.577686516 1.000000000 0.000000000
+ 1.097878166 1.000000000 0.000000000
+ 1.557837098 1.000000000 0.000000000
+ 0.572210815 1.000000000 0.000000000
+ 1.013004791 1.000000000 0.000000000
+ 1.516769336 1.000000000 0.000000000
+ 0.544832307 1.000000000 0.000000000
+ 0.999315537 1.000000000 0.000000000
+ 1.555099247 1.000000000 0.000000000
+ 0.536618754 1.000000000 0.000000000
+ 1.002053388 1.000000000 0.000000000
+ 1.494866530 1.000000000 0.000000000
+ 0.555783710 1.000000000 0.000000000
+ 1.059548255 1.000000000 0.000000000
+ 1.593429158 1.000000000 0.000000000
+ 0.522929500 1.000000000 0.000000000
+ 1.062286105 1.000000000 0.000000000
+ 1.571526352 1.000000000 0.000000000
+ 0.580424367 1.000000000 0.000000000
+ 1.037645448 1.000000000 0.000000000
+ 1.670088980 1.000000000 0.000000000
+ 0.536618754 1.000000000 0.000000000
+ 1.073237509 1.000000000 0.000000000
+ 1.494866530 1.000000000 0.000000000
+ 0.539356605 1.000000000 0.000000000
+ 1.054072553 1.000000000 0.000000000
+ 1.533196441 1.000000000 0.000000000
+ 0.670773443 1.000000000 0.000000000
+ 1.004791239 1.000000000 0.000000000
+ 0.580424367 1.059548255 3.000000000
+ 0.985626283 1.503080082 3.000000000
+ 0.002737851 0.539356605 3.000000000
+ 1.062286105 1.541409993 3.000000000
+ 0.002737851 0.501026694 3.000000000
+ 0.002737851 0.574948665 3.000000000
+ 0.002737851 0.583162218 3.000000000
+ 1.037645448 1.516769336 3.000000000
+ 0.574948665 1.114305270 3.000000000
+ 0.002737851 0.528405202 3.000000000
diff --git a/win32/deps/library/survival/tests/data.fluid b/win32/deps/library/survival/tests/data.fluid
new file mode 100644
index 0000000..cd55d26
--- /dev/null
+++ b/win32/deps/library/survival/tests/data.fluid
@@ -0,0 +1,41 @@
+   5.79 26kV 
+1579.52 26kV 
+2323.70 26kV    
+   7.74 30kV 
+  17.05 30kV   
+  20.46 30kV 
+  21.02 30kV   
+  22.66 30kV 
+  43.40 30kV  
+  47.30 30kV 
+ 139.07 30kV  
+ 144.12 30kV 
+ 175.88 30kV  
+ 194.90 30kV 
+   0.19 34kV  
+   0.78 34kV 
+   0.96 34kV   
+   1.31 34kV 
+   2.78 34kV  
+   3.16 34kV 
+   4.15 34kV   
+   4.67 34kV 
+   4.85 34kV  
+   6.50 34kV 
+   7.35 34kV   
+   8.01 34kV 
+   8.27 34kV  
+  12.06 34kV 
+  31.75 34kV  
+  32.52 34kV 
+  33.91 34kV  
+  36.71 34kV 
+  72.89 34kV  
+   0.09 38kV 
+   0.39 38kV   
+   0.47 38kV 
+   0.73 38kV  
+   0.74 38kV 
+   1.13 38kV   
+   1.40 38kV 
+   2.38 38kV              
diff --git a/win32/deps/library/survival/tests/data.interval b/win32/deps/library/survival/tests/data.interval
new file mode 100644
index 0000000..309d59d
--- /dev/null
+++ b/win32/deps/library/survival/tests/data.interval
@@ -0,0 +1,30 @@
+ This data set is to test interval censoring.  It has 2 left censored, 14
+right censored, 2 exact and 8 interval censored observations, grafted onto
+covariates from the ovarian data set.
+"ltime","rtime","age","resid.ds","rx","ecog.ps"
+"1",NA,150,72.3315,2,1,1
+"2",NA,150,74.4932,2,1,1
+"3",146,166,66.4658,2,1,2
+"4",421,NA,53.3644,2,2,1
+"5",421,421,50.3397,2,1,1
+"6",448,NA,56.4301,1,1,2
+"7",454,474,56.937,2,2,2
+"8",465,485,59.8548,2,2,2
+"9",477,NA,64.1753,2,1,1
+"10",553,573,55.1781,1,2,2
+"11",628,648,56.7562,1,1,2
+"12",744,NA,50.1096,1,2,1
+"13",769,NA,59.6301,2,2,2
+"14",770,NA,57.0521,2,2,1
+"15",803,NA,39.2712,1,1,1
+"16",855,NA,43.1233,1,1,2
+"17",1040,NA,38.8932,2,1,2
+"18",1106,NA,44.6,1,1,1
+"19",1129,NA,53.9068,1,2,1
+"20",1206,NA,44.2055,2,2,1
+"21",1227,NA,59.589,1,2,2
+"22",258,278,74.5041,2,1,2
+"23",319,339,43.137,2,1,1
+"24",343,363,63.2192,1,2,2
+"25",375,375,64.4247,2,2,1
+"26",377,NA,58.3096,1,2,1
diff --git a/win32/deps/library/survival/tests/data.motor b/win32/deps/library/survival/tests/data.motor
new file mode 100644
index 0000000..420752c
--- /dev/null
+++ b/win32/deps/library/survival/tests/data.motor
@@ -0,0 +1,40 @@
+150 8064 0
+150 8064 0
+150 8064 0
+150 8064 0
+150 8064 0
+150 8064 0
+150 8064 0
+150 8064 0
+150 8064 0
+150 8064 0
+170 1764 1
+170 2772 1
+170 3444 1
+170 3542 1
+170 3780 1
+170 4860 1
+170 5196 1
+170 5448 0
+170 5448 0
+170 5448 0
+190  408 1
+190  408 1
+190 1344 1
+190 1344 1
+190 1440 1
+190 1680 0
+190 1680 0
+190 1680 0
+190 1680 0
+190 1680 0
+220  408 1
+220  408 1
+220  504 1
+220  504 1
+220  504 1
+220  528 0
+220  528 0
+220  528 0
+220  528 0
+220  528 0
diff --git a/win32/deps/library/survival/tests/data.peterson b/win32/deps/library/survival/tests/data.peterson
new file mode 100644
index 0000000..220f218
--- /dev/null
+++ b/win32/deps/library/survival/tests/data.peterson
@@ -0,0 +1,20 @@
+1 4 1
+1 7 1
+1 12 1
+2 3 0
+2 10 0
+2 22 1
+2 21 1
+2 11 0
+2 12 0
+6 18 1
+6 9 1
+3 12 0
+3 19 1
+3 16 0
+3 5 0
+3 14 0
+3 20 1
+4 2 1
+5 6 1
+
diff --git a/win32/deps/library/survival/tests/data.rat2 b/win32/deps/library/survival/tests/data.rat2
new file mode 100644
index 0000000..90ef33e
--- /dev/null
+++ b/win32/deps/library/survival/tests/data.rat2
@@ -0,0 +1,253 @@
+1 1 1 60 182 1
+2 1 1 60 182 0
+3 1 1 60 63 1
+3 1 2 63 68 1
+3 1 3 68 182 0
+4 1 1 60 152 1
+4 1 2 152 182 0
+5 1 1 60 130 1
+5 1 2 130 134 1
+5 1 3 134 145 1
+6 1 1 60 98 1
+6 1 2 98 152 1
+6 1 1 60 98 1
+6 1 2 98 152 1
+6 1 3 152 182 1
+7 1 1 60 88 1
+7 1 2 88 95 1
+7 1 3 95 105 1
+7 1 4 105 130 1
+7 1 5 130 137 1
+7 1 6 137 167 1
+7 1 7 167 182 0
+8 1 1 60 152 1
+8 1 2 152 182 0
+9 1 1 60 81 1
+9 1 2 81 182 0
+10 1 1 60 71 1
+10 1 2 71 84 1
+10 1 3 84 126 1
+10 1 4 126 134 1
+10 1 5 134 152 1
+10 1 6 152 182 0
+11 1 1 60 116 1
+11 1 2 116 130 1
+11 1 3 130 182 0
+12 1 1 60 91 1
+12 1 2 91 182 0
+13 1 1 60 63 1
+13 1 2 63 68 1
+13 1 3 68 84 1
+13 1 4 84 95 1
+13 1 5 95 152 1
+13 1 6 152 182 0
+14 1 1 60 105 1
+14 1 2 103 152 1
+14 1 3 152 182 0
+15 1 1 60 63 1
+15 1 2 63 102 1
+15 1 3 102 152 1
+15 1 4 152 182 0
+16 1 1 60 63 1
+16 1 2 63 77 1
+16 1 3 77 112 1
+16 1 4 112 140 1
+16 1 5 140 182 0
+17 1 1 60 77 1
+17 1 2 77 119 1
+17 1 3 119 152 1
+17 1 4 152 161 1
+17 1 5 161 167 1
+17 1 6 167 182 0
+18 1 1 60 105 1
+18 1 2 105 112 1
+18 1 3 112 145 1
+18 1 4 145 161 1
+18 1 5 161 182 1
+19 1 1 60 152 1
+19 1 2 152 182 1
+20 1 1 60 81 1
+20 1 2 81 95 1
+20 1 3 95 182 0
+21 1 1 60 84 1
+21 1 2 84 91 1
+21 1 3 91 102 1
+21 1 4 102 108 1
+21 1 5 108 130 1
+21 1 6 130 134 1
+21 1 7 134 182 0
+22 1 1 60 182 0
+23 1 1 60 91 1
+23 1 2 91 182 0
+24 0 1 60 63 1
+24 0 2 63 102 1
+24 0 3 102 119 1
+24 0 4 119 161 1
+24 0 5 161 161 1
+24 0 6 161 172 1
+24 0 7 172 179 1
+24 0 8 179 182 0
+25 0 1 60 88 1
+25 0 2 88 91 1
+25 0 3 91 95 1
+25 0 4 95 105 1
+25 0 5 105 112 1
+25 0 6 112 119 1
+25 0 7 119 119 1
+25 0 8 119 137 1
+25 0 9 137 145 1
+25 0 10 145 167 1
+25 0 11 167 172 1
+25 0 12 172 182 0
+26 0 1 60 91 1
+26 0 2 91 98 1
+26 0 3 98 108 1
+26 0 4 108 112 1
+26 0 5 112 134 1
+26 0 6 134 137 1
+26 0 7 137 161 1
+26 0 8 161 161 1
+26 0 9 161 179 1
+26 0 10 179 182 0
+27 0 1 60 71 1
+27 0 2 71 174 1
+27 0 2 174 182 0
+28 0 1 60 95 1
+28 0 2 95 105 1
+28 0 3 105 134 1
+28 0 4 134 137 1
+28 0 5 137 140 1
+28 0 6 140 145 1
+28 0 7 145 150 1
+28 0 8 150 150 1
+28 0 9 150 182 0
+29 0 1 60 66 1
+29 0 2 66 68 1
+29 0 3 68 130 1
+29 0 4 130 137 1
+29 0 5 137 182 0
+30 0 1 60 77 1
+30 0 2 77 85 1
+30 0 3 85 112 1
+30 0 4 112 137 1
+30 0 5 137 161 1
+30 0 6 161 174 1
+30 0 7 174 182 0
+31 0 1 60 81 1
+31 0 2 81 84 1
+31 0 3 84 126 1
+31 0 4 125 134 1
+31 0 5 134 161 1
+31 0 6 161 161 1
+31 0 7 161 174 1
+31 0 8 174 182 0
+32 0 1 60 68 1
+32 0 2 68 77 1
+32 0 3 77 98 1
+32 0 4 98 102 1
+32 0 5 102 102 1
+32 0 6 102 102 1
+32 0 7 102 182 0
+33 0 1 60 112 1
+33 0 2 112 182 0
+34 0 1 60 88 1
+34 0 2 88 88 1
+34 0 3 88 91 1
+34 0 4 91 98 1
+34 0 5 98 112 1
+34 0 6 112 134 1
+34 0 7 134 134 1
+34 0 8 134 137 1
+34 0 9 137 137 1
+34 0 10 137 140 1
+34 0 11 140 140 1
+34 0 12 140 152 1
+34 0 13 152 152 1
+34 0 14 152 182 0
+35 0 1 60 77 1
+35 0 2 77 179 1
+35 0 3 179 182 0
+36 0 1 60 112 1
+36 0 2 112 182 0
+37 0 1 60 71 1
+37 0 2 71 71 1
+37 0 3 71 74 1
+37 0 4 74 77 1
+37 0 5 77 112 1
+37 0 6 112 116 1
+37 0 7 116 116 1
+37 0 8 116 140 1
+37 0 9 140 140 1
+37 0 10 140 167 1
+37 0 11 167 182 0
+38 0 1 60 77 1
+38 0 2 77 95 1
+38 0 3 95 126 1
+38 0 4 126 150 1
+38 0 5 150 182 0
+39 0 1 60 88 1
+39 0 2 88 126 1
+39 0 3 126 130 1
+39 0 4 130 130 1
+39 0 5 130 134 1
+39 0 6 134 182 0
+40 0 1 60 63 1
+40 0 2 63 74 1
+40 0 3 74 84 1
+40 0 4 84 84 1
+40 0 5 84 88 1
+40 0 6 88 91 1
+40 0 7 91 95 1
+40 0 8 95 108 1
+40 0 9 108 134 1
+40 0 10 134 137 1
+40 0 11 137 179 1
+40 0 12 179 182 0
+41 0 1 60 81 1
+41 0 2 81 88 1
+41 0 3 88 105 1
+41 0 4 105 116 1
+41 0 5 116 123 1
+41 0 6 123 140 1
+41 0 7 140 145 1
+41 0 8 145 152 1
+41 0 9 152 161 1
+41 0 10 161 161 1
+41 0 11 161 179 1
+41 0 12 179 182 0
+42 0 1 60 88 1
+42 0 2 88 95 1
+42 0 3 95 112 1
+42 0 4 112 119 1
+42 0 5 119 126 1
+42 0 6 126 126 1
+42 0 7 126 150 1
+42 0 8 150 157 1
+42 0 9 157 179 1
+42 0 10 179 182 0
+43 0 1 60 68 1
+43 0 2 68 68 1
+43 0 3 68 84 1
+43 0 4 84 102 1
+43 0 5 102 105 1
+43 0 6 105 119 1
+43 0 7 119 123 1
+43 0 8 123 123 1
+43 0 9 123 137 1
+43 0 10 137 161 1
+43 0 11 161 179 1
+43 0 12 179 182 0
+44 0 1 60 140 1
+44 0 2 140 182 0
+45 0 1 60 152 1
+45 0 2 152 182 1
+45 0 3 182 182 1
+46 0 1 60 81 1
+46 0 2 81 182 0
+47 0 1 60 63 1
+47 0 2 63 88 1
+47 0 3 88 134 1
+47 0 4 134 182 0
+48 0 1 60 84 1
+48 0 2 84 134 1
+48 0 3 134 182 1
diff --git a/win32/deps/library/survival/tests/data.smoke b/win32/deps/library/survival/tests/data.smoke
new file mode 100644
index 0000000..edbc16b
--- /dev/null
+++ b/win32/deps/library/survival/tests/data.smoke
@@ -0,0 +1,33 @@
+ 186.0  439.2  234.4  365.8  159.6  216.9  167.4  159.5
+ 255.6  702.7  544.7  431.0  454.8  349.7  214.0  250.4
+ 448.9 1132.4  945.2  728.8  729.4  590.2  447.3  436.6
+ 733.7 1981.1 1177.7 1589.2 1316.5 1266.9  875.6  703.0
+1119.4 3003.0 2244.9 3380.3 2374.9 1820.2 1669.1 1159.2
+2070.5 4697.5 4255.3 5083.0 4485.0 3888.7 3184.3 2194.9
+3675.3 7340.6 5882.4 6597.2 7707.5 4945.1 5618.0 4128.9
+
+ 186.0  610.0  497.5  251.7  417.5  122.6  198.3  193.4
+ 255.6  915.6  482.8  500.7  488.9  402.9  393.9  354.3
+ 448.9 1391.0 1757.1  953.5 1025.8  744.0  668.5  537.8
+ 733.7 2393.4 1578.4 1847.2 1790.1 1220.7 1100.0  993.3
+1119.4 3497.9 2301.8 3776.6 2081.0 2766.4 2268.1 1230.7
+2070.5 5861.3 3174.6 2974.0 3712.9 3988.8 3268.6 2468.9
+3675.3 6250.0 4000.0 4424.8 7329.8 6383.0 7666.1 5048.1
+
+
+ 125.7  225.6    0    433.9  212.0  107.2  135.9   91.0
+ 177.3  353.8  116.8   92.1  289.5  200.9  121.3  172.1
+ 244.8  542.8  287.4  259.5  375.9  165.8  202.2  247.2
+ 397.7  858.0 1016.3  365.0  650.9  470.8  570.6  319.7
+ 692.1 1496.2 1108.0 1348.5 1263.2  864.8  586.6  618.0
+1160.0 2084.8  645.2 1483.1 1250.0 1126.3 1070.5 1272.1
+2070.8 3319.5    0   2580.6 2590.7 3960.4 1666.7 1861.5
+
+ 125.7  277.9  266.7  102.7  178.6  224.7  142.1  138.8
+ 177.3  517.9  138.7  466.8  270.1  190.2  116.8   83.0
+ 244.8  823.5  473.6  602.0  361.0  454.5  412.2  182.1
+ 397.7 1302.9 1114.8  862.1  699.6  541.7  373.1  356.4
+ 692.1 1934.9 2319.6 1250.0 1688.0  828.7  797.9  581.5
+1160.0 2827.0 4635.8 2517.2 1687.3 2848.7 1621.2 1363.4
+2070.8 4273.1 2409.6 5769.2 3125.0 2978.7 2803.7 2195.4
+
diff --git a/win32/deps/library/survival/tests/data.turbine b/win32/deps/library/survival/tests/data.turbine
new file mode 100644
index 0000000..0b24b6a
--- /dev/null
+++ b/win32/deps/library/survival/tests/data.turbine
@@ -0,0 +1,23 @@
+NA  4  0                                           
+4  NA  39                                          
+NA 10  4                                           
+10 NA  49                                          
+NA 14  2                                           
+14 NA  31                                          
+NA 18  7                                           
+18 NA  66                                          
+NA 22  5                                           
+22 NA  25                                          
+NA 26  9                                           
+26 NA  30                                          
+NA 30  9                                           
+30 NA  33                                          
+NA 34  6                                           
+34 NA  7                                           
+NA 38  22                                          
+38 NA  12                                          
+NA 42  21                                          
+42 NA  19                                          
+NA 46  21                                          
+46 NA  15                                          
+  
diff --git a/win32/deps/library/survival/tests/data.valve b/win32/deps/library/survival/tests/data.valve
new file mode 100644
index 0000000..40c1ded
--- /dev/null
+++ b/win32/deps/library/survival/tests/data.valve
@@ -0,0 +1,89 @@
+251  761   -1
+252  759   -1
+327   98    1
+327  667   -1
+328  326    1
+328  653    1
+328  653    1
+328  667   -1
+329  665   -1
+330   84    1
+330  667   -1
+331   87    1
+331  663   -1
+389  646    1
+389  653   -1
+390   92    1
+390  653   -1
+391  651   -1
+392  258    1
+392  328    1
+392  377    1
+392  621    1
+392  650   -1
+393   61    1
+393  539    1
+393  648   -1
+394  254    1
+394  276    1
+394  298    1
+394  640    1
+394  644   -1
+395   76    1
+395  538    1
+395  642   -1
+396  635    1
+396  641   -1
+397  349    1
+397  404    1
+397  561    1
+397  649   -1
+398  631   -1
+399  596   -1
+400  120    1
+400  479    1
+400  614   -1
+401  323    1
+401  449    1
+401  582   -1
+402  139    1
+402  139    1
+402  589   -1
+403  593   -1
+404  573    1
+404  589   -1
+405  165    1
+405  408    1
+405  604    1
+405  606   -1
+406  249    1
+406  594   -1
+407  344    1
+407  497    1
+407  613   -1
+408  265    1
+408  586    1
+408  595   -1
+409  166    1
+409  206    1
+409  348    1
+409  389   -1
+410  601   -1
+411  410    1
+411  581    1
+411  601   -1
+412  611   -1
+413  608   -1
+414  587   -1
+415  367    1
+415  603   -1
+416  202    1
+416  563    1
+416  570    1
+416  585   -1
+417  587   -1
+418  578   -1
+419  578   -1
+420  586   -1
+421  585   -1
+422  582   -1
diff --git a/win32/deps/library/survival/tests/detail.R b/win32/deps/library/survival/tests/detail.R
new file mode 100644
index 0000000..3b1f6b7
--- /dev/null
+++ b/win32/deps/library/survival/tests/detail.R
@@ -0,0 +1,69 @@
+# A short test on coxph.detail, to ensure that the computed hazard is
+#  equal to the theoretical value
+library(survival)
+aeq <- function(a,b) all.equal(as.vector(a), as.vector(b))
+
+# taken from book4.R
+test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
+                    stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
+                    event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
+                    x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+
+byhand <- function(beta, newx=0) {
+    r <- exp(beta)
+    loglik <- 4*beta - (log(r+1) + log(r+2) + 2*log(3*r+2) + 2*log(3*r+1) +
+        log(2*r +2))
+    u <- 1/(r+1) +  1/(3*r+1) + 2*(1/(3*r+2) + 1/(2*r+2)) -
+                 ( r/(r+2) +3*r/(3*r+2) + 3*r/(3*r+1))
+    imat <- r*(1/(r+1)^2 + 2/(r+2)^2 + 6/(3*r+2)^2 +
+            6/(3*r+1)^2 + 6/(3*r+2)^2 + 4/(2*r +2)^2)
+
+    hazard <-c( 1/(r+1), 1/(r+2), 1/(3*r+2), 1/(3*r+1), 1/(3*r+1),
+               1/(3*r+2), 1/(2*r +2) )
+
+
+    # The matrix of weights, one row per obs, one col per time
+    #   deaths at 2,3,6,7,8,9
+    wtmat <- matrix(c(1,0,0,0,1, 0, 0,0,0,0,
+                      0,1,0,1,1, 0, 0,0,0,0,
+                      0,0,1,1,1, 0, 1,1,0,0,
+                      0,0,0,1,1, 0, 1,1,0,0,
+                      0,0,0,0,1, 1, 1,1,0,0,
+                      0,0,0,0,0, 1, 1,1,1,1,
+                      0,0,0,0,0,.5,.5,1,1,1), ncol=7)
+    wtmat <- diag(c(r,1,1,r,1,r,r,r,1,1)) %*% wtmat
+
+    x      <- c(1,0,0,1,0,1,1,1,0,0)
+    status <- c(1,1,1,1,1,1,1,0,0,0)
+    xbar <- colSums(wtmat*x)/ colSums(wtmat)
+    n <- length(x)
+
+   # Table of sums for score and Schoenfeld resids
+    hazmat <- wtmat %*% diag(hazard) #each subject's hazard over time
+    dM <- -hazmat  #Expected part
+    for (i in 1:5) dM[i,i] <- dM[i,i] +1  #observed
+    dM[6:7,6:7] <- dM[6:7,6:7] +.5  # observed
+    mart <- rowSums(dM)
+
+    # Table of sums for score and Schoenfeld resids
+    #  Looks like the last table of appendix E.2.1 of the book
+    resid <- dM * outer(x, xbar, '-')
+    score <- rowSums(resid)
+    scho <- colSums(resid)
+
+    # We need to add the ties back up (they are symmetric)
+    scho[6:7] <- rep(mean(scho[6:7]), 2)
+
+    list(loglik=loglik, u=u, imat=imat, xbar=xbar, haz=hazard* exp(beta*newx),
+	     mart=mart,  score=score, rmat=resid,
+		scho=scho)
+    } 
+
+# The actual coefficient of the fit is close to zero.  Using a larger
+#  number pushes the test harder, but it should still work without
+#  the init and iter arguments, i.e., for any coefficient.
+fit1 <- coxph(Surv(start, stop, event) ~x, test2,init=-1, iter=0)
+temp <- coxph.detail(fit1)
+temp2 <- byhand(fit1$coef, fit1$means)
+aeq(temp$haz, c(temp2$haz[1:5], sum(temp2$haz[6:7])))
+                  
diff --git a/win32/deps/library/survival/tests/detail.Rout.save b/win32/deps/library/survival/tests/detail.Rout.save
new file mode 100644
index 0000000..068e63f
--- /dev/null
+++ b/win32/deps/library/survival/tests/detail.Rout.save
@@ -0,0 +1,89 @@
+
+R version 2.11.0 (2010-04-22)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> # A short test on coxph.detail, to ensure that the computed hazard is
+> #  equal to the theoretical value
+> library(survival)
+Loading required package: splines
+> aeq <- function(a,b) all.equal(as.vector(a), as.vector(b))
+> 
+> # taken from book4.R
+> test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
++                     stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
++                     event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
++                     x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+> 
+> byhand <- function(beta, newx=0) {
++     r <- exp(beta)
++     loglik <- 4*beta - (log(r+1) + log(r+2) + 2*log(3*r+2) + 2*log(3*r+1) +
++         log(2*r +2))
++     u <- 1/(r+1) +  1/(3*r+1) + 2*(1/(3*r+2) + 1/(2*r+2)) -
++                  ( r/(r+2) +3*r/(3*r+2) + 3*r/(3*r+1))
++     imat <- r*(1/(r+1)^2 + 2/(r+2)^2 + 6/(3*r+2)^2 +
++             6/(3*r+1)^2 + 6/(3*r+2)^2 + 4/(2*r +2)^2)
++ 
++     hazard <-c( 1/(r+1), 1/(r+2), 1/(3*r+2), 1/(3*r+1), 1/(3*r+1),
++                1/(3*r+2), 1/(2*r +2) )
++ 
++ 
++     # The matrix of weights, one row per obs, one col per time
++     #   deaths at 2,3,6,7,8,9
++     wtmat <- matrix(c(1,0,0,0,1, 0, 0,0,0,0,
++                       0,1,0,1,1, 0, 0,0,0,0,
++                       0,0,1,1,1, 0, 1,1,0,0,
++                       0,0,0,1,1, 0, 1,1,0,0,
++                       0,0,0,0,1, 1, 1,1,0,0,
++                       0,0,0,0,0, 1, 1,1,1,1,
++                       0,0,0,0,0,.5,.5,1,1,1), ncol=7)
++     wtmat <- diag(c(r,1,1,r,1,r,r,r,1,1)) %*% wtmat
++ 
++     x      <- c(1,0,0,1,0,1,1,1,0,0)
++     status <- c(1,1,1,1,1,1,1,0,0,0)
++     xbar <- colSums(wtmat*x)/ colSums(wtmat)
++     n <- length(x)
++ 
++    # Table of sums for score and Schoenfeld resids
++     hazmat <- wtmat %*% diag(hazard) #each subject's hazard over time
++     dM <- -hazmat  #Expected part
++     for (i in 1:5) dM[i,i] <- dM[i,i] +1  #observed
++     dM[6:7,6:7] <- dM[6:7,6:7] +.5  # observed
++     mart <- rowSums(dM)
++ 
++     # Table of sums for score and Schoenfeld resids
++     #  Looks like the last table of appendix E.2.1 of the book
++     resid <- dM * outer(x, xbar, '-')
++     score <- rowSums(resid)
++     scho <- colSums(resid)
++ 
++     # We need to add the ties back up (they are symmetric)
++     scho[6:7] <- rep(mean(scho[6:7]), 2)
++ 
++     list(loglik=loglik, u=u, imat=imat, xbar=xbar, haz=hazard* exp(beta*newx),
++ 	     mart=mart,  score=score, rmat=resid,
++ 		scho=scho)
++     } 
+> 
+> # The actual coefficient of the fit is close to zero.  Using a larger
+> #  number pushes the test harder, but it should still work without
+> #  the init and iter arguments, i.e., for any coefficient.
+> fit1 <- coxph(Surv(start, stop, event) ~x, test2,init=-1, iter=0)
+> temp <- coxph.detail(fit1)
+> temp2 <- byhand(fit1$coef, fit1$means)
+> aeq(temp$haz, c(temp2$haz[1:5], sum(temp2$haz[6:7])))
+[1] TRUE
+>                   
+> 
diff --git a/win32/deps/library/survival/tests/difftest.R b/win32/deps/library/survival/tests/difftest.R
new file mode 100644
index 0000000..51e8631
--- /dev/null
+++ b/win32/deps/library/survival/tests/difftest.R
@@ -0,0 +1,56 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Test some more features of surv.diff
+#
+#  First, what happens when one group is a dummy
+#
+
+
+#
+# The AML data, with a third group of early censorings "tacked on"
+#
+aml3 <- list(time=   c( 9, 13, 13, 18, 23, 28, 31, 34, 45, 48, 161,
+			   5,  5,  8,  8, 12, 16, 23, 27, 30, 33, 43, 45,
+			   1,  2,  2,  3,  3,  3,  4),
+	    status= c( 1,1,0,1,1,0,1,1,0,1,0, 1,1,1,1,1,0,1,1,1,1,1,1,
+				0,0,0,0,0,0,0),
+	    x     = as.factor(c(rep("Maintained", 11),
+				rep("Nonmaintained", 12), rep("Dummy",7) )))
+
+aml3 <- data.frame(aml3)
+
+# These should give the same result (chisq, df), but the second has an
+#  extra group
+survdiff(Surv(time, status) ~x, aml)
+survdiff(Surv(time, status) ~x, aml3)
+
+
+#
+# Now a test of the stratified log-rank
+#   There are no tied times within institution, so the coxph program
+#   can be used to give a complete test
+#
+fit <- survdiff(Surv(time, status) ~ pat.karno + strata(inst), cancer)
+
+cfit <- coxph(Surv(time, status) ~ factor(pat.karno) + strata(inst),
+		cancer, iter=0)
+
+tdata <- na.omit(cancer[,c('time', 'status', 'pat.karno', 'inst')])
+
+temp1 <- tapply(tdata$status-1, list(tdata$pat.karno, tdata$inst), sum)
+temp1 <- ifelse(is.na(temp1), 0, temp1)
+temp2 <- tapply(cfit$resid,  list(tdata$pat.karno, tdata$inst), sum)
+temp2 <- ifelse(is.na(temp2), 0, temp2)
+
+temp2 <- temp1 - temp2
+
+#Now temp1=observed, temp2=expected
+all.equal(c(temp1), c(fit$obs))
+all.equal(c(temp2), c(fit$exp))
+
+all.equal(fit$var[-1,-1], solve(cfit$var))
+
+rm(tdata, temp1, temp2)
diff --git a/win32/deps/library/survival/tests/difftest.Rout.save b/win32/deps/library/survival/tests/difftest.Rout.save
new file mode 100644
index 0000000..e9e4fee
--- /dev/null
+++ b/win32/deps/library/survival/tests/difftest.Rout.save
@@ -0,0 +1,96 @@
+
+R version 2.14.0 Under development (unstable) (2011-04-10 r55401)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Test some more features of surv.diff
+> #
+> #  First, what happens when one group is a dummy
+> #
+> 
+> 
+> #
+> # The AML data, with a third group of early censorings "tacked on"
+> #
+> aml3 <- list(time=   c( 9, 13, 13, 18, 23, 28, 31, 34, 45, 48, 161,
++ 			   5,  5,  8,  8, 12, 16, 23, 27, 30, 33, 43, 45,
++ 			   1,  2,  2,  3,  3,  3,  4),
++ 	    status= c( 1,1,0,1,1,0,1,1,0,1,0, 1,1,1,1,1,0,1,1,1,1,1,1,
++ 				0,0,0,0,0,0,0),
++ 	    x     = as.factor(c(rep("Maintained", 11),
++ 				rep("Nonmaintained", 12), rep("Dummy",7) )))
+> 
+> aml3 <- data.frame(aml3)
+> 
+> # These should give the same result (chisq, df), but the second has an
+> #  extra group
+> survdiff(Surv(time, status) ~x, aml)
+Call:
+survdiff(formula = Surv(time, status) ~ x, data = aml)
+
+                 N Observed Expected (O-E)^2/E (O-E)^2/V
+x=Maintained    11        7    10.69      1.27       3.4
+x=Nonmaintained 12       11     7.31      1.86       3.4
+
+ Chisq= 3.4  on 1 degrees of freedom, p= 0.0653 
+> survdiff(Surv(time, status) ~x, aml3)
+Call:
+survdiff(formula = Surv(time, status) ~ x, data = aml3)
+
+                 N Observed Expected (O-E)^2/E (O-E)^2/V
+x=Dummy          7        0     0.00       NaN       NaN
+x=Maintained    11        7    10.69      1.27       3.4
+x=Nonmaintained 12       11     7.31      1.86       3.4
+
+ Chisq= 3.4  on 1 degrees of freedom, p= 0.0653 
+> 
+> 
+> #
+> # Now a test of the stratified log-rank
+> #   There are no tied times within institution, so the coxph program
+> #   can be used to give a complete test
+> #
+> fit <- survdiff(Surv(time, status) ~ pat.karno + strata(inst), cancer)
+> 
+> cfit <- coxph(Surv(time, status) ~ factor(pat.karno) + strata(inst),
++ 		cancer, iter=0)
+> 
+> tdata <- na.omit(cancer[,c('time', 'status', 'pat.karno', 'inst')])
+> 
+> temp1 <- tapply(tdata$status-1, list(tdata$pat.karno, tdata$inst), sum)
+> temp1 <- ifelse(is.na(temp1), 0, temp1)
+> temp2 <- tapply(cfit$resid,  list(tdata$pat.karno, tdata$inst), sum)
+> temp2 <- ifelse(is.na(temp2), 0, temp2)
+> 
+> temp2 <- temp1 - temp2
+> 
+> #Now temp1=observed, temp2=expected
+> all.equal(c(temp1), c(fit$obs))
+[1] TRUE
+> all.equal(c(temp2), c(fit$exp))
+[1] TRUE
+> 
+> all.equal(fit$var[-1,-1], solve(cfit$var))
+[1] TRUE
+> 
+> rm(tdata, temp1, temp2)
+> 
diff --git a/win32/deps/library/survival/tests/doaml.R b/win32/deps/library/survival/tests/doaml.R
new file mode 100644
index 0000000..4673f16
--- /dev/null
+++ b/win32/deps/library/survival/tests/doaml.R
@@ -0,0 +1,64 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+#
+# These results can be found in Miller
+#
+fit <- coxph(Surv(aml$time, aml$status) ~ aml$x, method='breslow')
+fit
+resid(fit, type='mart')
+resid(fit, type='score')
+resid(fit, type='scho')
+
+# Test the drop of an itercept: should have no effect
+fit2 <- coxph(Surv(time, status) ~ x -1, method='breslow',
+                   data=aml)
+aeq(fit$loglik, fit2$loglik)
+aeq(coef(fit), coef(fit2))
+aeq(fit$var, fit2$var)
+
+fit <- survfit(Surv(aml$time, aml$status) ~ aml$x)
+fit
+summary(fit)
+survdiff(Surv(aml$time, aml$status)~ aml$x)
+
+#
+# Test out the weighted K-M
+#
+#  First, equal case weights- shouldn't change the survival, but will
+#    halve the variance
+temp2 <-survfit(Surv(aml$time, aml$status)~1, type='kaplan', weight=rep(2,23))
+temp  <-survfit(Surv(time, status)~1, aml)
+aeq(temp$surv, temp2$surv)
+aeq(temp$std.err^2, 2*temp2$std.err^2)
+
+# Risk weights-- use a null Cox model
+tfit <- coxph(Surv(aml$time, aml$status) ~ offset(log(1:23)))
+sfit <- survfit(tfit, type='aalen', censor=FALSE)
+
+# Now compute it by hand.  The survfit program will produce a curve
+#   corresponding to the mean offset.  This is a change on 7/2010,
+#   which caused S(new) = S(old)^exp(mean(log(1:23))).
+#  Ties are a nuisance
+rscore <- exp(log(1:23) - mean(log(1:23)))[order(aml$time)]
+atime <- sort(aml$time)
+denom <- rev(cumsum(rev(rscore)))
+denom <- denom[match(unique(atime), atime)]
+deaths <- tapply(aml$status, aml$time, sum)
+chaz <- cumsum(deaths/denom)
+all.equal(sfit$surv, as.vector(exp(-chaz[deaths>0])))
+cvar <- cumsum(deaths/denom^2)
+all.equal(sfit$std^2, as.vector(cvar[deaths>0]))
+
+# And the Efron result
+summary(survfit(tfit))
+
+# Lots of ties, so its a good test case
+x1 <- coxph(Surv(time, status)~x, aml, method='efron')
+x1
+x2 <- coxph(Surv(rep(0,23),time, status) ~x, aml, method='efron')
+aeq(x1$coef, x2$coef)
+
+
+rm(x1, x2, atime, denom, deaths, chaz,cvar, tfit, sfit, temp, temp2, fit)
diff --git a/win32/deps/library/survival/tests/doaml.Rout.save b/win32/deps/library/survival/tests/doaml.Rout.save
new file mode 100644
index 0000000..3e02ad8
--- /dev/null
+++ b/win32/deps/library/survival/tests/doaml.Rout.save
@@ -0,0 +1,185 @@
+
+R version 2.13.0 RC (2011-04-11 r55409)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> #
+> # These results can be found in Miller
+> #
+> fit <- coxph(Surv(aml$time, aml$status) ~ aml$x, method='breslow')
+> fit
+Call:
+coxph(formula = Surv(aml$time, aml$status) ~ aml$x, method = "breslow")
+
+
+                    coef exp(coef) se(coef)    z     p
+aml$xNonmaintained 0.904      2.47    0.512 1.77 0.078
+
+Likelihood ratio test=3.3  on 1 df, p=0.0694  n= 23, number of events= 18 
+> resid(fit, type='mart')
+          1           2           3           4           5           6 
+ 0.86225539  0.79200985 -0.20799015  0.74818869  0.65652976 -0.39796610 
+          7           8           9          10          11          12 
+ 0.45424957  0.25475051 -1.05400917 -0.55400917 -1.55400917  0.87844483 
+         13          14          15          16          17          18 
+ 0.87844483  0.74006941  0.74006941  0.57677292 -0.51373647  0.15162716 
+         19          20          21          22          23 
+ 0.01702219 -0.14897252 -0.56448258 -1.15185244 -1.60340676 
+> resid(fit, type='score')
+           1            2            3            4            5            6 
+-0.546856248 -0.492501830  0.141063944 -0.479907930 -0.447416819  0.268453990 
+           7            8            9           10           11           12 
+-0.235908976 -0.072655945  0.640826596  0.640826596  0.640826596  0.237767767 
+          13           14           15           16           17           18 
+ 0.237767767  0.232585063  0.232585063  0.203878910 -0.165307985  0.044923326 
+          19           20           21           22           23 
+ 0.007079721 -0.039651990 -0.181184547 -0.395076175 -0.472116894 
+> resid(fit, type='scho')
+         5          5          8          8          9         12         13 
+ 0.2706690  0.2706690  0.3081229  0.3081229 -0.6423931  0.3360212 -0.6335658 
+        18         23         23         27         30         31         33 
+-0.6494307 -0.6791937  0.3208063  0.3269751  0.3360212 -0.5970995  0.3505693 
+        34         43         45         48 
+-0.5525731  0.3778334  0.5484457  0.0000000 
+> 
+> # Test the drop of an itercept: should have no effect
+> fit2 <- coxph(Surv(time, status) ~ x -1, method='breslow',
++                    data=aml)
+> aeq(fit$loglik, fit2$loglik)
+[1] TRUE
+> aeq(coef(fit), coef(fit2))
+[1] TRUE
+> aeq(fit$var, fit2$var)
+[1] TRUE
+> 
+> fit <- survfit(Surv(aml$time, aml$status) ~ aml$x)
+> fit
+Call: survfit(formula = Surv(aml$time, aml$status) ~ aml$x)
+
+                    records n.max n.start events median 0.95LCL 0.95UCL
+aml$x=Maintained         11    11      11      7     31      18      NA
+aml$x=Nonmaintained      12    12      12     11     23       8      NA
+> summary(fit)
+Call: survfit(formula = Surv(aml$time, aml$status) ~ aml$x)
+
+                aml$x=Maintained 
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+    9     11       1    0.909  0.0867       0.7541        1.000
+   13     10       1    0.818  0.1163       0.6192        1.000
+   18      8       1    0.716  0.1397       0.4884        1.000
+   23      7       1    0.614  0.1526       0.3769        0.999
+   31      5       1    0.491  0.1642       0.2549        0.946
+   34      4       1    0.368  0.1627       0.1549        0.875
+   48      2       1    0.184  0.1535       0.0359        0.944
+
+                aml$x=Nonmaintained 
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+    5     12       2   0.8333  0.1076       0.6470        1.000
+    8     10       2   0.6667  0.1361       0.4468        0.995
+   12      8       1   0.5833  0.1423       0.3616        0.941
+   23      6       1   0.4861  0.1481       0.2675        0.883
+   27      5       1   0.3889  0.1470       0.1854        0.816
+   30      4       1   0.2917  0.1387       0.1148        0.741
+   33      3       1   0.1944  0.1219       0.0569        0.664
+   43      2       1   0.0972  0.0919       0.0153        0.620
+   45      1       1   0.0000     NaN           NA           NA
+
+> survdiff(Surv(aml$time, aml$status)~ aml$x)
+Call:
+survdiff(formula = Surv(aml$time, aml$status) ~ aml$x)
+
+                     N Observed Expected (O-E)^2/E (O-E)^2/V
+aml$x=Maintained    11        7    10.69      1.27       3.4
+aml$x=Nonmaintained 12       11     7.31      1.86       3.4
+
+ Chisq= 3.4  on 1 degrees of freedom, p= 0.0653 
+> 
+> #
+> # Test out the weighted K-M
+> #
+> #  First, equal case weights- shouldn't change the survival, but will
+> #    halve the variance
+> temp2 <-survfit(Surv(aml$time, aml$status)~1, type='kaplan', weight=rep(2,23))
+> temp  <-survfit(Surv(time, status)~1, aml)
+> aeq(temp$surv, temp2$surv)
+[1] TRUE
+> aeq(temp$std.err^2, 2*temp2$std.err^2)
+[1] TRUE
+> 
+> # Risk weights-- use a null Cox model
+> tfit <- coxph(Surv(aml$time, aml$status) ~ offset(log(1:23)))
+> sfit <- survfit(tfit, type='aalen', censor=FALSE)
+> 
+> # Now compute it by hand.  The survfit program will produce a curve
+> #   corresponding to the mean offset.  This is a change on 7/2010,
+> #   which caused S(new) = S(old)^exp(mean(log(1:23))).
+> #  Ties are a nuisance
+> rscore <- exp(log(1:23) - mean(log(1:23)))[order(aml$time)]
+> atime <- sort(aml$time)
+> denom <- rev(cumsum(rev(rscore)))
+> denom <- denom[match(unique(atime), atime)]
+> deaths <- tapply(aml$status, aml$time, sum)
+> chaz <- cumsum(deaths/denom)
+> all.equal(sfit$surv, as.vector(exp(-chaz[deaths>0])))
+[1] TRUE
+> cvar <- cumsum(deaths/denom^2)
+> all.equal(sfit$std^2, as.vector(cvar[deaths>0]))
+[1] TRUE
+> 
+> # And the Efron result
+> summary(survfit(tfit))
+Call: survfit(formula = tfit)
+
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+    5     23       2    0.932  0.0461       0.8463        1.000
+    8     21       2    0.863  0.0637       0.7467        0.997
+    9     19       1    0.827  0.0704       0.6999        0.977
+   12     18       1    0.793  0.0755       0.6576        0.955
+   13     17       1    0.757  0.0801       0.6152        0.931
+   18     14       1    0.719  0.0846       0.5709        0.905
+   23     13       2    0.645  0.0907       0.4893        0.849
+   27     11       1    0.607  0.0929       0.4496        0.819
+   30      9       1    0.565  0.0955       0.4054        0.787
+   31      8       1    0.519  0.0982       0.3579        0.752
+   33      7       1    0.474  0.0994       0.3140        0.715
+   34      6       1    0.423  0.1009       0.2649        0.675
+   43      5       1    0.373  0.1006       0.2198        0.633
+   45      4       1    0.312  0.1009       0.1657        0.588
+   48      2       1    0.199  0.1102       0.0674        0.589
+> 
+> # Lots of ties, so its a good test case
+> x1 <- coxph(Surv(time, status)~x, aml, method='efron')
+> x1
+Call:
+coxph(formula = Surv(time, status) ~ x, data = aml, method = "efron")
+
+
+                coef exp(coef) se(coef)    z     p
+xNonmaintained 0.916       2.5    0.512 1.79 0.074
+
+Likelihood ratio test=3.38  on 1 df, p=0.0658  n= 23, number of events= 18 
+> x2 <- coxph(Surv(rep(0,23),time, status) ~x, aml, method='efron')
+> aeq(x1$coef, x2$coef)
+[1] TRUE
+> 
+> 
+> rm(x1, x2, atime, denom, deaths, chaz,cvar, tfit, sfit, temp, temp2, fit)
+> 
diff --git a/win32/deps/library/survival/tests/doweight.R b/win32/deps/library/survival/tests/doweight.R
new file mode 100644
index 0000000..b8ff0cd
--- /dev/null
+++ b/win32/deps/library/survival/tests/doweight.R
@@ -0,0 +1,240 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+# Tests of the weighted Cox model
+#
+# Similar data set to test1, but add weights,
+#                                    a double-death/censor tied time
+#                                    a censored last subject
+# The latter two are cases covered only feebly elsewhere.
+# 
+# The data set testw2 has the same data, but done via replication
+#
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+
+testw1 <- data.frame(time=  c(1,1,2,2,2,2,3,4,5),
+		    status= c(1,0,1,1,1,0,0,1,0),
+		    x=      c(2,0,1,1,0,1,0,1,0),
+		    wt =    c(1,2,3,4,3,2,1,2,1))
+xx <- c(1,2,3,4,3,2,1,2,1)
+testw2 <- data.frame(time=   rep(c(1,1,2,2,2,2,3,4,5), xx),
+		     status= rep(c(1,0,1,1,1,0,0,1,0), xx),
+		     x=      rep(c(2,0,1,1,0,1,0,1,0), xx),
+		     id=     rep(1:9, xx))
+indx <- match(1:9, testw2$id)
+testw2 <- data.frame(time=   rep(c(1,1,2,2,2,2,3,4,5), xx),
+		     status= rep(c(1,0,1,1,1,0,0,1,0), xx),
+		     x=      rep(c(2,0,1,1,0,1,0,1,0), xx),
+		     id=     rep(1:9, xx))
+indx <- match(1:9, testw2$id)
+
+fit0 <- coxph(Surv(time, status) ~x, testw1, weights=wt,
+		    method='breslow', iter=0)
+fit0b <- coxph(Surv(time, status) ~x, testw2, method='breslow', iter=0)
+fit  <- coxph(Surv(time, status) ~x, testw1, weights=wt, method='breslow')
+fitb <- coxph(Surv(time, status) ~x, testw2, method='breslow')
+
+texp <- function(beta) {  # expected, Breslow estimate
+    r <- exp(beta)
+    temp <- cumsum(c(1/(r^2 + 11*r +7), 10/(11*r +5), 2/(2*r+1)))
+    c(r^2, 1,r,r,1,r,1,r,1)* temp[c(1,1,2,2,2,2,2,3,3)]
+    }
+aeq(texp(0),  c(1/19, 1/19, rep(103/152, 5), rep(613/456,2))) #verify texp()
+
+xbar <- function(beta) { # xbar, Breslow estimate
+    r <- exp(beta)
+    temp <- r* rep(c(2*r + 11, 11/10, 1), c(2, 5, 2))
+    temp * texp(beta)
+    }
+
+fit0
+summary(fit)
+aeq(resid(fit0), testw1$status - texp(0))
+resid(fit0, type='score')
+resid(fit0, type='scho')
+
+aeq(resid(fit0, type='mart'), (resid(fit0b, type='mart'))[indx])
+aeq(resid(fit0, type='scor'), (resid(fit0b, type='scor'))[indx])
+aeq(unique(resid(fit0, type='scho')), unique(resid(fit0b, type='scho')))
+
+
+aeq(resid(fit, type='mart'), testw1$status - texp(fit$coef))
+resid(fit, type='score')
+resid(fit, type='scho')
+aeq(resid(fit, type='mart'), (resid(fitb, type='mart'))[indx])
+aeq(resid(fit, type='scor'), (resid(fitb, type='scor'))[indx])
+aeq(unique(resid(fit, type='scho')), unique(resid(fitb, type='scho')))
+rr1 <- resid(fit, type='mart')
+rr2 <- resid(fit, type='mart', weighted=T)
+aeq(rr2/rr1, testw1$wt)
+
+rr1 <- resid(fit, type='score')
+rr2 <- resid(fit, type='score', weighted=T)
+aeq(rr2/rr1, testw1$wt)
+
+fit  <- coxph(Surv(time, status) ~x, testw1, weights=wt, method='efron')
+fit
+resid(fit, type='mart')
+resid(fit, type='score')
+resid(fit, type='scho')
+
+# Tests of the weighted Cox model, AG form of the data
+#   Same solution as doweight1.s
+#
+testw3 <- data.frame(id  =  c( 1, 1, 2, 3, 3, 3, 4, 5, 5, 6, 7, 8, 8, 9),
+		     begin= c( 0, 5, 0, 0,10,15, 0, 0,14, 0, 0, 0,23, 0),
+		     time=  c( 5,10,10,10,15,20,20,14,20,20,30,23,40,50),
+		    status= c( 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0),
+		    x=      c( 2, 2, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0),
+		    wt =    c( 1, 1, 2, 3, 3, 3, 4, 3, 3, 2, 1, 2, 2, 1))
+
+fit0 <- coxph(Surv(begin,time, status) ~x, testw3, weights=wt,
+		    method='breslow', iter=0)
+fit  <- coxph(Surv(begin,time, status) ~x, testw3, weights=wt, method='breslow')
+fit0
+summary(fit)
+resid(fit0, type='mart', collapse=testw3$id)
+resid(fit0, type='score', collapse=testw3$id)
+resid(fit0, type='scho')
+
+resid(fit, type='mart', collapse=testw3$id)
+resid(fit, type='score', collapse=testw3$id)
+resid(fit, type='scho')
+fit0 <- coxph(Surv(begin, time, status) ~x,testw3, weights=wt, iter=0)
+resid(fit0, 'mart', collapse=testw3$id)
+resid(coxph(Surv(begin, time, status) ~1, testw3, weights=wt)
+		      , collapse=testw3$id)  #Null model
+
+fit  <- coxph(Surv(begin,time, status) ~x, testw3, weights=wt, method='efron')
+fit
+resid(fit, type='mart', collapse=testw3$id)
+resid(fit, type='score', collapse=testw3$id)
+resid(fit, type='scho')
+#
+# Check out the impact of weights on the dfbetas
+#    Am I computing them correctly?
+#
+wtemp <- rep(1,26)
+wtemp[c(5,10,15)] <- 2:4
+fit <- coxph(Surv(futime, fustat) ~ age + ecog.ps, ovarian, weights=wtemp)
+rr <- resid(fit, 'dfbeta')
+
+fit1 <- coxph(Surv(futime, fustat) ~ age + ecog.ps, ovarian, weights=wtemp,
+	         subset=(-5))
+fit2 <- coxph(Surv(futime, fustat) ~ age + ecog.ps, ovarian, weights=wtemp,
+	         subset=(-10))
+fit3 <- coxph(Surv(futime, fustat) ~ age + ecog.ps, ovarian, weights=wtemp,
+	         subset=(-15))
+
+#
+# Effect of case weights on expected survival curves post Cox model
+#
+fit0  <- coxph(Surv(time, status) ~x, testw1, weights=wt, method='breslow',
+	       iter=0)
+fit0b <- coxph(Surv(time, status) ~x, testw2, method='breslow', iter=0)
+
+surv1 <- survfit(fit0, newdata=list(x=0))
+surv2 <- survfit(fit0b, newdata=list(x=0))
+aeq(surv1$surv, surv2$surv)
+#
+# Check out the Efron approx. 
+#
+
+fit0 <- coxph(Surv(time, status) ~x,testw1, weights=wt, iter=0)
+fit  <- coxph(Surv(time, status) ~x,testw1, weights=wt)
+resid(fit0, 'mart')
+resid(coxph(Surv(time, status) ~1, testw1, weights=wt))  #Null model
+
+# lfun is the known log-likelihood for this data set, worked out in the
+#   appendix of Therneau and Grambsch
+# ufun is the score vector and ifun the information matrix
+lfun <- function(beta) {
+    r <- exp(beta)
+    a <- 7*r +3
+    b <- 4*r +2
+    11*beta - ( log(r^2 + 11*r +7) + 
+	(10/3)*(log(a+b) + log(2*a/3 +b) + log(a/3 +b)) + 2*log(2*r +1))
+    }
+aeq(fit0$log[1], lfun(0))
+aeq(fit$log[2], lfun(fit$coef))
+
+ufun <- function(beta, efron=T) {  #score statistic
+    r <- exp(beta)
+    xbar1 <- (2*r^2+11*r)/(r^2+11*r +7)
+    xbar2 <- 11*r/(11*r +5)
+    xbar3 <-  2*r/(2*r +1)
+    xbar2b<- 26*r/(26*r+12)
+    xbar2c<- 19*r/(19*r + 9)
+    temp <- 11 - (xbar1 + 2*xbar3)
+    if (efron) temp - (10/3)*(xbar2 + xbar2b + xbar2c)
+    else       temp - 10*xbar2
+    }
+print(ufun(fit$coef) < 1e-4)  # Should be true
+
+ifun <- function(beta, efron=T) {  # information matrix
+    r <- exp(beta)
+    xbar1 <- (2*r^2+11*r)/(r^2+11*r +7)
+    xbar2 <- 11*r/(11*r +5)
+    xbar3 <-  2*r/(2*r +1)
+    xbar2b<- 26*r/(26*r+12)
+    xbar2c<- 19*r/(19*r + 9)
+    temp <- ((4*r^2 + 11*r)/(r^2+11*r +7) - xbar1^2) +
+	    2*(xbar3 - xbar3^2)
+    if (efron) temp + (10/3)*((xbar2- xbar2^2) + (xbar2b - xbar2b^2) +
+			      (xbar2c -xbar2c^2))
+    else       temp + 10 * (xbar2- xbar2^2)
+    }
+
+aeq(fit0$var, 1/ifun(0))
+aeq(fit$var, 1/ifun(fit$coef))
+
+
+      
+# Make sure that the weights pass through the residuals correctly
+rr1 <- resid(fit, type='mart')
+rr2 <- resid(fit, type='mart', weighted=T)
+aeq(rr2/rr1, testw1$wt)
+rr1 <- resid(fit, type='score')
+rr2 <- resid(fit, type='score', weighted=T)
+aeq(rr2/rr1, testw1$wt)
+
+#
+# Look at the individual components
+#
+dt0 <- coxph.detail(fit0)
+dt <- coxph.detail(fit)
+aeq(sum(dt$score), ufun(fit$coef))  #score statistic
+aeq(sum(dt0$score), ufun(0))
+aeq(dt0$hazard, c(1/19, (10/3)*(1/16 + 1/(6+20/3) + 1/(6+10/3)), 2/3))
+
+
+
+rm(fit, fit0, rr1, rr2, dt, dt0)
+#
+# Effect of weights on the robust variance
+#
+test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0),
+		    wt=    c(3,0,1,1,1,1,1),
+                    id=    1:7)
+testx <- data.frame(time=  c(4,4,4,1,1,2,2,3),
+                    status=c(1,1,1,1,0,1,1,0),
+                    x=     c(0,0,0,1,1,1,0,0),
+		    wt=    c(1,1,1,1,1,1,1,1),
+                    id=    1:8)
+ 
+fit1 <- coxph(Surv(time, status) ~x + cluster(id), test1, method='breslow',
+              weights=wt)
+fit2 <- coxph(Surv(time, status) ~x + cluster(id), testx, method='breslow')
+
+db1 <- resid(fit1, 'dfbeta', weighted=F)
+db1 <- db1[-2]         #toss the missing
+db2 <- resid(fit2, 'dfbeta')
+aeq(db1, db2[3:8])
+
+W <- c(3,1,1,1,1,1)   #Weights, after removal of the missing value
+aeq(fit2$var, sum(db1*db1*W))
+aeq(fit1$var, sum(db1*db1*W*W))
+
diff --git a/win32/deps/library/survival/tests/doweight.Rout.save b/win32/deps/library/survival/tests/doweight.Rout.save
new file mode 100644
index 0000000..2a30311
--- /dev/null
+++ b/win32/deps/library/survival/tests/doweight.Rout.save
@@ -0,0 +1,429 @@
+
+R version 2.15.0 (2012-03-30)
+Copyright (C) 2012 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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> # Tests of the weighted Cox model
+> #
+> # Similar data set to test1, but add weights,
+> #                                    a double-death/censor tied time
+> #                                    a censored last subject
+> # The latter two are cases covered only feebly elsewhere.
+> # 
+> # The data set testw2 has the same data, but done via replication
+> #
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> 
+> testw1 <- data.frame(time=  c(1,1,2,2,2,2,3,4,5),
++ 		    status= c(1,0,1,1,1,0,0,1,0),
++ 		    x=      c(2,0,1,1,0,1,0,1,0),
++ 		    wt =    c(1,2,3,4,3,2,1,2,1))
+> xx <- c(1,2,3,4,3,2,1,2,1)
+> testw2 <- data.frame(time=   rep(c(1,1,2,2,2,2,3,4,5), xx),
++ 		     status= rep(c(1,0,1,1,1,0,0,1,0), xx),
++ 		     x=      rep(c(2,0,1,1,0,1,0,1,0), xx),
++ 		     id=     rep(1:9, xx))
+> indx <- match(1:9, testw2$id)
+> testw2 <- data.frame(time=   rep(c(1,1,2,2,2,2,3,4,5), xx),
++ 		     status= rep(c(1,0,1,1,1,0,0,1,0), xx),
++ 		     x=      rep(c(2,0,1,1,0,1,0,1,0), xx),
++ 		     id=     rep(1:9, xx))
+> indx <- match(1:9, testw2$id)
+> 
+> fit0 <- coxph(Surv(time, status) ~x, testw1, weights=wt,
++ 		    method='breslow', iter=0)
+> fit0b <- coxph(Surv(time, status) ~x, testw2, method='breslow', iter=0)
+> fit  <- coxph(Surv(time, status) ~x, testw1, weights=wt, method='breslow')
+> fitb <- coxph(Surv(time, status) ~x, testw2, method='breslow')
+> 
+> texp <- function(beta) {  # expected, Breslow estimate
++     r <- exp(beta)
++     temp <- cumsum(c(1/(r^2 + 11*r +7), 10/(11*r +5), 2/(2*r+1)))
++     c(r^2, 1,r,r,1,r,1,r,1)* temp[c(1,1,2,2,2,2,2,3,3)]
++     }
+> aeq(texp(0),  c(1/19, 1/19, rep(103/152, 5), rep(613/456,2))) #verify texp()
+[1] TRUE
+> 
+> xbar <- function(beta) { # xbar, Breslow estimate
++     r <- exp(beta)
++     temp <- r* rep(c(2*r + 11, 11/10, 1), c(2, 5, 2))
++     temp * texp(beta)
++     }
+> 
+> fit0
+Call:
+coxph(formula = Surv(time, status) ~ x, data = testw1, weights = wt, 
+    method = "breslow", iter = 0)
+
+
+  coef exp(coef) se(coef) z p
+x    0         1    0.586 0 1
+
+Likelihood ratio test=0  on 1 df, p=1  n= 9, number of events= 5 
+> summary(fit)
+Call:
+coxph(formula = Surv(time, status) ~ x, data = testw1, weights = wt, 
+    method = "breslow")
+
+  n= 9, number of events= 5 
+
+    coef exp(coef) se(coef)     z Pr(>|z|)
+x 0.8596    2.3621   0.7131 1.205    0.228
+
+  exp(coef) exp(-coef) lower .95 upper .95
+x     2.362     0.4233    0.5839     9.556
+
+Concordance= 0.638  (se = 0.159 )
+Rsquare= 0.171   (max possible= 0.999 )
+Likelihood ratio test= 1.69  on 1 df,   p=0.1932
+Wald test            = 1.45  on 1 df,   p=0.2281
+Score (logrank) test = 1.52  on 1 df,   p=0.217
+
+> aeq(resid(fit0), testw1$status - texp(0))
+[1] TRUE
+> resid(fit0, type='score')
+          1           2           3           4           5           6 
+ 1.24653740  0.03601108  0.10056700  0.10056700 -0.22180142 -0.21193300 
+          7           8           9 
+ 0.46569858 -0.10082189  0.91014302 
+> resid(fit0, type='scho')
+         1          2          2          2          4 
+ 1.3157895  0.3125000  0.3125000 -0.6875000  0.3333333 
+> 
+> aeq(resid(fit0, type='mart'), (resid(fit0b, type='mart'))[indx])
+[1] TRUE
+> aeq(resid(fit0, type='scor'), (resid(fit0b, type='scor'))[indx])
+[1] TRUE
+> aeq(unique(resid(fit0, type='scho')), unique(resid(fit0b, type='scho')))
+[1] TRUE
+> 
+> 
+> aeq(resid(fit, type='mart'), testw1$status - texp(fit$coef))
+[1] TRUE
+> resid(fit, type='score')
+          1           2           3           4           5           6 
+ 0.88681615  0.02497653  0.03608964  0.03608964 -0.54297652 -0.12528780 
+          7           8           9 
+ 0.29564605 -0.09476911  0.58400064 
+> resid(fit, type='scho')
+         1          2          2          2          4 
+ 1.0368337  0.1613774  0.1613774 -0.8386226  0.1746960 
+> aeq(resid(fit, type='mart'), (resid(fitb, type='mart'))[indx])
+[1] TRUE
+> aeq(resid(fit, type='scor'), (resid(fitb, type='scor'))[indx])
+[1] TRUE
+> aeq(unique(resid(fit, type='scho')), unique(resid(fitb, type='scho')))
+[1] TRUE
+> rr1 <- resid(fit, type='mart')
+> rr2 <- resid(fit, type='mart', weighted=T)
+> aeq(rr2/rr1, testw1$wt)
+[1] TRUE
+> 
+> rr1 <- resid(fit, type='score')
+> rr2 <- resid(fit, type='score', weighted=T)
+> aeq(rr2/rr1, testw1$wt)
+[1] TRUE
+> 
+> fit  <- coxph(Surv(time, status) ~x, testw1, weights=wt, method='efron')
+> fit
+Call:
+coxph(formula = Surv(time, status) ~ x, data = testw1, weights = wt, 
+    method = "efron")
+
+
+   coef exp(coef) se(coef)    z    p
+x 0.873      2.39    0.713 1.22 0.22
+
+Likelihood ratio test=1.75  on 1 df, p=0.186  n= 9, number of events= 5 
+> resid(fit, type='mart')
+          1           2           3           4           5           6 
+ 0.85334536 -0.02560716  0.32265266  0.32265266  0.71696234 -1.07772629 
+          7           8           9 
+-0.45034077 -0.90490339 -0.79598658 
+> resid(fit, type='score')
+          1           2           3           4           5           6 
+ 0.88116056  0.02477248  0.06057806  0.06057806 -0.59724033 -0.16737066 
+          7           8           9 
+ 0.38040295 -0.13750290  0.66631324 
+> resid(fit, type='scho')
+         1          2          2          2          4 
+ 1.0325955  0.1621759  0.1621759 -0.8378241  0.1728229 
+> 
+> # Tests of the weighted Cox model, AG form of the data
+> #   Same solution as doweight1.s
+> #
+> testw3 <- data.frame(id  =  c( 1, 1, 2, 3, 3, 3, 4, 5, 5, 6, 7, 8, 8, 9),
++ 		     begin= c( 0, 5, 0, 0,10,15, 0, 0,14, 0, 0, 0,23, 0),
++ 		     time=  c( 5,10,10,10,15,20,20,14,20,20,30,23,40,50),
++ 		    status= c( 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0),
++ 		    x=      c( 2, 2, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0),
++ 		    wt =    c( 1, 1, 2, 3, 3, 3, 4, 3, 3, 2, 1, 2, 2, 1))
+> 
+> fit0 <- coxph(Surv(begin,time, status) ~x, testw3, weights=wt,
++ 		    method='breslow', iter=0)
+> fit  <- coxph(Surv(begin,time, status) ~x, testw3, weights=wt, method='breslow')
+> fit0
+Call:
+coxph(formula = Surv(begin, time, status) ~ x, data = testw3, 
+    weights = wt, method = "breslow", iter = 0)
+
+
+  coef exp(coef) se(coef) z p
+x    0         1    0.586 0 1
+
+Likelihood ratio test=0  on 1 df, p=1  n= 14, number of events= 5 
+> summary(fit)
+Call:
+coxph(formula = Surv(begin, time, status) ~ x, data = testw3, 
+    weights = wt, method = "breslow")
+
+  n= 14, number of events= 5 
+
+    coef exp(coef) se(coef)     z Pr(>|z|)
+x 0.8596    2.3621   0.7131 1.205    0.228
+
+  exp(coef) exp(-coef) lower .95 upper .95
+x     2.362     0.4233    0.5839     9.556
+
+Concordance= 0.638  (se = 0.159 )
+Rsquare= 0.114   (max possible= 0.991 )
+Likelihood ratio test= 1.69  on 1 df,   p=0.1932
+Wald test            = 1.45  on 1 df,   p=0.2281
+Score (logrank) test = 1.52  on 1 df,   p=0.217
+
+> resid(fit0, type='mart', collapse=testw3$id)
+          1           2           3           4           5           6 
+ 0.94736842 -0.05263158  0.32236842  0.32236842  0.32236842 -0.67763158 
+          7           8           9 
+-0.67763158 -0.34429825 -1.34429825 
+> resid(fit0, type='score', collapse=testw3$id)
+          1           2           3           4           5           6 
+ 1.24653740  0.03601108  0.10056700  0.10056700 -0.22180142 -0.21193300 
+          7           8           9 
+ 0.46569858 -0.10082189  0.91014302 
+> resid(fit0, type='scho')
+        10         20         20         20         40 
+ 1.3157895  0.3125000  0.3125000 -0.6875000  0.3333333 
+> 
+> resid(fit, type='mart', collapse=testw3$id)
+          1           2           3           4           5           6 
+ 0.85531186 -0.02593169  0.17636221  0.17636221  0.65131344 -0.82363779 
+          7           8           9 
+-0.34868656 -0.64894181 -0.69807852 
+> resid(fit, type='score', collapse=testw3$id)
+          1           2           3           4           5           6 
+ 0.88681615  0.02497653  0.03608964  0.03608964 -0.54297652 -0.12528780 
+          7           8           9 
+ 0.29564605 -0.09476911  0.58400064 
+> resid(fit, type='scho')
+        10         20         20         20         40 
+ 1.0368337  0.1613774  0.1613774 -0.8386226  0.1746960 
+> fit0 <- coxph(Surv(begin, time, status) ~x,testw3, weights=wt, iter=0)
+> resid(fit0, 'mart', collapse=testw3$id)
+          1           2           3           4           5           6 
+ 0.94736842 -0.05263158  0.44454887  0.44454887  0.44454887 -0.88126566 
+          7           8           9 
+-0.88126566 -0.54793233 -1.54793233 
+> resid(coxph(Surv(begin, time, status) ~1, testw3, weights=wt)
++ 		      , collapse=testw3$id)  #Null model
+          1           2           3           4           5           6 
+ 0.94736842 -0.05263158  0.44454887  0.44454887  0.44454887 -0.88126566 
+          7           8           9 
+-0.88126566 -0.54793233 -1.54793233 
+> 
+> fit  <- coxph(Surv(begin,time, status) ~x, testw3, weights=wt, method='efron')
+> fit
+Call:
+coxph(formula = Surv(begin, time, status) ~ x, data = testw3, 
+    weights = wt, method = "efron")
+
+
+   coef exp(coef) se(coef)    z    p
+x 0.873      2.39    0.713 1.22 0.22
+
+Likelihood ratio test=1.75  on 1 df, p=0.186  n= 14, number of events= 5 
+> resid(fit, type='mart', collapse=testw3$id)
+          1           2           3           4           5           6 
+ 0.85334536 -0.02560716  0.32265266  0.32265266  0.71696234 -1.07772629 
+          7           8           9 
+-0.45034077 -0.90490339 -0.79598658 
+> resid(fit, type='score', collapse=testw3$id)
+          1           2           3           4           5           6 
+ 0.88116056  0.02477248  0.06057806  0.06057806 -0.59724033 -0.16737066 
+          7           8           9 
+ 0.38040295 -0.13750290  0.66631324 
+> resid(fit, type='scho')
+        10         20         20         20         40 
+ 1.0325955  0.1621759  0.1621759 -0.8378241  0.1728229 
+> #
+> # Check out the impact of weights on the dfbetas
+> #    Am I computing them correctly?
+> #
+> wtemp <- rep(1,26)
+> wtemp[c(5,10,15)] <- 2:4
+> fit <- coxph(Surv(futime, fustat) ~ age + ecog.ps, ovarian, weights=wtemp)
+> rr <- resid(fit, 'dfbeta')
+> 
+> fit1 <- coxph(Surv(futime, fustat) ~ age + ecog.ps, ovarian, weights=wtemp,
++ 	         subset=(-5))
+> fit2 <- coxph(Surv(futime, fustat) ~ age + ecog.ps, ovarian, weights=wtemp,
++ 	         subset=(-10))
+> fit3 <- coxph(Surv(futime, fustat) ~ age + ecog.ps, ovarian, weights=wtemp,
++ 	         subset=(-15))
+> 
+> #
+> # Effect of case weights on expected survival curves post Cox model
+> #
+> fit0  <- coxph(Surv(time, status) ~x, testw1, weights=wt, method='breslow',
++ 	       iter=0)
+> fit0b <- coxph(Surv(time, status) ~x, testw2, method='breslow', iter=0)
+> 
+> surv1 <- survfit(fit0, newdata=list(x=0))
+> surv2 <- survfit(fit0b, newdata=list(x=0))
+> aeq(surv1$surv, surv2$surv)
+[1] TRUE
+> #
+> # Check out the Efron approx. 
+> #
+> 
+> fit0 <- coxph(Surv(time, status) ~x,testw1, weights=wt, iter=0)
+> fit  <- coxph(Surv(time, status) ~x,testw1, weights=wt)
+> resid(fit0, 'mart')
+          1           2           3           4           5           6 
+ 0.94736842 -0.05263158  0.44454887  0.44454887  0.44454887 -0.88126566 
+          7           8           9 
+-0.88126566 -0.54793233 -1.54793233 
+> resid(coxph(Surv(time, status) ~1, testw1, weights=wt))  #Null model
+          1           2           3           4           5           6 
+ 0.94736842 -0.05263158  0.44454887  0.44454887  0.44454887 -0.88126566 
+          7           8           9 
+-0.88126566 -0.54793233 -1.54793233 
+> 
+> # lfun is the known log-likelihood for this data set, worked out in the
+> #   appendix of Therneau and Grambsch
+> # ufun is the score vector and ifun the information matrix
+> lfun <- function(beta) {
++     r <- exp(beta)
++     a <- 7*r +3
++     b <- 4*r +2
++     11*beta - ( log(r^2 + 11*r +7) + 
++ 	(10/3)*(log(a+b) + log(2*a/3 +b) + log(a/3 +b)) + 2*log(2*r +1))
++     }
+> aeq(fit0$log[1], lfun(0))
+[1] TRUE
+> aeq(fit$log[2], lfun(fit$coef))
+[1] TRUE
+> 
+> ufun <- function(beta, efron=T) {  #score statistic
++     r <- exp(beta)
++     xbar1 <- (2*r^2+11*r)/(r^2+11*r +7)
++     xbar2 <- 11*r/(11*r +5)
++     xbar3 <-  2*r/(2*r +1)
++     xbar2b<- 26*r/(26*r+12)
++     xbar2c<- 19*r/(19*r + 9)
++     temp <- 11 - (xbar1 + 2*xbar3)
++     if (efron) temp - (10/3)*(xbar2 + xbar2b + xbar2c)
++     else       temp - 10*xbar2
++     }
+> print(ufun(fit$coef) < 1e-4)  # Should be true
+   x 
+TRUE 
+> 
+> ifun <- function(beta, efron=T) {  # information matrix
++     r <- exp(beta)
++     xbar1 <- (2*r^2+11*r)/(r^2+11*r +7)
++     xbar2 <- 11*r/(11*r +5)
++     xbar3 <-  2*r/(2*r +1)
++     xbar2b<- 26*r/(26*r+12)
++     xbar2c<- 19*r/(19*r + 9)
++     temp <- ((4*r^2 + 11*r)/(r^2+11*r +7) - xbar1^2) +
++ 	    2*(xbar3 - xbar3^2)
++     if (efron) temp + (10/3)*((xbar2- xbar2^2) + (xbar2b - xbar2b^2) +
++ 			      (xbar2c -xbar2c^2))
++     else       temp + 10 * (xbar2- xbar2^2)
++     }
+> 
+> aeq(fit0$var, 1/ifun(0))
+[1] TRUE
+> aeq(fit$var, 1/ifun(fit$coef))
+[1] TRUE
+> 
+> 
+>       
+> # Make sure that the weights pass through the residuals correctly
+> rr1 <- resid(fit, type='mart')
+> rr2 <- resid(fit, type='mart', weighted=T)
+> aeq(rr2/rr1, testw1$wt)
+[1] TRUE
+> rr1 <- resid(fit, type='score')
+> rr2 <- resid(fit, type='score', weighted=T)
+> aeq(rr2/rr1, testw1$wt)
+[1] TRUE
+> 
+> #
+> # Look at the individual components
+> #
+> dt0 <- coxph.detail(fit0)
+> dt <- coxph.detail(fit)
+> aeq(sum(dt$score), ufun(fit$coef))  #score statistic
+[1] TRUE
+> aeq(sum(dt0$score), ufun(0))
+[1] TRUE
+> aeq(dt0$hazard, c(1/19, (10/3)*(1/16 + 1/(6+20/3) + 1/(6+10/3)), 2/3))
+[1] TRUE
+> 
+> 
+> 
+> rm(fit, fit0, rr1, rr2, dt, dt0)
+> #
+> # Effect of weights on the robust variance
+> #
+> test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0),
++ 		    wt=    c(3,0,1,1,1,1,1),
++                     id=    1:7)
+> testx <- data.frame(time=  c(4,4,4,1,1,2,2,3),
++                     status=c(1,1,1,1,0,1,1,0),
++                     x=     c(0,0,0,1,1,1,0,0),
++ 		    wt=    c(1,1,1,1,1,1,1,1),
++                     id=    1:8)
+>  
+> fit1 <- coxph(Surv(time, status) ~x + cluster(id), test1, method='breslow',
++               weights=wt)
+> fit2 <- coxph(Surv(time, status) ~x + cluster(id), testx, method='breslow')
+> 
+> db1 <- resid(fit1, 'dfbeta', weighted=F)
+> db1 <- db1[-2]         #toss the missing
+> db2 <- resid(fit2, 'dfbeta')
+> aeq(db1, db2[3:8])
+[1] TRUE
+> 
+> W <- c(3,1,1,1,1,1)   #Weights, after removal of the missing value
+> aeq(fit2$var, sum(db1*db1*W))
+[1] TRUE
+> aeq(fit1$var, sum(db1*db1*W*W))
+[1] TRUE
+> 
+> 
+> proc.time()
+   user  system elapsed 
+  0.292   0.036   0.325 
diff --git a/win32/deps/library/survival/tests/expected.R b/win32/deps/library/survival/tests/expected.R
new file mode 100644
index 0000000..d82a3c4
--- /dev/null
+++ b/win32/deps/library/survival/tests/expected.R
@@ -0,0 +1,286 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#  Tests of expected survival
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+#
+# This makes several scripts easier
+#  Certain tests depended in the now-depreciated date library
+{if (is.R()) mdy.date <- function(m, d, y) {
+    y <- ifelse(y<100, y+1900, y)
+    as.Date(paste(m,d,y, sep='/'), "%m/%d/%Y")
+    }
+else mdy.date <- function(m,d,y) {
+    y <- ifelse(y<100, y+1900, y)
+    timeDate(paste(y, m, d, sep='/'), in.format="%Y/%m/%d")
+    }
+ }
+
+# This function takes a single subject and walks down the rate table
+# Input: the vector of starting points, futime, and a ratetable
+# Output: the full history of walking through said table. Let n= #unique
+#   rates that were used
+#       cell = n by #dims of the table: index of the table cell
+#       days = time spent in cell
+#       hazard= accumulated hazard = days * rate
+# This does not do date or factor conversions -- start has to be numeric
+#
+ratewalk <- function(start, futime, ratetable=survexp.us) {
+    if (!is.ratetable(ratetable)) stop("Bad rate table")
+    ratedim <- dim(ratetable)
+    nvar <- length(ratedim)
+    if (length(start) != nvar) stop("Wrong length for start")
+    if (futime <=0) stop("Invalid futime")
+
+    attR <- attributes(ratetable)
+    discrete <- (attR$type ==1)  #discrete categories
+
+    maxn <- sum(!discrete)*prod(ratedim[!discrete]) #most cells you can hit
+    cell <- matrix(0, nrow=maxn, ncol=nvar)
+    days <- hazard <- double(maxn)
+
+    eps <- 1e-8  #Avoid round off error
+    n <- 0
+    while (futime >0) {
+        n <- n+1
+        #what cell am I in?
+        # Note that at the edges of the rate table, we use the edge: if
+        #   it only goes up the the year 2000, year 2000 is used for any
+        #   dates beyond.  This effectively eliminates one boundary
+        cell[n,discrete] <- start[discrete]
+        edge <- futime  #time to nearest edge, or finish
+        for (j in which(!discrete)) {
+            indx <- sum(start[j] >= attR$cutpoints[[j]]-eps)
+            cell[n, j] <- max(1, indx)
+            if (indx < ratedim[j]) 
+                edge <- min(edge, (attR$cutpoints[[j]])[indx+1] - start[j])
+            }
+        days[n] <- edge  #this many days in the cell
+        # using a matrix as a subscript is so handy sometimes
+        hazard[n] <- edge * (as.matrix(ratetable))[cell[n,,drop=F]]
+        futime <- futime - edge  #amount of time yet to account for
+        start[!discrete] <- start[!discrete] + edge  #walk forward in time
+        }
+    list(cell=cell[1:n,], days=days[1:n], hazard=hazard[1:n])
+    }
+
+# Simple test of ratewalk: 20 years old, start on 7Sep 1960 (day 250)
+#   116 days at the 1960, 20 year old male rate, through the end of the day
+#     on 12/31/1960, then 84 days at the 1961 rate.  
+#   The decennial q for 1960 males is .00169.
+zz <- ratewalk(c(20.4*365.25, 1, 250), 200)
+all.equal(zz$hazard[1], -(116/365.25)*log(1-.00169))
+all.equal(zz$days, c(116,84))
+
+        
+#
+# Simple case 1: a single male subject, born 1/1/36 and entered on study 1/2/55
+#
+#  Compute the 1, 5, 10 and 12 year expected survival
+
+temp1 <- mdy.date(1,1,36)
+temp2 <- mdy.date(1,2,55)
+exp1 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=1, race='white'),
+		    ratetable=survexp.usr,times=c(366, 1827, 3653, 4383))
+
+tyear <- as.numeric(temp2 - mdy.date(1,1,1960))
+h1 <- ratewalk(c(temp2-temp1, 1, 1, tyear), 366,  survexp.usr)
+h2 <- ratewalk(c(temp2-temp1, 1, 1, tyear), 1827, survexp.usr)
+h3 <- ratewalk(c(temp2-temp1, 1, 1, tyear), 3653, survexp.usr)
+h4 <- ratewalk(c(temp2-temp1, 1, 1, tyear), 4383, survexp.usr)
+
+aeq(-log(exp1$surv), c(sum(h1$hazard), sum(h2$hazard), sum(h3$hazard),
+                       sum(h4$hazard)))
+
+
+# Just a little harder: 
+#   Born 3/1/25 and entered the study on 6/10/55.  The code creates shifted
+#   dates to align with US rate tables - entry is 59 days earlier (days from
+#   1/1/25 to 3/1/25).
+#
+temp1 <- mdy.date(3,1,25)
+temp2 <- mdy.date(6,10,55)
+exp1 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=2, race='black'),
+		    ratetable=survexp.usr,times=c(366, 1827, 3653, 4383))
+
+tyear <- as.numeric(temp2 - mdy.date(1,1,1960)) - 59
+h1 <- ratewalk(c(temp2-temp1, 2, 2, tyear), 366,  survexp.usr)
+h2 <- ratewalk(c(temp2-temp1, 2, 2, tyear), 1827, survexp.usr)
+h3 <- ratewalk(c(temp2-temp1, 2, 2, tyear), 3653, survexp.usr)
+h4 <- ratewalk(c(temp2-temp1, 2, 2, tyear), 4383, survexp.usr)
+
+aeq(-log(exp1$surv), c(sum(h1$hazard), sum(h2$hazard), sum(h3$hazard),
+                       sum(h4$hazard)))
+
+rm(temp1, temp2, zz, exp1, h1, h2, h3, h4 )
+
+#
+# Simple case 2: make sure that the averages are correct, for Ederer method
+#
+#  Compute the 1, 5, 10 and 12 year expected survival
+
+temp1 <- mdy.date(1:6,6:11,1890:1895)
+temp2 <- mdy.date(6:1,11:6,c(55:50))
+temp3 <- c(1,2,1,2,1,2)
+age <- temp2 - temp1
+
+exp1 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=temp3),
+		       times=c(366, 1827, 3653, 4383))
+exp2 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=temp3) + I(1:6),
+			times=c(366, 1827, 3653, 4383))
+exp3 <- exp2$surv
+for (i in 1:length(temp1)){
+    exp3[,i] <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=temp3),
+                        times=c(366, 1827, 3653, 4383), subset=i)$surv
+    }
+
+             
+print(aeq(exp2$surv, exp3))
+print(all.equal(exp1$surv, apply(exp2$surv, 1, mean)))
+
+# They agree, but are they right?
+#
+for (i in 1:length(temp1)) {
+    offset <- as.numeric(temp1[i] - mdy.date(1,1, 1889+i))
+    tyear = (as.numeric(temp2[i] - mdy.date(1,1,1960))) - offset
+    haz1 <- ratewalk(c((temp2-temp1)[i], temp3[i], tyear), 366)
+    haz2 <- ratewalk(c((temp2-temp1)[i], temp3[i], tyear), 1827)
+    haz3 <- ratewalk(c((temp2-temp1)[i], temp3[i], tyear), 3653)
+    haz4 <- ratewalk(c((temp2-temp1)[i], temp3[i], tyear), 4383)
+    print(aeq(-log(exp2$surv[,i]), c(sum(haz1$hazard), sum(haz2$hazard),
+                                    sum(haz3$hazard), sum(haz4$hazard))))
+    }
+
+#
+# Check that adding more time points doesn't change things
+#
+exp4 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=temp3) + I(1:6),
+		times=sort(c(366, 1827, 3653, 4383, 30*(1:100))))
+aeq(exp4$surv[match(exp2$time, exp4$time),], exp2$surv)
+
+exp4 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=temp3),
+		times=sort(c(366, 1827, 3653, 4383, 30*(1:100))))
+aeq(exp1$surv, exp4$surv[match(exp1$time, exp4$time, nomatch=0)])
+
+
+#
+# Now test Hakulinen's method, assuming an analysis date of 3/1/57
+#
+futime <- mdy.date(3,1,57) - temp2
+xtime  <- sort(c(futime, 30, 60, 185, 365))
+
+exp1 <- survexp(futime ~ ratetable(year=temp2, age=(temp2-temp1), sex=1),
+		times=xtime, conditional=F)
+exp2 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=1) + I(1:6),
+			times=futime)
+
+wt <- rep(1,6)
+con <- double(6)
+for (i in 1:6) {
+    con[i] <- sum(exp2$surv[i,i:6])/sum(wt[i:6])
+    wt <- exp2$surv[i,]
+    }
+
+exp1$surv[match(futime, xtime)]
+aeq(exp1$surv[match(futime, xtime)], cumprod(con))
+
+
+#
+# Now for the conditional method
+#
+exp1 <- survexp(futime ~ ratetable(year=temp2, age=(temp2-temp1), sex=1),
+		times=xtime, conditional=T)
+
+cond <- exp2$surv
+for (i in 6:2) cond[i,] <- (cond[i,]/cond[i-1,])  #conditional survival
+for (i in 1:6) con[i] <- exp(mean(log(cond[i, i:6])))
+
+all.equal(exp1$surv[match(futime, xtime)], cumprod(con))
+cumprod(con)
+
+rm(con, cond, exp1, exp2, wt, temp1, temp2, age)
+rm(exp3, exp4, futime, xtime)
+
+#
+# Test out expected survival, when the parent pop is another Cox model
+#
+test1 <- data.frame(time=  c(4, 3,1,1,2,2,3),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0))
+
+fit <- coxph(Surv(time, status) ~x, test1, method='breslow')
+
+dummy <- data.frame(time=c(.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5),
+		    status=c(1,0,1,0,1,0,1,1,1), x=(-4:4)/2)
+
+efit <- survexp(time ~ ratetable(x=x), dummy, ratetable=fit, cohort=F)
+
+#
+# Now, compare to the true answer, which is known to us
+#
+ss <- exp(fit$coef)
+haz <- c( 1/(3*ss+3), 2/(ss+3), 1) #truth at time 0,1,2,4+
+chaz <- cumsum(c(0,haz))
+chaz2 <- chaz[c(1,2,2,3,3,3,3,4,4)]
+
+risk <- exp(fit$coef*dummy$x)
+efit2 <- exp(-risk*chaz2)
+
+all.equal(as.vector(efit), as.vector(efit2))  #ignore mismatched name attrib
+
+#
+# Now test the direct-adjusted curve (Ederer)
+#
+efit <- survexp( ~ ratetable(x=x), dummy, ratetable=fit, se=F)
+direct <- survfit(fit, newdata=dummy, censor=FALSE)$surv
+
+chaz <- chaz[-1]                  #drop time 0
+d2 <- exp(outer(-chaz, risk))
+all.equal(as.vector(direct), as.vector(d2))   #this tests survfit
+
+all.equal(as.vector(efit$surv), as.vector(apply(direct,1,mean)))  #direct
+
+# Check out the "times" arg of survexp
+efit2 <- survexp( ~ ratetable(x=x), dummy, ratetable=fit, se=F,
+                  times=c(.5, 2, 3.5,6))
+aeq(efit2$surv, c(1, efit$surv[c(2,2,3)]))
+
+#
+# Now test out the Hakulinen method (Bonsel's method)
+#  By construction, we have a large correlation between x and censoring
+#
+# In theory, hak1 and hak2 would be the same.  In practice, like a KM and
+#   F-H, they differ when n is small.
+#
+efit <- survexp( time ~ ratetable(x=x), dummy, ratetable=fit, se=F)
+
+surv  <- wt <- rep(1,9)
+tt <- c(1,2,4)
+hak1 <- hak2 <- NULL
+for (i in 1:3) {
+    wt[dummy$time < tt[i]]  <- 0
+    hak1 <- c(hak1,  exp(-sum(haz[i]*risk*surv*wt)/sum(surv*wt)))
+    hak2 <- c(hak2,  sum(exp(-haz[i]*risk)*surv*wt)/sum(surv*wt))
+    surv <- surv * exp(-haz[i]*risk)
+    }
+
+all.equal(as.vector(efit$surv), as.vector(cumprod(hak2)))
+
+#
+#  Now do the conditional estimate
+#
+efit <- survexp( time ~ ratetable(x=x), dummy, ratetable=fit, se=F,
+			conditional=T)
+wt <- rep(1,9)
+cond <- NULL
+for (i in 1:3) {
+    wt[dummy$time < tt[i]]  <- 0
+    cond <- c(cond,  exp(-sum(haz[i]*risk*wt)/sum(wt)))
+    }
+
+all.equal(as.vector(efit$surv), as.vector(cumprod(cond)))
+
+rm(wt, cond, efit, tt, surv, hak1, hak2)
+rm(fit, dummy, ss, efit2, chaz, chaz2, risk)
+rm(d2, direct)
diff --git a/win32/deps/library/survival/tests/expected.Rout.save b/win32/deps/library/survival/tests/expected.Rout.save
new file mode 100644
index 0000000..67a8b0d
--- /dev/null
+++ b/win32/deps/library/survival/tests/expected.Rout.save
@@ -0,0 +1,329 @@
+
+R version 2.11.1 (2010-05-31)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #  Tests of expected survival
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> #
+> # This makes several scripts easier
+> #  Certain tests depended in the now-depreciated date library
+> {if (is.R()) mdy.date <- function(m, d, y) {
++     y <- ifelse(y<100, y+1900, y)
++     as.Date(paste(m,d,y, sep='/'), "%m/%d/%Y")
++     }
++ else mdy.date <- function(m,d,y) {
++     y <- ifelse(y<100, y+1900, y)
++     timeDate(paste(y, m, d, sep='/'), in.format="%Y/%m/%d")
++     }
++  }
+> 
+> # This function takes a single subject and walks down the rate table
+> # Input: the vector of starting points, futime, and a ratetable
+> # Output: the full history of walking through said table. Let n= #unique
+> #   rates that were used
+> #       cell = n by #dims of the table: index of the table cell
+> #       days = time spent in cell
+> #       hazard= accumulated hazard = days * rate
+> # This does not do date or factor conversions -- start has to be numeric
+> #
+> ratewalk <- function(start, futime, ratetable=survexp.us) {
++     if (!is.ratetable(ratetable)) stop("Bad rate table")
++     ratedim <- dim(ratetable)
++     nvar <- length(ratedim)
++     if (length(start) != nvar) stop("Wrong length for start")
++     if (futime <=0) stop("Invalid futime")
++ 
++     attR <- attributes(ratetable)
++     discrete <- (attR$type ==1)  #discrete categories
++ 
++     maxn <- sum(!discrete)*prod(ratedim[!discrete]) #most cells you can hit
++     cell <- matrix(0, nrow=maxn, ncol=nvar)
++     days <- hazard <- double(maxn)
++ 
++     eps <- 1e-8  #Avoid round off error
++     n <- 0
++     while (futime >0) {
++         n <- n+1
++         #what cell am I in?
++         # Note that at the edges of the rate table, we use the edge: if
++         #   it only goes up the the year 2000, year 2000 is used for any
++         #   dates beyond.  This effectively eliminates one boundary
++         cell[n,discrete] <- start[discrete]
++         edge <- futime  #time to nearest edge, or finish
++         for (j in which(!discrete)) {
++             indx <- sum(start[j] >= attR$cutpoints[[j]]-eps)
++             cell[n, j] <- max(1, indx)
++             if (indx < ratedim[j]) 
++                 edge <- min(edge, (attR$cutpoints[[j]])[indx+1] - start[j])
++             }
++         days[n] <- edge  #this many days in the cell
++         # using a matrix as a subscript is so handy sometimes
++         hazard[n] <- edge * (as.matrix(ratetable))[cell[n,,drop=F]]
++         futime <- futime - edge  #amount of time yet to account for
++         start[!discrete] <- start[!discrete] + edge  #walk forward in time
++         }
++     list(cell=cell[1:n,], days=days[1:n], hazard=hazard[1:n])
++     }
+> 
+> # Simple test of ratewalk: 20 years old, start on 7Sep 1960 (day 250)
+> #   116 days at the 1960, 20 year old male rate, through the end of the day
+> #     on 12/31/1960, then 84 days at the 1961 rate.  
+> #   The decennial q for 1960 males is .00169.
+> zz <- ratewalk(c(20.4*365.25, 1, 250), 200)
+> all.equal(zz$hazard[1], -(116/365.25)*log(1-.00169))
+[1] TRUE
+> all.equal(zz$days, c(116,84))
+[1] TRUE
+> 
+>         
+> #
+> # Simple case 1: a single male subject, born 1/1/36 and entered on study 1/2/55
+> #
+> #  Compute the 1, 5, 10 and 12 year expected survival
+> 
+> temp1 <- mdy.date(1,1,36)
+> temp2 <- mdy.date(1,2,55)
+> exp1 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=1, race='white'),
++ 		    ratetable=survexp.usr,times=c(366, 1827, 3653, 4383))
+> 
+> tyear <- as.numeric(temp2 - mdy.date(1,1,1960))
+> h1 <- ratewalk(c(temp2-temp1, 1, 1, tyear), 366,  survexp.usr)
+> h2 <- ratewalk(c(temp2-temp1, 1, 1, tyear), 1827, survexp.usr)
+> h3 <- ratewalk(c(temp2-temp1, 1, 1, tyear), 3653, survexp.usr)
+> h4 <- ratewalk(c(temp2-temp1, 1, 1, tyear), 4383, survexp.usr)
+> 
+> aeq(-log(exp1$surv), c(sum(h1$hazard), sum(h2$hazard), sum(h3$hazard),
++                        sum(h4$hazard)))
+[1] TRUE
+> 
+> 
+> # Just a little harder: 
+> #   Born 3/1/25 and entered the study on 6/10/55.  The code creates shifted
+> #   dates to align with US rate tables - entry is 59 days earlier (days from
+> #   1/1/25 to 3/1/25).
+> #
+> temp1 <- mdy.date(3,1,25)
+> temp2 <- mdy.date(6,10,55)
+> exp1 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=2, race='black'),
++ 		    ratetable=survexp.usr,times=c(366, 1827, 3653, 4383))
+> 
+> tyear <- as.numeric(temp2 - mdy.date(1,1,1960)) - 59
+> h1 <- ratewalk(c(temp2-temp1, 2, 2, tyear), 366,  survexp.usr)
+> h2 <- ratewalk(c(temp2-temp1, 2, 2, tyear), 1827, survexp.usr)
+> h3 <- ratewalk(c(temp2-temp1, 2, 2, tyear), 3653, survexp.usr)
+> h4 <- ratewalk(c(temp2-temp1, 2, 2, tyear), 4383, survexp.usr)
+> 
+> aeq(-log(exp1$surv), c(sum(h1$hazard), sum(h2$hazard), sum(h3$hazard),
++                        sum(h4$hazard)))
+[1] TRUE
+> 
+> rm(temp1, temp2, zz, exp1, h1, h2, h3, h4 )
+> 
+> #
+> # Simple case 2: make sure that the averages are correct, for Ederer method
+> #
+> #  Compute the 1, 5, 10 and 12 year expected survival
+> 
+> temp1 <- mdy.date(1:6,6:11,1890:1895)
+> temp2 <- mdy.date(6:1,11:6,c(55:50))
+> temp3 <- c(1,2,1,2,1,2)
+> age <- temp2 - temp1
+> 
+> exp1 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=temp3),
++ 		       times=c(366, 1827, 3653, 4383))
+> exp2 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=temp3) + I(1:6),
++ 			times=c(366, 1827, 3653, 4383))
+> exp3 <- exp2$surv
+> for (i in 1:length(temp1)){
++     exp3[,i] <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=temp3),
++                         times=c(366, 1827, 3653, 4383), subset=i)$surv
++     }
+> 
+>              
+> print(aeq(exp2$surv, exp3))
+[1] TRUE
+> print(all.equal(exp1$surv, apply(exp2$surv, 1, mean)))
+[1] TRUE
+> 
+> # They agree, but are they right?
+> #
+> for (i in 1:length(temp1)) {
++     offset <- as.numeric(temp1[i] - mdy.date(1,1, 1889+i))
++     tyear = (as.numeric(temp2[i] - mdy.date(1,1,1960))) - offset
++     haz1 <- ratewalk(c((temp2-temp1)[i], temp3[i], tyear), 366)
++     haz2 <- ratewalk(c((temp2-temp1)[i], temp3[i], tyear), 1827)
++     haz3 <- ratewalk(c((temp2-temp1)[i], temp3[i], tyear), 3653)
++     haz4 <- ratewalk(c((temp2-temp1)[i], temp3[i], tyear), 4383)
++     print(aeq(-log(exp2$surv[,i]), c(sum(haz1$hazard), sum(haz2$hazard),
++                                     sum(haz3$hazard), sum(haz4$hazard))))
++     }
+[1] TRUE
+[1] TRUE
+[1] TRUE
+[1] TRUE
+[1] TRUE
+[1] TRUE
+> 
+> #
+> # Check that adding more time points doesn't change things
+> #
+> exp4 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=temp3) + I(1:6),
++ 		times=sort(c(366, 1827, 3653, 4383, 30*(1:100))))
+> aeq(exp4$surv[match(exp2$time, exp4$time),], exp2$surv)
+[1] TRUE
+> 
+> exp4 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=temp3),
++ 		times=sort(c(366, 1827, 3653, 4383, 30*(1:100))))
+> aeq(exp1$surv, exp4$surv[match(exp1$time, exp4$time, nomatch=0)])
+[1] TRUE
+> 
+> 
+> #
+> # Now test Hakulinen's method, assuming an analysis date of 3/1/57
+> #
+> futime <- mdy.date(3,1,57) - temp2
+> xtime  <- sort(c(futime, 30, 60, 185, 365))
+> 
+> exp1 <- survexp(futime ~ ratetable(year=temp2, age=(temp2-temp1), sex=1),
++ 		times=xtime, conditional=F)
+> exp2 <- survexp(~ratetable(year=temp2, age=(temp2-temp1), sex=1) + I(1:6),
++ 			times=futime)
+> 
+> wt <- rep(1,6)
+> con <- double(6)
+> for (i in 1:6) {
++     con[i] <- sum(exp2$surv[i,i:6])/sum(wt[i:6])
++     wt <- exp2$surv[i,]
++     }
+> 
+> exp1$surv[match(futime, xtime)]
+[1] 0.9557362 0.9285840 0.9025661 0.8774220 0.8532489 0.8297416
+> aeq(exp1$surv[match(futime, xtime)], cumprod(con))
+[1] TRUE
+> 
+> 
+> #
+> # Now for the conditional method
+> #
+> exp1 <- survexp(futime ~ ratetable(year=temp2, age=(temp2-temp1), sex=1),
++ 		times=xtime, conditional=T)
+> 
+> cond <- exp2$surv
+> for (i in 6:2) cond[i,] <- (cond[i,]/cond[i-1,])  #conditional survival
+> for (i in 1:6) con[i] <- exp(mean(log(cond[i, i:6])))
+> 
+> all.equal(exp1$surv[match(futime, xtime)], cumprod(con))
+[1] TRUE
+> cumprod(con)
+[1] 0.9556656 0.9284398 0.9023612 0.8771798 0.8529944 0.8294940
+> 
+> rm(con, cond, exp1, exp2, wt, temp1, temp2, age)
+> rm(exp3, exp4, futime, xtime)
+> 
+> #
+> # Test out expected survival, when the parent pop is another Cox model
+> #
+> test1 <- data.frame(time=  c(4, 3,1,1,2,2,3),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0))
+> 
+> fit <- coxph(Surv(time, status) ~x, test1, method='breslow')
+> 
+> dummy <- data.frame(time=c(.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5),
++ 		    status=c(1,0,1,0,1,0,1,1,1), x=(-4:4)/2)
+> 
+> efit <- survexp(time ~ ratetable(x=x), dummy, ratetable=fit, cohort=F)
+> 
+> #
+> # Now, compare to the true answer, which is known to us
+> #
+> ss <- exp(fit$coef)
+> haz <- c( 1/(3*ss+3), 2/(ss+3), 1) #truth at time 0,1,2,4+
+> chaz <- cumsum(c(0,haz))
+> chaz2 <- chaz[c(1,2,2,3,3,3,3,4,4)]
+> 
+> risk <- exp(fit$coef*dummy$x)
+> efit2 <- exp(-risk*chaz2)
+> 
+> all.equal(as.vector(efit), as.vector(efit2))  #ignore mismatched name attrib
+[1] TRUE
+> 
+> #
+> # Now test the direct-adjusted curve (Ederer)
+> #
+> efit <- survexp( ~ ratetable(x=x), dummy, ratetable=fit, se=F)
+> direct <- survfit(fit, newdata=dummy, censor=FALSE)$surv
+> 
+> chaz <- chaz[-1]                  #drop time 0
+> d2 <- exp(outer(-chaz, risk))
+> all.equal(as.vector(direct), as.vector(d2))   #this tests survfit
+[1] TRUE
+> 
+> all.equal(as.vector(efit$surv), as.vector(apply(direct,1,mean)))  #direct
+[1] TRUE
+> 
+> # Check out the "times" arg of survexp
+> efit2 <- survexp( ~ ratetable(x=x), dummy, ratetable=fit, se=F,
++                   times=c(.5, 2, 3.5,6))
+> aeq(efit2$surv, c(1, efit$surv[c(2,2,3)]))
+[1] TRUE
+> 
+> #
+> # Now test out the Hakulinen method (Bonsel's method)
+> #  By construction, we have a large correlation between x and censoring
+> #
+> # In theory, hak1 and hak2 would be the same.  In practice, like a KM and
+> #   F-H, they differ when n is small.
+> #
+> efit <- survexp( time ~ ratetable(x=x), dummy, ratetable=fit, se=F)
+> 
+> surv  <- wt <- rep(1,9)
+> tt <- c(1,2,4)
+> hak1 <- hak2 <- NULL
+> for (i in 1:3) {
++     wt[dummy$time < tt[i]]  <- 0
++     hak1 <- c(hak1,  exp(-sum(haz[i]*risk*surv*wt)/sum(surv*wt)))
++     hak2 <- c(hak2,  sum(exp(-haz[i]*risk)*surv*wt)/sum(surv*wt))
++     surv <- surv * exp(-haz[i]*risk)
++     }
+> 
+> all.equal(as.vector(efit$surv), as.vector(cumprod(hak2)))
+[1] TRUE
+> 
+> #
+> #  Now do the conditional estimate
+> #
+> efit <- survexp( time ~ ratetable(x=x), dummy, ratetable=fit, se=F,
++ 			conditional=T)
+> wt <- rep(1,9)
+> cond <- NULL
+> for (i in 1:3) {
++     wt[dummy$time < tt[i]]  <- 0
++     cond <- c(cond,  exp(-sum(haz[i]*risk*wt)/sum(wt)))
++     }
+> 
+> all.equal(as.vector(efit$surv), as.vector(cumprod(cond)))
+[1] TRUE
+> 
+> rm(wt, cond, efit, tt, surv, hak1, hak2)
+> rm(fit, dummy, ss, efit2, chaz, chaz2, risk)
+> rm(d2, direct)
+> 
diff --git a/win32/deps/library/survival/tests/expected2.R b/win32/deps/library/survival/tests/expected2.R
new file mode 100644
index 0000000..3c14410
--- /dev/null
+++ b/win32/deps/library/survival/tests/expected2.R
@@ -0,0 +1,16 @@
+library(survival)
+#
+# A Cox model with a factor, followed by survexp.  
+#
+pfit2 <- coxph(Surv(time, status > 0) ~ trt + log(bili) +
+          log(protime) + age + platelet + sex, data = pbc)
+esurv <- survexp(~ trt, ratetable = pfit2, data = pbc)
+
+temp <- pbc
+temp$sex2 <- factor(as.numeric(pbc$sex), levels=2:0,
+                    labels=c("f", "m", "unknown"))
+esurv2 <- survexp(~ trt, ratetable = pfit2, data = temp, 
+                  rmap=list(sex=sex2))
+
+# The call components won't match, which happen to be first
+all.equal(unclass(esurv)[-1], unclass(esurv2)[-1])
diff --git a/win32/deps/library/survival/tests/expected2.Rout.save b/win32/deps/library/survival/tests/expected2.Rout.save
new file mode 100644
index 0000000..deee9ee
--- /dev/null
+++ b/win32/deps/library/survival/tests/expected2.Rout.save
@@ -0,0 +1,36 @@
+
+R version 2.11.1 (2010-05-31)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(survival)
+Loading required package: splines
+> #
+> # A Cox model with a factor, followed by survexp.  
+> #
+> pfit2 <- coxph(Surv(time, status > 0) ~ trt + log(bili) +
++           log(protime) + age + platelet + sex, data = pbc)
+> esurv <- survexp(~ trt, ratetable = pfit2, data = pbc)
+> 
+> temp <- pbc
+> temp$sex2 <- factor(as.numeric(pbc$sex), levels=2:0,
++                     labels=c("f", "m", "unknown"))
+> esurv2 <- survexp(~ trt, ratetable = pfit2, data = temp, 
++                   rmap=list(sex=sex2))
+> 
+> # The call components won't match, which happen to be first
+> all.equal(unclass(esurv)[-1], unclass(esurv2)[-1])
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/factor.R b/win32/deps/library/survival/tests/factor.R
new file mode 100644
index 0000000..60070cb
--- /dev/null
+++ b/win32/deps/library/survival/tests/factor.R
@@ -0,0 +1,33 @@
+#
+# Ensure that factors work in prediction
+#
+library(survival)
+
+options(na.action="na.exclude") # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+
+tfit <- coxph(Surv(time, status) ~ age + factor(ph.ecog), lung)
+p1 <- predict(tfit, type='risk')
+
+# Testing NA handling is important too
+keep <- (is.na(lung$ph.ecog) | lung$ph.ecog !=1)
+lung2 <- lung[keep,]
+p2 <- predict(tfit, type='risk', newdata=lung[keep,])
+aeq(p1[keep], p2)
+
+# Same, for survreg
+tfit <- survreg(Surv(time, status) ~ age + factor(ph.ecog), lung)
+p1 <- predict(tfit, type='response')
+p2 <- predict(tfit, type='response', newdata=lung2)
+aeq(p1[keep], p2)
+
+
+# Now repeat it tossing the missings
+options(na.action=na.omit) 
+keep2 <- (lung$ph.ecog[!is.na(lung$ph.ecog)] !=1)
+
+tfit2 <- survreg(Surv(time, status) ~ age + factor(ph.ecog), lung)
+p3 <- predict(tfit2, type='response')
+p4 <- predict(tfit2, type='response', newdata=lung2, na.action=na.omit)
+aeq(p3[keep2] , p4)
diff --git a/win32/deps/library/survival/tests/factor.Rout.save b/win32/deps/library/survival/tests/factor.Rout.save
new file mode 100644
index 0000000..77db11d
--- /dev/null
+++ b/win32/deps/library/survival/tests/factor.Rout.save
@@ -0,0 +1,56 @@
+
+R version 2.14.0 (2011-10-31)
+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.
+
+> #
+> # Ensure that factors work in prediction
+> #
+> library(survival)
+Loading required package: splines
+> 
+> options(na.action="na.exclude") # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> tfit <- coxph(Surv(time, status) ~ age + factor(ph.ecog), lung)
+> p1 <- predict(tfit, type='risk')
+> 
+> # Testing NA handling is important too
+> keep <- (is.na(lung$ph.ecog) | lung$ph.ecog !=1)
+> lung2 <- lung[keep,]
+> p2 <- predict(tfit, type='risk', newdata=lung[keep,])
+> aeq(p1[keep], p2)
+[1] TRUE
+> 
+> # Same, for survreg
+> tfit <- survreg(Surv(time, status) ~ age + factor(ph.ecog), lung)
+> p1 <- predict(tfit, type='response')
+> p2 <- predict(tfit, type='response', newdata=lung2)
+> aeq(p1[keep], p2)
+[1] TRUE
+> 
+> 
+> # Now repeat it tossing the missings
+> options(na.action=na.omit) 
+> keep2 <- (lung$ph.ecog[!is.na(lung$ph.ecog)] !=1)
+> 
+> tfit2 <- survreg(Surv(time, status) ~ age + factor(ph.ecog), lung)
+> p3 <- predict(tfit2, type='response')
+> p4 <- predict(tfit2, type='response', newdata=lung2, na.action=na.omit)
+> aeq(p3[keep2] , p4)
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/factor2.R b/win32/deps/library/survival/tests/factor2.R
new file mode 100644
index 0000000..07dca32
--- /dev/null
+++ b/win32/deps/library/survival/tests/factor2.R
@@ -0,0 +1,26 @@
+library(survival)
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+options(na.action=na.exclude)
+#
+# More tests of factors in prediction, using a new data set
+#
+fit <- coxph(Surv(time, status) ~  factor(ph.ecog), lung)
+
+tdata <- data.frame(ph.ecog = factor(0:3))
+p1 <- predict(fit, newdata=tdata, type='lp')
+p2 <- predict(fit, type='lp')
+aeq(p1, p2[match(0:3, lung$ph.ecog)])
+
+fit2 <- coxph(Surv(time, status) ~ factor(ph.ecog) + factor(sex), lung)
+tdata <- expand.grid(ph.ecog = factor(0:3), sex=factor(1:2))
+p1 <- predict(fit2, newdata=tdata, type='risk')
+
+xdata <- expand.grid(ph.ecog=factor(1:3), sex=factor(1:2))
+p2 <- predict(fit2, newdata=xdata, type='risk')
+all.equal(p2, p1[c(2:4, 6:8)], check.attributes=FALSE)
+
+
+fit3 <- survreg(Surv(time, status) ~ factor(ph.ecog) + age, lung)
+tdata <- data.frame(ph.ecog=factor(0:3), age=50)
+predict(fit, type='lp', newdata=tdata)
+predict(fit3, type='lp', newdata=tdata)
diff --git a/win32/deps/library/survival/tests/factor2.Rout.save b/win32/deps/library/survival/tests/factor2.Rout.save
new file mode 100644
index 0000000..60342b8
--- /dev/null
+++ b/win32/deps/library/survival/tests/factor2.Rout.save
@@ -0,0 +1,52 @@
+
+R version 2.14.0 (2011-10-31)
+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.
+
+> library(survival)
+Loading required package: splines
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> options(na.action=na.exclude)
+> #
+> # More tests of factors in prediction, using a new data set
+> #
+> fit <- coxph(Surv(time, status) ~  factor(ph.ecog), lung)
+> 
+> tdata <- data.frame(ph.ecog = factor(0:3))
+> p1 <- predict(fit, newdata=tdata, type='lp')
+> p2 <- predict(fit, type='lp')
+> aeq(p1, p2[match(0:3, lung$ph.ecog)])
+[1] TRUE
+> 
+> fit2 <- coxph(Surv(time, status) ~ factor(ph.ecog) + factor(sex), lung)
+> tdata <- expand.grid(ph.ecog = factor(0:3), sex=factor(1:2))
+> p1 <- predict(fit2, newdata=tdata, type='risk')
+> 
+> xdata <- expand.grid(ph.ecog=factor(1:3), sex=factor(1:2))
+> p2 <- predict(fit2, newdata=xdata, type='risk')
+> all.equal(p2, p1[c(2:4, 6:8)], check.attributes=FALSE)
+[1] TRUE
+> 
+> 
+> fit3 <- survreg(Surv(time, status) ~ factor(ph.ecog) + age, lung)
+> tdata <- data.frame(ph.ecog=factor(0:3), age=50)
+> predict(fit, type='lp', newdata=tdata)
+          1           2           3           4 
+-0.39518177 -0.02634168  0.52120527  1.81279848 
+> predict(fit3, type='lp', newdata=tdata)
+       1        2        3        4 
+6.399571 6.142938 5.770523 4.916993 
+> 
diff --git a/win32/deps/library/survival/tests/fr_cancer.R b/win32/deps/library/survival/tests/fr_cancer.R
new file mode 100644
index 0000000..6813c69
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_cancer.R
@@ -0,0 +1,27 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Here is a test case with multiple smoothing terms
+#
+
+fit0 <- coxph(Surv(time, status) ~ ph.ecog + age, lung)
+fit1 <- coxph(Surv(time, status) ~ ph.ecog + pspline(age,3), lung)
+fit2 <- coxph(Surv(time, status) ~ ph.ecog + pspline(age,4), lung)
+fit3 <- coxph(Surv(time, status) ~ ph.ecog + pspline(age,8), lung)
+
+
+
+fit4 <- coxph(Surv(time, status) ~ ph.ecog + pspline(wt.loss,3), lung)
+
+fit5 <-coxph(Surv(time, status) ~ ph.ecog + pspline(age,3) + 
+	     pspline(wt.loss,3), lung)
+
+fit1
+fit2
+fit3
+fit4
+fit5
+
+rm(fit1, fit2, fit3, fit4, fit5)
diff --git a/win32/deps/library/survival/tests/fr_cancer.Rout.save b/win32/deps/library/survival/tests/fr_cancer.Rout.save
new file mode 100644
index 0000000..a6fc30e
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_cancer.Rout.save
@@ -0,0 +1,120 @@
+
+R version 2.14.0 Under development (unstable) (2011-04-10 r55401)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Here is a test case with multiple smoothing terms
+> #
+> 
+> fit0 <- coxph(Surv(time, status) ~ ph.ecog + age, lung)
+> fit1 <- coxph(Surv(time, status) ~ ph.ecog + pspline(age,3), lung)
+> fit2 <- coxph(Surv(time, status) ~ ph.ecog + pspline(age,4), lung)
+> fit3 <- coxph(Surv(time, status) ~ ph.ecog + pspline(age,8), lung)
+> 
+> 
+> 
+> fit4 <- coxph(Surv(time, status) ~ ph.ecog + pspline(wt.loss,3), lung)
+> 
+> fit5 <-coxph(Surv(time, status) ~ ph.ecog + pspline(age,3) + 
++ 	     pspline(wt.loss,3), lung)
+> 
+> fit1
+Call:
+coxph(formula = Surv(time, status) ~ ph.ecog + pspline(age, 3), 
+    data = lung)
+
+                        coef   se(coef) se2     Chisq DF   p      
+ph.ecog                 0.4480 0.11707  0.11678 14.64 1.00 0.00013
+pspline(age, 3), linear 0.0113 0.00928  0.00928  1.47 1.00 0.22000
+pspline(age, 3), nonlin                          2.08 2.08 0.37000
+
+Iterations: 4 outer, 12 Newton-Raphson
+     Theta= 0.861 
+Degrees of freedom for terms= 1.0 3.1 
+Likelihood ratio test=21.9  on 4.08 df, p=0.000227
+  n=227 (1 observation deleted due to missingness)
+> fit2
+Call:
+coxph(formula = Surv(time, status) ~ ph.ecog + pspline(age, 4), 
+    data = lung)
+
+                        coef   se(coef) se2     Chisq DF   p      
+ph.ecog                 0.4505 0.11766  0.11723 14.66 1.00 0.00013
+pspline(age, 4), linear 0.0112 0.00927  0.00927  1.45 1.00 0.23000
+pspline(age, 4), nonlin                          2.96 3.08 0.41000
+
+Iterations: 4 outer, 11 Newton-Raphson
+     Theta= 0.797 
+Degrees of freedom for terms= 1.0 4.1 
+Likelihood ratio test=22.7  on 5.07 df, p=0.000412
+  n=227 (1 observation deleted due to missingness)
+> fit3
+Call:
+coxph(formula = Surv(time, status) ~ ph.ecog + pspline(age, 8), 
+    data = lung)
+
+                        coef   se(coef) se2     Chisq DF   p      
+ph.ecog                 0.4764 0.12024  0.11925 15.70 1.00 7.4e-05
+pspline(age, 8), linear 0.0117 0.00923  0.00923  1.61 1.00 2.0e-01
+pspline(age, 8), nonlin                          6.93 6.99 4.3e-01
+
+Iterations: 5 outer, 15 Newton-Raphson
+     Theta= 0.691 
+Degrees of freedom for terms= 1 8 
+Likelihood ratio test=27.6  on 8.97 df, p=0.00108
+  n=227 (1 observation deleted due to missingness)
+> fit4
+Call:
+coxph(formula = Surv(time, status) ~ ph.ecog + pspline(wt.loss, 
+    3), data = lung)
+
+                          coef     se(coef) se2     Chisq DF   p      
+ph.ecog                    0.51545 0.12960  0.12737 15.82 1.00 0.00007
+pspline(wt.loss, 3), line -0.00702 0.00655  0.00655  1.15 1.00 0.28000
+pspline(wt.loss, 3), nonl                            2.45 2.09 0.31000
+
+Iterations: 3 outer, 10 Newton-Raphson
+     Theta= 0.776 
+Degrees of freedom for terms= 1.0 3.1 
+Likelihood ratio test=21.1  on 4.06 df, p=0.000326
+  n=213 (15 observations deleted due to missingness)
+> fit5
+Call:
+coxph(formula = Surv(time, status) ~ ph.ecog + pspline(age, 3) + 
+    pspline(wt.loss, 3), data = lung)
+
+                          coef     se(coef) se2     Chisq DF   p      
+ph.ecog                    0.47422 0.13495  0.13206 12.35 1.00 0.00044
+pspline(age, 3), linear    0.01368 0.00976  0.00974  1.96 1.00 0.16000
+pspline(age, 3), nonlin                              1.90 2.07 0.40000
+pspline(wt.loss, 3), line -0.00717 0.00661  0.00660  1.18 1.00 0.28000
+pspline(wt.loss, 3), nonl                            2.08 2.03 0.36000
+
+Iterations: 4 outer, 12 Newton-Raphson
+     Theta= 0.85 
+     Theta= 0.779 
+Degrees of freedom for terms= 1.0 3.1 3.0 
+Likelihood ratio test=25.2  on 7.06 df, p=0.000726
+  n=213 (15 observations deleted due to missingness)
+> 
+> rm(fit1, fit2, fit3, fit4, fit5)
+> 
diff --git a/win32/deps/library/survival/tests/fr_colon.R b/win32/deps/library/survival/tests/fr_colon.R
new file mode 100644
index 0000000..909be6f
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_colon.R
@@ -0,0 +1,58 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Fit models to the Colon cancer data used in Lin
+#
+fitc1 <- coxph(Surv(time, status) ~ rx + extent + node4 + cluster(id)
+	        + strata(etype), colon)
+fitc1
+
+fitc2 <- coxph(Surv(time, status) ~ rx + extent + node4 + 
+	       frailty(id, dist='gauss', trace=T)
+	        + strata(etype), colon)
+fitc2
+
+fitc3 <- coxph(Surv(time, status) ~ rx + extent + node4 + frailty(id, trace=T)
+	        + strata(etype), colon)
+fitc3
+
+fitc4 <- coxph(Surv(time, status) ~ rx + extent + node4 + frailty(id, df=30)
+	        + strata(etype), colon)
+fitc4
+
+# Do a fit, removing the no-event people
+temp <- tapply(colon$status, colon$id, sum)
+keep <- !(is.na(match(colon$id, names(temp[temp>0])))) 
+fitc5 <- coxph(Surv(time, status) ~ rx + extent + node4 +cluster(id)
+	       + strata(etype), colon, subset=keep)
+fitc5
+
+#
+# Do the factor fit, but first remove the no-event people
+#
+#  Ha!  This routine has a factor with 506 levels.  It uses all available
+#    memory, and can't finish in my patience window.  Commented out.
+
+#fitc6 <- coxph(Surv(time, status) ~ rx + extent + node4 + factor(id), colon,
+#	       subset=keep)
+
+# Try the AIC
+fitc7 <- coxph(Surv(time, status) ~ rx + extent + node4 +
+	          frailty(id, method='aic', caic=T), colon)
+fitc7
+
+if (FALSE) {
+    # This fails to converge, with different bad paths in different
+    #  releases (due to changes in eps parameters).  It's not a bug per
+    #  se, just too unstable a solution for the code to find.  
+    # Remove it from the tests 2/2/09
+    fitc8 <- coxph(Surv(time, status) ~ rx + extent + node4 +
+	          frailty(id, method='aic', dist='t', caic=T), colon)
+
+    fitc8
+    }
+
+
+
diff --git a/win32/deps/library/survival/tests/fr_colon.Rout.save b/win32/deps/library/survival/tests/fr_colon.Rout.save
new file mode 100644
index 0000000..648069a
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_colon.Rout.save
@@ -0,0 +1,317 @@
+
+R version 2.14.0 Under development (unstable) (2011-04-10 r55401)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Fit models to the Colon cancer data used in Lin
+> #
+> fitc1 <- coxph(Surv(time, status) ~ rx + extent + node4 + cluster(id)
++ 	        + strata(etype), colon)
+> fitc1
+Call:
+coxph(formula = Surv(time, status) ~ rx + extent + node4 + cluster(id) + 
+    strata(etype), data = colon)
+
+
+             coef exp(coef) se(coef) robust se      z       p
+rxLev     -0.0362     0.964   0.0768    0.1056 -0.343 7.3e-01
+rxLev+5FU -0.4488     0.638   0.0840    0.1168 -3.842 1.2e-04
+extent     0.5155     1.674   0.0796    0.1097  4.701 2.6e-06
+node4      0.8799     2.411   0.0681    0.0961  9.160 0.0e+00
+
+Likelihood ratio test=248  on 4 df, p=0  n= 1858, number of events= 920 
+> 
+> fitc2 <- coxph(Surv(time, status) ~ rx + extent + node4 + 
++ 	       frailty(id, dist='gauss', trace=T)
++ 	        + strata(etype), colon)
+     theta     resid      fsum    trace
+[1,]     1 0.5720661  677.1944 498.2329
+[2,]     3 0.8263010 2431.5386 880.5594
+    new theta= 6 
+
+     theta     resid      fsum     trace
+[1,]     1 0.5720661  677.1944  498.2329
+[2,]     3 0.8263010 2431.5386  880.5594
+[3,]     6 0.3191860 4522.8358 1279.6154
+    new theta= 12 
+
+     theta      resid      fsum     trace
+[1,]     1  0.5720661  677.1944  498.2329
+[2,]     3  0.8263010 2431.5386  880.5594
+[3,]     6  0.3191860 4522.8358 1279.6154
+[4,]    12 -2.1485959 7550.5833 1950.6309
+    new theta= 7.579324 
+
+         theta      resid      fsum     trace
+[1,]  1.000000  0.5720661  677.1944  498.2329
+[2,]  3.000000  0.8263010 2431.5386  880.5594
+[3,]  6.000000  0.3191860 4522.8358 1279.6154
+[4,] 12.000000 -2.1485959 7550.5833 1950.6309
+[5,]  7.579324 -0.1853733 5438.8102 1466.0258
+    new theta= 7.020146 
+
+         theta        resid      fsum     trace
+[1,]  1.000000  0.572066075  677.1944  498.2329
+[2,]  3.000000  0.826301016 2431.5386  880.5594
+[3,]  6.000000  0.319185976 4522.8358 1279.6154
+[4,] 12.000000 -2.148595876 7550.5833 1950.6309
+[5,]  7.579324 -0.185373320 5438.8102 1466.0258
+[6,]  7.020146  0.008957243 5127.0057 1401.2432
+    new theta= 7.047272 
+
+         theta        resid      fsum     trace
+[1,]  1.000000  0.572066075  677.1944  498.2329
+[2,]  3.000000  0.826301016 2431.5386  880.5594
+[3,]  6.000000  0.319185976 4522.8358 1279.6154
+[4,] 12.000000 -2.148595876 7550.5833 1950.6309
+[5,]  7.579324 -0.185373320 5438.8102 1466.0258
+[6,]  7.020146  0.008957243 5127.0057 1401.2432
+[7,]  7.047272 -0.001444564 5141.4462 1404.4156
+    new theta= 7.043486 
+
+         theta        resid      fsum     trace
+[1,]  1.000000  0.572066075  677.1944  498.2329
+[2,]  3.000000  0.826301016 2431.5386  880.5594
+[3,]  6.000000  0.319185976 4522.8358 1279.6154
+[4,] 12.000000 -2.148595876 7550.5833 1950.6309
+[5,]  7.579324 -0.185373320 5438.8102 1466.0258
+[6,]  7.020146  0.008957243 5127.0057 1401.2432
+[7,]  7.047272 -0.001444564 5141.4462 1404.4156
+[8,]  7.043486  0.000960198 5140.1195 1403.9797
+    new theta= 7.045177 
+
+          theta         resid      fsum     trace
+ [1,]  1.000000  0.5720660750  677.1944  498.2329
+ [2,]  3.000000  0.8263010161 2431.5386  880.5594
+ [3,]  6.000000  0.3191859764 4522.8358 1279.6154
+ [4,] 12.000000 -2.1485958763 7550.5833 1950.6309
+ [5,]  7.579324 -0.1853733197 5438.8102 1466.0258
+ [6,]  7.020146  0.0089572430 5127.0057 1401.2432
+ [7,]  7.047272 -0.0014445644 5141.4462 1404.4156
+ [8,]  7.043486  0.0009601980 5140.1195 1403.9797
+ [9,]  7.045177 -0.0002391451 5140.6313 1404.1637
+    new theta= 7.044809 
+
+          theta         resid      fsum     trace
+ [1,]  1.000000  5.720661e-01  677.1944  498.2329
+ [2,]  3.000000  8.263010e-01 2431.5386  880.5594
+ [3,]  6.000000  3.191860e-01 4522.8358 1279.6154
+ [4,] 12.000000 -2.148596e+00 7550.5833 1950.6309
+ [5,]  7.579324 -1.853733e-01 5438.8102 1466.0258
+ [6,]  7.020146  8.957243e-03 5127.0057 1401.2432
+ [7,]  7.047272 -1.444564e-03 5141.4462 1404.4156
+ [8,]  7.043486  9.601980e-04 5140.1195 1403.9797
+ [9,]  7.045177 -2.391451e-04 5140.6313 1404.1637
+[10,]  7.044809  8.359535e-05 5140.5615 1404.1267
+    new theta= 7.04491 
+
+Warning message:
+In coxpenal.fit(X, Y, strats, offset, init = init, control, weights = weights,  :
+  Inner loop failed to coverge for iterations 4 5
+> fitc2
+Call:
+coxph(formula = Surv(time, status) ~ rx + extent + node4 + frailty(id, 
+    dist = "gauss", trace = T) + strata(etype), data = colon)
+
+                          coef    se(coef) se2    Chisq   DF  p      
+rxLev                     -0.0267 0.241    0.0824    0.01   1 9.1e-01
+rxLev+5FU                 -0.7880 0.243    0.1071   10.50   1 1.2e-03
+extent                     1.1305 0.218    0.1068   26.81   1 2.2e-07
+node4                      2.1266 0.210    0.0984  102.58   1 0.0e+00
+frailty(id, dist = "gauss                         5463.66 730 0.0e+00
+
+Iterations: 10 outer, 104 Newton-Raphson
+     Variance of random effect= 7.04 
+Degrees of freedom for terms=   0.3   0.2   0.2 729.7 
+Likelihood ratio test=3544  on 730 df, p=0  n= 1858 
+> 
+> fitc3 <- coxph(Surv(time, status) ~ rx + extent + node4 + frailty(id, trace=T)
++ 	        + strata(etype), colon)
+     theta    loglik  c.loglik
+[1,]     0 -5846.216 -5846.216
+[2,]     1 -5305.049 -5590.102
+    new theta= 2 
+
+     theta    loglik  c.loglik
+[1,]     0 -5846.216 -5846.216
+[2,]     1 -5305.049 -5590.102
+[3,]     2 -5036.927 -5479.479
+    new theta= 4 
+
+     theta    loglik  c.loglik
+[1,]     0 -5846.216 -5846.216
+[2,]     1 -5305.049 -5590.102
+[3,]     2 -5036.927 -5479.479
+[4,]     4 -4740.394 -5385.886
+    new theta= 8 
+
+     theta    loglik  c.loglik
+[1,]     0 -5846.216 -5846.216
+[2,]     1 -5305.049 -5590.102
+[3,]     2 -5036.927 -5479.479
+[4,]     4 -4740.394 -5385.886
+[5,]     8 -4457.094 -5347.375
+    new theta= 16 
+
+     theta    loglik  c.loglik
+[1,]     0 -5846.216 -5846.216
+[2,]     1 -5305.049 -5590.102
+[3,]     2 -5036.927 -5479.479
+[4,]     4 -4740.394 -5385.886
+[5,]     8 -4457.094 -5347.375
+[6,]    16 -4223.785 -5393.362
+    new theta= 8.740334 
+
+         theta    loglik  c.loglik
+[1,]  0.000000 -5846.216 -5846.216
+[2,]  1.000000 -5305.049 -5590.102
+[3,]  2.000000 -5036.927 -5479.479
+[4,]  4.000000 -4740.394 -5385.886
+[5,]  8.000000 -4457.094 -5347.375
+[6,] 16.000000 -4223.785 -5393.362
+[7,]  8.740334 -4423.925 -5348.128
+    new theta= 8.058156 
+
+         theta    loglik  c.loglik
+[1,]  0.000000 -5846.216 -5846.216
+[2,]  1.000000 -5305.049 -5590.102
+[3,]  2.000000 -5036.927 -5479.479
+[4,]  4.000000 -4740.394 -5385.886
+[5,]  8.000000 -4457.094 -5347.375
+[6,] 16.000000 -4223.785 -5393.362
+[7,]  8.740334 -4423.925 -5348.128
+[8,]  8.058156 -4454.338 -5347.375
+    new theta= 8.02886 
+
+          theta    loglik  c.loglik
+ [1,]  0.000000 -5846.216 -5846.216
+ [2,]  1.000000 -5305.049 -5590.102
+ [3,]  2.000000 -5036.927 -5479.479
+ [4,]  4.000000 -4740.394 -5385.886
+ [5,]  8.000000 -4457.094 -5347.375
+ [6,] 16.000000 -4223.785 -5393.362
+ [7,]  8.740334 -4423.925 -5348.128
+ [8,]  8.058156 -4454.338 -5347.375
+ [9,]  8.028860 -4455.719 -5347.369
+    new theta= 8.029002 
+
+Warning message:
+In coxpenal.fit(X, Y, strats, offset, init = init, control, weights = weights,  :
+  Inner loop failed to coverge for iterations 4 5 6 7 8
+> fitc3
+Call:
+coxph(formula = Surv(time, status) ~ rx + extent + node4 + frailty(id, 
+    trace = T) + strata(etype), data = colon)
+
+                       coef    se(coef) se2   Chisq   DF  p      
+rxLev                   0.0433 0.305    0.140    0.02   1 8.9e-01
+rxLev+5FU              -0.5117 0.310    0.170    2.72   1 9.9e-02
+extent                  1.3360 0.251    0.137   28.36   1 1.0e-07
+node4                   2.3345 0.233    0.156  100.45   1 0.0e+00
+frailty(id, trace = T)                        5947.15 867 0.0e+00
+
+Iterations: 9 outer, 145 Newton-Raphson
+     Variance of random effect= 8.03   I-likelihood = -5347.4 
+Degrees of freedom for terms=   0.5   0.3   0.4 866.8 
+Likelihood ratio test=3788  on 868 df, p=0  n= 1858 
+> 
+> fitc4 <- coxph(Surv(time, status) ~ rx + extent + node4 + frailty(id, df=30)
++ 	        + strata(etype), colon)
+> fitc4
+Call:
+coxph(formula = Surv(time, status) ~ rx + extent + node4 + frailty(id, 
+    df = 30) + strata(etype), data = colon)
+
+                     coef    se(coef) se2    Chisq  DF p      
+rxLev                -0.0374 0.0789   0.0769   0.22  1 6.4e-01
+rxLev+5FU            -0.4565 0.0859   0.0840  28.27  1 1.1e-07
+extent                0.5289 0.0815   0.0798  42.13  1 8.5e-11
+node4                 0.9078 0.0701   0.0681 167.85  1 0.0e+00
+frailty(id, df = 30)                          58.56 30 1.4e-03
+
+Iterations: 3 outer, 9 Newton-Raphson
+     Variance of random effect= 0.0337   I-likelihood = -5832.4 
+Degrees of freedom for terms=  1.9  1.0  0.9 30.0 
+Likelihood ratio test=363  on 33.8 df, p=0  n= 1858 
+> 
+> # Do a fit, removing the no-event people
+> temp <- tapply(colon$status, colon$id, sum)
+> keep <- !(is.na(match(colon$id, names(temp[temp>0])))) 
+> fitc5 <- coxph(Surv(time, status) ~ rx + extent + node4 +cluster(id)
++ 	       + strata(etype), colon, subset=keep)
+> fitc5
+Call:
+coxph(formula = Surv(time, status) ~ rx + extent + node4 + cluster(id) + 
+    strata(etype), data = colon, subset = keep)
+
+
+             coef exp(coef) se(coef) robust se      z       p
+rxLev      0.0832     1.087   0.0771    0.0989  0.841 4.0e-01
+rxLev+5FU -0.0277     0.973   0.0848    0.1090 -0.255 8.0e-01
+extent     0.1797     1.197   0.0785    0.1036  1.735 8.3e-02
+node4      0.5219     1.685   0.0684    0.0912  5.720 1.1e-08
+
+Likelihood ratio test=63.7  on 4 df, p=4.8e-13  n= 1012, number of events= 920 
+> 
+> #
+> # Do the factor fit, but first remove the no-event people
+> #
+> #  Ha!  This routine has a factor with 506 levels.  It uses all available
+> #    memory, and can't finish in my patience window.  Commented out.
+> 
+> #fitc6 <- coxph(Surv(time, status) ~ rx + extent + node4 + factor(id), colon,
+> #	       subset=keep)
+> 
+> # Try the AIC
+> fitc7 <- coxph(Surv(time, status) ~ rx + extent + node4 +
++ 	          frailty(id, method='aic', caic=T), colon)
+> fitc7
+Call:
+coxph(formula = Surv(time, status) ~ rx + extent + node4 + frailty(id, 
+    method = "aic", caic = T), data = colon)
+
+                          coef    se(coef) se2    Chisq DF  p      
+rxLev                     -0.0409 0.0915   0.0781   0.2   1 6.6e-01
+rxLev+5FU                 -0.4832 0.0979   0.0852  24.4   1 7.9e-07
+extent                     0.6037 0.0918   0.0816  43.2   1 4.8e-11
+node4                      1.0463 0.0825   0.0700 160.9   1 0.0e+00
+frailty(id, method = "aic                         416.3 205 1.1e-16
+
+Iterations: 8 outer, 38 Newton-Raphson
+     Variance of random effect= 0.271   I-likelihood = -6393 
+Degrees of freedom for terms=   1.5   0.8   0.7 204.8 
+Likelihood ratio test=964  on 208 df, p=0  n= 1858 
+> 
+> if (FALSE) {
++     # This fails to converge, with different bad paths in different
++     #  releases (due to changes in eps parameters).  It's not a bug per
++     #  se, just too unstable a solution for the code to find.  
++     # Remove it from the tests 2/2/09
++     fitc8 <- coxph(Surv(time, status) ~ rx + extent + node4 +
++ 	          frailty(id, method='aic', dist='t', caic=T), colon)
++ 
++     fitc8
++     }
+> 
+> 
+> 
+> 
diff --git a/win32/deps/library/survival/tests/fr_kidney.R b/win32/deps/library/survival/tests/fr_kidney.R
new file mode 100644
index 0000000..e4a9183
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_kidney.R
@@ -0,0 +1,70 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+# From:	McGilchrist and Aisbett, Biometrics 47, 461-66, 1991
+# Data on the recurrence times to infection, at the point of insertion of
+#  the catheter, for kidney patients using portable dialysis equipment.
+#  Catheters may be removed for reasons other than infection, in which case
+#  the observation is censored.  Each patient has exactly 2 observations.
+
+# Variables: patient, time, status, age, 
+#	   sex (1=male, 2=female),
+#	   disease type (0=GN, 1=AN, 2=PKD, 3=Other)
+#	   author's estimate of the frailty
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+
+# I don't match their answers, and I think that I'm right
+kfit <- coxph(Surv(time, status)~ age + sex + disease + frailty(id), kidney)
+kfit1<- coxph(Surv(time, status) ~age + sex + disease +
+	      frailty(id, theta=1), kidney, iter=20)
+kfit0 <- coxph(Surv(time, status)~ age + sex + disease, kidney)
+temp <-  coxph(Surv(time, status) ~age + sex + disease +
+	      frailty(id, theta=1, sparse=F), kidney)
+
+
+# Check out the EM based score equations
+#  temp1 and kfit1 should have essentially the same coefficients
+#  temp2 should equal kfit1$frail
+# equality won't be exact because of the different iteration paths
+temp1 <- coxph(Surv(time, status) ~ age + sex + disease +
+	       offset(kfit1$frail[id]), kidney)
+rr <- tapply(resid(temp1), kidney$id, sum)
+temp2 <- log(rr/1 +1)
+aeq(temp1$coef, kfit1$coef, tolerance=.005) 
+aeq(temp2, kfit1$frail, tolerance=.005)
+
+
+
+kfit
+kfit1
+kfit0
+temp
+
+#
+# Now fit the data using REML
+#
+kfitm1 <- coxph(Surv(time,status) ~ age + sex + disease + 
+		frailty(id, dist='gauss'), kidney)
+kfitm2 <- coxph(Surv(time,status) ~ age + sex + disease + 
+		      frailty(id, dist='gauss', sparse=F), kidney)
+kfitm1
+summary(kfitm2)
+#
+# Fit the kidney data using AIC
+#
+
+# gamma, corrected aic
+coxph(Surv(time, status) ~ age + sex + frailty(id, method='aic', caic=T), 
+      kidney)
+
+coxph(Surv(time, status) ~ age + sex + frailty(id, dist='t'), kidney)
+coxph(Surv(time, status) ~ age + sex + frailty(id, dist='gauss', method='aic',
+					       caic=T), kidney)
+
+
+# uncorrected aic
+coxph(Surv(time, status) ~ age + sex + frailty(id, method='aic', caic=F), 
+      kidney)
+
+coxph(Surv(time, status) ~ age + sex + frailty(id, dist='t', caic=F), kidney)
diff --git a/win32/deps/library/survival/tests/fr_kidney.Rout.save b/win32/deps/library/survival/tests/fr_kidney.Rout.save
new file mode 100644
index 0000000..7b22f98
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_kidney.Rout.save
@@ -0,0 +1,302 @@
+
+R version 2.13.0 (2011-04-13)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> # From:	McGilchrist and Aisbett, Biometrics 47, 461-66, 1991
+> # Data on the recurrence times to infection, at the point of insertion of
+> #  the catheter, for kidney patients using portable dialysis equipment.
+> #  Catheters may be removed for reasons other than infection, in which case
+> #  the observation is censored.  Each patient has exactly 2 observations.
+> 
+> # Variables: patient, time, status, age, 
+> #	   sex (1=male, 2=female),
+> #	   disease type (0=GN, 1=AN, 2=PKD, 3=Other)
+> #	   author's estimate of the frailty
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> # I don't match their answers, and I think that I'm right
+> kfit <- coxph(Surv(time, status)~ age + sex + disease + frailty(id), kidney)
+> kfit1<- coxph(Surv(time, status) ~age + sex + disease +
++ 	      frailty(id, theta=1), kidney, iter=20)
+> kfit0 <- coxph(Surv(time, status)~ age + sex + disease, kidney)
+> temp <-  coxph(Surv(time, status) ~age + sex + disease +
++ 	      frailty(id, theta=1, sparse=F), kidney)
+> 
+> 
+> # Check out the EM based score equations
+> #  temp1 and kfit1 should have essentially the same coefficients
+> #  temp2 should equal kfit1$frail
+> # equality won't be exact because of the different iteration paths
+> temp1 <- coxph(Surv(time, status) ~ age + sex + disease +
++ 	       offset(kfit1$frail[id]), kidney)
+> rr <- tapply(resid(temp1), kidney$id, sum)
+> temp2 <- log(rr/1 +1)
+> aeq(temp1$coef, kfit1$coef, tolerance=.005) 
+[1] TRUE
+> aeq(temp2, kfit1$frail, tolerance=.005)
+[1] TRUE
+> 
+> 
+> 
+> kfit
+Call:
+coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id), 
+    data = kidney)
+
+            coef     se(coef) se2    Chisq DF p      
+age          0.00318 0.0111   0.0111  0.08 1  7.8e-01
+sex         -1.48314 0.3582   0.3582 17.14 1  3.5e-05
+diseaseGN    0.08796 0.4064   0.4064  0.05 1  8.3e-01
+diseaseAN    0.35079 0.3997   0.3997  0.77 1  3.8e-01
+diseasePKD  -1.43111 0.6311   0.6311  5.14 1  2.3e-02
+frailty(id)                           0.00 0  9.3e-01
+
+Iterations: 6 outer, 35 Newton-Raphson
+     Variance of random effect= 5e-07   I-likelihood = -179.1 
+Degrees of freedom for terms= 1 1 3 0 
+Likelihood ratio test=17.6  on 5 df, p=0.00342  n= 76 
+> kfit1
+Call:
+coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id, 
+    theta = 1), data = kidney, iter = 20)
+
+                       coef     se(coef) se2     Chisq DF   p      
+age                     0.00389 0.0196   0.00943  0.04  1.0 0.84000
+sex                    -2.00764 0.5910   0.41061 11.54  1.0 0.00068
+diseaseGN               0.35335 0.7165   0.38015  0.24  1.0 0.62000
+diseaseAN               0.52341 0.7230   0.40463  0.52  1.0 0.47000
+diseasePKD             -0.45938 1.0898   0.66088  0.18  1.0 0.67000
+frailty(id, theta = 1)                           28.51 18.8 0.06900
+
+Iterations: 1 outer, 14 Newton-Raphson
+     Variance of random effect= 1   I-likelihood = -182.5 
+Degrees of freedom for terms=  0.2  0.5  1.1 18.8 
+Likelihood ratio test=63.8  on 20.6 df, p=2.53e-06  n= 76 
+> kfit0
+Call:
+coxph(formula = Surv(time, status) ~ age + sex + disease, data = kidney)
+
+
+               coef exp(coef) se(coef)      z       p
+age         0.00318     1.003   0.0111  0.285 7.8e-01
+sex        -1.48314     0.227   0.3582 -4.140 3.5e-05
+diseaseGN   0.08796     1.092   0.4064  0.216 8.3e-01
+diseaseAN   0.35079     1.420   0.3997  0.878 3.8e-01
+diseasePKD -1.43111     0.239   0.6311 -2.268 2.3e-02
+
+Likelihood ratio test=17.6  on 5 df, p=0.00342  n= 76, number of events= 58 
+> temp
+Call:
+coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id, 
+    theta = 1, sparse = F), data = kidney)
+
+                          coef     se(coef) se2    Chisq DF   p      
+age                        0.00389 0.0186   0.0112  0.04  1.0 0.83000
+sex                       -2.00763 0.5762   0.4080 12.14  1.0 0.00049
+diseaseGN                  0.35335 0.6786   0.4315  0.27  1.0 0.60000
+diseaseAN                  0.52340 0.6891   0.4404  0.58  1.0 0.45000
+diseasePKD                -0.45934 1.0139   0.7130  0.21  1.0 0.65000
+frailty(id, theta = 1, sp                          26.23 18.7 0.12000
+
+Iterations: 1 outer, 5 Newton-Raphson
+     Variance of random effect= 1   I-likelihood = -182.5 
+Degrees of freedom for terms=  0.4  0.5  1.4 18.7 
+Likelihood ratio test=63.8  on 21 df, p=3.27e-06  n= 76 
+> 
+> #
+> # Now fit the data using REML
+> #
+> kfitm1 <- coxph(Surv(time,status) ~ age + sex + disease + 
++ 		frailty(id, dist='gauss'), kidney)
+> kfitm2 <- coxph(Surv(time,status) ~ age + sex + disease + 
++ 		      frailty(id, dist='gauss', sparse=F), kidney)
+> kfitm1
+Call:
+coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id, 
+    dist = "gauss"), data = kidney)
+
+                          coef     se(coef) se2    Chisq DF   p      
+age                        0.00489 0.015    0.0106  0.11  1.0 0.74000
+sex                       -1.69728 0.461    0.3617 13.55  1.0 0.00023
+diseaseGN                  0.17986 0.545    0.3927  0.11  1.0 0.74000
+diseaseAN                  0.39294 0.545    0.3982  0.52  1.0 0.47000
+diseasePKD                -1.13631 0.825    0.6173  1.90  1.0 0.17000
+frailty(id, dist = "gauss                          17.89 12.1 0.12000
+
+Iterations: 7 outer, 42 Newton-Raphson
+     Variance of random effect= 0.493 
+Degrees of freedom for terms=  0.5  0.6  1.7 12.1 
+Likelihood ratio test=47.5  on 14.9 df, p=2.82e-05  n= 76 
+> summary(kfitm2)
+Call:
+coxph(formula = Surv(time, status) ~ age + sex + disease + frailty(id, 
+    dist = "gauss", sparse = F), data = kidney)
+
+  n= 76, number of events= 58 
+
+                          coef     se(coef) se2    Chisq DF   p      
+age                        0.00492 0.0149   0.0108  0.11  1.0 0.74000
+sex                       -1.70204 0.4631   0.3613 13.51  1.0 0.00024
+diseaseGN                  0.18173 0.5413   0.4017  0.11  1.0 0.74000
+diseaseAN                  0.39442 0.5428   0.4052  0.53  1.0 0.47000
+diseasePKD                -1.13160 0.8175   0.6298  1.92  1.0 0.17000
+frailty(id, dist = "gauss                          18.13 12.3 0.12000
+
+           exp(coef) exp(-coef) lower .95 upper .95
+age            1.005      0.995    0.9760     1.035
+sex            0.182      5.485    0.0736     0.452
+diseaseGN      1.199      0.834    0.4151     3.465
+diseaseAN      1.484      0.674    0.5120     4.299
+diseasePKD     0.323      3.101    0.0650     1.601
+gauss:1        1.701      0.588    0.5181     5.586
+gauss:2        1.424      0.702    0.3851     5.266
+gauss:3        1.159      0.863    0.3828     3.511
+gauss:4        0.623      1.606    0.2340     1.657
+gauss:5        1.254      0.797    0.3981     3.953
+gauss:6        1.135      0.881    0.3834     3.360
+gauss:7        1.973      0.507    0.5694     6.834
+gauss:8        0.620      1.614    0.2166     1.772
+gauss:9        0.823      1.215    0.2888     2.346
+gauss:10       0.503      1.988    0.1747     1.448
+gauss:11       0.757      1.322    0.2708     2.113
+gauss:12       1.105      0.905    0.3343     3.651
+gauss:13       1.302      0.768    0.4275     3.967
+gauss:14       0.591      1.691    0.1854     1.885
+gauss:15       0.545      1.835    0.1858     1.598
+gauss:16       1.044      0.958    0.3142     3.470
+gauss:17       0.914      1.095    0.3000     2.782
+gauss:18       0.918      1.089    0.3248     2.597
+gauss:19       0.643      1.556    0.1951     2.117
+gauss:20       1.170      0.855    0.3453     3.963
+gauss:21       0.334      2.997    0.1020     1.091
+gauss:22       0.687      1.455    0.2353     2.006
+gauss:23       1.478      0.677    0.4756     4.592
+gauss:24       1.017      0.983    0.3156     3.278
+gauss:25       0.810      1.235    0.2749     2.384
+gauss:26       0.614      1.627    0.2149     1.757
+gauss:27       1.088      0.919    0.3282     3.610
+gauss:28       1.542      0.649    0.4923     4.829
+gauss:29       1.379      0.725    0.4377     4.342
+gauss:30       1.375      0.727    0.4444     4.253
+gauss:31       1.445      0.692    0.4703     4.438
+gauss:32       1.199      0.834    0.3521     4.085
+gauss:33       1.945      0.514    0.5523     6.849
+gauss:34       0.862      1.161    0.2769     2.682
+gauss:35       1.703      0.587    0.5266     5.508
+gauss:36       0.827      1.209    0.2281     3.002
+gauss:37       1.471      0.680    0.3894     5.555
+gauss:38       1.048      0.954    0.3068     3.579
+
+Iterations: 6 outer, 21 Newton-Raphson
+     Variance of random effect= 0.509 
+Degrees of freedom for terms=  0.5  0.6  1.7 12.3 
+Concordance= 0.796  (se = 0.046 )
+Rsquare= 0.788   (max possible= 0.997 )
+Likelihood ratio test= 118  on 15.1 df,   p=0
+Wald test            = 37.4  on 15.1 df,   p=0.00119
+> #
+> # Fit the kidney data using AIC
+> #
+> 
+> # gamma, corrected aic
+> coxph(Surv(time, status) ~ age + sex + frailty(id, method='aic', caic=T), 
++       kidney)
+Call:
+coxph(formula = Surv(time, status) ~ age + sex + frailty(id, 
+    method = "aic", caic = T), data = kidney)
+
+                          coef     se(coef) se2     Chisq DF   p      
+age                        0.00364 0.0105   0.00891  0.12 1.00 0.73000
+sex                       -1.31953 0.3956   0.32497 11.13 1.00 0.00085
+frailty(id, method = "aic                           13.55 7.81 0.08700
+
+Iterations: 9 outer, 63 Newton-Raphson
+     Variance of random effect= 0.203   I-likelihood = -182.1 
+Degrees of freedom for terms= 0.7 0.7 7.8 
+Likelihood ratio test=33.3  on 9.21 df, p=0.000137  n= 76 
+> 
+> coxph(Surv(time, status) ~ age + sex + frailty(id, dist='t'), kidney)
+Call:
+coxph(formula = Surv(time, status) ~ age + sex + frailty(id, 
+    dist = "t"), data = kidney)
+
+                        coef     se(coef) se2     Chisq DF   p      
+age                      0.00561 0.012    0.00872  0.22  1.0 0.64000
+sex                     -1.65487 0.483    0.38527 11.74  1.0 0.00061
+frailty(id, dist = "t")                           20.33 13.9 0.12000
+
+Iterations: 8 outer, 58 Newton-Raphson
+     Variance of random effect= 0.825 
+Degrees of freedom for terms=  0.5  0.6 13.9 
+Likelihood ratio test=48.6  on 15.1 df, p=2.18e-05  n= 76 
+> coxph(Surv(time, status) ~ age + sex + frailty(id, dist='gauss', method='aic',
++ 					       caic=T), kidney)
+Call:
+coxph(formula = Surv(time, status) ~ age + sex + frailty(id, 
+    dist = "gauss", method = "aic", caic = T), data = kidney)
+
+                          coef     se(coef) se2     Chisq DF   p     
+age                        0.00303 0.0103   0.00895  0.09 1.00 0.7700
+sex                       -1.15152 0.3637   0.30556 10.03 1.00 0.0015
+frailty(id, dist = "gauss                           12.35 6.76 0.0800
+
+Iterations: 7 outer, 41 Newton-Raphson
+     Variance of random effect= 0.185 
+Degrees of freedom for terms= 0.8 0.7 6.8 
+Likelihood ratio test=28.4  on 8.22 df, p=0.000476  n= 76 
+> 
+> 
+> # uncorrected aic
+> coxph(Surv(time, status) ~ age + sex + frailty(id, method='aic', caic=F), 
++       kidney)
+Call:
+coxph(formula = Surv(time, status) ~ age + sex + frailty(id, 
+    method = "aic", caic = F), data = kidney)
+
+                          coef     se(coef) se2     Chisq DF   p      
+age                        0.00785 0.015    0.00823  0.27  1.0 0.60000
+sex                       -1.88990 0.561    0.39941 11.34  1.0 0.00076
+frailty(id, method = "aic                           37.46 19.7 0.00920
+
+Iterations: 8 outer, 87 Newton-Raphson
+     Variance of random effect= 0.886   I-likelihood = -182.8 
+Degrees of freedom for terms=  0.3  0.5 19.7 
+Likelihood ratio test=61.2  on 20.5 df, p=6.25e-06  n= 76 
+Warning message:
+In coxpenal.fit(X, Y, strats, offset, init = init, control, weights = weights,  :
+  Inner loop failed to coverge for iterations 4
+> 
+> coxph(Surv(time, status) ~ age + sex + frailty(id, dist='t', caic=F), kidney)
+Call:
+coxph(formula = Surv(time, status) ~ age + sex + frailty(id, 
+    dist = "t", caic = F), data = kidney)
+
+                          coef     se(coef) se2     Chisq DF   p      
+age                        0.00561 0.012    0.00872  0.22  1.0 0.64000
+sex                       -1.65487 0.483    0.38527 11.74  1.0 0.00061
+frailty(id, dist = "t", c                           20.33 13.9 0.12000
+
+Iterations: 8 outer, 58 Newton-Raphson
+     Variance of random effect= 0.825 
+Degrees of freedom for terms=  0.5  0.6 13.9 
+Likelihood ratio test=48.6  on 15.1 df, p=2.18e-05  n= 76 
+> 
diff --git a/win32/deps/library/survival/tests/fr_lung.R b/win32/deps/library/survival/tests/fr_lung.R
new file mode 100644
index 0000000..d0a4fbf
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_lung.R
@@ -0,0 +1,29 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# A test with the lung data
+#  This caused problems in one release
+
+#
+#   First, get rid of some missings
+#
+lung2 <- na.omit(lung[c('time', 'status', 'wt.loss')])
+
+#
+# Test the logliklihoods
+#
+fit <- coxph(Surv(time, status) ~ pspline(wt.loss,3), lung2, x=T)
+fit0<- coxph(Surv(time, status) ~ 1, lung2)
+fit1<- coxph(Surv(time, status) ~ fit$x, lung2, iter=0, init=fit$coef)
+
+all.equal(fit$loglik[1], fit0$loglik)
+all.equal(fit$loglik[2], fit1$loglik[2])
+
+#
+# Check variances
+#
+imat <- solve(fit1$var)
+var2 <- fit$var %*% imat %*% fit$var
+all.equal(fit$var2, var2)
diff --git a/win32/deps/library/survival/tests/fr_lung.Rout.save b/win32/deps/library/survival/tests/fr_lung.Rout.save
new file mode 100644
index 0000000..d79a420
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_lung.Rout.save
@@ -0,0 +1,51 @@
+
+R version 2.11.1 (2010-05-31)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # A test with the lung data
+> #  This caused problems in one release
+> 
+> #
+> #   First, get rid of some missings
+> #
+> lung2 <- na.omit(lung[c('time', 'status', 'wt.loss')])
+> 
+> #
+> # Test the logliklihoods
+> #
+> fit <- coxph(Surv(time, status) ~ pspline(wt.loss,3), lung2, x=T)
+> fit0<- coxph(Surv(time, status) ~ 1, lung2)
+> fit1<- coxph(Surv(time, status) ~ fit$x, lung2, iter=0, init=fit$coef)
+> 
+> all.equal(fit$loglik[1], fit0$loglik)
+[1] TRUE
+> all.equal(fit$loglik[2], fit1$loglik[2])
+[1] TRUE
+> 
+> #
+> # Check variances
+> #
+> imat <- solve(fit1$var)
+> var2 <- fit$var %*% imat %*% fit$var
+> all.equal(fit$var2, var2)
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/fr_ovarian.R b/win32/deps/library/survival/tests/fr_ovarian.R
new file mode 100644
index 0000000..0102006
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_ovarian.R
@@ -0,0 +1,21 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Test on the ovarian data
+
+fit1 <- coxph(Surv(futime, fustat) ~ rx + age, ovarian)
+fit2 <- coxph(Surv(futime, fustat) ~ rx + pspline(age, df=2), 
+		data=ovarian)
+fit2$iter
+
+fit2$df
+
+fit2$history
+
+fit4 <- coxph(Surv(futime, fustat) ~ rx + pspline(age, df=4), 
+		data=ovarian)
+fit4
+
+
diff --git a/win32/deps/library/survival/tests/fr_ovarian.Rout.save b/win32/deps/library/survival/tests/fr_ovarian.Rout.save
new file mode 100644
index 0000000..70b05e4
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_ovarian.Rout.save
@@ -0,0 +1,74 @@
+
+R version 2.14.0 Under development (unstable) (2011-04-10 r55401)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Test on the ovarian data
+> 
+> fit1 <- coxph(Surv(futime, fustat) ~ rx + age, ovarian)
+> fit2 <- coxph(Surv(futime, fustat) ~ rx + pspline(age, df=2), 
++ 		data=ovarian)
+> fit2$iter
+[1] 2 8
+> 
+> fit2$df
+[1] 0.9426611 1.9293051
+> 
+> fit2$history
+$`pspline(age, df = 2)`
+$`pspline(age, df = 2)`$theta
+[1] 0.4468868
+
+$`pspline(age, df = 2)`$done
+[1] TRUE
+
+$`pspline(age, df = 2)`$history
+        thetas      dfs
+[1,] 1.0000000 1.000000
+[2,] 0.0000000 5.000000
+[3,] 0.6000000 1.734267
+[4,] 0.4845205 1.929305
+
+$`pspline(age, df = 2)`$half
+[1] 0
+
+
+> 
+> fit4 <- coxph(Surv(futime, fustat) ~ rx + pspline(age, df=4), 
++ 		data=ovarian)
+> fit4
+Call:
+coxph(formula = Surv(futime, fustat) ~ rx + pspline(age, df = 4), 
+    data = ovarian)
+
+                          coef   se(coef) se2   Chisq DF   p     
+rx                        -0.373 0.761    0.749 0.24  1.00 0.6200
+pspline(age, df = 4), lin  0.139 0.044    0.044 9.98  1.00 0.0016
+pspline(age, df = 4), non                       2.59  2.93 0.4500
+
+Iterations: 3 outer, 14 Newton-Raphson
+     Theta= 0.242 
+Degrees of freedom for terms= 1.0 3.9 
+Likelihood ratio test=19.4  on 4.9 df, p=0.00149  n= 26 
+> 
+> 
+> 
diff --git a/win32/deps/library/survival/tests/fr_rat1.R b/win32/deps/library/survival/tests/fr_rat1.R
new file mode 100644
index 0000000..5a3ddae
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_rat1.R
@@ -0,0 +1,24 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+# Tests using the rats data
+#
+#  (Female rats, from Mantel et al, Cancer Research 37,
+#    3863-3868, November 77)
+
+rfit <- coxph(Surv(time,status) ~ rx + frailty(litter), rats,
+	     method='breslow')
+names(rfit)
+rfit
+
+rfit$iter
+rfit$df
+rfit$history[[1]]
+
+rfit1 <- coxph(Surv(time,status) ~ rx + frailty(litter, theta=1), rats,
+	     method='breslow')
+rfit1
+
+rfit2 <- coxph(Surv(time,status) ~ frailty(litter), rats)
+rfit2
diff --git a/win32/deps/library/survival/tests/fr_rat1.Rout.save b/win32/deps/library/survival/tests/fr_rat1.Rout.save
new file mode 100644
index 0000000..27c2123
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_rat1.Rout.save
@@ -0,0 +1,109 @@
+
+R version 2.13.0 (2011-04-13)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> # Tests using the rats data
+> #
+> #  (Female rats, from Mantel et al, Cancer Research 37,
+> #    3863-3868, November 77)
+> 
+> rfit <- coxph(Surv(time,status) ~ rx + frailty(litter), rats,
++ 	     method='breslow')
+> names(rfit)
+ [1] "coefficients"      "var"               "var2"             
+ [4] "loglik"            "iter"              "linear.predictors"
+ [7] "residuals"         "means"             "concordance"      
+[10] "method"            "frail"             "fvar"             
+[13] "df"                "df2"               "penalty"          
+[16] "pterms"            "assign2"           "history"          
+[19] "coxlist1"          "printfun"          "n"                
+[22] "nevent"            "terms"             "assign"           
+[25] "wald.test"         "y"                 "formula"          
+[28] "call"             
+> rfit
+Call:
+coxph(formula = Surv(time, status) ~ rx + frailty(litter), data = rats, 
+    method = "breslow")
+
+                coef  se(coef) se2   Chisq DF   p    
+rx              0.906 0.323    0.319  7.88  1.0 0.005
+frailty(litter)                      16.89 13.8 0.250
+
+Iterations: 6 outer, 25 Newton-Raphson
+     Variance of random effect= 0.474   I-likelihood = -181.1 
+Degrees of freedom for terms=  1.0 13.9 
+Likelihood ratio test=36.3  on 14.8 df, p=0.00144  n= 150 
+> 
+> rfit$iter
+[1]  6 25
+> rfit$df
+[1]  0.975943 13.854864
+> rfit$history[[1]]
+$theta
+[1] 0.4742849
+
+$done
+c.loglik 
+    TRUE 
+
+$history
+         theta    loglik  c.loglik
+[1,] 0.0000000 -181.8451 -181.8451
+[2,] 1.0000000 -168.3683 -181.5458
+[3,] 0.5000000 -173.3117 -181.0788
+[4,] 0.3090061 -175.9446 -181.1490
+[5,] 0.4645720 -173.7590 -181.0775
+[6,] 0.4736210 -173.6431 -181.0773
+
+$c.loglik
+[1] -181.0773
+
+> 
+> rfit1 <- coxph(Surv(time,status) ~ rx + frailty(litter, theta=1), rats,
++ 	     method='breslow')
+> rfit1
+Call:
+coxph(formula = Surv(time, status) ~ rx + frailty(litter, theta = 1), 
+    data = rats, method = "breslow")
+
+                          coef  se(coef) se2   Chisq DF   p     
+rx                        0.918 0.327    0.321  7.85  1.0 0.0051
+frailty(litter, theta = 1                      27.25 22.7 0.2300
+
+Iterations: 1 outer, 6 Newton-Raphson
+     Variance of random effect= 1   I-likelihood = -181.5 
+Degrees of freedom for terms=  1.0 22.7 
+Likelihood ratio test=50.7  on 23.7 df, p=0.001  n= 150 
+> 
+> rfit2 <- coxph(Surv(time,status) ~ frailty(litter), rats)
+> rfit2
+Call:
+coxph(formula = Surv(time, status) ~ frailty(litter), data = rats)
+
+                coef se(coef) se2 Chisq DF   p   
+frailty(litter)                   18    14.6 0.24
+
+Iterations: 6 outer, 22 Newton-Raphson
+     Variance of random effect= 0.504   I-likelihood = -184.8 
+Degrees of freedom for terms= 14.6 
+Likelihood ratio test=30  on 14.6 df, p=0.0101  n= 150 
+> 
diff --git a/win32/deps/library/survival/tests/fr_rat2.R b/win32/deps/library/survival/tests/fr_rat2.R
new file mode 100644
index 0000000..4edd1be
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_rat2.R
@@ -0,0 +1,65 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+# From Gail, Sautner and Brown, Biometrics 36, 255-66, 1980
+
+# 48 rats were injected with a carcinogen, and then randomized to either
+# drug or placebo.  The number of tumors ranges from 0 to 13; all rats were
+# censored at 6 months after randomization.
+
+# Variables: rat, treatment (1=drug, 0=control), o
+# 	   observation # within rat,
+#	   (start, stop] status
+# The raw data has some intervals of zero length, i.e., start==stop.
+#  We add .1 to these times as an approximate solution
+#
+rat2 <- read.table('data.rat2', col.names=c('id', 'rx', 'enum', 'start',
+				  'stop', 'status'))
+temp1 <- rat2$start
+temp2 <- rat2$stop
+for (i in 1:nrow(rat2)) {
+    if (temp1[i] == temp2[i]) {
+	temp2[i] <- temp2[i] + .1
+	if (i < nrow(rat2) && rat2$id[i] == rat2$id[i+1]) {
+	    temp1[i+1] <- temp1[i+1] + .1
+	    if (temp2[i+1] <= temp1[i+1]) temp2[i+1] <- temp1[i+1]
+	    }
+        }
+    }
+rat2$start <- temp1
+rat2$stop  <- temp2
+
+r2fit0 <- coxph(Surv(start, stop, status) ~ rx + cluster(id), rat2)
+
+r2fitg <-  coxph(Surv(start, stop, status) ~ rx + frailty(id), rat2)
+r2fitm <-  coxph(Surv(start, stop, status) ~ rx + frailty.gaussian(id), rat2)
+
+r2fit0
+r2fitg
+r2fitm
+
+#This example is unusual: the frailties variances end up about the same,
+#  but the effect on rx differs.  Double check it
+# Because of different iteration paths, the coef won't be exactly the
+#     same, but darn close.
+
+temp <- coxph(Surv(start, stop, status) ~ rx + offset(r2fitm$frail[id]), rat2)
+all.equal(temp$coef, r2fitm$coef[1], tolerance=1e-7)
+
+temp <- coxph(Surv(start, stop, status) ~ rx + offset(r2fitg$frail[id]), rat2)
+all.equal(temp$coef, r2fitg$coef[1], tolerance=1e-7)
+
+#
+# What do I get with AIC
+#
+r2fita1 <- coxph(Surv(start, stop, status) ~ rx + frailty(id, method='aic'),
+		 rat2)
+r2fita2 <- coxph(Surv(start, stop, status) ~ rx + frailty(id, method='aic',
+							  dist='gauss'), rat2)
+r2fita3 <- coxph(Surv(start, stop, status) ~ rx + frailty(id, dist='t'),
+		 rat2)
+
+r2fita1
+r2fita2
+r2fita3
diff --git a/win32/deps/library/survival/tests/fr_rat2.Rout.save b/win32/deps/library/survival/tests/fr_rat2.Rout.save
new file mode 100644
index 0000000..aa32eba
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_rat2.Rout.save
@@ -0,0 +1,156 @@
+
+R version 2.14.0 Under development (unstable) (2011-04-10 r55401)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> # From Gail, Sautner and Brown, Biometrics 36, 255-66, 1980
+> 
+> # 48 rats were injected with a carcinogen, and then randomized to either
+> # drug or placebo.  The number of tumors ranges from 0 to 13; all rats were
+> # censored at 6 months after randomization.
+> 
+> # Variables: rat, treatment (1=drug, 0=control), o
+> # 	   observation # within rat,
+> #	   (start, stop] status
+> # The raw data has some intervals of zero length, i.e., start==stop.
+> #  We add .1 to these times as an approximate solution
+> #
+> rat2 <- read.table('data.rat2', col.names=c('id', 'rx', 'enum', 'start',
++ 				  'stop', 'status'))
+> temp1 <- rat2$start
+> temp2 <- rat2$stop
+> for (i in 1:nrow(rat2)) {
++     if (temp1[i] == temp2[i]) {
++ 	temp2[i] <- temp2[i] + .1
++ 	if (i < nrow(rat2) && rat2$id[i] == rat2$id[i+1]) {
++ 	    temp1[i+1] <- temp1[i+1] + .1
++ 	    if (temp2[i+1] <= temp1[i+1]) temp2[i+1] <- temp1[i+1]
++ 	    }
++         }
++     }
+> rat2$start <- temp1
+> rat2$stop  <- temp2
+> 
+> r2fit0 <- coxph(Surv(start, stop, status) ~ rx + cluster(id), rat2)
+> 
+> r2fitg <-  coxph(Surv(start, stop, status) ~ rx + frailty(id), rat2)
+> r2fitm <-  coxph(Surv(start, stop, status) ~ rx + frailty.gaussian(id), rat2)
+> 
+> r2fit0
+Call:
+coxph(formula = Surv(start, stop, status) ~ rx + cluster(id), 
+    data = rat2)
+
+
+     coef exp(coef) se(coef) robust se     z       p
+rx -0.827     0.438    0.151     0.204 -4.05 5.2e-05
+
+Likelihood ratio test=32.9  on 1 df, p=9.89e-09  n= 253, number of events= 212 
+> r2fitg
+Call:
+coxph(formula = Surv(start, stop, status) ~ rx + frailty(id), 
+    data = rat2)
+
+            coef   se(coef) se2   Chisq DF   p      
+rx          -0.838 0.219    0.152 14.6   1.0 0.00013
+frailty(id)                       57.3  26.4 0.00045
+
+Iterations: 7 outer, 26 Newton-Raphson
+     Variance of random effect= 0.317   I-likelihood = -779.1 
+Degrees of freedom for terms=  0.5 26.3 
+Likelihood ratio test=120  on 26.8 df, p=8.43e-14  n= 253 
+> r2fitm
+Call:
+coxph(formula = Surv(start, stop, status) ~ rx + frailty.gaussian(id), 
+    data = rat2)
+
+                     coef  se(coef) se2   Chisq DF   p      
+rx                   -0.79 0.22     0.154 12.9   1.0 3.2e-04
+frailty.gaussian(id)                      60.9  24.9 7.3e-05
+
+Iterations: 6 outer, 23 Newton-Raphson
+     Variance of random effect= 0.303 
+Degrees of freedom for terms=  0.5 24.9 
+Likelihood ratio test=118  on 25.4 df, p=6.99e-14  n= 253 
+> 
+> #This example is unusual: the frailties variances end up about the same,
+> #  but the effect on rx differs.  Double check it
+> # Because of different iteration paths, the coef won't be exactly the
+> #     same, but darn close.
+> 
+> temp <- coxph(Surv(start, stop, status) ~ rx + offset(r2fitm$frail[id]), rat2)
+> all.equal(temp$coef, r2fitm$coef[1], tolerance=1e-7)
+[1] TRUE
+> 
+> temp <- coxph(Surv(start, stop, status) ~ rx + offset(r2fitg$frail[id]), rat2)
+> all.equal(temp$coef, r2fitg$coef[1], tolerance=1e-7)
+[1] TRUE
+> 
+> #
+> # What do I get with AIC
+> #
+> r2fita1 <- coxph(Surv(start, stop, status) ~ rx + frailty(id, method='aic'),
++ 		 rat2)
+> r2fita2 <- coxph(Surv(start, stop, status) ~ rx + frailty(id, method='aic',
++ 							  dist='gauss'), rat2)
+> r2fita3 <- coxph(Surv(start, stop, status) ~ rx + frailty(id, dist='t'),
++ 		 rat2)
+> 
+> r2fita1
+Call:
+coxph(formula = Surv(start, stop, status) ~ rx + frailty(id, 
+    method = "aic"), data = rat2)
+
+                          coef   se(coef) se2   Chisq DF   p      
+rx                        -0.838 0.23     0.151 13.3   1.0 0.00026
+frailty(id, method = "aic                       60.4  28.2 0.00039
+
+Iterations: 10 outer, 34 Newton-Raphson
+     Variance of random effect= 0.375   I-likelihood = -779.2 
+Degrees of freedom for terms=  0.4 28.2 
+Likelihood ratio test=124  on 28.6 df, p=7.92e-14  n= 253 
+> r2fita2
+Call:
+coxph(formula = Surv(start, stop, status) ~ rx + frailty(id, 
+    method = "aic", dist = "gauss"), data = rat2)
+
+                          coef   se(coef) se2   Chisq DF   p      
+rx                        -0.785 0.245    0.154 10.3   1.0 1.3e-03
+frailty(id, method = "aic                       70.4  28.5 2.1e-05
+
+Iterations: 9 outer, 33 Newton-Raphson
+     Variance of random effect= 0.436 
+Degrees of freedom for terms=  0.4 28.5 
+Likelihood ratio test=125  on 28.9 df, p=5.93e-14  n= 253 
+> r2fita3
+Call:
+coxph(formula = Surv(start, stop, status) ~ rx + frailty(id, 
+    dist = "t"), data = rat2)
+
+                        coef  se(coef) se2   Chisq DF p      
+rx                      -0.79 0.254    0.157  9.67  1 0.00190
+frailty(id, dist = "t")                      64.72 30 0.00024
+
+Iterations: 7 outer, 29 Newton-Raphson
+     Variance of random effect= 0.78 
+Degrees of freedom for terms=  0.4 30.0 
+Likelihood ratio test=126  on 30.4 df, p=1.39e-13  n= 253 
+> 
diff --git a/win32/deps/library/survival/tests/fr_resid.R b/win32/deps/library/survival/tests/fr_resid.R
new file mode 100644
index 0000000..dde6c15
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_resid.R
@@ -0,0 +1,94 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# The residual methods treat a sparse frailty as a fixed offset with
+#   no variance
+#
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+
+kfit1 <- coxph(Surv(time, status) ~ age + sex + 
+	           frailty(id, dist='gauss'), kidney)
+tempf <- predict(kfit1, type='terms')[,3]
+temp  <- kfit1$frail[match(kidney$id, sort(unique(kidney$id)))]
+#all.equal(unclass(tempf), unclass(temp))
+all.equal(as.vector(tempf), as.vector(temp))
+
+# Now fit a model with explicit offset
+kfitx <- coxph(Surv(time, status) ~ age + sex + offset(tempf),kidney,
+	       eps=1e-7)
+
+# These are not precisely the same, due to different iteration paths
+aeq(kfitx$coef, kfit1$coef)
+
+# This will make them identical
+kfitx <- coxph(Surv(time, status) ~ age + sex  + offset(temp),kidney,
+	       iter=0, init=kfit1$coef)
+aeq(resid(kfit1), resid(kfitx))
+aeq(resid(kfit1, type='score'), resid(kfitx, type='score'))
+aeq(resid(kfit1, type='schoe'), resid(kfitx, type='schoe'))
+
+# These are not the same, due to a different variance matrix
+#  The frailty model's variance is about 2x the naive "assume an offset" var
+# The score residuals are equal, however.
+aeq(resid(kfit1, type='dfbeta'), resid(kfitx, type='dfbeta'))
+zed <- kfitx
+zed$var <- kfit1$var
+aeq(resid(kfit1, type='dfbeta'), resid(zed, type='dfbeta'))
+
+
+temp1 <- resid(kfit1, type='score')
+temp2 <- resid(kfitx, type='score')
+aeq(temp1, temp2)
+
+#
+# Now for some tests of predicted values
+#
+aeq(predict(kfit1, type='expected'), predict(kfitx, type='expected'))
+aeq(predict(kfit1, type='lp'), predict(kfitx, type='lp'))
+
+temp1 <- predict(kfit1, type='terms', se.fit=T)
+temp2 <- predict(kfitx, type='terms', se.fit=T)
+aeq(temp1$fit[,1:2], temp2$fit)
+aeq(temp1$se.fit[,1:2], temp2$se.fit)  #should be false
+mean(temp1$se.fit[,1:2]/ temp2$se.fit)
+aeq(as.vector(temp1$se.fit[,3])^2, 
+	  as.vector(kfit1$fvar[match(kidney$id, sort(unique(kidney$id)))]))
+
+print(temp1)
+kfit1
+kfitx
+
+rm(temp1, temp2, kfitx, zed, tempf)
+#
+# The special case of a single sparse frailty
+#
+
+kfit1 <- coxph(Surv(time, status) ~ frailty(id, dist='gauss'), kidney)
+tempf <- predict(kfit1, type='terms')
+temp  <- kfit1$frail[match(kidney$id, sort(unique(kidney$id)))]
+all.equal(as.vector(tempf), as.vector(temp))
+
+# Now fit a model with explicit offset
+kfitx <- coxph(Surv(time, status) ~ offset(tempf),kidney, eps=1e-7)
+
+aeq(resid(kfit1), resid(kfitx))
+aeq(resid(kfit1, type='deviance'), resid(kfitx, type='deviance'))
+
+#
+# Some tests of predicted values
+#
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+aeq(predict(kfit1, type='expected'), predict(kfitx, type='expected'))
+aeq(predict(kfit1, type='lp'), predict(kfitx, type='lp'))
+
+temp1 <- predict(kfit1, type='terms', se.fit=T)
+aeq(temp1$fit, kfitx$linear)
+aeq(temp1$se.fit^2, 
+	  kfit1$fvar[match(kidney$id, sort(unique(kidney$id)))])
+
+temp1
+kfit1
+
+
diff --git a/win32/deps/library/survival/tests/fr_resid.Rout.save b/win32/deps/library/survival/tests/fr_resid.Rout.save
new file mode 100644
index 0000000..8392ccd
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_resid.Rout.save
@@ -0,0 +1,358 @@
+
+R version 2.14.0 Under development (unstable) (2011-04-10 r55401)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # The residual methods treat a sparse frailty as a fixed offset with
+> #   no variance
+> #
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> kfit1 <- coxph(Surv(time, status) ~ age + sex + 
++ 	           frailty(id, dist='gauss'), kidney)
+> tempf <- predict(kfit1, type='terms')[,3]
+> temp  <- kfit1$frail[match(kidney$id, sort(unique(kidney$id)))]
+> #all.equal(unclass(tempf), unclass(temp))
+> all.equal(as.vector(tempf), as.vector(temp))
+[1] TRUE
+> 
+> # Now fit a model with explicit offset
+> kfitx <- coxph(Surv(time, status) ~ age + sex + offset(tempf),kidney,
++ 	       eps=1e-7)
+> 
+> # These are not precisely the same, due to different iteration paths
+> aeq(kfitx$coef, kfit1$coef)
+[1] TRUE
+> 
+> # This will make them identical
+> kfitx <- coxph(Surv(time, status) ~ age + sex  + offset(temp),kidney,
++ 	       iter=0, init=kfit1$coef)
+> aeq(resid(kfit1), resid(kfitx))
+[1] TRUE
+> aeq(resid(kfit1, type='score'), resid(kfitx, type='score'))
+[1] TRUE
+> aeq(resid(kfit1, type='schoe'), resid(kfitx, type='schoe'))
+[1] TRUE
+> 
+> # These are not the same, due to a different variance matrix
+> #  The frailty model's variance is about 2x the naive "assume an offset" var
+> # The score residuals are equal, however.
+> aeq(resid(kfit1, type='dfbeta'), resid(kfitx, type='dfbeta'))
+[1] "Mean relative difference: 0.5216263"
+> zed <- kfitx
+> zed$var <- kfit1$var
+> aeq(resid(kfit1, type='dfbeta'), resid(zed, type='dfbeta'))
+[1] TRUE
+> 
+> 
+> temp1 <- resid(kfit1, type='score')
+> temp2 <- resid(kfitx, type='score')
+> aeq(temp1, temp2)
+[1] TRUE
+> 
+> #
+> # Now for some tests of predicted values
+> #
+> aeq(predict(kfit1, type='expected'), predict(kfitx, type='expected'))
+[1] TRUE
+> aeq(predict(kfit1, type='lp'), predict(kfitx, type='lp'))
+[1] TRUE
+> 
+> temp1 <- predict(kfit1, type='terms', se.fit=T)
+> temp2 <- predict(kfitx, type='terms', se.fit=T)
+> aeq(temp1$fit[,1:2], temp2$fit)
+[1] TRUE
+> aeq(temp1$se.fit[,1:2], temp2$se.fit)  #should be false
+[1] "Mean relative difference: 0.3024526"
+> mean(temp1$se.fit[,1:2]/ temp2$se.fit)
+[1] 1.433017
+> aeq(as.vector(temp1$se.fit[,3])^2, 
++ 	  as.vector(kfit1$fvar[match(kidney$id, sort(unique(kidney$id)))]))
+[1] TRUE
+> 
+> print(temp1)
+$fit
+            age       sex frailty(id, dist = "gauss")
+1  -0.073981042  1.039553                  0.59814468
+2  -0.073981042  1.039553                  0.59814468
+3   0.020278123 -0.371269                  0.38512389
+4   0.020278123 -0.371269                  0.38512389
+5  -0.055129209  1.039553                  0.20210998
+6  -0.055129209  1.039553                  0.20210998
+7  -0.059842167 -0.371269                 -0.55932015
+8  -0.055129209 -0.371269                 -0.55932015
+9  -0.158814289  1.039553                  0.28558387
+10 -0.158814289  1.039553                  0.28558387
+11 -0.130536540 -0.371269                  0.06628942
+12 -0.125823582 -0.371269                  0.06628942
+13  0.034416998  1.039553                  0.80505119
+14  0.034416998  1.039553                  0.80505119
+15  0.053268830 -0.371269                 -0.43834241
+16  0.057981789 -0.371269                 -0.43834241
+17  0.119250245 -0.371269                 -0.05631649
+18  0.119250245 -0.371269                 -0.05631649
+19  0.034416998  1.039553                 -0.49980572
+20  0.039129956  1.039553                 -0.49980572
+21  0.001426290 -0.371269                 -0.13028264
+22  0.001426290 -0.371269                 -0.13028264
+23 -0.045703292 -0.371269                  0.06377401
+24 -0.045703292 -0.371269                  0.06377401
+25 -0.040990334 -0.371269                  0.38815296
+26 -0.040990334 -0.371269                  0.38815296
+27 -0.007999626 -0.371269                 -0.47650510
+28 -0.007999626 -0.371269                 -0.47650510
+29 -0.125823582 -0.371269                 -0.66986830
+30 -0.125823582 -0.371269                 -0.66986830
+31  0.076833621  1.039553                  0.19359678
+32  0.076833621  1.039553                  0.19359678
+33  0.076833621 -0.371269                 -0.16483200
+34  0.076833621 -0.371269                 -0.16483200
+35 -0.003286668 -0.371269                 -0.15794998
+36  0.001426290 -0.371269                 -0.15794998
+37  0.043842914 -0.371269                 -0.46236014
+38  0.043842914 -0.371269                 -0.46236014
+39  0.001426290 -0.371269                  0.12603308
+40  0.001426290 -0.371269                  0.12603308
+41  0.010852206  1.039553                 -1.74303142
+42  0.015565165  1.039553                 -1.74303142
+43 -0.064555125 -0.371269                 -0.45211210
+44 -0.064555125 -0.371269                 -0.45211210
+45  0.086259538 -0.371269                  0.51574106
+46  0.090972496 -0.371269                  0.51574106
+47 -0.007999626 -0.371269                  0.09475123
+48 -0.003286668 -0.371269                  0.09475123
+49 -0.003286668  1.039553                  0.05790354
+50 -0.003286668  1.039553                  0.05790354
+51  0.062694747 -0.371269                 -0.37933234
+52  0.067407705 -0.371269                 -0.37933234
+53 -0.158814289 -0.371269                  0.11248891
+54 -0.158814289 -0.371269                  0.11248891
+55  0.039129956 -0.371269                  0.54791210
+56  0.039129956 -0.371269                  0.54791210
+57  0.043842914  1.039553                  0.45873482
+58  0.043842914  1.039553                  0.45873482
+59  0.048555872 -0.371269                  0.35639797
+60  0.048555872 -0.371269                  0.35639797
+61  0.057981789 -0.371269                  0.48803342
+62  0.057981789 -0.371269                  0.48803342
+63  0.029704039 -0.371269                  0.25597325
+64  0.034416998 -0.371269                  0.25597325
+65  0.062694747 -0.371269                  0.23054948
+66  0.062694747 -0.371269                  0.23054948
+67  0.001426290 -0.371269                 -0.13680005
+68  0.006139248 -0.371269                 -0.13680005
+69 -0.102258791 -0.371269                  0.51977995
+70 -0.102258791 -0.371269                  0.51977995
+71 -0.007999626 -0.371269                 -0.23878154
+72 -0.007999626 -0.371269                 -0.23878154
+73  0.039129956 -0.371269                  0.17174306
+74  0.039129956 -0.371269                  0.17174306
+75  0.076833621  1.039553                 -0.35822829
+76  0.076833621  1.039553                 -0.35822829
+
+$se.fit
+           age       sex frailty(id, dist = "gauss")
+1  0.195861829 0.3280279                   0.6246430
+2  0.195861829 0.3280279                   0.6246430
+3  0.053685514 0.1171528                   0.6954922
+4  0.053685514 0.1171528                   0.6954922
+5  0.145952360 0.3280279                   0.5705340
+6  0.145952360 0.3280279                   0.5705340
+7  0.158429727 0.1171528                   0.4894541
+8  0.145952360 0.1171528                   0.4894541
+9  0.420454437 0.3280279                   0.6071455
+10 0.420454437 0.3280279                   0.6071455
+11 0.345590234 0.1171528                   0.5633997
+12 0.333112867 0.1171528                   0.5633997
+13 0.091117615 0.3280279                   0.6641707
+14 0.091117615 0.3280279                   0.6641707
+15 0.141027084 0.1171528                   0.5101890
+16 0.153504451 0.1171528                   0.5101890
+17 0.315710223 0.1171528                   0.5491569
+18 0.315710223 0.1171528                   0.5491569
+19 0.091117615 0.3280279                   0.5264083
+20 0.103594982 0.3280279                   0.5264083
+21 0.003776045 0.1171528                   0.5180953
+22 0.003776045 0.1171528                   0.5180953
+23 0.120997626 0.1171528                   0.6208806
+24 0.120997626 0.1171528                   0.6208806
+25 0.108520259 0.1171528                   0.5811421
+26 0.108520259 0.1171528                   0.5811421
+27 0.021178689 0.1171528                   0.6247779
+28 0.021178689 0.1171528                   0.6247779
+29 0.333112867 0.1171528                   0.5615987
+30 0.333112867 0.1171528                   0.5615987
+31 0.203413919 0.3280279                   0.6532405
+32 0.203413919 0.3280279                   0.6532405
+33 0.203413919 0.1171528                   0.5247227
+34 0.203413919 0.1171528                   0.5247227
+35 0.008701322 0.1171528                   0.5106606
+36 0.003776045 0.1171528                   0.5106606
+37 0.116072349 0.1171528                   0.6284328
+38 0.116072349 0.1171528                   0.6284328
+39 0.003776045 0.1171528                   0.6320009
+40 0.003776045 0.1171528                   0.6320009
+41 0.028730780 0.3280279                   0.5235228
+42 0.041208147 0.3280279                   0.5235228
+43 0.170907094 0.1171528                   0.5492095
+44 0.170907094 0.1171528                   0.5492095
+45 0.228368654 0.1171528                   0.6058686
+46 0.240846021 0.1171528                   0.6058686
+47 0.021178689 0.1171528                   0.6267998
+48 0.008701322 0.1171528                   0.6267998
+49 0.008701322 0.3280279                   0.5526664
+50 0.008701322 0.3280279                   0.5526664
+51 0.165981818 0.1171528                   0.5556706
+52 0.178459185 0.1171528                   0.5556706
+53 0.420454437 0.1171528                   0.5849825
+54 0.420454437 0.1171528                   0.5849825
+55 0.103594982 0.1171528                   0.6081780
+56 0.103594982 0.1171528                   0.6081780
+57 0.116072349 0.3280279                   0.6010279
+58 0.116072349 0.3280279                   0.6010279
+59 0.128549717 0.1171528                   0.5762113
+60 0.128549717 0.1171528                   0.5762113
+61 0.153504451 0.1171528                   0.5982501
+62 0.153504451 0.1171528                   0.5982501
+63 0.078640248 0.1171528                   0.6614053
+64 0.091117615 0.1171528                   0.6614053
+65 0.165981818 0.1171528                   0.5609510
+66 0.165981818 0.1171528                   0.5609510
+67 0.003776045 0.1171528                   0.5844921
+68 0.016253412 0.1171528                   0.5844921
+69 0.270726031 0.1171528                   0.6089631
+70 0.270726031 0.1171528                   0.6089631
+71 0.021178689 0.1171528                   0.6795741
+72 0.021178689 0.1171528                   0.6795741
+73 0.103594982 0.1171528                   0.6421784
+74 0.103594982 0.1171528                   0.6421784
+75 0.203413919 0.3280279                   0.5779661
+76 0.203413919 0.3280279                   0.5779661
+
+> kfit1
+Call:
+coxph(formula = Surv(time, status) ~ age + sex + frailty(id, 
+    dist = "gauss"), data = kidney)
+
+                          coef     se(coef) se2     Chisq DF   p     
+age                        0.00471 0.0125   0.00856  0.14  1.0 0.7100
+sex                       -1.41082 0.4452   0.31504 10.04  1.0 0.0015
+frailty(id, dist = "gauss                           26.54 14.7 0.0290
+
+Iterations: 6 outer, 39 Newton-Raphson
+     Variance of random effect= 0.569 
+Degrees of freedom for terms=  0.5  0.5 14.7 
+Likelihood ratio test=47.5  on 15.7 df, p=4.65e-05  n= 76 
+> kfitx
+Call:
+coxph(formula = Surv(time, status) ~ age + sex + offset(temp), 
+    data = kidney, init = kfit1$coef, iter = 0)
+
+
+        coef exp(coef) se(coef)      z       p
+age  0.00471     1.005  0.00875  0.539 5.9e-01
+sex -1.41082     0.244  0.30916 -4.563 5.0e-06
+
+Likelihood ratio test=0  on 2 df, p=1  n= 76, number of events= 58 
+> 
+> rm(temp1, temp2, kfitx, zed, tempf)
+> #
+> # The special case of a single sparse frailty
+> #
+> 
+> kfit1 <- coxph(Surv(time, status) ~ frailty(id, dist='gauss'), kidney)
+> tempf <- predict(kfit1, type='terms')
+> temp  <- kfit1$frail[match(kidney$id, sort(unique(kidney$id)))]
+> all.equal(as.vector(tempf), as.vector(temp))
+[1] TRUE
+> 
+> # Now fit a model with explicit offset
+> kfitx <- coxph(Surv(time, status) ~ offset(tempf),kidney, eps=1e-7)
+> 
+> aeq(resid(kfit1), resid(kfitx))
+[1] TRUE
+> aeq(resid(kfit1, type='deviance'), resid(kfitx, type='deviance'))
+[1] TRUE
+> 
+> #
+> # Some tests of predicted values
+> #
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> aeq(predict(kfit1, type='expected'), predict(kfitx, type='expected'))
+[1] TRUE
+> aeq(predict(kfit1, type='lp'), predict(kfitx, type='lp'))
+[1] TRUE
+> 
+> temp1 <- predict(kfit1, type='terms', se.fit=T)
+> aeq(temp1$fit, kfitx$linear)
+[1] TRUE
+> aeq(temp1$se.fit^2, 
++ 	  kfit1$fvar[match(kidney$id, sort(unique(kidney$id)))])
+[1] TRUE
+> 
+> temp1
+$fit
+ [1]  0.696003729  0.696003729  0.244575316  0.244575316  0.494175549
+ [6]  0.494175549 -0.659248798 -0.659248798  0.521423106  0.521423106
+[11] -0.114492938 -0.114492938  0.800127481  0.800127481 -0.488101282
+[16] -0.488101282 -0.120396647 -0.120396647  0.131121515  0.131121515
+[21] -0.214987009 -0.214987009 -0.054872789 -0.054872789  0.184657295
+[26]  0.184657295 -0.510007747 -0.510007747 -0.790746805 -0.790746805
+[31]  0.324674289  0.324674289 -0.239374060 -0.239374060 -0.264428564
+[36] -0.264428564 -0.472698773 -0.472698773  0.006304049  0.006304049
+[41] -0.873434085 -0.873434085 -0.530880840 -0.530880840  0.351411783
+[46]  0.351411783 -0.037212138 -0.037212138  0.442049266  0.442049266
+[51] -0.419206550 -0.419206550 -0.108012854 -0.108012854  0.346332076
+[56]  0.346332076  0.659300205  0.659300205  0.197278585  0.197278585
+[61]  0.304868889  0.304868889  0.139712997  0.139712997  0.093574024
+[66]  0.093574024 -0.209690355 -0.209690355  0.302070834  0.302070834
+[71] -0.278962288 -0.278962288  0.068599919  0.068599919  0.078493616
+[76]  0.078493616
+
+$se.fit
+ [1] 0.6150025 0.6150025 0.6160184 0.6160184 0.5715622 0.5715622 0.4393615
+ [8] 0.4393615 0.5761369 0.5761369 0.4834244 0.4834244 0.6421184 0.6421184
+[15] 0.4574824 0.4574824 0.4813578 0.4813578 0.5119792 0.5119792 0.4764145
+[22] 0.4764145 0.5532477 0.5532477 0.5195437 0.5195437 0.5534327 0.5534327
+[29] 0.4775572 0.4775572 0.6364522 0.6364522 0.4708988 0.4708988 0.4670896
+[36] 0.4670896 0.5600672 0.5600672 0.5641880 0.5641880 0.4650576 0.4650576
+[43] 0.4904715 0.4904715 0.5448430 0.5448430 0.5570120 0.5570120 0.5608187
+[50] 0.5608187 0.4996021 0.4996021 0.4831697 0.4831697 0.5452255 0.5452255
+[57] 0.6057428 0.6057428 0.5209402 0.5209402 0.5376594 0.5376594 0.5911350
+[64] 0.5911350 0.5065368 0.5065368 0.5290283 0.5290283 0.5368433 0.5368433
+[71] 0.5996077 0.5996077 0.5762814 0.5762814 0.5782753 0.5782753
+
+> kfit1
+Call:
+coxph(formula = Surv(time, status) ~ frailty(id, dist = "gauss"), 
+    data = kidney)
+
+                          coef se(coef) se2 Chisq DF   p    
+frailty(id, dist = "gauss                   23    13.8 0.057
+
+Iterations: 7 outer, 39 Newton-Raphson
+     Variance of random effect= 0.458 
+Degrees of freedom for terms= 13.8 
+Likelihood ratio test=33.4  on 13.8 df, p=0.00234  n= 76 
+> 
+> 
+> 
diff --git a/win32/deps/library/survival/tests/fr_simple.R b/win32/deps/library/survival/tests/fr_simple.R
new file mode 100644
index 0000000..583d545
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_simple.R
@@ -0,0 +1,62 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Test the logic of the penalized code by fitting some no-frailty models
+#  (theta=0).  It should give exactly the same answers as 'ordinary' coxph.
+#
+test1 <- data.frame(time=  c(4, 3,1,1,2,2,3),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0))
+
+test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
+                    stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
+                    event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
+                    x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+
+zz <- rep(0, nrow(test1))
+tfit1 <- coxph(Surv(time,status) ~x, test1, eps=1e-7)
+tfit2 <- coxph(Surv(time,status) ~x + frailty(zz, theta=0, sparse=T), test1)
+tfit3 <- coxph(Surv(zz,time,status) ~x + frailty(zz, theta=0, sparse=T), test1)
+
+temp <- c('coefficients', 'var', 'loglik', 'linear.predictors',
+	  'means', 'n')
+
+all.equal(tfit1[temp], tfit2[temp])
+all.equal(tfit2[temp], tfit3[temp])
+
+zz <- rep(0, nrow(test2))
+tfit1 <- coxph(Surv(start, stop, event) ~x, test2, eps=1e-7)
+tfit2 <- coxph(Surv(start, stop, event) ~ x + frailty(zz, theta=0, sparse=T),
+	       test2)
+all.equal(tfit1[temp], tfit2[temp])
+
+
+#
+# Repeat the above tests, but with a strata added
+#  Because the data set is simply doubled, the loglik will double,
+#   beta is the same, variance is halved.
+#
+test3 <- rbind(test1, test1)
+test3$x2 <- rep(1:2, rep(nrow(test1),2))
+zz <- rep(0, nrow(test3))
+tfit1 <- coxph(Surv(time,status) ~x + strata(x2), test3, eps=1e-7)
+tfit2 <- coxph(Surv(time,status) ~x + frailty(zz, theta=0, sparse=T)
+	       + strata(x2), test3)
+tfit3 <- coxph(Surv(zz,time,status) ~x + frailty(zz, theta=0, sparse=T)
+	         + strata(x2), test3)
+
+all.equal(tfit1[temp], tfit2[temp])
+all.equal(tfit2[temp], tfit3[temp])
+
+
+test4 <- rbind(test2, test2)
+test4$x2 <- rep(1:2, rep(nrow(test2),2))
+zz <- rep(0, nrow(test4))
+tfit1 <- coxph(Surv(start, stop, event) ~x, test4, eps=1e-7)
+tfit2 <- coxph(Surv(start, stop, event) ~ x + frailty(zz, theta=0, sparse=T),
+	       test4)
+all.equal(tfit1[temp], tfit2[temp])
+
+rm(test3, test4, tfit1, tfit2, tfit3, temp, zz)
diff --git a/win32/deps/library/survival/tests/fr_simple.Rout.save b/win32/deps/library/survival/tests/fr_simple.Rout.save
new file mode 100644
index 0000000..ab69134
--- /dev/null
+++ b/win32/deps/library/survival/tests/fr_simple.Rout.save
@@ -0,0 +1,87 @@
+
+R version 2.7.1 (2008-06-23)
+Copyright (C) 2008 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Test the logic of the penalized code by fitting some no-frailty models
+> #  (theta=0).  It should give exactly the same answers as 'ordinary' coxph.
+> #
+> test1 <- data.frame(time=  c(4, 3,1,1,2,2,3),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0))
+> 
+> test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
++                     stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
++                     event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
++                     x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+> 
+> zz <- rep(0, nrow(test1))
+> tfit1 <- coxph(Surv(time,status) ~x, test1, eps=1e-7)
+> tfit2 <- coxph(Surv(time,status) ~x + frailty(zz, theta=0, sparse=T), test1)
+> tfit3 <- coxph(Surv(zz,time,status) ~x + frailty(zz, theta=0, sparse=T), test1)
+> 
+> temp <- c('coefficients', 'var', 'loglik', 'linear.predictors',
++ 	  'means', 'n')
+> 
+> all.equal(tfit1[temp], tfit2[temp])
+[1] TRUE
+> all.equal(tfit2[temp], tfit3[temp])
+[1] TRUE
+> 
+> zz <- rep(0, nrow(test2))
+> tfit1 <- coxph(Surv(start, stop, event) ~x, test2, eps=1e-7)
+> tfit2 <- coxph(Surv(start, stop, event) ~ x + frailty(zz, theta=0, sparse=T),
++ 	       test2)
+> all.equal(tfit1[temp], tfit2[temp])
+[1] TRUE
+> 
+> 
+> #
+> # Repeat the above tests, but with a strata added
+> #  Because the data set is simply doubled, the loglik will double,
+> #   beta is the same, variance is halved.
+> #
+> test3 <- rbind(test1, test1)
+> test3$x2 <- rep(1:2, rep(nrow(test1),2))
+> zz <- rep(0, nrow(test3))
+> tfit1 <- coxph(Surv(time,status) ~x + strata(x2), test3, eps=1e-7)
+> tfit2 <- coxph(Surv(time,status) ~x + frailty(zz, theta=0, sparse=T)
++ 	       + strata(x2), test3)
+> tfit3 <- coxph(Surv(zz,time,status) ~x + frailty(zz, theta=0, sparse=T)
++ 	         + strata(x2), test3)
+> 
+> all.equal(tfit1[temp], tfit2[temp])
+[1] TRUE
+> all.equal(tfit2[temp], tfit3[temp])
+[1] TRUE
+> 
+> 
+> test4 <- rbind(test2, test2)
+> test4$x2 <- rep(1:2, rep(nrow(test2),2))
+> zz <- rep(0, nrow(test4))
+> tfit1 <- coxph(Surv(start, stop, event) ~x, test4, eps=1e-7)
+> tfit2 <- coxph(Surv(start, stop, event) ~ x + frailty(zz, theta=0, sparse=T),
++ 	       test4)
+> all.equal(tfit1[temp], tfit2[temp])
+[1] TRUE
+> 
+> rm(test3, test4, tfit1, tfit2, tfit3, temp, zz)
+> 
diff --git a/win32/deps/library/survival/tests/frailty.R b/win32/deps/library/survival/tests/frailty.R
new file mode 100644
index 0000000..b1de713
--- /dev/null
+++ b/win32/deps/library/survival/tests/frailty.R
@@ -0,0 +1,22 @@
+library(survival)
+#
+# The constuction of a survival curve with sparse frailties
+#
+# In this case the coefficient vector is kept in two parts, the
+#  fixed coefs and the (often very large) random effects coefficients
+# The survfit function treats the second set of coefficients as fixed
+#  values, to avoid an unmanagable variance matrix, and behaves like
+#  the second fit below.
+
+fit1 <- coxph(Surv(time, status) ~ age + frailty(inst), lung)
+sfit1 <- survfit(fit1)
+
+# A parallel model with the frailties treated as fixed offsets
+offvar <- fit1$frail[as.numeric(factor(lung$inst))]
+fit2 <- coxph(Surv(time, status) ~ age + offset(offvar),lung)
+fit2$var <- fit1$var  #force variances to match
+
+all.equal(fit1$coef, fit2$coef)
+sfit2 <- survfit(fit2, newdata=list(age=fit1$means, offvar=0))
+all.equal(sfit1$surv, sfit2$surv)
+all.equal(sfit1$var, sfit2$var)
diff --git a/win32/deps/library/survival/tests/frailty.Rout.save b/win32/deps/library/survival/tests/frailty.Rout.save
new file mode 100644
index 0000000..807c287
--- /dev/null
+++ b/win32/deps/library/survival/tests/frailty.Rout.save
@@ -0,0 +1,44 @@
+
+R version 2.11.1 (2010-05-31)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(survival)
+Loading required package: splines
+> #
+> # The constuction of a survival curve with sparse frailties
+> #
+> # In this case the coefficient vector is kept in two parts, the
+> #  fixed coefs and the (often very large) random effects coefficients
+> # The survfit function treats the second set of coefficients as fixed
+> #  values, to avoid an unmanagable variance matrix, and behaves like
+> #  the second fit below.
+> 
+> fit1 <- coxph(Surv(time, status) ~ age + frailty(inst), lung)
+> sfit1 <- survfit(fit1)
+> 
+> # A parallel model with the frailties treated as fixed offsets
+> offvar <- fit1$frail[as.numeric(factor(lung$inst))]
+> fit2 <- coxph(Surv(time, status) ~ age + offset(offvar),lung)
+> fit2$var <- fit1$var  #force variances to match
+> 
+> all.equal(fit1$coef, fit2$coef)
+[1] TRUE
+> sfit2 <- survfit(fit2, newdata=list(age=fit1$means, offvar=0))
+> all.equal(sfit1$surv, sfit2$surv)
+[1] TRUE
+> all.equal(sfit1$var, sfit2$var)
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/frank.R b/win32/deps/library/survival/tests/frank.R
new file mode 100644
index 0000000..030cf39
--- /dev/null
+++ b/win32/deps/library/survival/tests/frank.R
@@ -0,0 +1,23 @@
+library(survival)
+#
+# Check out intercept/interaction for Frank H
+#
+age2 <- lung$age - 50
+fit1 <- coxph(Surv(time, status) ~ age * strata(sex), lung)
+fit2 <- coxph(Surv(time, status) ~ age2*strata(sex), lung)
+
+surv1 <- survfit(fit1)
+surv2 <- survfit(fit2)
+# The call won't match, but the rest should
+icall <- match("call", names(surv1))
+all.equal(unclass(surv1)[-icall], unclass(surv2)[-icall])
+
+
+# It should match what I get with a single strata fit
+
+fit3 <- coxph(Surv(time, status) ~ age, data=lung,
+              init=fit1$coef[1], subset=(sex==1), iter=0)
+surv1b <- survfit(fit3, newdata=fit1$means[1])
+icall <- match("call", surv1b)
+all.equal(unlist(surv1[1])[-icall], unlist(surv1b)[-icall])
+
diff --git a/win32/deps/library/survival/tests/frank.Rout.save b/win32/deps/library/survival/tests/frank.Rout.save
new file mode 100644
index 0000000..22e885f
--- /dev/null
+++ b/win32/deps/library/survival/tests/frank.Rout.save
@@ -0,0 +1,45 @@
+
+R version 2.12.1 (2010-12-16)
+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(survival)
+Loading required package: splines
+> #
+> # Check out intercept/interaction for Frank H
+> #
+> age2 <- lung$age - 50
+> fit1 <- coxph(Surv(time, status) ~ age * strata(sex), lung)
+> fit2 <- coxph(Surv(time, status) ~ age2*strata(sex), lung)
+> 
+> surv1 <- survfit(fit1)
+> surv2 <- survfit(fit2)
+> # The call won't match, but the rest should
+> icall <- match("call", names(surv1))
+> all.equal(unclass(surv1)[-icall], unclass(surv2)[-icall])
+[1] TRUE
+> 
+> 
+> # It should match what I get with a single strata fit
+> 
+> fit3 <- coxph(Surv(time, status) ~ age, data=lung,
++               init=fit1$coef[1], subset=(sex==1), iter=0)
+> surv1b <- survfit(fit3, newdata=fit1$means[1])
+> icall <- match("call", surv1b)
+> all.equal(unlist(surv1[1])[-icall], unlist(surv1b)[-icall])
+[1] TRUE
+> 
+> 
diff --git a/win32/deps/library/survival/tests/gray1.rda b/win32/deps/library/survival/tests/gray1.rda
new file mode 100644
index 0000000..ad4d80b
Binary files /dev/null and b/win32/deps/library/survival/tests/gray1.rda differ
diff --git a/win32/deps/library/survival/tests/infcox.R b/win32/deps/library/survival/tests/infcox.R
new file mode 100644
index 0000000..56efef7
--- /dev/null
+++ b/win32/deps/library/survival/tests/infcox.R
@@ -0,0 +1,35 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# A test to exercise the "infinity" check on 2 variables
+#
+test3 <- data.frame(futime=1:12, fustat=c(1,0,1,0,1,0,0,0,0,0,0,0),
+		   x1=rep(0:1,6), x2=c(rep(0,6), rep(1,6)))
+
+# This will produce a warning message, which is the point of the test.
+# The variance is close to singular and gives different answers 
+#  on different machines
+fit3 <- coxph(Surv(futime, fustat) ~ x1 + x2, test3, iter=25)
+
+all.equal(round(fit3$coef,1), c(-22.2, -22.9), check.attributes=FALSE)
+all.equal(round(fit3$log, 4),c(-6.8669, -1.7918))
+
+#
+# Actual solution
+#  time 1, 12 at risk,  3 each of x1/x2 = 00, 01, 10, 11
+#  time 2, 10 at risk,                     2, 3,  2 ,  3
+#  time 5, 8  at risk,                     1, 3,  1,   3
+# Let r1 = exp(beta1), r2= exp(beta2)
+# loglik = -log(3 + 3r1 + 3r2 + 3 r1*r2) - log(2 + 2r1 + 3r2 + 3 r1*r2) -
+#           log(1 + r1  + 3r2 + 3 r1*r2)
+true <- function(beta) {
+    r1 <- exp(beta[1])
+    r2 <- exp(beta[2])
+    loglik <- -log(3*(1+ r1+ r2+ r1*r2)) - log(2+ 2*r1 + 3*r2 + 3*r1*r2) -
+               log(1 + r1 + 3*r2 + 3*r1*r2)
+    loglik
+}
+
+all.equal(fit3$loglik[2], true(fit3$coef), check.attributes=FALSE)
diff --git a/win32/deps/library/survival/tests/infcox.Rout.save b/win32/deps/library/survival/tests/infcox.Rout.save
new file mode 100644
index 0000000..613dc05
--- /dev/null
+++ b/win32/deps/library/survival/tests/infcox.Rout.save
@@ -0,0 +1,61 @@
+
+R version 2.14.0 (2011-10-31)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # A test to exercise the "infinity" check on 2 variables
+> #
+> test3 <- data.frame(futime=1:12, fustat=c(1,0,1,0,1,0,0,0,0,0,0,0),
++ 		   x1=rep(0:1,6), x2=c(rep(0,6), rep(1,6)))
+> 
+> # This will produce a warning message, which is the point of the test.
+> # The variance is close to singular and gives different answers 
+> #  on different machines
+> fit3 <- coxph(Surv(futime, fustat) ~ x1 + x2, test3, iter=25)
+Warning message:
+In fitter(X, Y, strats, offset, init, control, weights = weights,  :
+  Loglik converged before variable  1,2 ; beta may be infinite. 
+> 
+> all.equal(round(fit3$coef,1), c(-22.2, -22.9), check.attributes=FALSE)
+[1] TRUE
+> all.equal(round(fit3$log, 4),c(-6.8669, -1.7918))
+[1] TRUE
+> 
+> #
+> # Actual solution
+> #  time 1, 12 at risk,  3 each of x1/x2 = 00, 01, 10, 11
+> #  time 2, 10 at risk,                     2, 3,  2 ,  3
+> #  time 5, 8  at risk,                     1, 3,  1,   3
+> # Let r1 = exp(beta1), r2= exp(beta2)
+> # loglik = -log(3 + 3r1 + 3r2 + 3 r1*r2) - log(2 + 2r1 + 3r2 + 3 r1*r2) -
+> #           log(1 + r1  + 3r2 + 3 r1*r2)
+> true <- function(beta) {
++     r1 <- exp(beta[1])
++     r2 <- exp(beta[2])
++     loglik <- -log(3*(1+ r1+ r2+ r1*r2)) - log(2+ 2*r1 + 3*r2 + 3*r1*r2) -
++                log(1 + r1 + 3*r2 + 3*r1*r2)
++     loglik
++ }
+> 
+> all.equal(fit3$loglik[2], true(fit3$coef), check.attributes=FALSE)
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/jasa.R b/win32/deps/library/survival/tests/jasa.R
new file mode 100644
index 0000000..5ab3481
--- /dev/null
+++ b/win32/deps/library/survival/tests/jasa.R
@@ -0,0 +1,89 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+expect <- survexp(futime ~ ratetable(age=(accept.dt - birth.dt), sex=1,
+		year=accept.dt, race='white'), jasa, cohort=F, 
+                  ratetable=survexp.usr)
+
+survdiff(Surv(jasa$futime, jasa$fustat) ~ offset(expect))
+# Now fit the 6 models found in Kalbfleisch and Prentice, p139
+sfit.1 <- coxph(Surv(start, stop, event)~ (age + surgery)*transplant,
+				jasa1, method='breslow')
+sfit.2 <- coxph(Surv(start, stop, event)~ year*transplant,
+				jasa1, method='breslow')
+sfit.3 <- coxph(Surv(start, stop, event)~ (age + year)*transplant,
+				jasa1, method='breslow')
+sfit.4 <- coxph(Surv(start, stop, event)~ (year +surgery) *transplant,
+				jasa1, method='breslow')
+sfit.5 <- coxph(Surv(start, stop, event)~ (age + surgery)*transplant + year ,
+				jasa1, method='breslow')
+sfit.6 <- coxph(Surv(start, stop, event)~ age*transplant + surgery + year,
+				jasa1, method='breslow')
+
+summary(sfit.1)
+sfit.2
+summary(sfit.3)
+sfit.4
+sfit.5
+sfit.6
+
+# Survival curve for an "average" subject,
+#  done once as overall, once via individual method
+surv1 <- survfit(sfit.1, newdata=list(age=-2, surgery=0, transplant=0))
+newdata <- data.frame(start=c(0,50,100), stop=c(50,100, max(jasa1$stop)), 
+                   event=c(1,1,1), age=rep(-2,3), surgery=rep(0,3),
+                   transplant=rep(0,3))
+surv2 <- survfit(sfit.1, newdata, individual=T)
+# Have to use unclass to avoid [.survfit trying to pick curves,
+#  remove the final element "call" because it won't match
+all.equal(unclass(surv1)[-length(surv1)],
+          unclass(surv2)[-length(surv2)])
+
+
+# Survival curve for a subject of age 50, with prior surgery, tx at 6 months
+#  Remember that 'age' in jasa 1 was centered at 48
+data <- data.frame(start=c(0,183), stop=c(183,3*365), event=c(1,1),
+		   age=c(2,2),  surgery=c(1,1), transplant=c(0,1))
+summary(survfit(sfit.1, data, individual=T))
+
+# These should all give the same answer
+# When there are offsets, the default curve is always for someone with
+#  the mean offset.
+j.age <- jasa$age -48
+fit1 <- coxph(Surv(futime, fustat) ~ j.age, data=jasa)
+fit2 <- coxph(Surv(futime, fustat) ~ j.age, jasa, init=fit1$coef, iter=0)
+fit3 <- coxph(Surv(start, stop, event) ~ age, jasa1)
+fit4 <- coxph(Surv(start, stop, event) ~ offset(age*fit1$coef), jasa1)
+
+s1 <- survfit(fit1, fit3$means, censor=FALSE)
+s2 <- survfit(fit2, list(j.age=fit3$means), censor=FALSE)
+s3 <- survfit(fit3, censor=FALSE)
+s4 <- survfit(fit4, censor=FALSE)
+
+all.equal(s1$surv, s2$surv)
+all.equal(s1$surv, s3$surv)
+all.equal(s1$surv, s4$surv)
+
+# Still the same answer, fit multiple strata at once
+#  Strata 1 has independent coefs of strata 2, so putting in
+#    the other data should not affect it
+attach(jasa1)
+ll <- length(start)
+ss <- rep(0:1, c(ll,ll))
+tdata <- data.frame(start=rep(start,2), stop=rep(stop,2),
+		    event=rep(event,2), ss=ss, age=rep(age,2),
+		    age2 = (rep(age,2))^2 * ss)
+fit <- coxph(Surv(start, stop, event) ~ age*strata(ss) + age2, tdata)
+#  Above replaced these 2 lines, which kill Splus5 as of 8/98
+#    Something with data frames, I expect.
+#fit <- coxph(Surv(rep(start,2), rep(stop,2), rep(event,2)) ~
+#			rep(age,2)*strata(ss) + I(rep(age,2)^2*ss) )
+all.equal(fit$coef[1], fit3$coef)
+s5 <- survfit(fit, data.frame(age=fit3$means, age2=0, ss=0), censor=FALSE)
+all.equal(s5$surv[1:(s5$strata[1])],  s3$surv)
+detach("jasa1")
+
+rm(s1, s2, s3, s4, s5, tdata, ll, ss, data)
+rm(fit1, fit2, fit3, fit4, fit, j.age)
+rm(sfit.1, sfit.2, sfit.3, sfit.4, sfit.5, sfit.6)
diff --git a/win32/deps/library/survival/tests/jasa.Rout.save b/win32/deps/library/survival/tests/jasa.Rout.save
new file mode 100644
index 0000000..2fd0a7c
--- /dev/null
+++ b/win32/deps/library/survival/tests/jasa.Rout.save
@@ -0,0 +1,289 @@
+
+R version 2.12.2 (2011-02-25)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> expect <- survexp(futime ~ ratetable(age=(accept.dt - birth.dt), sex=1,
++ 		year=accept.dt, race='white'), jasa, cohort=F, 
++                   ratetable=survexp.usr)
+> 
+> survdiff(Surv(jasa$futime, jasa$fustat) ~ offset(expect))
+Call:
+survdiff(formula = Surv(jasa$futime, jasa$fustat) ~ offset(expect))
+
+Observed Expected        Z        p 
+  75.000    0.587  -97.119    0.000 
+> # Now fit the 6 models found in Kalbfleisch and Prentice, p139
+> sfit.1 <- coxph(Surv(start, stop, event)~ (age + surgery)*transplant,
++ 				jasa1, method='breslow')
+> sfit.2 <- coxph(Surv(start, stop, event)~ year*transplant,
++ 				jasa1, method='breslow')
+> sfit.3 <- coxph(Surv(start, stop, event)~ (age + year)*transplant,
++ 				jasa1, method='breslow')
+> sfit.4 <- coxph(Surv(start, stop, event)~ (year +surgery) *transplant,
++ 				jasa1, method='breslow')
+> sfit.5 <- coxph(Surv(start, stop, event)~ (age + surgery)*transplant + year ,
++ 				jasa1, method='breslow')
+> sfit.6 <- coxph(Surv(start, stop, event)~ age*transplant + surgery + year,
++ 				jasa1, method='breslow')
+> 
+> summary(sfit.1)
+Call:
+coxph(formula = Surv(start, stop, event) ~ (age + surgery) * 
+    transplant, data = jasa1, method = "breslow")
+
+  n= 170, number of events= 75 
+
+                       coef exp(coef) se(coef)      z Pr(>|z|)
+age                 0.01386   1.01395  0.01813  0.765    0.445
+surgery            -0.54652   0.57896  0.61091 -0.895    0.371
+transplant          0.11572   1.12268  0.32729  0.354    0.724
+age:transplant      0.03473   1.03534  0.02725  1.274    0.202
+surgery:transplant -0.29037   0.74799  0.75819 -0.383    0.702
+
+                   exp(coef) exp(-coef) lower .95 upper .95
+age                    1.014     0.9862    0.9786     1.051
+surgery                0.579     1.7272    0.1748     1.917
+transplant             1.123     0.8907    0.5911     2.132
+age:transplant         1.035     0.9659    0.9815     1.092
+surgery:transplant     0.748     1.3369    0.1692     3.306
+
+Concordance= 0.595  (se = 0.037 )
+Rsquare= 0.071   (max possible= 0.97 )
+Likelihood ratio test= 12.45  on 5 df,   p=0.02915
+Wald test            = 11.62  on 5 df,   p=0.04031
+Score (logrank) test = 12.02  on 5 df,   p=0.03457
+
+> sfit.2
+Call:
+coxph(formula = Surv(start, stop, event) ~ year * transplant, 
+    data = jasa1, method = "breslow")
+
+
+                  coef exp(coef) se(coef)      z     p
+year            -0.265     0.767    0.105 -2.522 0.012
+transplant      -0.287     0.750    0.514 -0.559 0.580
+year:transplant  0.137     1.147    0.141  0.973 0.330
+
+Likelihood ratio test=8.61  on 3 df, p=0.0349  n= 170, number of events= 75 
+> summary(sfit.3)
+Call:
+coxph(formula = Surv(start, stop, event) ~ (age + year) * transplant, 
+    data = jasa1, method = "breslow")
+
+  n= 170, number of events= 75 
+
+                    coef exp(coef) se(coef)      z Pr(>|z|)   
+age              0.01558   1.01571  0.01734  0.899  0.36887   
+year            -0.27413   0.76023  0.10588 -2.589  0.00962 **
+transplant      -0.59388   0.55218  0.54222 -1.095  0.27339   
+age:transplant   0.03380   1.03438  0.02795  1.209  0.22653   
+year:transplant  0.20228   1.22419  0.14247  1.420  0.15566   
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
+
+                exp(coef) exp(-coef) lower .95 upper .95
+age                1.0157     0.9845    0.9818    1.0508
+year               0.7602     1.3154    0.6178    0.9356
+transplant         0.5522     1.8110    0.1908    1.5981
+age:transplant     1.0344     0.9668    0.9792    1.0926
+year:transplant    1.2242     0.8169    0.9259    1.6185
+
+Concordance= 0.63  (se = 0.037 )
+Rsquare= 0.084   (max possible= 0.97 )
+Likelihood ratio test= 14.85  on 5 df,   p=0.01102
+Wald test            = 13.77  on 5 df,   p=0.01716
+Score (logrank) test = 14.06  on 5 df,   p=0.01525
+
+> sfit.4
+Call:
+coxph(formula = Surv(start, stop, event) ~ (year + surgery) * 
+    transplant, data = jasa1, method = "breslow")
+
+
+                     coef exp(coef) se(coef)      z     p
+year               -0.254     0.776    0.108 -2.360 0.018
+surgery            -0.237     0.789    0.628 -0.377 0.710
+transplant         -0.297     0.743    0.505 -0.588 0.560
+year:transplant     0.165     1.180    0.142  1.167 0.240
+surgery:transplant -0.550     0.577    0.776 -0.709 0.480
+
+Likelihood ratio test=12.4  on 5 df, p=0.0302  n= 170, number of events= 75 
+> sfit.5
+Call:
+coxph(formula = Surv(start, stop, event) ~ (age + surgery) * 
+    transplant + year, data = jasa1, method = "breslow")
+
+
+                      coef exp(coef) se(coef)      z     p
+age                 0.0150     1.015   0.0176  0.855 0.390
+surgery            -0.4202     0.657   0.6156 -0.683 0.490
+transplant          0.0741     1.077   0.3311  0.224 0.820
+year               -0.1363     0.873   0.0710 -1.921 0.055
+age:transplant      0.0269     1.027   0.0271  0.992 0.320
+surgery:transplant -0.2966     0.743   0.7580 -0.391 0.700
+
+Likelihood ratio test=16.2  on 6 df, p=0.0127  n= 170, number of events= 75 
+> sfit.6
+Call:
+coxph(formula = Surv(start, stop, event) ~ age * transplant + 
+    surgery + year, data = jasa1, method = "breslow")
+
+
+                  coef exp(coef) se(coef)      z     p
+age             0.0153     1.015   0.0175  0.873 0.380
+transplant      0.0446     1.046   0.3217  0.139 0.890
+surgery        -0.6211     0.537   0.3679 -1.688 0.091
+year           -0.1361     0.873   0.0709 -1.919 0.055
+age:transplant  0.0270     1.027   0.0271  0.996 0.320
+
+Likelihood ratio test=16.1  on 5 df, p=0.00669  n= 170, number of events= 75 
+> 
+> # Survival curve for an "average" subject,
+> #  done once as overall, once via individual method
+> surv1 <- survfit(sfit.1, newdata=list(age=-2, surgery=0, transplant=0))
+> newdata <- data.frame(start=c(0,50,100), stop=c(50,100, max(jasa1$stop)), 
++                    event=c(1,1,1), age=rep(-2,3), surgery=rep(0,3),
++                    transplant=rep(0,3))
+> surv2 <- survfit(sfit.1, newdata, individual=T)
+> # Have to use unclass to avoid [.survfit trying to pick curves,
+> #  remove the final element "call" because it won't match
+> all.equal(unclass(surv1)[-length(surv1)],
++           unclass(surv2)[-length(surv2)])
+[1] TRUE
+> 
+> 
+> # Survival curve for a subject of age 50, with prior surgery, tx at 6 months
+> #  Remember that 'age' in jasa 1 was centered at 48
+> data <- data.frame(start=c(0,183), stop=c(183,3*365), event=c(1,1),
++ 		   age=c(2,2),  surgery=c(1,1), transplant=c(0,1))
+> summary(survfit(sfit.1, data, individual=T))
+Call: survfit(formula = sfit.1, newdata = data, individual = T)
+
+   time n.risk n.event survival std.err lower 95% CI upper 95% CI
+    0.5    103       1    0.994 0.00722        0.980        1.000
+    1.0    102       3    0.975 0.01860        0.939        1.000
+    2.0     99       3    0.956 0.02914        0.900        1.000
+    4.0     96       2    0.943 0.03605        0.875        1.000
+    5.0     94       2    0.930 0.04286        0.849        1.000
+    7.0     92       1    0.923 0.04623        0.837        1.000
+    8.0     91       1    0.917 0.04959        0.824        1.000
+   11.0     89       1    0.910 0.05294        0.812        1.000
+   15.0     88       3    0.890 0.06278        0.775        1.000
+   16.0     85       1    0.883 0.06608        0.763        1.000
+   17.0     84       1    0.877 0.06928        0.751        1.000
+   20.0     83       2    0.864 0.07538        0.728        1.000
+   27.0     81       1    0.857 0.07849        0.716        1.000
+   29.0     80       1    0.850 0.08160        0.705        1.000
+   31.0     78       1    0.844 0.08473        0.693        1.000
+   34.0     77       1    0.837 0.08786        0.681        1.000
+   35.0     76       1    0.830 0.09098        0.669        1.000
+   36.0     75       1    0.823 0.09412        0.658        1.000
+   38.0     74       1    0.816 0.09727        0.646        1.000
+   39.0     72       2    0.802 0.10349        0.623        1.000
+   42.0     70       1    0.795 0.10664        0.611        1.000
+   44.0     69       1    0.788 0.10982        0.600        1.000
+   49.0     68       1    0.781 0.11300        0.588        1.000
+   50.0     67       1    0.774 0.11614        0.577        1.000
+   52.0     66       1    0.767 0.11925        0.565        1.000
+   57.0     65       1    0.760 0.12238        0.554        1.000
+   60.0     64       1    0.752 0.12552        0.542        1.000
+   65.0     63       1    0.745 0.12866        0.531        1.000
+   67.0     62       2    0.730 0.13494        0.508        1.000
+   68.0     60       1    0.722 0.13809        0.497        1.000
+   71.0     59       2    0.707 0.14420        0.474        1.000
+   76.0     57       1    0.699 0.14729        0.463        1.000
+   77.0     56       1    0.691 0.15043        0.451        1.000
+   79.0     55       1    0.683 0.15362        0.439        1.000
+   80.0     54       1    0.674 0.15680        0.428        1.000
+   84.0     53       1    0.666 0.16005        0.416        1.000
+   89.0     52       1    0.657 0.16326        0.404        1.000
+   95.0     51       1    0.648 0.16648        0.392        1.000
+   99.0     50       1    0.639 0.16972        0.380        1.000
+  101.0     49       1    0.630 0.17293        0.368        1.000
+  109.0     47       1    0.621 0.17611        0.356        1.000
+  148.0     45       1    0.611 0.17927        0.344        1.000
+  152.0     44       1    0.601 0.18236        0.332        1.000
+  164.0     43       1    0.592 0.18551        0.320        1.000
+  185.0     41       1    0.583 0.12737        0.380        0.894
+  187.0     40       1    0.574 0.12889        0.370        0.891
+  206.0     39       1    0.565 0.13036        0.359        0.888
+  218.0     38       1    0.556 0.13180        0.349        0.885
+  262.0     37       1    0.546 0.13320        0.339        0.881
+  284.0     35       2    0.527 0.13585        0.318        0.874
+  307.0     33       1    0.517 0.13707        0.308        0.869
+  333.0     32       1    0.507 0.13823        0.297        0.865
+  339.0     31       1    0.497 0.13930        0.287        0.861
+  342.0     29       1    0.486 0.14029        0.276        0.856
+  583.0     21       1    0.471 0.14187        0.261        0.850
+  674.0     17       1    0.452 0.14361        0.243        0.843
+  732.0     16       1    0.433 0.14506        0.225        0.835
+  851.0     14       1    0.410 0.14622        0.204        0.825
+  979.0     11       1    0.383 0.14698        0.180        0.813
+  995.0     10       1    0.356 0.14735        0.158        0.801
+ 1031.0      9       1    0.330 0.14743        0.137        0.792
+> 
+> # These should all give the same answer
+> # When there are offsets, the default curve is always for someone with
+> #  the mean offset.
+> j.age <- jasa$age -48
+> fit1 <- coxph(Surv(futime, fustat) ~ j.age, data=jasa)
+> fit2 <- coxph(Surv(futime, fustat) ~ j.age, jasa, init=fit1$coef, iter=0)
+> fit3 <- coxph(Surv(start, stop, event) ~ age, jasa1)
+> fit4 <- coxph(Surv(start, stop, event) ~ offset(age*fit1$coef), jasa1)
+> 
+> s1 <- survfit(fit1, fit3$means, censor=FALSE)
+> s2 <- survfit(fit2, list(j.age=fit3$means), censor=FALSE)
+> s3 <- survfit(fit3, censor=FALSE)
+> s4 <- survfit(fit4, censor=FALSE)
+> 
+> all.equal(s1$surv, s2$surv)
+[1] TRUE
+> all.equal(s1$surv, s3$surv)
+[1] TRUE
+> all.equal(s1$surv, s4$surv)
+[1] TRUE
+> 
+> # Still the same answer, fit multiple strata at once
+> #  Strata 1 has independent coefs of strata 2, so putting in
+> #    the other data should not affect it
+> attach(jasa1)
+> ll <- length(start)
+> ss <- rep(0:1, c(ll,ll))
+> tdata <- data.frame(start=rep(start,2), stop=rep(stop,2),
++ 		    event=rep(event,2), ss=ss, age=rep(age,2),
++ 		    age2 = (rep(age,2))^2 * ss)
+> fit <- coxph(Surv(start, stop, event) ~ age*strata(ss) + age2, tdata)
+> #  Above replaced these 2 lines, which kill Splus5 as of 8/98
+> #    Something with data frames, I expect.
+> #fit <- coxph(Surv(rep(start,2), rep(stop,2), rep(event,2)) ~
+> #			rep(age,2)*strata(ss) + I(rep(age,2)^2*ss) )
+> all.equal(fit$coef[1], fit3$coef)
+[1] TRUE
+> s5 <- survfit(fit, data.frame(age=fit3$means, age2=0, ss=0), censor=FALSE)
+> all.equal(s5$surv[1:(s5$strata[1])],  s3$surv)
+[1] TRUE
+> detach("jasa1")
+> 
+> rm(s1, s2, s3, s4, s5, tdata, ll, ss, data)
+> rm(fit1, fit2, fit3, fit4, fit, j.age)
+> rm(sfit.1, sfit.2, sfit.3, sfit.4, sfit.5, sfit.6)
+> 
diff --git a/win32/deps/library/survival/tests/model.matrix.R b/win32/deps/library/survival/tests/model.matrix.R
new file mode 100644
index 0000000..6cf768a
--- /dev/null
+++ b/win32/deps/library/survival/tests/model.matrix.R
@@ -0,0 +1,31 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Test out the revised model.matrix code
+#
+test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0),
+                    z= factor(c('a', 'a', 'b', 'b', 'c', 'c', 'a')))
+
+fit1 <- coxph(Surv(time, status) ~ z, test1, iter=1)
+fit2 <- coxph(Surv(time, status) ~z, test1, x=T, iter=1)
+all.equal(model.matrix(fit1), fit2$x)
+
+# This has no level 'b', make sure dummies recode properly
+test2 <- data.frame(time=  c(9, 3,1,1,6,6,8),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0),
+                    z= factor(c('a', 'a', 'a', 'a', 'c', 'c', 'a')))
+
+ftest <- model.frame(fit1, data=test2)
+all.equal(levels(ftest$z), levels(test1$z))
+
+# xtest will have one more row than the others, since it does not delete
+#  the observation with a missing value for status
+xtest <- model.matrix(fit1, data=test2)
+dummy <- fit2$x
+dummy[,1] <- 0
+all.equal(xtest[-2,], dummy, check.attributes=FALSE)
diff --git a/win32/deps/library/survival/tests/model.matrix.Rout.save b/win32/deps/library/survival/tests/model.matrix.Rout.save
new file mode 100644
index 0000000..18f61ed
--- /dev/null
+++ b/win32/deps/library/survival/tests/model.matrix.Rout.save
@@ -0,0 +1,53 @@
+
+R version 2.11.1 (2010-05-31)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Test out the revised model.matrix code
+> #
+> test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0),
++                     z= factor(c('a', 'a', 'b', 'b', 'c', 'c', 'a')))
+> 
+> fit1 <- coxph(Surv(time, status) ~ z, test1, iter=1)
+> fit2 <- coxph(Surv(time, status) ~z, test1, x=T, iter=1)
+> all.equal(model.matrix(fit1), fit2$x)
+[1] TRUE
+> 
+> # This has no level 'b', make sure dummies recode properly
+> test2 <- data.frame(time=  c(9, 3,1,1,6,6,8),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0),
++                     z= factor(c('a', 'a', 'a', 'a', 'c', 'c', 'a')))
+> 
+> ftest <- model.frame(fit1, data=test2)
+> all.equal(levels(ftest$z), levels(test1$z))
+[1] TRUE
+> 
+> # xtest will have one more row than the others, since it does not delete
+> #  the observation with a missing value for status
+> xtest <- model.matrix(fit1, data=test2)
+> dummy <- fit2$x
+> dummy[,1] <- 0
+> all.equal(xtest[-2,], dummy, check.attributes=FALSE)
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/mrtest.R b/win32/deps/library/survival/tests/mrtest.R
new file mode 100644
index 0000000..d5e7fa2
--- /dev/null
+++ b/win32/deps/library/survival/tests/mrtest.R
@@ -0,0 +1,28 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+{if (is.R()) mdy.date <- function(m, d, y) {
+    y <- ifelse(y<100, y+1900, y)
+    as.Date(paste(m,d,y, sep='/'), "%m/%d/%Y")
+    }
+else mdy.date <- function(m,d,y) {
+    y <- ifelse(y<100, y+1900, y)
+    timeDate(paste(y, m, d, sep='/'), in.format="%Y/%m/%d")
+    }
+ }
+
+#
+# A test of the match.ratetable function, specifically the
+#  change to allow partial matching of strings 
+#  Note that 10,000 days old is 27.4 years
+#
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+
+temp1 <- data.frame(year=mdy.date(2,2,1960:1964),
+                    age =   10000 + 1:5,
+                    sex = c('M', 'fema', 'f', 'ma', 'F'))
+
+temp2 <- ratetable(year=temp1$year, age=temp1$age, sex=temp1$sex)
+temp3 <- match.ratetable(temp2, survexp.us)
+aeq(temp3$R[,2], c(1,2,2,1,2))
diff --git a/win32/deps/library/survival/tests/mrtest.Rout.save b/win32/deps/library/survival/tests/mrtest.Rout.save
new file mode 100644
index 0000000..6c3eb8f
--- /dev/null
+++ b/win32/deps/library/survival/tests/mrtest.Rout.save
@@ -0,0 +1,48 @@
+
+R version 2.7.1 (2008-06-23)
+Copyright (C) 2008 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> {if (is.R()) mdy.date <- function(m, d, y) {
++     y <- ifelse(y<100, y+1900, y)
++     as.Date(paste(m,d,y, sep='/'), "%m/%d/%Y")
++     }
++ else mdy.date <- function(m,d,y) {
++     y <- ifelse(y<100, y+1900, y)
++     timeDate(paste(y, m, d, sep='/'), in.format="%Y/%m/%d")
++     }
++  }
+> 
+> #
+> # A test of the match.ratetable function, specifically the
+> #  change to allow partial matching of strings 
+> #  Note that 10,000 days old is 27.4 years
+> #
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> temp1 <- data.frame(year=mdy.date(2,2,1960:1964),
++                     age =   10000 + 1:5,
++                     sex = c('M', 'fema', 'f', 'ma', 'F'))
+> 
+> temp2 <- ratetable(year=temp1$year, age=temp1$age, sex=temp1$sex)
+> temp3 <- match.ratetable(temp2, survexp.us)
+> aeq(temp3$R[,2], c(1,2,2,1,2))
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/nested.R b/win32/deps/library/survival/tests/nested.R
new file mode 100644
index 0000000..215b748
--- /dev/null
+++ b/win32/deps/library/survival/tests/nested.R
@@ -0,0 +1,16 @@
+library(survival)
+#
+# A test of nesting.  It makes sure tha model.frame is built correctly
+#
+tfun <- function(fit, mydata) {
+    survfit(fit, newdata=mydata)
+    }
+
+myfit <- coxph(Surv(time, status) ~ age + factor(sex), lung)
+
+temp1 <- tfun(myfit, lung[1:5,])
+temp2 <- survfit(myfit, lung[1:5,])
+indx <- match('call', names(temp1))  #the call components won't match
+
+all.equal(unclass(temp1)[-indx], unclass(temp2)[-indx])
+
diff --git a/win32/deps/library/survival/tests/nested.Rout.save b/win32/deps/library/survival/tests/nested.Rout.save
new file mode 100644
index 0000000..0086204
--- /dev/null
+++ b/win32/deps/library/survival/tests/nested.Rout.save
@@ -0,0 +1,37 @@
+
+R version 2.12.0 (2010-10-15)
+Copyright (C) 2010 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(survival)
+Loading required package: splines
+> #
+> # A test of nesting.  It makes sure tha model.frame is built correctly
+> #
+> tfun <- function(fit, mydata) {
++     survfit(fit, newdata=mydata)
++     }
+> 
+> myfit <- coxph(Surv(time, status) ~ age + factor(sex), lung)
+> 
+> temp1 <- tfun(myfit, lung[1:5,])
+> temp2 <- survfit(myfit, lung[1:5,])
+> indx <- match('call', names(temp1))  #the call components won't match
+> 
+> all.equal(unclass(temp1)[-indx], unclass(temp2)[-indx])
+[1] TRUE
+> 
+> 
diff --git a/win32/deps/library/survival/tests/ovarian.R b/win32/deps/library/survival/tests/ovarian.R
new file mode 100644
index 0000000..6f9d574
--- /dev/null
+++ b/win32/deps/library/survival/tests/ovarian.R
@@ -0,0 +1,61 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Test the coxph program on the Ovarian data
+#
+
+attach(ovarian)
+
+summary(survfit(Surv(futime, fustat)~1), censor=TRUE)
+
+# Various models
+coxph(Surv(futime, fustat)~ age)
+coxph(Surv(futime, fustat)~ resid.ds)
+coxph(Surv(futime, fustat)~ rx)
+coxph(Surv(futime, fustat)~ ecog.ps)
+
+coxph(Surv(futime, fustat)~ resid.ds + rx + ecog.ps)
+coxph(Surv(futime, fustat)~ age + rx + ecog.ps)
+coxph(Surv(futime, fustat)~ age + resid.ds + ecog.ps)
+coxph(Surv(futime, fustat)~ age + resid.ds + rx)
+
+# Residuals
+fit <- coxph(Surv(futime, fustat)~ age + resid.ds + rx + ecog.ps )
+resid(fit)
+resid(fit, 'dev')
+resid(fit, 'scor')
+resid(fit, 'scho')
+
+fit <- coxph(Surv(futime, fustat) ~ age + ecog.ps + strata(rx))
+summary(fit)
+summary(survfit(fit))
+sfit <- survfit(fit, list(age=c(30,70), ecog.ps=c(2,3)))  #two columns
+sfit
+summary(sfit)
+detach()
+
+
+# Check of offset + surv, added 7/2000
+fit1 <- coxph(Surv(futime, fustat) ~ age + rx, ovarian,
+	      control=coxph.control(eps=1e-8))
+fit2 <- coxph(Surv(futime, fustat) ~ age + offset(rx*fit1$coef[2]), ovarian,
+	      control=coxph.control(eps=1e-8))
+all.equal(fit1$coef[1], fit2$coef[1])
+
+fit <- coxph(Surv(futime, fustat) ~ age + offset(rx), ovarian)
+survfit(fit, censor=FALSE)$surv^exp(-1.5)
+
+# Check it by hand -- there are no tied times
+#  Remember that offsets from survfit are centered, which is 1.5 for
+#  this data set.
+eta <- fit$coef*(ovarian$age - fit$mean) + (ovarian$rx - 1.5)
+ord <- order(ovarian$futime)
+risk <- exp(eta[ord])
+rsum <- rev(cumsum(rev(risk)))   # cumulative risk at each time point
+dead <- (ovarian$fustat[ord]==1)
+baseline <- cumsum(1/rsum[dead])
+all.equal(survfit(fit, censor=FALSE)$surv, exp(-baseline))
+
+rm(fit, fit1, fit2, ord, eta, risk, rsum, dead, baseline, sfit)
diff --git a/win32/deps/library/survival/tests/ovarian.Rout.save b/win32/deps/library/survival/tests/ovarian.Rout.save
new file mode 100644
index 0000000..a078c7f
--- /dev/null
+++ b/win32/deps/library/survival/tests/ovarian.Rout.save
@@ -0,0 +1,319 @@
+
+R version 2.15.0 (2012-03-30)
+Copyright (C) 2012 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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Test the coxph program on the Ovarian data
+> #
+> 
+> attach(ovarian)
+> 
+> summary(survfit(Surv(futime, fustat)~1), censor=TRUE)
+Call: survfit(formula = Surv(futime, fustat) ~ 1)
+
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+   59     26       1    0.962  0.0377        0.890        1.000
+  115     25       1    0.923  0.0523        0.826        1.000
+  156     24       1    0.885  0.0627        0.770        1.000
+  268     23       1    0.846  0.0708        0.718        0.997
+  329     22       1    0.808  0.0773        0.670        0.974
+  353     21       1    0.769  0.0826        0.623        0.949
+  365     20       1    0.731  0.0870        0.579        0.923
+  377     19       0    0.731  0.0870        0.579        0.923
+  421     18       0    0.731  0.0870        0.579        0.923
+  431     17       1    0.688  0.0919        0.529        0.894
+  448     16       0    0.688  0.0919        0.529        0.894
+  464     15       1    0.642  0.0965        0.478        0.862
+  475     14       1    0.596  0.0999        0.429        0.828
+  477     13       0    0.596  0.0999        0.429        0.828
+  563     12       1    0.546  0.1032        0.377        0.791
+  638     11       1    0.497  0.1051        0.328        0.752
+  744     10       0    0.497  0.1051        0.328        0.752
+  769      9       0    0.497  0.1051        0.328        0.752
+  770      8       0    0.497  0.1051        0.328        0.752
+  803      7       0    0.497  0.1051        0.328        0.752
+  855      6       0    0.497  0.1051        0.328        0.752
+ 1040      5       0    0.497  0.1051        0.328        0.752
+ 1106      4       0    0.497  0.1051        0.328        0.752
+ 1129      3       0    0.497  0.1051        0.328        0.752
+ 1206      2       0    0.497  0.1051        0.328        0.752
+ 1227      1       0    0.497  0.1051        0.328        0.752
+> 
+> # Various models
+> coxph(Surv(futime, fustat)~ age)
+Call:
+coxph(formula = Surv(futime, fustat) ~ age)
+
+
+     coef exp(coef) se(coef)    z      p
+age 0.162      1.18   0.0497 3.25 0.0012
+
+Likelihood ratio test=14.3  on 1 df, p=0.000156  n= 26, number of events= 12 
+> coxph(Surv(futime, fustat)~ resid.ds)
+Call:
+coxph(formula = Surv(futime, fustat) ~ resid.ds)
+
+
+         coef exp(coef) se(coef)   z     p
+resid.ds 1.21      3.35    0.672 1.8 0.072
+
+Likelihood ratio test=3.76  on 1 df, p=0.0525  n= 26, number of events= 12 
+> coxph(Surv(futime, fustat)~ rx)
+Call:
+coxph(formula = Surv(futime, fustat) ~ rx)
+
+
+     coef exp(coef) se(coef)     z    p
+rx -0.596     0.551    0.587 -1.02 0.31
+
+Likelihood ratio test=1.05  on 1 df, p=0.305  n= 26, number of events= 12 
+> coxph(Surv(futime, fustat)~ ecog.ps)
+Call:
+coxph(formula = Surv(futime, fustat) ~ ecog.ps)
+
+
+         coef exp(coef) se(coef)     z   p
+ecog.ps 0.398      1.49    0.586 0.679 0.5
+
+Likelihood ratio test=0.47  on 1 df, p=0.494  n= 26, number of events= 12 
+> 
+> coxph(Surv(futime, fustat)~ resid.ds + rx + ecog.ps)
+Call:
+coxph(formula = Surv(futime, fustat) ~ resid.ds + rx + ecog.ps)
+
+
+           coef exp(coef) se(coef)      z     p
+resid.ds  1.347     3.844    0.680  1.980 0.048
+rx       -0.749     0.473    0.595 -1.260 0.210
+ecog.ps   0.453     1.573    0.590  0.767 0.440
+
+Likelihood ratio test=6.03  on 3 df, p=0.11  n= 26, number of events= 12 
+> coxph(Surv(futime, fustat)~ age + rx + ecog.ps)
+Call:
+coxph(formula = Surv(futime, fustat) ~ age + rx + ecog.ps)
+
+
+          coef exp(coef) se(coef)     z      p
+age      0.147     1.158   0.0463  3.17 0.0015
+rx      -0.815     0.443   0.6342 -1.28 0.2000
+ecog.ps  0.103     1.109   0.6064  0.17 0.8600
+
+Likelihood ratio test=15.9  on 3 df, p=0.00118  n= 26, number of events= 12 
+> coxph(Surv(futime, fustat)~ age + resid.ds + ecog.ps)
+Call:
+coxph(formula = Surv(futime, fustat) ~ age + resid.ds + ecog.ps)
+
+
+          coef exp(coef) se(coef)     z      p
+age      0.142      1.15    0.052 2.740 0.0061
+resid.ds 0.663      1.94    0.750 0.883 0.3800
+ecog.ps  0.166      1.18    0.615 0.271 0.7900
+
+Likelihood ratio test=15.1  on 3 df, p=0.00173  n= 26, number of events= 12 
+> coxph(Surv(futime, fustat)~ age + resid.ds + rx)
+Call:
+coxph(formula = Surv(futime, fustat) ~ age + resid.ds + rx)
+
+
+           coef exp(coef) se(coef)      z      p
+age       0.129     1.137   0.0473  2.718 0.0066
+resid.ds  0.696     2.006   0.7585  0.918 0.3600
+rx       -0.849     0.428   0.6392 -1.328 0.1800
+
+Likelihood ratio test=16.8  on 3 df, p=0.000789  n= 26, number of events= 12 
+> 
+> # Residuals
+> fit <- coxph(Surv(futime, fustat)~ age + resid.ds + rx + ecog.ps )
+> resid(fit)
+          1           2           3           4           5           6 
+ 0.84103277  0.54424388  0.59670824 -0.11281376  0.75111588 -0.32609026 
+          7           8           9          10          11          12 
+ 0.59998927  0.29570718 -2.15325805  0.76243469  0.06474272 -0.11680752 
+         13          14          15          16          17          18 
+-1.22562781 -0.63474839 -0.07535824 -0.17058905 -0.22986038 -0.14654862 
+         19          20          21          22          23          24 
+-0.18762920 -0.12771548 -0.53373114 -0.65480022  0.95866131  0.82111675 
+         25          26 
+ 0.55136554 -0.09154014 
+> resid(fit, 'dev')
+          1           2           3           4           5           6 
+ 1.41281595  0.69505907  0.78916003 -0.47500266  1.13106322 -0.80757694 
+          7           8           9          10          11          12 
+ 0.79532966  0.33122166 -2.07521471  1.16179002  0.06619519 -0.48333740 
+         13          14          15          16          17          18 
+-1.56564862 -1.12671948 -0.38822221 -0.58410453 -0.67802711 -0.54138455 
+         19          20          21          22          23          24 
+-0.61258338 -0.50540178 -1.03318066 -0.54976346  2.11059000  1.34157009 
+         25          26 
+ 0.70736314 -0.42787881 
+> resid(fit, 'scor')
+            age    resid.ds          rx     ecog.ps
+1    2.26503249  0.05686357 -0.10565379 -0.42661688
+2    3.02525428  0.04641312 -0.08623662 -0.34821275
+3   -0.06851355  0.07131430 -0.13250357  0.06167527
+4    0.94597623 -0.02541510 -0.06423496  0.05971729
+5   -5.41507168  0.21605962 -0.32258092 -0.39333909
+6    1.48999552  0.24899474  0.14035143 -0.15380664
+7   -0.68612431  0.13740891  0.28392482  0.29196506
+8    0.93116906  0.08428957  0.16040160  0.18430641
+9   -8.20092595 -0.51356176  0.95647608  1.11337112
+10   0.95287510 -0.31078224  0.21463992  0.17363388
+11   2.85526159  0.09417730 -0.14186603 -0.07586086
+12   0.92721107  0.07495002 -0.05400751  0.07061578
+13  -1.93962967 -0.43919871 -0.56668535 -0.48467672
+14   0.63185387 -0.22745949 -0.29348437  0.38373600
+15   1.41495195  0.04835392  0.04051535  0.04555769
+16   2.54591188  0.10945916  0.09171493 -0.06745975
+17   4.40282381 -0.08236953  0.12358137 -0.09089870
+18   1.97071836  0.09403352  0.07878991  0.08859570
+19   0.77692371  0.12039304 -0.08675286  0.11343089
+20   1.76784279 -0.04576632 -0.05905095  0.07721016
+21  -0.82272526  0.34247077 -0.24677770 -0.21106494
+22  -3.48057998 -0.03965965  0.07368852 -0.26669335
+23 -14.86623758  0.28137017 -0.52279208 -0.43881151
+24   3.96084273 -0.56566921  0.34648950  0.44907410
+25   4.30025715  0.15241262  0.22417527 -0.20390438
+26   0.31490641  0.07091764 -0.05212198  0.04845623
+> resid(fit, 'scho')
+             age    resid.ds         rx    ecog.ps
+59    2.69315603  0.06761160 -0.1256239 -0.5072536
+115   5.36390105  0.08039116 -0.1493686 -0.6031318
+156  -0.89877512  0.10683985 -0.1985108  0.1984379
+268   6.95664326  0.12857949 -0.2389036  0.2388157
+329 -15.73656605  0.28889883 -0.5367805 -0.4634169
+353   4.06104389 -0.70587654  0.4535120  0.5282024
+365   5.50035833  0.25348264  0.4796230 -0.4413864
+431  -8.06809505  0.27490176 -0.4297023 -0.5248323
+464  -2.15471559  0.23158421  0.5066040  0.4814387
+475   0.57065051  0.25226659  0.5518479  0.5244351
+563   0.06487219 -0.47274522  0.3319974  0.2747028
+638   1.64752655 -0.50593437 -0.6446947  0.2939883
+> 
+> fit <- coxph(Surv(futime, fustat) ~ age + ecog.ps + strata(rx))
+> summary(fit)
+Call:
+coxph(formula = Surv(futime, fustat) ~ age + ecog.ps + strata(rx))
+
+  n= 26, number of events= 12 
+
+            coef exp(coef) se(coef)      z Pr(>|z|)   
+age      0.13853   1.14858  0.04801  2.885  0.00391 **
+ecog.ps -0.09670   0.90783  0.62994 -0.154  0.87800   
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
+
+        exp(coef) exp(-coef) lower .95 upper .95
+age        1.1486     0.8706    1.0454     1.262
+ecog.ps    0.9078     1.1015    0.2641     3.120
+
+Concordance= 0.819  (se = 0.134 )
+Rsquare= 0.387   (max possible= 0.874 )
+Likelihood ratio test= 12.71  on 2 df,   p=0.001736
+Wald test            = 8.43  on 2 df,   p=0.01476
+Score (logrank) test = 12.24  on 2 df,   p=0.002195
+
+> summary(survfit(fit))
+Call: survfit(formula = fit)
+
+                rx=1 
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+   59     13       1    0.978  0.0266       0.9275            1
+  115     12       1    0.951  0.0478       0.8620            1
+  156     11       1    0.910  0.0760       0.7722            1
+  268     10       1    0.862  0.1055       0.6776            1
+  329      9       1    0.737  0.1525       0.4909            1
+  431      8       1    0.627  0.1704       0.3680            1
+  638      5       1    0.333  0.2296       0.0865            1
+
+                rx=2 
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+  353     13       1    0.943  0.0560        0.839        1.000
+  365     12       1    0.880  0.0812        0.735        1.000
+  464      9       1    0.789  0.1143        0.594        1.000
+  475      8       1    0.697  0.1349        0.477        1.000
+  563      7       1    0.597  0.1494        0.366        0.975
+
+> sfit <- survfit(fit, list(age=c(30,70), ecog.ps=c(2,3)))  #two columns
+> sfit
+Call: survfit(formula = fit, newdata = list(age = c(30, 70), ecog.ps = c(2, 
+    3)))
+
+     records n.max n.start events median 0.95LCL 0.95UCL
+rx=1      13    13      13      7     NA      NA      NA
+rx=1      13    13      13      7    268     115      NA
+rx=2      13    13      13      5     NA      NA      NA
+rx=2      13    13      13      5    365     353      NA
+> summary(sfit)
+Call: survfit(formula = fit, newdata = list(age = c(30, 70), ecog.ps = c(2, 
+    3)))
+
+                rx=1 
+ time n.risk n.event survival1 survival2
+   59     13       1     0.999   0.87905
+  115     12       1     0.999   0.74575
+  156     11       1     0.998   0.57398
+  268     10       1     0.996   0.41764
+  329      9       1     0.992   0.16673
+  431      8       1     0.988   0.06489
+  638      5       1     0.973   0.00161
+
+                rx=2 
+ time n.risk n.event survival1 survival2
+  353     13       1     0.999    0.7092
+  365     12       1     0.997    0.4738
+  464      9       1     0.994    0.2494
+  475      8       1     0.991    0.1207
+  563      7       1     0.987    0.0489
+
+> detach()
+> 
+> 
+> # Check of offset + surv, added 7/2000
+> fit1 <- coxph(Surv(futime, fustat) ~ age + rx, ovarian,
++ 	      control=coxph.control(eps=1e-8))
+> fit2 <- coxph(Surv(futime, fustat) ~ age + offset(rx*fit1$coef[2]), ovarian,
++ 	      control=coxph.control(eps=1e-8))
+> all.equal(fit1$coef[1], fit2$coef[1])
+[1] TRUE
+> 
+> fit <- coxph(Surv(futime, fustat) ~ age + offset(rx), ovarian)
+> survfit(fit, censor=FALSE)$surv^exp(-1.5)
+ [1] 0.9977751 0.9951975 0.9917927 0.9881504 0.9825769 0.9770280 0.9704304
+ [8] 0.9603196 0.9499085 0.9385539 0.9217097 0.9031334
+> 
+> # Check it by hand -- there are no tied times
+> #  Remember that offsets from survfit are centered, which is 1.5 for
+> #  this data set.
+> eta <- fit$coef*(ovarian$age - fit$mean) + (ovarian$rx - 1.5)
+> ord <- order(ovarian$futime)
+> risk <- exp(eta[ord])
+> rsum <- rev(cumsum(rev(risk)))   # cumulative risk at each time point
+> dead <- (ovarian$fustat[ord]==1)
+> baseline <- cumsum(1/rsum[dead])
+> all.equal(survfit(fit, censor=FALSE)$surv, exp(-baseline))
+[1] TRUE
+> 
+> rm(fit, fit1, fit2, ord, eta, risk, rsum, dead, baseline, sfit)
+> 
+> proc.time()
+   user  system elapsed 
+  0.264   0.028   0.288 
diff --git a/win32/deps/library/survival/tests/prednew.R b/win32/deps/library/survival/tests/prednew.R
new file mode 100644
index 0000000..7a4a104
--- /dev/null
+++ b/win32/deps/library/survival/tests/prednew.R
@@ -0,0 +1,73 @@
+#
+# Make sure that the newdata argument works for various
+#   predictions
+# We purposely use a subset of the lung data that has only some
+#   of the levels of the ph.ecog
+library(survival)
+options(na.action=na.exclude, contrasts=c('contr.treatment', 'contr.poly'))
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+
+myfit <- coxph(Surv(time, status) ~ age + factor(ph.ecog) + strata(sex), lung)
+
+keep <- which(lung$sex==1 & (lung$ph.ecog==1 | lung$ph.ecog==2))
+p1 <- predict(myfit, type='lp')
+p2 <- predict(myfit, type="lp", newdata=lung[keep,])
+p3 <- predict(myfit, type='lp', se.fit=TRUE)
+p4 <- predict(myfit, type="lp", newdata=lung[keep,], se.fit=TRUE)
+aeq(p1[keep], p2)
+aeq(p1, p3$fit)
+aeq(p1[keep], p4$fit)
+aeq(p3$se.fit[keep], p4$se.fit)
+
+p1 <- predict(myfit, type='risk')
+p2 <- predict(myfit, type="risk", newdata=lung[keep,])
+p3 <- predict(myfit, type='risk', se.fit=TRUE)
+p4 <- predict(myfit, type="risk", newdata=lung[keep,], se.fit=TRUE)
+aeq(p1[keep], p2)
+aeq(p1, p3$fit)
+aeq(p1[keep], p4$fit)
+aeq(p3$se.fit[keep], p4$se.fit)
+
+# The all.equal fails for type=expected, Efron approx, and tied death
+#  times due to use of an approximation.  See comments in the source code.
+myfit <- coxph(Surv(time, status) ~ age + factor(ph.ecog) + strata(sex), 
+               data=lung, method='breslow')
+p1 <- predict(myfit, type='expected')
+p2 <- predict(myfit, type="expected", newdata=lung[keep,])
+p3 <- predict(myfit, type='expected', se.fit=TRUE)
+p4 <- predict(myfit, type="expected", newdata=lung[keep,], se.fit=TRUE)
+aeq(p1[keep], p2)
+aeq(p1, p3$fit)
+aeq(p1[keep], p4$fit)
+aeq(p3$se.fit[keep], p4$se.fit)
+
+p1 <- predict(myfit, type='terms')
+p2 <- predict(myfit, type="terms",newdata=lung[keep,])
+p3 <- predict(myfit, type='terms', se.fit=T)
+p4 <- predict(myfit, type="terms",newdata=lung[keep,], se.fit=T)
+aeq(p1[keep,], p2)
+aeq(p1, p3$fit)
+aeq(p1[keep,], p4$fit)
+aeq(p3$se.fit[keep,], p4$se.fit)
+
+#
+# Check out the logic whereby predict does not need to
+#  recover the model frame.  The first call should not 
+#  need to do so, the second should in each case.
+#
+myfit <- coxph(Surv(time, status) ~ age + factor(sex), lung, x=T)
+p1 <- predict(myfit, type='risk', se=T)
+myfit2 <- coxph(Surv(time, status) ~ age + factor(sex), lung)
+p2 <- predict(myfit2, type='risk', se=T)
+aeq(p1$fit, p2$fit)
+aeq(p1$se, p2$se)
+
+p1 <- predict(myfit, type='expected', se=T)
+p2 <- predict(myfit2, type='expected', se=T)
+aeq(p1$fit, p2$fit)
+aeq(p1$se.fit, p2$se.fit)
+
+p1 <- predict(myfit, type='terms', se=T)
+p2 <- predict(myfit2, type='terms', se=T)
+aeq(p1$fit, p2$fit)
+aeq(p1$se.fit, p2$se.fit)
diff --git a/win32/deps/library/survival/tests/prednew.Rout.save b/win32/deps/library/survival/tests/prednew.Rout.save
new file mode 100644
index 0000000..e60ca6b
--- /dev/null
+++ b/win32/deps/library/survival/tests/prednew.Rout.save
@@ -0,0 +1,115 @@
+
+R version 2.12.2 (2011-02-25)
+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.
+
+> #
+> # Make sure that the newdata argument works for various
+> #   predictions
+> # We purposely use a subset of the lung data that has only some
+> #   of the levels of the ph.ecog
+> library(survival)
+Loading required package: splines
+> options(na.action=na.exclude, contrasts=c('contr.treatment', 'contr.poly'))
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> 
+> myfit <- coxph(Surv(time, status) ~ age + factor(ph.ecog) + strata(sex), lung)
+> 
+> keep <- which(lung$sex==1 & (lung$ph.ecog==1 | lung$ph.ecog==2))
+> p1 <- predict(myfit, type='lp')
+> p2 <- predict(myfit, type="lp", newdata=lung[keep,])
+> p3 <- predict(myfit, type='lp', se.fit=TRUE)
+> p4 <- predict(myfit, type="lp", newdata=lung[keep,], se.fit=TRUE)
+> aeq(p1[keep], p2)
+[1] TRUE
+> aeq(p1, p3$fit)
+[1] TRUE
+> aeq(p1[keep], p4$fit)
+[1] TRUE
+> aeq(p3$se.fit[keep], p4$se.fit)
+[1] TRUE
+> 
+> p1 <- predict(myfit, type='risk')
+> p2 <- predict(myfit, type="risk", newdata=lung[keep,])
+> p3 <- predict(myfit, type='risk', se.fit=TRUE)
+> p4 <- predict(myfit, type="risk", newdata=lung[keep,], se.fit=TRUE)
+> aeq(p1[keep], p2)
+[1] TRUE
+> aeq(p1, p3$fit)
+[1] TRUE
+> aeq(p1[keep], p4$fit)
+[1] TRUE
+> aeq(p3$se.fit[keep], p4$se.fit)
+[1] TRUE
+> 
+> # The all.equal fails for type=expected, Efron approx, and tied death
+> #  times due to use of an approximation.  See comments in the source code.
+> myfit <- coxph(Surv(time, status) ~ age + factor(ph.ecog) + strata(sex), 
++                data=lung, method='breslow')
+> p1 <- predict(myfit, type='expected')
+> p2 <- predict(myfit, type="expected", newdata=lung[keep,])
+> p3 <- predict(myfit, type='expected', se.fit=TRUE)
+> p4 <- predict(myfit, type="expected", newdata=lung[keep,], se.fit=TRUE)
+> aeq(p1[keep], p2)
+[1] TRUE
+> aeq(p1, p3$fit)
+[1] TRUE
+> aeq(p1[keep], p4$fit)
+[1] TRUE
+> aeq(p3$se.fit[keep], p4$se.fit)
+[1] TRUE
+> 
+> p1 <- predict(myfit, type='terms')
+> p2 <- predict(myfit, type="terms",newdata=lung[keep,])
+> p3 <- predict(myfit, type='terms', se.fit=T)
+> p4 <- predict(myfit, type="terms",newdata=lung[keep,], se.fit=T)
+> aeq(p1[keep,], p2)
+[1] TRUE
+> aeq(p1, p3$fit)
+[1] TRUE
+> aeq(p1[keep,], p4$fit)
+[1] TRUE
+> aeq(p3$se.fit[keep,], p4$se.fit)
+[1] TRUE
+> 
+> #
+> # Check out the logic whereby predict does not need to
+> #  recover the model frame.  The first call should not 
+> #  need to do so, the second should in each case.
+> #
+> myfit <- coxph(Surv(time, status) ~ age + factor(sex), lung, x=T)
+> p1 <- predict(myfit, type='risk', se=T)
+> myfit2 <- coxph(Surv(time, status) ~ age + factor(sex), lung)
+> p2 <- predict(myfit2, type='risk', se=T)
+> aeq(p1$fit, p2$fit)
+[1] TRUE
+> aeq(p1$se, p2$se)
+[1] TRUE
+> 
+> p1 <- predict(myfit, type='expected', se=T)
+> p2 <- predict(myfit2, type='expected', se=T)
+> aeq(p1$fit, p2$fit)
+[1] TRUE
+> aeq(p1$se.fit, p2$se.fit)
+[1] TRUE
+> 
+> p1 <- predict(myfit, type='terms', se=T)
+> p2 <- predict(myfit2, type='terms', se=T)
+> aeq(p1$fit, p2$fit)
+[1] TRUE
+> aeq(p1$se.fit, p2$se.fit)
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/pspline.R b/win32/deps/library/survival/tests/pspline.R
new file mode 100644
index 0000000..8e7f5ec
--- /dev/null
+++ b/win32/deps/library/survival/tests/pspline.R
@@ -0,0 +1,34 @@
+library(survival)
+#
+# Tests with the pspline function, to verify the prediction aspects
+#
+options(na.action=na.exclude)
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+
+spfit <- coxph(Surv(time, status) ~ pspline(age) + ph.ecog, lung)
+
+spfit2 <- coxph(Surv(time, status) ~ pspline(age) + ph.ecog, lung, x=TRUE)
+x2 <- model.matrix(spfit)
+all.equal(spfit2$x, x2)
+
+keep <- (lung$age < 60)
+x3 <- model.matrix(spfit, data=lung[keep,])  
+attr(x3, 'assign') <- NULL #subscripting loses the assign attr below
+all.equal(napredict(spfit$na.action,x2)[keep,], x3)
+
+p2 <- predict(spfit, newdata=lung[keep,])
+aeq(p2, predict(spfit)[keep])
+
+
+p3 <- survfit(spfit)
+p4 <- survfit(spfit, newdata=lung[1:2,])
+temp <- scale(x2[1:2,], center=spfit$means, scale=FALSE)%*% coef(spfit)
+aeq(p3$time, p4$time)
+aeq(outer(-log(p3$surv), exp(temp), '*'), -log(p4$surv))
+
+# Check out model.frame
+spfit3 <- coxph(Surv(time, status) ~ pspline(age) + sex, lung,
+                model=TRUE)  #avoid the missing value
+m2 <- model.frame(spfit3, data=lung[keep,])
+all.equal(m2, spfit3$model[keep,])
+
diff --git a/win32/deps/library/survival/tests/pspline.Rout.save b/win32/deps/library/survival/tests/pspline.Rout.save
new file mode 100644
index 0000000..1b3a3ec
--- /dev/null
+++ b/win32/deps/library/survival/tests/pspline.Rout.save
@@ -0,0 +1,60 @@
+
+R version 2.14.0 (2011-10-31)
+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(survival)
+Loading required package: splines
+> #
+> # Tests with the pspline function, to verify the prediction aspects
+> #
+> options(na.action=na.exclude)
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> spfit <- coxph(Surv(time, status) ~ pspline(age) + ph.ecog, lung)
+> 
+> spfit2 <- coxph(Surv(time, status) ~ pspline(age) + ph.ecog, lung, x=TRUE)
+> x2 <- model.matrix(spfit)
+> all.equal(spfit2$x, x2)
+[1] TRUE
+> 
+> keep <- (lung$age < 60)
+> x3 <- model.matrix(spfit, data=lung[keep,])  
+> attr(x3, 'assign') <- NULL #subscripting loses the assign attr below
+> all.equal(napredict(spfit$na.action,x2)[keep,], x3)
+[1] TRUE
+> 
+> p2 <- predict(spfit, newdata=lung[keep,])
+> aeq(p2, predict(spfit)[keep])
+[1] TRUE
+> 
+> 
+> p3 <- survfit(spfit)
+> p4 <- survfit(spfit, newdata=lung[1:2,])
+> temp <- scale(x2[1:2,], center=spfit$means, scale=FALSE)%*% coef(spfit)
+> aeq(p3$time, p4$time)
+[1] TRUE
+> aeq(outer(-log(p3$surv), exp(temp), '*'), -log(p4$surv))
+[1] TRUE
+> 
+> # Check out model.frame
+> spfit3 <- coxph(Surv(time, status) ~ pspline(age) + sex, lung,
++                 model=TRUE)  #avoid the missing value
+> m2 <- model.frame(spfit3, data=lung[keep,])
+> all.equal(m2, spfit3$model[keep,])
+[1] TRUE
+> 
+> 
diff --git a/win32/deps/library/survival/tests/pyear.R b/win32/deps/library/survival/tests/pyear.R
new file mode 100644
index 0000000..8e56350
--- /dev/null
+++ b/win32/deps/library/survival/tests/pyear.R
@@ -0,0 +1,211 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+{if (is.R()) mdy.date <- function(m, d, y) {
+    y <- ifelse(y<100, y+1900, y)
+    as.Date(paste(m,d,y, sep='/'), "%m/%d/%Y")
+    }
+else mdy.date <- function(m,d,y) {
+    y <- ifelse(y<100, y+1900, y)
+    timeDate(paste(y, m, d, sep='/'), in.format="%Y/%m/%d")
+    }
+ }
+
+# 
+# Simple case: a single male subject, born 6/6/36 and entered on study 6/6/55.
+#
+
+temp1 <- mdy.date(6,6,36)
+temp2 <- mdy.date(6,6,55)# Now compare the results from person-years
+#
+temp.age <- tcut(temp2-temp1, floor(c(-1, (18:31 * 365.24))),
+	labels=c('0-18', paste(18:30, 19:31, sep='-')))
+temp.yr  <- tcut(temp2, mdy.date(1,1,1954:1965), labels=1954:1964)
+temp.time <- 3700   #total days of fu
+py1 <- pyears(temp.time ~ temp.age + temp.yr, scale=1) #output in days
+
+# The subject should appear in 20 cells
+#    6/6/55 - 12/31/55, 209 days, age 19-20, 1955
+#    1/1/56 -  6/ 4/56, 156 days, age 19-20, 1956
+#    6/5/56 - 12/31/56, 210 days, age 20-21, 1956   (a leap year, and his
+#			birthday computes one day earlier)
+#    1/1/57 -  6/ 5/57, 156 days, age 20-21, 1957
+#    6/6/57 - 12/31/57, 209 days, age 21-22, 1957
+# and etc
+#   with 203 days "off table", ie, beyond the last cell of the table
+#
+# It is a nuisance, but tcut follows 'cut' in that we give the ENDS of
+#  the intervals, whereas the survival tables use the starts of intervals.
+#  Thus this breakdown does not match that in doexpect.s
+#
+xx <- matrix(0, nrow=14, ncol=11)
+xx[cbind(3:11, 3:11)] <- 156
+xx[cbind(3:12, 2:11)] <- c(209, 210, rep(c(209, 209, 209, 210),2))
+dimnames(xx) <- list(c('0-18', paste(18:30, 19:31, sep='-')), 1954:1964)
+all.equal(xx, py1$pyears)
+all.equal(203, py1$offtable)
+all.equal(1*(xx>0), py1$n)
+
+#
+# Now with expecteds
+#
+py2 <- pyears(temp.time ~ temp.age + temp.yr
+		+ ratetable(age=temp2-temp1, year=temp2, sex=1),
+	     scale=1, ratetable=survexp.us ) #output in days
+all.equal(xx, py2$pyears)
+all.equal(203, py2$offtable)
+all.equal(1*(xx>0), py2$n)
+
+py2b <- pyears(temp.time ~ temp.age + temp.yr,
+	      rmap = list(age=temp2-temp1, year=temp2, sex=1),
+	     scale=1, ratetable=survexp.us ) #output in days
+all.equal(xx, py2b$pyears)
+all.equal(203, py2b$offtable)
+all.equal(1*(xx>0), py2b$n)
+all.equal(py2$expected, py2b$expected)
+
+
+
+py3 <-  pyears(temp.time ~ temp.age + temp.yr,
+		rmap=list(age=temp2-temp1, year=temp2, sex=1),
+	     scale=1, ratetable=survexp.us , expect='pyears')
+all.equal(py2$n, py3$n)
+all.equal(py2$pyear, py3$pyear)
+all.equal(py3$n, 1*(py3$expect>0))
+
+# Now, compute the py3 result "by hand".  Since there is only one person
+#   it can be derived from py2.
+#
+xx1 <- py2$expect[py2$n>0]   		# the hazard over each interval
+cumhaz <- cumsum(c(0, xx1[-length(xx1)]))     # the cumulative hazard	
+xx2 <- py3$expect[py3$n>0]   		# the expected number of person days
+xx3 <- py3$pyears[py3$n>0]   		# the potential number of person days
+
+# This is the integral of the curve "exp(-haz *t)" over the interval
+integral <- xx3 * exp(-cumhaz)* (1- exp(-xx1))/ xx1
+# They might not be exactly equal, since the C code tracks changes in the
+#   rate tables that occur -within- an interval.  So try for 6 digits
+all.equal(round(integral,3), round(xx2,3))
+
+# Cut off the bottom of the table, instead of the side
+temp.age <- tcut(temp2-temp1, floor(c(-1, (18:27 * 365.24))),
+	labels=c('0-18', paste(18:26, 19:27, sep='-')))
+
+py4 <- eval(py3$call)
+all.equal(py4$pyear, py3$pyear[1:10,])
+all.equal(py4$expect, py3$expect[1:10,])
+
+
+rm(temp.age, integral, xx1, xx2, xx3, cumhaz, py1, py2, py3, py4)
+rm(temp1, temp2, temp.yr, temp.time, xx)
+
+
+
+
+# 
+# Simple case: a single male subject, born 6/6/36 and entered on study 6/6/55.
+#
+
+temp1 <- mdy.date(6,6,36)
+temp2 <- mdy.date(6,6,55)# Now compare the results from person-years
+#
+temp.age <- tcut(temp2-temp1, floor(c(-1, (18:31 * 365.24))),
+	labels=c('0-18', paste(18:30, 19:31, sep='-')))
+temp.yr  <- tcut(temp2, mdy.date(1,1,1954:1965), labels=1954:1964)
+temp.time <- 3700   #total days of fu
+py1 <- pyears(temp.time ~ temp.age + temp.yr, scale=1) #output in days
+
+# The subject should appear in 20 cells
+#    6/6/55 - 12/31/55, 209 days, age 19-20, 1955
+#    1/1/56 -  6/ 4/56, 156 days, age 19-20, 1956
+#    6/5/56 - 12/31/56, 210 days, age 20-21, 1956   (a leap year, and his
+#			birthday computes one day earlier)
+#    1/1/57 -  6/ 5/57, 156 days, age 20-21, 1957
+#    6/6/57 - 12/31/57, 209 days, age 21-22, 1957
+# and etc
+#   with 203 days "off table", ie, beyond the last cell of the table
+#
+# It is a nuisance, but tcut follows 'cut' in that we give the ENDS of
+#  the intervals, whereas the survival tables use the starts of intervals.
+#
+xx <- matrix(0, nrow=14, ncol=11)
+xx[cbind(3:11, 3:11)] <- 156
+xx[cbind(3:12, 2:11)] <- c(209, 210, rep(c(209, 209, 209, 210),2))
+dimnames(xx) <- list(c('0-18', paste(18:30, 19:31, sep='-')), 1954:1964)
+all.equal(xx, py1$pyears)
+all.equal(203, py1$offtable)
+all.equal(1*(xx>0), py1$n)
+
+#
+# Now with expecteds
+#
+py2 <- pyears(temp.time ~ temp.age + temp.yr
+		+ ratetable(age=temp2-temp1, year=temp2, sex=1),
+	     scale=1, ratetable=survexp.us ) #output in days
+all.equal(xx, py2$pyears)
+all.equal(203, py2$offtable)
+all.equal(1*(xx>0), py2$n)
+
+
+py3 <-  pyears(temp.time ~ temp.age + temp.yr
+		+ ratetable(age=temp2-temp1, year=temp2, sex=1),
+	     scale=1, ratetable=survexp.us , expect='pyears')
+all.equal(py2$n, py3$n)
+all.equal(py2$pyear, py3$pyear)
+all.equal(py3$n, 1*(py3$expect>0))
+
+# Now, compute the py3 result "by hand".  Since there is only one person
+#   it can be derived from py2.
+#
+xx1 <- py2$expect[py2$n>0]   		# the hazard over each interval
+cumhaz <- cumsum(c(0, xx1[-length(xx1)]))     # the cumulative hazard	
+xx2 <- py3$expect[py3$n>0]   		# the expected number of person days
+xx3 <- py3$pyears[py3$n>0]   		# the potential number of person days
+
+# This is the integral of the curve "exp(-haz *t)" over the interval
+integral <- xx3 * exp(-cumhaz)* (1- exp(-xx1))/ xx1
+# They might not be exactly equal, since the C code tracks changes in the
+#   rate tables that occur -within- an interval.  So try for 6 digits
+all.equal(round(integral,3), round(xx2,3))
+
+# Cut off the bottom of the table, instead of the side
+temp.age <- tcut(temp2-temp1, floor(c(-1, (18:27 * 365.24))),
+	labels=c('0-18', paste(18:26, 19:27, sep='-')))
+
+py4 <- eval(py3$call)
+all.equal(py4$pyear, py3$pyear[1:10,])
+all.equal(py4$expect, py3$expect[1:10,])
+
+
+rm(temp.age, integral, xx1, xx2, xx3, cumhaz, py1, py2, py3, py4)
+rm(temp1, temp2, temp.yr, temp.time, xx)
+
+
+
+
+#
+# Create a "user defined" rate table, using the smoking data
+#
+temp <- scan("data.smoke")/100000
+temp <-  matrix(temp, ncol=8, byrow=T)
+smoke.rate <- c(rep(temp[,1],6), rep(temp[,2],6), temp[,3:8])
+attributes(smoke.rate) <- list(
+	dim=c(7,2,2,6,3),
+	dimnames=list(c("45-49","50-54","55-59","60-64","65-69","70-74","75-79"),
+		      c("1-20", "21+"),
+		      c("Male","Female"),
+		      c("<1", "1-2", "3-5", "6-10", "11-15", ">=16"),
+		      c("Never", "Current", "Former")),
+	dimid=c("age", "amount", "sex", "duration", "status"),
+	factor=c(0,1,1,0,1),
+	cutpoints=list(c(45,50,55,60,65,70,75),NULL, NULL,
+				     c(0,1,3,6,11,16),NULL),
+	class='ratetable'
+	)
+rm(temp)
+
+is.ratetable(smoke.rate)
+summary(smoke.rate)
+print(smoke.rate)
+
+summary(smoke.rate[1:3,,1,,])  #test subscripting
diff --git a/win32/deps/library/survival/tests/pyear.Rout.save b/win32/deps/library/survival/tests/pyear.Rout.save
new file mode 100644
index 0000000..6eb671b
--- /dev/null
+++ b/win32/deps/library/survival/tests/pyear.Rout.save
@@ -0,0 +1,669 @@
+
+R version 2.12.1 (2010-12-16)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> {if (is.R()) mdy.date <- function(m, d, y) {
++     y <- ifelse(y<100, y+1900, y)
++     as.Date(paste(m,d,y, sep='/'), "%m/%d/%Y")
++     }
++ else mdy.date <- function(m,d,y) {
++     y <- ifelse(y<100, y+1900, y)
++     timeDate(paste(y, m, d, sep='/'), in.format="%Y/%m/%d")
++     }
++  }
+> 
+> # 
+> # Simple case: a single male subject, born 6/6/36 and entered on study 6/6/55.
+> #
+> 
+> temp1 <- mdy.date(6,6,36)
+> temp2 <- mdy.date(6,6,55)# Now compare the results from person-years
+> #
+> temp.age <- tcut(temp2-temp1, floor(c(-1, (18:31 * 365.24))),
++ 	labels=c('0-18', paste(18:30, 19:31, sep='-')))
+> temp.yr  <- tcut(temp2, mdy.date(1,1,1954:1965), labels=1954:1964)
+> temp.time <- 3700   #total days of fu
+> py1 <- pyears(temp.time ~ temp.age + temp.yr, scale=1) #output in days
+> 
+> # The subject should appear in 20 cells
+> #    6/6/55 - 12/31/55, 209 days, age 19-20, 1955
+> #    1/1/56 -  6/ 4/56, 156 days, age 19-20, 1956
+> #    6/5/56 - 12/31/56, 210 days, age 20-21, 1956   (a leap year, and his
+> #			birthday computes one day earlier)
+> #    1/1/57 -  6/ 5/57, 156 days, age 20-21, 1957
+> #    6/6/57 - 12/31/57, 209 days, age 21-22, 1957
+> # and etc
+> #   with 203 days "off table", ie, beyond the last cell of the table
+> #
+> # It is a nuisance, but tcut follows 'cut' in that we give the ENDS of
+> #  the intervals, whereas the survival tables use the starts of intervals.
+> #  Thus this breakdown does not match that in doexpect.s
+> #
+> xx <- matrix(0, nrow=14, ncol=11)
+> xx[cbind(3:11, 3:11)] <- 156
+> xx[cbind(3:12, 2:11)] <- c(209, 210, rep(c(209, 209, 209, 210),2))
+> dimnames(xx) <- list(c('0-18', paste(18:30, 19:31, sep='-')), 1954:1964)
+> all.equal(xx, py1$pyears)
+[1] TRUE
+> all.equal(203, py1$offtable)
+[1] TRUE
+> all.equal(1*(xx>0), py1$n)
+[1] TRUE
+> 
+> #
+> # Now with expecteds
+> #
+> py2 <- pyears(temp.time ~ temp.age + temp.yr
++ 		+ ratetable(age=temp2-temp1, year=temp2, sex=1),
++ 	     scale=1, ratetable=survexp.us ) #output in days
+> all.equal(xx, py2$pyears)
+[1] TRUE
+> all.equal(203, py2$offtable)
+[1] TRUE
+> all.equal(1*(xx>0), py2$n)
+[1] TRUE
+> 
+> py2b <- pyears(temp.time ~ temp.age + temp.yr,
++ 	      rmap = list(age=temp2-temp1, year=temp2, sex=1),
++ 	     scale=1, ratetable=survexp.us ) #output in days
+> all.equal(xx, py2b$pyears)
+[1] TRUE
+> all.equal(203, py2b$offtable)
+[1] TRUE
+> all.equal(1*(xx>0), py2b$n)
+[1] TRUE
+> all.equal(py2$expected, py2b$expected)
+[1] TRUE
+> 
+> 
+> 
+> py3 <-  pyears(temp.time ~ temp.age + temp.yr,
++ 		rmap=list(age=temp2-temp1, year=temp2, sex=1),
++ 	     scale=1, ratetable=survexp.us , expect='pyears')
+> all.equal(py2$n, py3$n)
+[1] TRUE
+> all.equal(py2$pyear, py3$pyear)
+[1] TRUE
+> all.equal(py3$n, 1*(py3$expect>0))
+[1] TRUE
+> 
+> # Now, compute the py3 result "by hand".  Since there is only one person
+> #   it can be derived from py2.
+> #
+> xx1 <- py2$expect[py2$n>0]   		# the hazard over each interval
+> cumhaz <- cumsum(c(0, xx1[-length(xx1)]))     # the cumulative hazard	
+> xx2 <- py3$expect[py3$n>0]   		# the expected number of person days
+> xx3 <- py3$pyears[py3$n>0]   		# the potential number of person days
+> 
+> # This is the integral of the curve "exp(-haz *t)" over the interval
+> integral <- xx3 * exp(-cumhaz)* (1- exp(-xx1))/ xx1
+> # They might not be exactly equal, since the C code tracks changes in the
+> #   rate tables that occur -within- an interval.  So try for 6 digits
+> all.equal(round(integral,3), round(xx2,3))
+[1] TRUE
+> 
+> # Cut off the bottom of the table, instead of the side
+> temp.age <- tcut(temp2-temp1, floor(c(-1, (18:27 * 365.24))),
++ 	labels=c('0-18', paste(18:26, 19:27, sep='-')))
+> 
+> py4 <- eval(py3$call)
+> all.equal(py4$pyear, py3$pyear[1:10,])
+[1] TRUE
+> all.equal(py4$expect, py3$expect[1:10,])
+[1] TRUE
+> 
+> 
+> rm(temp.age, integral, xx1, xx2, xx3, cumhaz, py1, py2, py3, py4)
+> rm(temp1, temp2, temp.yr, temp.time, xx)
+> 
+> 
+> 
+> 
+> # 
+> # Simple case: a single male subject, born 6/6/36 and entered on study 6/6/55.
+> #
+> 
+> temp1 <- mdy.date(6,6,36)
+> temp2 <- mdy.date(6,6,55)# Now compare the results from person-years
+> #
+> temp.age <- tcut(temp2-temp1, floor(c(-1, (18:31 * 365.24))),
++ 	labels=c('0-18', paste(18:30, 19:31, sep='-')))
+> temp.yr  <- tcut(temp2, mdy.date(1,1,1954:1965), labels=1954:1964)
+> temp.time <- 3700   #total days of fu
+> py1 <- pyears(temp.time ~ temp.age + temp.yr, scale=1) #output in days
+> 
+> # The subject should appear in 20 cells
+> #    6/6/55 - 12/31/55, 209 days, age 19-20, 1955
+> #    1/1/56 -  6/ 4/56, 156 days, age 19-20, 1956
+> #    6/5/56 - 12/31/56, 210 days, age 20-21, 1956   (a leap year, and his
+> #			birthday computes one day earlier)
+> #    1/1/57 -  6/ 5/57, 156 days, age 20-21, 1957
+> #    6/6/57 - 12/31/57, 209 days, age 21-22, 1957
+> # and etc
+> #   with 203 days "off table", ie, beyond the last cell of the table
+> #
+> # It is a nuisance, but tcut follows 'cut' in that we give the ENDS of
+> #  the intervals, whereas the survival tables use the starts of intervals.
+> #
+> xx <- matrix(0, nrow=14, ncol=11)
+> xx[cbind(3:11, 3:11)] <- 156
+> xx[cbind(3:12, 2:11)] <- c(209, 210, rep(c(209, 209, 209, 210),2))
+> dimnames(xx) <- list(c('0-18', paste(18:30, 19:31, sep='-')), 1954:1964)
+> all.equal(xx, py1$pyears)
+[1] TRUE
+> all.equal(203, py1$offtable)
+[1] TRUE
+> all.equal(1*(xx>0), py1$n)
+[1] TRUE
+> 
+> #
+> # Now with expecteds
+> #
+> py2 <- pyears(temp.time ~ temp.age + temp.yr
++ 		+ ratetable(age=temp2-temp1, year=temp2, sex=1),
++ 	     scale=1, ratetable=survexp.us ) #output in days
+> all.equal(xx, py2$pyears)
+[1] TRUE
+> all.equal(203, py2$offtable)
+[1] TRUE
+> all.equal(1*(xx>0), py2$n)
+[1] TRUE
+> 
+> 
+> py3 <-  pyears(temp.time ~ temp.age + temp.yr
++ 		+ ratetable(age=temp2-temp1, year=temp2, sex=1),
++ 	     scale=1, ratetable=survexp.us , expect='pyears')
+> all.equal(py2$n, py3$n)
+[1] TRUE
+> all.equal(py2$pyear, py3$pyear)
+[1] TRUE
+> all.equal(py3$n, 1*(py3$expect>0))
+[1] TRUE
+> 
+> # Now, compute the py3 result "by hand".  Since there is only one person
+> #   it can be derived from py2.
+> #
+> xx1 <- py2$expect[py2$n>0]   		# the hazard over each interval
+> cumhaz <- cumsum(c(0, xx1[-length(xx1)]))     # the cumulative hazard	
+> xx2 <- py3$expect[py3$n>0]   		# the expected number of person days
+> xx3 <- py3$pyears[py3$n>0]   		# the potential number of person days
+> 
+> # This is the integral of the curve "exp(-haz *t)" over the interval
+> integral <- xx3 * exp(-cumhaz)* (1- exp(-xx1))/ xx1
+> # They might not be exactly equal, since the C code tracks changes in the
+> #   rate tables that occur -within- an interval.  So try for 6 digits
+> all.equal(round(integral,3), round(xx2,3))
+[1] TRUE
+> 
+> # Cut off the bottom of the table, instead of the side
+> temp.age <- tcut(temp2-temp1, floor(c(-1, (18:27 * 365.24))),
++ 	labels=c('0-18', paste(18:26, 19:27, sep='-')))
+> 
+> py4 <- eval(py3$call)
+> all.equal(py4$pyear, py3$pyear[1:10,])
+[1] TRUE
+> all.equal(py4$expect, py3$expect[1:10,])
+[1] TRUE
+> 
+> 
+> rm(temp.age, integral, xx1, xx2, xx3, cumhaz, py1, py2, py3, py4)
+> rm(temp1, temp2, temp.yr, temp.time, xx)
+> 
+> 
+> 
+> 
+> #
+> # Create a "user defined" rate table, using the smoking data
+> #
+> temp <- scan("data.smoke")/100000
+Read 224 items
+> temp <-  matrix(temp, ncol=8, byrow=T)
+> smoke.rate <- c(rep(temp[,1],6), rep(temp[,2],6), temp[,3:8])
+> attributes(smoke.rate) <- list(
++ 	dim=c(7,2,2,6,3),
++ 	dimnames=list(c("45-49","50-54","55-59","60-64","65-69","70-74","75-79"),
++ 		      c("1-20", "21+"),
++ 		      c("Male","Female"),
++ 		      c("<1", "1-2", "3-5", "6-10", "11-15", ">=16"),
++ 		      c("Never", "Current", "Former")),
++ 	dimid=c("age", "amount", "sex", "duration", "status"),
++ 	factor=c(0,1,1,0,1),
++ 	cutpoints=list(c(45,50,55,60,65,70,75),NULL, NULL,
++ 				     c(0,1,3,6,11,16),NULL),
++ 	class='ratetable'
++ 	)
+> rm(temp)
+> 
+> is.ratetable(smoke.rate)
+[1] TRUE
+> summary(smoke.rate)
+ Rate table with 5 dimensions:
+	age ranges from 45 to 75; with 7 categories
+	amount has levels of: 1-20 21+
+	sex has levels of: Male Female
+	duration ranges from 0 to 16; with 6 categories
+	status has levels of: Never Current Former
+> print(smoke.rate)
+Rate table with dimension(s): age amount sex duration status 
+, , Male, <1, Never
+
+          1-20      21+
+45-49 0.001860 0.001860
+50-54 0.002556 0.002556
+55-59 0.004489 0.004489
+60-64 0.007337 0.007337
+65-69 0.011194 0.011194
+70-74 0.020705 0.020705
+75-79 0.036753 0.036753
+
+, , Female, <1, Never
+
+          1-20      21+
+45-49 0.001257 0.001257
+50-54 0.001773 0.001773
+55-59 0.002448 0.002448
+60-64 0.003977 0.003977
+65-69 0.006921 0.006921
+70-74 0.011600 0.011600
+75-79 0.020708 0.020708
+
+, , Male, 1-2, Never
+
+          1-20      21+
+45-49 0.001860 0.001860
+50-54 0.002556 0.002556
+55-59 0.004489 0.004489
+60-64 0.007337 0.007337
+65-69 0.011194 0.011194
+70-74 0.020705 0.020705
+75-79 0.036753 0.036753
+
+, , Female, 1-2, Never
+
+          1-20      21+
+45-49 0.001257 0.001257
+50-54 0.001773 0.001773
+55-59 0.002448 0.002448
+60-64 0.003977 0.003977
+65-69 0.006921 0.006921
+70-74 0.011600 0.011600
+75-79 0.020708 0.020708
+
+, , Male, 3-5, Never
+
+          1-20      21+
+45-49 0.001860 0.001860
+50-54 0.002556 0.002556
+55-59 0.004489 0.004489
+60-64 0.007337 0.007337
+65-69 0.011194 0.011194
+70-74 0.020705 0.020705
+75-79 0.036753 0.036753
+
+, , Female, 3-5, Never
+
+          1-20      21+
+45-49 0.001257 0.001257
+50-54 0.001773 0.001773
+55-59 0.002448 0.002448
+60-64 0.003977 0.003977
+65-69 0.006921 0.006921
+70-74 0.011600 0.011600
+75-79 0.020708 0.020708
+
+, , Male, 6-10, Never
+
+          1-20      21+
+45-49 0.001860 0.001860
+50-54 0.002556 0.002556
+55-59 0.004489 0.004489
+60-64 0.007337 0.007337
+65-69 0.011194 0.011194
+70-74 0.020705 0.020705
+75-79 0.036753 0.036753
+
+, , Female, 6-10, Never
+
+          1-20      21+
+45-49 0.001257 0.001257
+50-54 0.001773 0.001773
+55-59 0.002448 0.002448
+60-64 0.003977 0.003977
+65-69 0.006921 0.006921
+70-74 0.011600 0.011600
+75-79 0.020708 0.020708
+
+, , Male, 11-15, Never
+
+          1-20      21+
+45-49 0.001860 0.001860
+50-54 0.002556 0.002556
+55-59 0.004489 0.004489
+60-64 0.007337 0.007337
+65-69 0.011194 0.011194
+70-74 0.020705 0.020705
+75-79 0.036753 0.036753
+
+, , Female, 11-15, Never
+
+          1-20      21+
+45-49 0.001257 0.001257
+50-54 0.001773 0.001773
+55-59 0.002448 0.002448
+60-64 0.003977 0.003977
+65-69 0.006921 0.006921
+70-74 0.011600 0.011600
+75-79 0.020708 0.020708
+
+, , Male, >=16, Never
+
+          1-20      21+
+45-49 0.001860 0.001860
+50-54 0.002556 0.002556
+55-59 0.004489 0.004489
+60-64 0.007337 0.007337
+65-69 0.011194 0.011194
+70-74 0.020705 0.020705
+75-79 0.036753 0.036753
+
+, , Female, >=16, Never
+
+          1-20      21+
+45-49 0.001257 0.001257
+50-54 0.001773 0.001773
+55-59 0.002448 0.002448
+60-64 0.003977 0.003977
+65-69 0.006921 0.006921
+70-74 0.011600 0.011600
+75-79 0.020708 0.020708
+
+, , Male, <1, Current
+
+          1-20      21+
+45-49 0.004392 0.006100
+50-54 0.007027 0.009156
+55-59 0.011324 0.013910
+60-64 0.019811 0.023934
+65-69 0.030030 0.034979
+70-74 0.046975 0.058613
+75-79 0.073406 0.062500
+
+, , Female, <1, Current
+
+          1-20      21+
+45-49 0.002256 0.002779
+50-54 0.003538 0.005179
+55-59 0.005428 0.008235
+60-64 0.008580 0.013029
+65-69 0.014962 0.019349
+70-74 0.020848 0.028270
+75-79 0.033195 0.042731
+
+, , Male, 1-2, Current
+
+          1-20      21+
+45-49 0.004392 0.006100
+50-54 0.007027 0.009156
+55-59 0.011324 0.013910
+60-64 0.019811 0.023934
+65-69 0.030030 0.034979
+70-74 0.046975 0.058613
+75-79 0.073406 0.062500
+
+, , Female, 1-2, Current
+
+          1-20      21+
+45-49 0.002256 0.002779
+50-54 0.003538 0.005179
+55-59 0.005428 0.008235
+60-64 0.008580 0.013029
+65-69 0.014962 0.019349
+70-74 0.020848 0.028270
+75-79 0.033195 0.042731
+
+, , Male, 3-5, Current
+
+          1-20      21+
+45-49 0.004392 0.006100
+50-54 0.007027 0.009156
+55-59 0.011324 0.013910
+60-64 0.019811 0.023934
+65-69 0.030030 0.034979
+70-74 0.046975 0.058613
+75-79 0.073406 0.062500
+
+, , Female, 3-5, Current
+
+          1-20      21+
+45-49 0.002256 0.002779
+50-54 0.003538 0.005179
+55-59 0.005428 0.008235
+60-64 0.008580 0.013029
+65-69 0.014962 0.019349
+70-74 0.020848 0.028270
+75-79 0.033195 0.042731
+
+, , Male, 6-10, Current
+
+          1-20      21+
+45-49 0.004392 0.006100
+50-54 0.007027 0.009156
+55-59 0.011324 0.013910
+60-64 0.019811 0.023934
+65-69 0.030030 0.034979
+70-74 0.046975 0.058613
+75-79 0.073406 0.062500
+
+, , Female, 6-10, Current
+
+          1-20      21+
+45-49 0.002256 0.002779
+50-54 0.003538 0.005179
+55-59 0.005428 0.008235
+60-64 0.008580 0.013029
+65-69 0.014962 0.019349
+70-74 0.020848 0.028270
+75-79 0.033195 0.042731
+
+, , Male, 11-15, Current
+
+          1-20      21+
+45-49 0.004392 0.006100
+50-54 0.007027 0.009156
+55-59 0.011324 0.013910
+60-64 0.019811 0.023934
+65-69 0.030030 0.034979
+70-74 0.046975 0.058613
+75-79 0.073406 0.062500
+
+, , Female, 11-15, Current
+
+          1-20      21+
+45-49 0.002256 0.002779
+50-54 0.003538 0.005179
+55-59 0.005428 0.008235
+60-64 0.008580 0.013029
+65-69 0.014962 0.019349
+70-74 0.020848 0.028270
+75-79 0.033195 0.042731
+
+, , Male, >=16, Current
+
+          1-20      21+
+45-49 0.004392 0.006100
+50-54 0.007027 0.009156
+55-59 0.011324 0.013910
+60-64 0.019811 0.023934
+65-69 0.030030 0.034979
+70-74 0.046975 0.058613
+75-79 0.073406 0.062500
+
+, , Female, >=16, Current
+
+          1-20      21+
+45-49 0.002256 0.002779
+50-54 0.003538 0.005179
+55-59 0.005428 0.008235
+60-64 0.008580 0.013029
+65-69 0.014962 0.019349
+70-74 0.020848 0.028270
+75-79 0.033195 0.042731
+
+, , Male, <1, Former
+
+          1-20      21+
+45-49 0.002344 0.004975
+50-54 0.005447 0.004828
+55-59 0.009452 0.017571
+60-64 0.011777 0.015784
+65-69 0.022449 0.023018
+70-74 0.042553 0.031746
+75-79 0.058824 0.040000
+
+, , Female, <1, Former
+
+          1-20      21+
+45-49 0.000000 0.002667
+50-54 0.001168 0.001387
+55-59 0.002874 0.004736
+60-64 0.010163 0.011148
+65-69 0.011080 0.023196
+70-74 0.006452 0.046358
+75-79 0.000000 0.024096
+
+, , Male, 1-2, Former
+
+          1-20      21+
+45-49 0.003658 0.002517
+50-54 0.004310 0.005007
+55-59 0.007288 0.009535
+60-64 0.015892 0.018472
+65-69 0.033803 0.037766
+70-74 0.050830 0.029740
+75-79 0.065972 0.044248
+
+, , Female, 1-2, Former
+
+          1-20      21+
+45-49 0.004339 0.001027
+50-54 0.000921 0.004668
+55-59 0.002595 0.006020
+60-64 0.003650 0.008621
+65-69 0.013485 0.012500
+70-74 0.014831 0.025172
+75-79 0.025806 0.057692
+
+, , Male, 3-5, Former
+
+          1-20      21+
+45-49 0.001596 0.004175
+50-54 0.004548 0.004889
+55-59 0.007294 0.010258
+60-64 0.013165 0.017901
+65-69 0.023749 0.020810
+70-74 0.044850 0.037129
+75-79 0.077075 0.073298
+
+, , Female, 3-5, Former
+
+          1-20      21+
+45-49 0.002120 0.001786
+50-54 0.002895 0.002701
+55-59 0.003759 0.003610
+60-64 0.006509 0.006996
+65-69 0.012632 0.016880
+70-74 0.012500 0.016873
+75-79 0.025907 0.031250
+
+, , Male, 6-10, Former
+
+          1-20      21+
+45-49 0.002169 0.001226
+50-54 0.003497 0.004029
+55-59 0.005902 0.007440
+60-64 0.012669 0.012207
+65-69 0.018202 0.027664
+70-74 0.038887 0.039888
+75-79 0.049451 0.063830
+
+, , Female, 6-10, Former
+
+          1-20      21+
+45-49 0.001072 0.002247
+50-54 0.002009 0.001902
+55-59 0.001658 0.004545
+60-64 0.004708 0.005417
+65-69 0.008648 0.008287
+70-74 0.011263 0.028487
+75-79 0.039604 0.029787
+
+, , Male, 11-15, Former
+
+          1-20      21+
+45-49 0.001674 0.001983
+50-54 0.002140 0.003939
+55-59 0.004473 0.006685
+60-64 0.008756 0.011000
+65-69 0.016691 0.022681
+70-74 0.031843 0.032686
+75-79 0.056180 0.076661
+
+, , Female, 11-15, Former
+
+          1-20      21+
+45-49 0.001359 0.001421
+50-54 0.001213 0.001168
+55-59 0.002022 0.004122
+60-64 0.005706 0.003731
+65-69 0.005866 0.007979
+70-74 0.010705 0.016212
+75-79 0.016667 0.028037
+
+, , Male, >=16, Former
+
+          1-20      21+
+45-49 0.001595 0.001934
+50-54 0.002504 0.003543
+55-59 0.004366 0.005378
+60-64 0.007030 0.009933
+65-69 0.011592 0.012307
+70-74 0.021949 0.024689
+75-79 0.041289 0.050481
+
+, , Female, >=16, Former
+
+          1-20      21+
+45-49 0.000910 0.001388
+50-54 0.001721 0.000830
+55-59 0.002472 0.001821
+60-64 0.003197 0.003564
+65-69 0.006180 0.005815
+70-74 0.012721 0.013634
+75-79 0.018615 0.021954
+
+> 
+> summary(smoke.rate[1:3,,1,,])  #test subscripting
+ Rate table with 4 dimensions:
+	age ranges from 45 to 55; with 3 categories
+	amount has levels of: 1-20 21+
+	duration ranges from 0 to 16; with 6 categories
+	status has levels of: Never Current Former
+> 
diff --git a/win32/deps/library/survival/tests/r_capacitor.R b/win32/deps/library/survival/tests/r_capacitor.R
new file mode 100644
index 0000000..b0d9597
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_capacitor.R
@@ -0,0 +1,18 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+capacitor <- read.table('data.capacitor', row.names=1,
+			col.names=c('', 'days', 'event', 'voltage'))
+
+fitig <- survreg(Surv(days, event)~voltage, 
+	dist = "gaussian", data = capacitor)
+summary(fitig)
+
+fitix <- survreg(Surv(days, event)~voltage, 
+	dist = "extreme", data = capacitor)
+summary(fitix)
+
+fitil <- survreg(Surv(days, event)~voltage, 
+	dist = "logistic", data = capacitor)
+summary(fitil)
diff --git a/win32/deps/library/survival/tests/r_capacitor.Rout.save b/win32/deps/library/survival/tests/r_capacitor.Rout.save
new file mode 100644
index 0000000..0e1aeca
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_capacitor.Rout.save
@@ -0,0 +1,88 @@
+
+R version 2.7.1 (2008-06-23)
+Copyright (C) 2008 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> capacitor <- read.table('data.capacitor', row.names=1,
++ 			col.names=c('', 'days', 'event', 'voltage'))
+> 
+> fitig <- survreg(Surv(days, event)~voltage, 
++ 	dist = "gaussian", data = capacitor)
+> summary(fitig)
+
+Call:
+survreg(formula = Surv(days, event) ~ voltage, data = capacitor, 
+    dist = "gaussian")
+             Value Std. Error     z        p
+(Intercept) 1764.9    163.387 10.80 3.36e-27
+voltage      -53.9      5.545 -9.72 2.56e-22
+Log(scale)     4.8      0.105 45.56 0.00e+00
+
+Scale= 121 
+
+Gaussian distribution
+Loglik(model)= -361.9   Loglik(intercept only)= -420.1
+	Chisq= 116.33 on 1 degrees of freedom, p= 0 
+Number of Newton-Raphson Iterations: 6 
+n= 125 
+
+> 
+> fitix <- survreg(Surv(days, event)~voltage, 
++ 	dist = "extreme", data = capacitor)
+> summary(fitix)
+
+Call:
+survreg(formula = Surv(days, event) ~ voltage, data = capacitor, 
+    dist = "extreme")
+              Value Std. Error     z        p
+(Intercept) 2055.59    180.349  11.4 4.28e-30
+voltage      -62.21      5.967 -10.4 1.88e-25
+Log(scale)     4.53      0.108  41.9 0.00e+00
+
+Scale= 92.9 
+
+Extreme value distribution
+Loglik(model)= -360   Loglik(intercept only)= -427.1
+	Chisq= 134.25 on 1 degrees of freedom, p= 0 
+Number of Newton-Raphson Iterations: 7 
+n= 125 
+
+> 
+> fitil <- survreg(Surv(days, event)~voltage, 
++ 	dist = "logistic", data = capacitor)
+> summary(fitil)
+
+Call:
+survreg(formula = Surv(days, event) ~ voltage, data = capacitor, 
+    dist = "logistic")
+              Value Std. Error     z         p
+(Intercept) 1811.56    148.853  12.2  4.48e-34
+voltage      -55.48      4.986 -11.1  9.39e-29
+Log(scale)     4.19      0.117  35.8 2.03e-280
+
+Scale= 66.3 
+
+Logistic distribution
+Loglik(model)= -360.4   Loglik(intercept only)= -423.7
+	Chisq= 126.5 on 1 degrees of freedom, p= 0 
+Number of Newton-Raphson Iterations: 6 
+n= 125 
+
+> 
diff --git a/win32/deps/library/survival/tests/r_donnell.R b/win32/deps/library/survival/tests/r_donnell.R
new file mode 100644
index 0000000..6d91b8b
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_donnell.R
@@ -0,0 +1,60 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Good initial values are key to this data set
+#   It killed v4 of survreg; 
+#   data courtesy of Deborah Donnell, Fred Hutchinson Cancer Center
+#
+
+donnell <- scan("data.donnell", what=list(time1=0, time2=0, status=0))
+donnell <- data.frame(donnell)
+
+dfit <- survreg(Surv(time1, time2, status, type='interval') ~1, donnell)
+summary(dfit)
+
+#
+# Fit the Donnell data using Statsci's code - should get the same coefs
+#
+if (exists('censorReg')) {
+    dfitc <- censorReg(censor(time1, time2, status, type='interval') ~1, 
+                   donnell)
+    summary(dfitc)
+    }
+#
+# Do a contour plot of the donnell data
+#
+npt <- 20
+beta0  <- seq(.4, 3.4, length=npt)
+logsig <- seq(-1.4, 0.41, length=npt)
+donlog <- matrix(0,npt, npt)
+
+for (i in 1:npt) {
+    for (j in 1:npt) {
+	fit <- survreg(Surv(time1, time2, status, type='interval') ~1,
+			donnell, init=c(beta0[i],logsig[j]),
+		        maxiter=0)
+	donlog[i,j] <- fit$log[1]
+	}
+    }
+
+clev <- -c(51, 51.5, 52:60, 65, 75, 85, 100, 150)
+#clev <-  seq(-51, -50, length=10)
+
+contour(beta0, logsig, pmax(donlog, -200), levels=clev, xlab="Intercept",
+	ylab="Log(sigma)")
+points(2.39, log(.7885), pch=1, col=2)
+title("Donnell data")
+#
+# Compute the path of the iteration
+#
+niter <- 14
+donpath <- matrix(0,niter+1,2)
+for (i in 0:niter){
+    fit <- survreg(Surv(time1, time2, status, type='interval') ~1,
+		    donnell, maxiter=i)
+    donpath[i+1,] <- c(fit$coef, log(fit$scale))
+    }
+points(donpath[,1], donpath[,2])
+lines(donpath[,1], donpath[,2], col=4)
diff --git a/win32/deps/library/survival/tests/r_donnell.Rout.save b/win32/deps/library/survival/tests/r_donnell.Rout.save
new file mode 100644
index 0000000..b3c8fe3
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_donnell.Rout.save
@@ -0,0 +1,114 @@
+
+R version 2.7.1 (2008-06-23)
+Copyright (C) 2008 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Good initial values are key to this data set
+> #   It killed v4 of survreg; 
+> #   data courtesy of Deborah Donnell, Fred Hutchinson Cancer Center
+> #
+> 
+> donnell <- scan("data.donnell", what=list(time1=0, time2=0, status=0))
+Read 210 records
+> donnell <- data.frame(donnell)
+> 
+> dfit <- survreg(Surv(time1, time2, status, type='interval') ~1, donnell)
+> summary(dfit)
+
+Call:
+survreg(formula = Surv(time1, time2, status, type = "interval") ~ 
+    1, data = donnell)
+             Value Std. Error      z       p
+(Intercept)  2.390      0.804  2.972 0.00295
+Log(scale)  -0.237      0.346 -0.687 0.49232
+
+Scale= 0.789 
+
+Weibull distribution
+Loglik(model)= -51   Loglik(intercept only)= -51
+Number of Newton-Raphson Iterations: 11 
+n= 210 
+
+> 
+> #
+> # Fit the Donnell data using Statsci's code - should get the same coefs
+> #
+> if (exists('censorReg')) {
++     dfitc <- censorReg(censor(time1, time2, status, type='interval') ~1, 
++                    donnell)
++     summary(dfitc)
++     }
+> #
+> # Do a contour plot of the donnell data
+> #
+> npt <- 20
+> beta0  <- seq(.4, 3.4, length=npt)
+> logsig <- seq(-1.4, 0.41, length=npt)
+> donlog <- matrix(0,npt, npt)
+> 
+> for (i in 1:npt) {
++     for (j in 1:npt) {
++ 	fit <- survreg(Surv(time1, time2, status, type='interval') ~1,
++ 			donnell, init=c(beta0[i],logsig[j]),
++ 		        maxiter=0)
++ 	donlog[i,j] <- fit$log[1]
++ 	}
++     }
+> 
+> clev <- -c(51, 51.5, 52:60, 65, 75, 85, 100, 150)
+> #clev <-  seq(-51, -50, length=10)
+> 
+> contour(beta0, logsig, pmax(donlog, -200), levels=clev, xlab="Intercept",
++ 	ylab="Log(sigma)")
+> points(2.39, log(.7885), pch=1, col=2)
+> title("Donnell data")
+> #
+> # Compute the path of the iteration
+> #
+> niter <- 14
+> donpath <- matrix(0,niter+1,2)
+> for (i in 0:niter){
++     fit <- survreg(Surv(time1, time2, status, type='interval') ~1,
++ 		    donnell, maxiter=i)
++     donpath[i+1,] <- c(fit$coef, log(fit$scale))
++     }
+Warning messages:
+1: In survreg.fit(X, Y, weights, offset, init = init, controlvals = control,  :
+  Ran out of iterations and did not converge
+2: In survreg.fit(X, Y, weights, offset, init = init, controlvals = control,  :
+  Ran out of iterations and did not converge
+3: In survreg.fit(X, Y, weights, offset, init = init, controlvals = control,  :
+  Ran out of iterations and did not converge
+4: In survreg.fit(X, Y, weights, offset, init = init, controlvals = control,  :
+  Ran out of iterations and did not converge
+5: In survreg.fit(X, Y, weights, offset, init = init, controlvals = control,  :
+  Ran out of iterations and did not converge
+6: In survreg.fit(X, Y, weights, offset, init = init, controlvals = control,  :
+  Ran out of iterations and did not converge
+7: In survreg.fit(X, Y, weights, offset, init = init, controlvals = control,  :
+  Ran out of iterations and did not converge
+8: In survreg.fit(X, Y, weights, offset, init = init, controlvals = control,  :
+  Ran out of iterations and did not converge
+9: In survreg.fit(X, Y, weights, offset, init = init, controlvals = control,  :
+  Ran out of iterations and did not converge
+> points(donpath[,1], donpath[,2])
+> lines(donpath[,1], donpath[,2], col=4)
+> 
diff --git a/win32/deps/library/survival/tests/r_lung.R b/win32/deps/library/survival/tests/r_lung.R
new file mode 100644
index 0000000..2e887d8
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_lung.R
@@ -0,0 +1,49 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+
+lfit2 <- survreg(Surv(time, status) ~ age + ph.ecog + strata(sex), lung)
+lfit3 <- survreg(Surv(time, status) ~ sex + (age+ph.ecog)*strata(sex), lung)
+
+lfit4 <-  survreg(Surv(time, status) ~ age + ph.ecog , lung,
+		  subset=(sex==1))
+lfit5 <- survreg(Surv(time, status) ~ age + ph.ecog , lung,
+		  subset=(sex==2))
+
+if (exists('censorReg')) {
+    lfit1 <- censorReg(censor(time, status) ~ age + ph.ecog + strata(sex),lung)
+    aeq(lfit4$coef, lfit1[[1]]$coef)
+    aeq(lfit4$scale, lfit1[[1]]$scale)
+    aeq(c(lfit4$scale, lfit5$scale), sapply(lfit1, function(x) x$scale))
+    }
+aeq(c(lfit4$scale, lfit5$scale), lfit3$scale )
+
+#
+# Test out ridge regression and splines
+#
+lfit0 <- survreg(Surv(time, status) ~1, lung)
+lfit1 <- survreg(Surv(time, status) ~ age + ridge(ph.ecog, theta=5), lung)
+lfit2 <- survreg(Surv(time, status) ~ sex + ridge(age, ph.ecog, theta=1), lung)
+lfit3 <- survreg(Surv(time, status) ~ sex + age + ph.ecog, lung)
+
+lfit0
+lfit1
+lfit2
+lfit3
+
+
+xx <- pspline(lung$age, nterm=3, theta=.3)
+xx <- matrix(unclass(xx), ncol=ncol(xx))   # the raw matrix
+lfit4 <- survreg(Surv(time, status) ~xx, lung)
+lfit5 <- survreg(Surv(time, status) ~age, lung)
+
+lfit6 <- survreg(Surv(time, status)~pspline(age, df=2), lung)
+
+lfit7 <- survreg(Surv(time, status) ~ offset(lfit6$lin), lung)
+
+lfit4
+lfit5
+lfit6
+signif(lfit7$coef,6)
diff --git a/win32/deps/library/survival/tests/r_lung.Rout.save b/win32/deps/library/survival/tests/r_lung.Rout.save
new file mode 100644
index 0000000..afe217f
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_lung.Rout.save
@@ -0,0 +1,165 @@
+
+R version 2.14.0 (2011-10-31)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> lfit2 <- survreg(Surv(time, status) ~ age + ph.ecog + strata(sex), lung)
+> lfit3 <- survreg(Surv(time, status) ~ sex + (age+ph.ecog)*strata(sex), lung)
+> 
+> lfit4 <-  survreg(Surv(time, status) ~ age + ph.ecog , lung,
++ 		  subset=(sex==1))
+> lfit5 <- survreg(Surv(time, status) ~ age + ph.ecog , lung,
++ 		  subset=(sex==2))
+> 
+> if (exists('censorReg')) {
++     lfit1 <- censorReg(censor(time, status) ~ age + ph.ecog + strata(sex),lung)
++     aeq(lfit4$coef, lfit1[[1]]$coef)
++     aeq(lfit4$scale, lfit1[[1]]$scale)
++     aeq(c(lfit4$scale, lfit5$scale), sapply(lfit1, function(x) x$scale))
++     }
+> aeq(c(lfit4$scale, lfit5$scale), lfit3$scale )
+[1] TRUE
+> 
+> #
+> # Test out ridge regression and splines
+> #
+> lfit0 <- survreg(Surv(time, status) ~1, lung)
+> lfit1 <- survreg(Surv(time, status) ~ age + ridge(ph.ecog, theta=5), lung)
+> lfit2 <- survreg(Surv(time, status) ~ sex + ridge(age, ph.ecog, theta=1), lung)
+> lfit3 <- survreg(Surv(time, status) ~ sex + age + ph.ecog, lung)
+> 
+> lfit0
+Call:
+survreg(formula = Surv(time, status) ~ 1, data = lung)
+
+Coefficients:
+(Intercept) 
+   6.034904 
+
+Scale= 0.7593936 
+
+Loglik(model)= -1153.9   Loglik(intercept only)= -1153.9
+n= 228 
+> lfit1
+Call:
+survreg(formula = Surv(time, status) ~ age + ridge(ph.ecog, theta = 5), 
+    data = lung)
+
+               coef     se(coef) se2     Chisq DF p      
+(Intercept)     6.83082 0.42860  0.42860 254.0 1  0.00000
+age            -0.00783 0.00687  0.00687   1.3 1  0.25000
+ridge(ph.ecog) -0.32032 0.08484  0.08405  14.2 1  0.00016
+
+Scale= 0.738 
+
+Iterations: 1 outer, 5 Newton-Raphson
+Degrees of freedom for terms= 1 1 1 1 
+Likelihood ratio test=18.6  on 2 df, p=8.73e-05
+  n=227 (1 observation deleted due to missingness)
+> lfit2
+Call:
+survreg(formula = Surv(time, status) ~ sex + ridge(age, ph.ecog, 
+    theta = 1), data = lung)
+
+               coef     se(coef) se2     Chisq  DF p      
+(Intercept)     6.27163 0.45280  0.45210 191.84 1  0.0e+00
+sex             0.40096 0.12371  0.12371  10.50 1  1.2e-03
+ridge(age)     -0.00746 0.00675  0.00674   1.22 1  2.7e-01
+ridge(ph.ecog) -0.33848 0.08329  0.08314  16.51 1  4.8e-05
+
+Scale= 0.731 
+
+Iterations: 1 outer, 6 Newton-Raphson
+Degrees of freedom for terms= 1 1 2 1 
+Likelihood ratio test=30  on 3 df, p=1.37e-06
+  n=227 (1 observation deleted due to missingness)
+> lfit3
+Call:
+survreg(formula = Surv(time, status) ~ sex + age + ph.ecog, data = lung)
+
+Coefficients:
+ (Intercept)          sex          age      ph.ecog 
+ 6.273435252  0.401090541 -0.007475439 -0.339638098 
+
+Scale= 0.731109 
+
+Loglik(model)= -1132.4   Loglik(intercept only)= -1147.4
+	Chisq= 29.98 on 3 degrees of freedom, p= 1.4e-06 
+n=227 (1 observation deleted due to missingness)
+> 
+> 
+> xx <- pspline(lung$age, nterm=3, theta=.3)
+> xx <- matrix(unclass(xx), ncol=ncol(xx))   # the raw matrix
+> lfit4 <- survreg(Surv(time, status) ~xx, lung)
+> lfit5 <- survreg(Surv(time, status) ~age, lung)
+> 
+> lfit6 <- survreg(Surv(time, status)~pspline(age, df=2), lung)
+> 
+> lfit7 <- survreg(Surv(time, status) ~ offset(lfit6$lin), lung)
+> 
+> lfit4
+Call:
+survreg(formula = Surv(time, status) ~ xx, data = lung)
+
+Coefficients:
+(Intercept)         xx1         xx2         xx3         xx4         xx5 
+  13.551290   -7.615741   -7.424565   -7.533378   -7.571272  -14.527489 
+
+Scale= 0.755741 
+
+Loglik(model)= -1150.1   Loglik(intercept only)= -1153.9
+	Chisq= 7.52 on 5 degrees of freedom, p= 0.19 
+n= 228 
+> lfit5
+Call:
+survreg(formula = Surv(time, status) ~ age, data = lung)
+
+Coefficients:
+(Intercept)         age 
+ 6.88712062 -0.01360829 
+
+Scale= 0.7587515 
+
+Loglik(model)= -1151.9   Loglik(intercept only)= -1153.9
+	Chisq= 3.91 on 1 degrees of freedom, p= 0.048 
+n= 228 
+> lfit6
+Call:
+survreg(formula = Surv(time, status) ~ pspline(age, df = 2), 
+    data = lung)
+
+                          coef    se(coef) se2     Chisq  DF   p    
+(Intercept)                6.5918 0.63681  0.41853 107.15 1.00 0.000
+pspline(age, df = 2), lin -0.0136 0.00687  0.00687   3.94 1.00 0.047
+pspline(age, df = 2), non                            0.78 1.06 0.400
+
+Scale= 0.756 
+
+Iterations: 4 outer, 12 Newton-Raphson
+     Theta= 0.926 
+Degrees of freedom for terms= 0.4 2.1 1.0 
+Likelihood ratio test=5.2  on 1.5 df, p=0.0441  n= 228 
+> signif(lfit7$coef,6)
+(Intercept) 
+1.47899e-09 
+> 
diff --git a/win32/deps/library/survival/tests/r_peterson.R b/win32/deps/library/survival/tests/r_peterson.R
new file mode 100644
index 0000000..37c7039
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_peterson.R
@@ -0,0 +1,44 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Data courtesy of Bercedis Peterson, Duke University.
+#  v4 of survreg fails due to 2 groups that have only 1 subject; the coef
+#  for them easily gets out of hand.  In fact, this data set is my toughest
+#  test of the minimizer.
+#
+# A shrinkage model for this coefficient is therefore interesting
+
+
+peterson <- data.frame(
+		  scan('data.peterson', what=list(grp=0, time=0, status=0)))
+
+fitp <- survreg(Surv(time, status) ~ factor(grp), peterson)
+summary(fitp)
+
+# Now a shrinkage model.  Give the group coefficients
+#  about 1/2 the scale parameter of the original model, i.e., .18.
+#
+ffit <- survreg(Surv(time, status) ~ frailty(grp, theta=.1), peterson)
+ffit
+
+#
+# Try 3 degrees of freedom, since there are 6 groups
+#   compare them to the unconstrained ones.  The frailty coefs are
+#   on a "sum to constant" constraint rather than "first coef=0", so
+#   some conversion is neccessary
+#
+ffit3 <- survreg(Surv(time, status) ~ frailty(grp, df=3), peterson)
+print(ffit3)
+
+temp <- mean(c(0, fitp$coef[-1])) - mean(ffit3$frail)
+temp2 <- c(fitp$coef[1] + temp, c(0,fitp$coef[-1]) - temp)
+xx <- rbind(c(nrow(peterson), table(peterson$grp)),
+	    temp2,
+	    c(ffit3$coef, ffit3$frail))
+dimnames(xx) <- list(c("N", "factor", "frailty"),
+		     c("Intercept", paste("grp", 1:6)))
+signif(xx,3)
+
+rm(ffit, ffit3, temp, temp2, xx, fitp)
diff --git a/win32/deps/library/survival/tests/r_peterson.Rout.save b/win32/deps/library/survival/tests/r_peterson.Rout.save
new file mode 100644
index 0000000..f496b54
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_peterson.Rout.save
@@ -0,0 +1,117 @@
+
+R version 2.14.0 Under development (unstable) (2011-04-10 r55401)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Data courtesy of Bercedis Peterson, Duke University.
+> #  v4 of survreg fails due to 2 groups that have only 1 subject; the coef
+> #  for them easily gets out of hand.  In fact, this data set is my toughest
+> #  test of the minimizer.
+> #
+> # A shrinkage model for this coefficient is therefore interesting
+> 
+> 
+> peterson <- data.frame(
++ 		  scan('data.peterson', what=list(grp=0, time=0, status=0)))
+Read 19 records
+> 
+> fitp <- survreg(Surv(time, status) ~ factor(grp), peterson)
+> summary(fitp)
+
+Call:
+survreg(formula = Surv(time, status) ~ factor(grp), data = peterson)
+              Value Std. Error     z        p
+(Intercept)   2.291      0.115 19.92 2.93e-88
+factor(grp)2  0.786      0.177  4.44 8.79e-06
+factor(grp)3  0.728      0.183  3.97 7.09e-05
+factor(grp)4 -1.598      0.218 -7.32 2.48e-13
+factor(grp)5 -0.500      0.218 -2.29 2.21e-02
+factor(grp)6  0.475      0.170  2.79 5.23e-03
+Log(scale)   -1.684      0.257 -6.54 6.09e-11
+
+Scale= 0.186 
+
+Weibull distribution
+Loglik(model)= -26.7   Loglik(intercept only)= -40.7
+	Chisq= 28.18 on 5 degrees of freedom, p= 3.4e-05 
+Number of Newton-Raphson Iterations: 9 
+n= 19 
+
+> 
+> # Now a shrinkage model.  Give the group coefficients
+> #  about 1/2 the scale parameter of the original model, i.e., .18.
+> #
+> ffit <- survreg(Surv(time, status) ~ frailty(grp, theta=.1), peterson)
+> ffit
+Call:
+survreg(formula = Surv(time, status) ~ frailty(grp, theta = 0.1), 
+    data = peterson)
+
+                          coef se(coef) se2    Chisq DF   p     
+(Intercept)               2.62 0.172    0.0874 232.0 1.00 0.0000
+frailty(grp, theta = 0.1)                       10.4 2.15 0.0067
+
+Scale= 0.301 
+
+Iterations: 1 outer, 6 Newton-Raphson
+     Variance of random effect= 0.1   I-likelihood = -11.8 
+Degrees of freedom for terms= 0.3 2.2 0.7 
+Likelihood ratio test=13.8  on 1.1 df, p=0.00027  n= 19 
+> 
+> #
+> # Try 3 degrees of freedom, since there are 6 groups
+> #   compare them to the unconstrained ones.  The frailty coefs are
+> #   on a "sum to constant" constraint rather than "first coef=0", so
+> #   some conversion is neccessary
+> #
+> ffit3 <- survreg(Surv(time, status) ~ frailty(grp, df=3), peterson)
+> print(ffit3)
+Call:
+survreg(formula = Surv(time, status) ~ frailty(grp, df = 3), 
+    data = peterson)
+
+                     coef se(coef) se2    Chisq DF   p      
+(Intercept)          2.54 0.187    0.0685 184.1 1.00 0.00000
+frailty(grp, df = 3)                       16.7 3.06 0.00088
+
+Scale= 0.227 
+
+Iterations: 6 outer, 32 Newton-Raphson
+     Variance of random effect= 0.17   I-likelihood = -10.1 
+Degrees of freedom for terms= 0.1 3.1 0.3 
+Likelihood ratio test=22.9  on 1.5 df, p=4.58e-06  n= 19 
+> 
+> temp <- mean(c(0, fitp$coef[-1])) - mean(ffit3$frail)
+> temp2 <- c(fitp$coef[1] + temp, c(0,fitp$coef[-1]) - temp)
+> xx <- rbind(c(nrow(peterson), table(peterson$grp)),
++ 	    temp2,
++ 	    c(ffit3$coef, ffit3$frail))
+> dimnames(xx) <- list(c("N", "factor", "frailty"),
++ 		     c("Intercept", paste("grp", 1:6)))
+> signif(xx,3)
+        Intercept  grp 1 grp 2 grp 3 grp 4  grp 5 grp 6
+N           19.00  3.000 6.000 6.000  1.00  1.000 2.000
+factor       2.43 -0.137 0.649 0.591 -1.74 -0.636 0.338
+frailty      2.54 -0.255 0.474 0.438 -1.21 -0.554 0.180
+> 
+> rm(ffit, ffit3, temp, temp2, xx, fitp)
+> 
diff --git a/win32/deps/library/survival/tests/r_resid.R b/win32/deps/library/survival/tests/r_resid.R
new file mode 100644
index 0000000..ead044e
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_resid.R
@@ -0,0 +1,109 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+
+fit1 <- survreg(Surv(futime, fustat) ~ age + ecog.ps, ovarian)
+fit4 <- survreg(Surv(log(futime), fustat) ~age + ecog.ps, ovarian,
+		dist='extreme')
+
+print(fit1)
+summary(fit4)		
+
+
+# Hypothesis (and I'm fairly sure): censorReg shares the fault of many
+#  iterative codes -- it returns the loglik and variance for iteration k
+#  but the coef vector of iteration k+1.  Hence the "all.equal" tests
+#  below don't come out perfect.
+#
+if (exists('censorReg')) {  #true for Splus, not R
+    fit2 <- censorReg(censor(futime, fustat) ~ age + ecog.ps, ovarian)
+    fit3 <- survreg(Surv(futime, fustat) ~ age + ecog.ps, ovarian,
+		iter=0, init=c(fit2$coef,   log(fit2$scale)))
+
+    aeq(resid(fit2, type='working')[,1], resid(fit3, type='working'))
+    aeq(resid(fit2, type='response')[,1], resid(fit3, type='response'))
+
+    temp <- sign(resid(fit3, type='working'))
+    aeq(resid(fit2, type='deviance')[,1], 
+	temp*abs(resid(fit3, type='deviance')))
+    aeq(resid(fit2, type='deviance')[,1], resid(fit3, type='deviance'))
+    }
+#
+# Now check fit1 and fit4, which should follow identical iteration paths
+#   These tests should all be true
+#
+aeq(fit1$coef, fit4$coef)
+ 
+resid(fit1, type='working')
+resid(fit1, type='response')
+resid(fit1, type='deviance')
+resid(fit1, type='dfbeta')
+resid(fit1, type='dfbetas')
+resid(fit1, type='ldcase')
+resid(fit1, type='ldresp')
+resid(fit1, type='ldshape')
+resid(fit1, type='matrix')
+
+aeq(resid(fit1, type='working'),resid(fit4, type='working'))
+#aeq(resid(fit1, type='response'), resid(fit4, type='response'))#should differ
+aeq(resid(fit1, type='deviance'), resid(fit4, type='deviance'))
+aeq(resid(fit1, type='dfbeta'),   resid(fit4, type='dfbeta'))
+aeq(resid(fit1, type='dfbetas'),  resid(fit4, type='dfbetas'))
+aeq(resid(fit1, type='ldcase'),   resid(fit4, type='ldcase'))
+aeq(resid(fit1, type='ldresp'),   resid(fit4, type='ldresp'))
+aeq(resid(fit1, type='ldshape'),  resid(fit4, type='ldshape'))
+aeq(resid(fit1, type='matrix'),   resid(fit4, type='matrix'))
+#
+# Some tests of the quantile residuals
+#
+motor <- read.table('data.motor', col.names=c('temp', 'time', 'status'))
+
+# These should agree exactly with Ripley and Venables' book
+fit1 <- survreg(Surv(time, status) ~ temp, data=motor)
+summary(fit1)
+
+#
+# The first prediction has the SE that I think is correct
+#  The third is the se found in an early draft of Ripley; fit1 ignoring
+#  the variation in scale estimate, except via it's impact on the
+#  upper left corner of the inverse information matrix.
+# Numbers 1 and 3 differ little for this dataset
+#
+predict(fit1, data.frame(temp=130), type='uquantile', p=c(.5, .1), se=T)
+
+fit2 <- survreg(Surv(time, status) ~ temp, data=motor, scale=fit1$scale)
+predict(fit2, data.frame(temp=130), type='uquantile', p=c(.5, .1), se=T)
+
+fit3 <- fit2
+fit3$var <- fit1$var[1:2,1:2]
+predict(fit3, data.frame(temp=130), type='uquantile', p=c(.5, .1), se=T)
+
+pp <- seq(.05, .7, length=40)
+xx <- predict(fit1, data.frame(temp=130), type='uquantile', se=T,
+	      p=pp)
+#matplot(pp, cbind(xx$fit, xx$fit+2*xx$se, xx$fit - 2*xx$se), type='l')
+
+
+#
+# Now try out the various combinations of strata, #predicted, and
+#  number of quantiles desired
+#
+fit1 <- survreg(Surv(time, status) ~ inst + strata(inst) + age + sex, lung)
+qq1 <- predict(fit1, type='quantile', p=.3, se=T)
+qq2 <- predict(fit1, type='quantile', p=c(.2, .3, .4), se=T)
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+aeq(qq1$fit, qq2$fit[,2])
+aeq(qq1$se.fit, qq2$se.fit[,2])
+
+qq3 <- predict(fit1, type='quantile', p=c(.2, .3, .4), se=T,
+	       newdata= lung[1:5,])
+aeq(qq3$fit, qq2$fit[1:5,])
+
+qq4 <- predict(fit1, type='quantile', p=c(.2, .3, .4), se=T, newdata=lung[7,])
+aeq(qq4$fit, qq2$fit[7,])
+
+qq5 <- predict(fit1, type='quantile', p=c(.2, .3, .4), se=T, newdata=lung)
+aeq(qq2$fit, qq5$fit)
+aeq(qq2$se.fit, qq5$se.fit)
diff --git a/win32/deps/library/survival/tests/r_resid.Rout.save b/win32/deps/library/survival/tests/r_resid.Rout.save
new file mode 100644
index 0000000..d223f90
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_resid.Rout.save
@@ -0,0 +1,348 @@
+
+R version 2.7.1 (2008-06-23)
+Copyright (C) 2008 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> fit1 <- survreg(Surv(futime, fustat) ~ age + ecog.ps, ovarian)
+> fit4 <- survreg(Surv(log(futime), fustat) ~age + ecog.ps, ovarian,
++ 		dist='extreme')
+> 
+> print(fit1)
+Call:
+survreg(formula = Surv(futime, fustat) ~ age + ecog.ps, data = ovarian)
+
+Coefficients:
+(Intercept)         age     ecog.ps 
+12.28496723 -0.09702669  0.09977342 
+
+Scale= 0.6032744 
+
+Loglik(model)= -90   Loglik(intercept only)= -98
+	Chisq= 15.98 on 2 degrees of freedom, p= 0.00034 
+n= 26 
+> summary(fit4)		
+
+Call:
+survreg(formula = Surv(log(futime), fustat) ~ age + ecog.ps, 
+    data = ovarian, dist = "extreme")
+              Value Std. Error      z        p
+(Intercept) 12.2850     1.5015  8.182 2.80e-16
+age         -0.0970     0.0235 -4.127 3.67e-05
+ecog.ps      0.0998     0.3657  0.273 7.85e-01
+Log(scale)  -0.5054     0.2351 -2.149 3.16e-02
+
+Scale= 0.603 
+
+Extreme value distribution
+Loglik(model)= -21.8   Loglik(intercept only)= -29.8
+	Chisq= 15.98 on 2 degrees of freedom, p= 0.00034 
+Number of Newton-Raphson Iterations: 5 
+n= 26 
+
+> 
+> 
+> # Hypothesis (and I'm fairly sure): censorReg shares the fault of many
+> #  iterative codes -- it returns the loglik and variance for iteration k
+> #  but the coef vector of iteration k+1.  Hence the "all.equal" tests
+> #  below don't come out perfect.
+> #
+> if (exists('censorReg')) {  #true for Splus, not R
++     fit2 <- censorReg(censor(futime, fustat) ~ age + ecog.ps, ovarian)
++     fit3 <- survreg(Surv(futime, fustat) ~ age + ecog.ps, ovarian,
++ 		iter=0, init=c(fit2$coef,   log(fit2$scale)))
++ 
++     aeq(resid(fit2, type='working')[,1], resid(fit3, type='working'))
++     aeq(resid(fit2, type='response')[,1], resid(fit3, type='response'))
++ 
++     temp <- sign(resid(fit3, type='working'))
++     aeq(resid(fit2, type='deviance')[,1], 
++ 	temp*abs(resid(fit3, type='deviance')))
++     aeq(resid(fit2, type='deviance')[,1], resid(fit3, type='deviance'))
++     }
+> #
+> # Now check fit1 and fit4, which should follow identical iteration paths
+> #   These tests should all be true
+> #
+> aeq(fit1$coef, fit4$coef)
+[1] TRUE
+>  
+> resid(fit1, type='working')
+          1           2           3           4           5           6 
+ -4.5081778  -0.5909810  -2.4878519   0.6032744  -5.8993431   0.6032744 
+          7           8           9          10          11          12 
+ -1.7462937  -0.8102883   0.6032744  -1.6593962  -0.8235265   0.6032744 
+         13          14          15          16          17          18 
+  0.6032744   0.6032744   0.6032744   0.6032744   0.6032744   0.6032744 
+         19          20          21          22          23          24 
+  0.6032744   0.6032744   0.6032744   0.2572623 -31.8006867  -0.7426277 
+         25          26 
+ -0.2857597   0.6032744 
+> resid(fit1, type='response')
+          1           2           3           4           5           6 
+ -155.14523   -58.62744  -262.03173  -927.79842 -1377.84908  -658.86626 
+          7           8           9          10          11          12 
+ -589.74449  -318.93436     4.50671  -686.83338  -434.39281 -1105.68733 
+         13          14          15          16          17          18 
+  -42.43371  -173.09223 -4491.29974 -3170.49394 -5028.31053 -2050.91373 
+         19          20          21          22          23          24 
+ -150.65033 -2074.09345   412.32400    76.35826 -3309.40331  -219.81579 
+         25          26 
+  -96.19691  -457.76731 
+> resid(fit1, type='deviance')
+         1          2          3          4          5          6          7 
+-1.5842290 -0.6132746 -1.2876971  0.5387840 -1.7148539  0.6682580 -1.1102921 
+         8          9         10         11         12         13         14 
+-0.7460191  1.4253843 -1.0849419 -0.7531720  0.6648130  1.3526380  1.1954382 
+        15         16         17         18         19         20         21 
+ 0.2962391  0.3916044  0.3278067  0.5929057  1.2747643  0.6171130  1.9857606 
+        22         23         24         25         26 
+ 0.6125492 -2.4504208 -0.7080652 -0.3642424  0.7317955 
+> resid(fit1, type='dfbeta')
+   (Intercept)           age      ecog.ps   Log(scale)
+1   0.43370970 -1.087867e-02  0.126322520  0.048379059
+2   0.14426449 -5.144770e-03  0.088768478 -0.033939677
+3   0.25768057 -3.066698e-03 -0.066578834  0.021817646
+4   0.05772598 -5.068044e-04 -0.013121427 -0.007762466
+5  -0.58773456  6.676156e-03  0.084189274  0.008064026
+6   0.01499533 -7.881949e-04  0.026570173 -0.013513160
+7  -0.17869321  4.126121e-03 -0.072760519 -0.015006956
+8  -0.11851540  2.520303e-03 -0.045549628 -0.035686269
+9   0.08327656  3.206404e-03 -0.141835350  0.024490806
+10 -0.25083921  5.321702e-03 -0.073986269 -0.020648720
+11 -0.21333934  4.155746e-03 -0.049832434 -0.040215681
+12  0.13889770 -1.586136e-03 -0.019701151 -0.004686340
+13  0.07892133 -2.706713e-03  0.085242459  0.007847879
+14  0.29690157 -1.987141e-03 -0.085553120  0.017447343
+15  0.04344618 -6.319243e-04 -0.001944285 -0.003533279
+16  0.04866809 -1.068317e-03  0.012398602 -0.006340983
+17  0.04368104 -9.248316e-04  0.009428718 -0.004869178
+18  0.15684611 -2.081485e-03 -0.013068320 -0.003265399
+19  0.48839511 -4.775829e-03 -0.093258090  0.032703354
+20  0.17598922 -2.349254e-03 -0.014202966 -0.002486428
+21  0.37869758 -8.442011e-03  0.163476417  0.100850775
+22 -0.59761427  8.803638e-03  0.052784598 -0.053085234
+23 -0.79017984  1.092304e-02  0.053690092  0.080780399
+24 -0.02348526  8.331002e-04 -0.039028433 -0.032765737
+25 -0.13948485  3.687927e-04  0.056781884 -0.055647859
+26  0.05778937  3.766350e-06 -0.029232389 -0.008927920
+> resid(fit1, type='dfbetas')
+           [,1]          [,2]         [,3]        [,4]
+1   0.288846658 -0.4627232074  0.345395116  0.20574292
+2   0.096078819 -0.2188323823  0.242713641 -0.14433617
+3   0.171612884 -0.1304417700 -0.182041999  0.09278449
+4   0.038444974 -0.0215568869 -0.035877029 -0.03301165
+5  -0.391425795  0.2839697749  0.230193032  0.03429410
+6   0.009986751 -0.0335258093  0.072649027 -0.05746778
+7  -0.119008027  0.1755042532 -0.198944162 -0.06382048
+8  -0.078930164  0.1072008799 -0.124543264 -0.15176395
+9   0.055461420  0.1363841532 -0.387810796  0.10415271
+10 -0.167056601  0.2263581990 -0.202295647 -0.08781336
+11 -0.142082031  0.1767643342 -0.136253451 -0.17102630
+12  0.092504589 -0.0674661531 -0.053867524 -0.01992972
+13  0.052560878 -0.1151298322  0.233072686  0.03337488
+14  0.197733705 -0.0845228882 -0.233922105  0.07419878
+15  0.028934753 -0.0268788526 -0.005316126 -0.01502607
+16  0.032412497 -0.0454407662  0.033900659 -0.02696647
+17  0.029091172 -0.0393376416  0.025780305 -0.02070728
+18  0.104458066 -0.0885357994 -0.035731824 -0.01388685
+19  0.325266641 -0.2031395176 -0.254989284  0.13907843
+20  0.117207199 -0.0999253459 -0.038834208 -0.01057410
+21  0.252209096 -0.3590802699  0.446982501  0.42889079
+22 -0.398005596  0.3744620571  0.144325354 -0.22575700
+23 -0.526252483  0.4646108448  0.146801184  0.34353696
+24 -0.015640965  0.0354358527 -0.106712804 -0.13934372
+25 -0.092895624  0.0156865706  0.155254862 -0.23665514
+26  0.038487186  0.0001602014 -0.079928144 -0.03796800
+> resid(fit1, type='ldcase')
+          1           2           3           4           5           6 
+0.374432175 0.145690278 0.112678800 0.006399163 0.261176992 0.013280058 
+          7           8           9          10          11          12 
+0.109842490 0.074103234 0.248285282 0.128482147 0.094038203 0.016111951 
+         13          14          15          16          17          18 
+0.132812463 0.111857574 0.001698300 0.004730718 0.003131173 0.015840667 
+         19          20          21          22          23          24 
+0.179925399 0.019071941 0.797119488 0.233096445 0.666613755 0.062959708 
+         25          26 
+0.080117437 0.015922378 
+> resid(fit1, type='ldresp')
+          1           2           3           4           5           6 
+0.076910173 0.173810883 0.078356928 0.005310644 0.060742612 0.010002154 
+          7           8           9          10          11          12 
+0.067356838 0.067065693 0.355103899 0.067043195 0.068142828 0.016740944 
+         13          14          15          16          17          18 
+0.193444572 0.165021262 0.001494685 0.004083386 0.002767560 0.016400993 
+         19          20          21          22          23          24 
+0.269571809 0.020129806 1.409736499 1.040266083 0.058637282 0.071819025 
+         25          26 
+0.112702844 0.015105534 
+> resid(fit1, type='ldshape')
+          1           2           3           4           5           6 
+0.870628250 0.383362440 0.412503605 0.005534970 0.513991064 0.003310847 
+          7           8           9          10          11          12 
+0.291860593 0.154910362 0.256160646 0.312329770 0.183191309 0.004184904 
+         13          14          15          16          17          18 
+0.110215710 0.049299495 0.007678445 0.011633336 0.011588605 0.008641251 
+         19          20          21          22          23          24 
+0.112967758 0.008271358 2.246729275 0.966929220 1.022043272 0.143857170 
+         25          26 
+0.079754096 0.001606647 
+> resid(fit1, type='matrix')
+             g          dg         ddg          ds         dds        dsg
+1  -1.74950763 -1.46198129 -0.32429540  0.88466493 -2.42358635  1.8800360
+2  -0.68266980 -0.82027857 -1.38799493 -0.66206188 -0.57351872  1.3921043
+3  -1.32369884 -1.33411374 -0.53625126  0.31503768 -1.83606321  1.8626973
+4  -0.14514412  0.24059386 -0.39881329 -0.28013223 -0.26053084  0.2237590
+5  -1.96497889 -1.50383619 -0.25491587  1.15700933 -2.68145423  1.8694717
+6  -0.22328436  0.37012071 -0.61351964 -0.33477229 -0.16715487  0.1848047
+7  -1.11099124 -1.23201028 -0.70550005  0.01052036 -1.48515401  1.8106760
+8  -0.77288913 -0.95018808 -1.17265428 -0.51190170 -0.79753045  1.5525642
+9  -1.01586016  1.68391053 -2.79128447  0.01598527 -0.01623681 -1.7104080
+10 -1.08316634 -1.21566480 -0.73259465 -0.03052447 -1.43539383  1.7998987
+11 -0.77825093 -0.95675178 -1.16177415 -0.50314979 -0.81016011  1.5600720
+12 -0.22098818  0.36631452 -0.60721042 -0.33361394 -0.17002503  0.1866908
+13 -0.91481479  1.51641567 -2.51364157 -0.08144930  0.07419757 -1.3814037
+14 -0.71453621  1.18442981 -1.96333502 -0.24017106  0.15944438 -0.7863174
+15 -0.04387880  0.07273440 -0.12056602 -0.13717935 -0.29168773  0.1546569
+16 -0.07667699  0.12710134 -0.21068577 -0.19691828 -0.30879813  0.1993144
+17 -0.05372862  0.08906165 -0.14763041 -0.15709224 -0.30221555  0.1713377
+18 -0.17576861  0.29135764 -0.48296037 -0.30558900 -0.22570402  0.2151929
+19 -0.81251205  1.34683655 -2.23254376 -0.16869744  0.13367171 -1.0672002
+20 -0.19041424  0.31563454 -0.52320225 -0.31581218 -0.20797917  0.2078622
+21 -1.97162252  3.26820173 -5.41743790  1.33844939 -2.24706488 -5.4868428
+22 -0.68222519  1.23245193 -4.79064290 -0.58668577 -0.95209805 -2.8390386
+23 -3.49689798 -1.62675999 -0.05115487  2.90949868 -4.20494743  1.7496975
+24 -0.74529506 -0.91462436 -1.23160543 -0.55723389 -0.73139169  1.5108398
+25 -0.56095318 -0.53280415 -1.86451840 -0.87536233 -0.22666819  0.9689667
+26 -0.26776235  0.44384834 -0.73573207 -0.35281852 -0.11207472  0.1409908
+> 
+> aeq(resid(fit1, type='working'),resid(fit4, type='working'))
+[1] TRUE
+> #aeq(resid(fit1, type='response'), resid(fit4, type='response'))#should differ
+> aeq(resid(fit1, type='deviance'), resid(fit4, type='deviance'))
+[1] TRUE
+> aeq(resid(fit1, type='dfbeta'),   resid(fit4, type='dfbeta'))
+[1] TRUE
+> aeq(resid(fit1, type='dfbetas'),  resid(fit4, type='dfbetas'))
+[1] TRUE
+> aeq(resid(fit1, type='ldcase'),   resid(fit4, type='ldcase'))
+[1] TRUE
+> aeq(resid(fit1, type='ldresp'),   resid(fit4, type='ldresp'))
+[1] TRUE
+> aeq(resid(fit1, type='ldshape'),  resid(fit4, type='ldshape'))
+[1] TRUE
+> aeq(resid(fit1, type='matrix'),   resid(fit4, type='matrix'))
+[1] TRUE
+> #
+> # Some tests of the quantile residuals
+> #
+> motor <- read.table('data.motor', col.names=c('temp', 'time', 'status'))
+> 
+> # These should agree exactly with Ripley and Venables' book
+> fit1 <- survreg(Surv(time, status) ~ temp, data=motor)
+> summary(fit1)
+
+Call:
+survreg(formula = Surv(time, status) ~ temp, data = motor)
+              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 
+
+> 
+> #
+> # The first prediction has the SE that I think is correct
+> #  The third is the se found in an early draft of Ripley; fit1 ignoring
+> #  the variation in scale estimate, except via it's impact on the
+> #  upper left corner of the inverse information matrix.
+> # Numbers 1 and 3 differ little for this dataset
+> #
+> predict(fit1, data.frame(temp=130), type='uquantile', p=c(.5, .1), se=T)
+$fit
+[1] 10.306068  9.676248
+
+$se.fit
+[1] 0.2135247 0.2202088
+
+> 
+> fit2 <- survreg(Surv(time, status) ~ temp, data=motor, scale=fit1$scale)
+> predict(fit2, data.frame(temp=130), type='uquantile', p=c(.5, .1), se=T)
+$fit
+[1] 10.306068  9.676248
+
+$se.fit
+        1         1 
+0.2057964 0.2057964 
+
+> 
+> fit3 <- fit2
+> fit3$var <- fit1$var[1:2,1:2]
+> predict(fit3, data.frame(temp=130), type='uquantile', p=c(.5, .1), se=T)
+$fit
+[1] 10.306068  9.676248
+
+$se.fit
+        1         1 
+0.2219959 0.2219959 
+
+> 
+> pp <- seq(.05, .7, length=40)
+> xx <- predict(fit1, data.frame(temp=130), type='uquantile', se=T,
++ 	      p=pp)
+> #matplot(pp, cbind(xx$fit, xx$fit+2*xx$se, xx$fit - 2*xx$se), type='l')
+> 
+> 
+> #
+> # Now try out the various combinations of strata, #predicted, and
+> #  number of quantiles desired
+> #
+> fit1 <- survreg(Surv(time, status) ~ inst + strata(inst) + age + sex, lung)
+> qq1 <- predict(fit1, type='quantile', p=.3, se=T)
+> qq2 <- predict(fit1, type='quantile', p=c(.2, .3, .4), se=T)
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> aeq(qq1$fit, qq2$fit[,2])
+[1] TRUE
+> aeq(qq1$se.fit, qq2$se.fit[,2])
+[1] TRUE
+> 
+> qq3 <- predict(fit1, type='quantile', p=c(.2, .3, .4), se=T,
++ 	       newdata= lung[1:5,])
+> aeq(qq3$fit, qq2$fit[1:5,])
+[1] TRUE
+> 
+> qq4 <- predict(fit1, type='quantile', p=c(.2, .3, .4), se=T, newdata=lung[7,])
+> aeq(qq4$fit, qq2$fit[7,])
+[1] TRUE
+> 
+> qq5 <- predict(fit1, type='quantile', p=c(.2, .3, .4), se=T, newdata=lung)
+> aeq(qq2$fit, qq5$fit)
+[1] TRUE
+> aeq(qq2$se.fit, qq5$se.fit)
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/r_sas.R b/win32/deps/library/survival/tests/r_sas.R
new file mode 100644
index 0000000..b94e89f
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_sas.R
@@ -0,0 +1,259 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Reproduce example 1 in the SAS lifereg documentation
+#
+
+# this fit doesn't give the same log-lik that they claim
+motor <- read.table('data.motor', col.names=c('temp', 'time', 'status'))
+fit1 <- survreg(Surv(time, status) ~ I(1000/(273.2+temp)), motor,
+		subset=(temp>150), dist='lognormal')
+summary(fit1)
+
+# This one, with the loglik on the transformed scale (the inappropriate
+#   scale, Ripley & Venables would argue) does agree.
+# All coefs are of course identical.
+fit2 <- survreg(Surv(log(time), status) ~ I(1000/(273.2+temp)), motor,
+		subset=(temp>150), dist='gaussian')
+
+
+# Give the quantile estimates, which is the lower half of "output 48.1.5"
+#  in the SAS 9.2 manual
+
+pp1 <- predict(fit1, newdata=list(temp=c(130,150)), p=c(.1, .5, .9),
+		      type='quantile', se=T)
+pp2 <- predict(fit1, newdata=list(temp=c(130,150)), p=c(.1, .5, .9),
+		      type='uquantile', se=T)
+pp1
+
+temp130 <- matrix(0, nrow=3, ncol=6)
+temp130[,1] <- pp1$fit[1,]
+temp130[,2] <- pp1$se.fit[1,]
+temp130[,3] <- pp2$fit[1,]
+temp130[,4] <- pp2$se.fit[1,]
+temp130[,5] <- exp(pp2$fit[1,] - 1.64*pp2$se.fit[1,])
+temp130[,6] <- exp(pp2$fit[1,] + 1.64*pp2$se.fit[1,])
+dimnames(temp130) <- list(c("p=.1", "p=.2", "p=.3"),
+     c("Time", "se(time)", "log(time)", "se[log(time)]", 
+       "lower 90", "upper 90"))
+print(temp130)
+
+# A set of examples, copied from the manual pages of SAS procedure
+#  "reliability", which is part of their QC product.
+#
+
+color <- c("black", "red", "green", "blue", "magenta", "red4",
+                        "orange", "DarkGreen", "cyan2", "DarkViolet")
+palette(color)
+pdf(file='reliability.pdf')
+
+#
+# Insulating fluids example
+#
+fluid <- read.table('data.fluid', col.names=c('time', 'voltage'))
+
+# Adding a -1 to the fit just causes the each group to have it's own
+# intercept, rather than a global intercept + constrasts.  The strata
+# statement allows each to have a separate scale
+ffit <- survreg(Surv(time) ~ voltage + strata(voltage) -1, fluid)
+
+# Get predicted quantiles at each of the voltages
+# By default predict() would give a line of results for each observation,
+#  I only want the unique set of x's, i.e., only 4 cases
+uvolt <- sort(unique(fluid$voltage))      #the unique levels
+plist <- c(1, 2, 5, 1:9 *10, 95, 99)/100
+pred  <- predict(ffit, type='quantile', p=plist,
+                 newdata=data.frame(voltage=factor(uvolt)))
+tfun <- function(x) log(-log(1-x))
+
+matplot(t(pred), tfun(plist), type='l', log='x', lty=1,
+        col=1:4, yaxt='n')
+axis(2, tfun(plist), format(100*plist), adj=1)
+
+kfit <- survfit(Surv(time) ~ voltage, fluid, type='fleming') #KM fit
+for (i in 1:4) {
+    temp <- kfit[i]
+    points(temp$time, tfun(1-temp$surv), col=i, pch=i)
+    }
+
+# Now a table
+temp <- array(0, dim=c(4,4,4))  #4 groups by 4 parameters by 4 stats
+temp[,1,1] <- ffit$coef         # "EV Location" in SAS manual
+temp[,2,1] <- ffit$scale        # "EV scale"
+temp[,3,1] <- exp(ffit$coef)    # "Weibull Scale"
+temp[,4,1] <- 1/ffit$scale      # "Weibull Shape"
+ 
+temp[,1,2] <- sqrt(diag(ffit$var))[1:4]   #standard error
+temp[,2,2] <- sqrt(diag(ffit$var))[5:8] * ffit$scale
+temp[,3,2] <- temp[,1,2] * temp[,3,1]
+temp[,4,2] <- temp[,2,2] / (temp[,2,1])^2
+
+temp[,1,3] <- temp[,1,1] - 1.96*temp[,1,2]  #lower conf limits 
+temp[,1,4]  <- temp[,1,1] + 1.96*temp[,1,2] # upper
+# log(scale) is the natural parameter, in which the routine did its fitting
+#  and on which the std errors were computed
+temp[,2, 3] <- exp(log(ffit$scale) - 1.96*sqrt(diag(ffit$var))[5:8])
+temp[,2, 4] <- exp(log(ffit$scale) + 1.96*sqrt(diag(ffit$var))[5:8])
+
+temp[,3, 3:4] <- exp(temp[,1,3:4])
+temp[,4, 3:4] <- 1/temp[,2,4:3]
+
+dimnames(temp) <- list(uvolt, c("EV Location", "EV Scale", "Weibull scale",
+                                "Weibull shape"),
+                       c("Estimate", "SE", "lower 95% CI", "uppper 95% CI"))
+print(aperm(temp, c(2,3,1)), digits=5)
+
+rm(temp, uvolt, plist, pred, ffit, kfit) 
+
+#####################################################################
+# Turbine cracks data
+cracks <- read.table('data.cracks', col.names=c('time1', 'time2', 'n'))
+cfit <- survreg(Surv(time1, time2, type='interval2') ~1, 
+                dist='weibull', data=cracks, weight=n)
+
+summary(cfit)
+#Their output also has Wiebull scale = exp(cfit$coef), shape = 1/(cfit$scale)
+
+# Draw the SAS plot
+#  The "type=fleming" argument reflects that they estimate hazards rather than
+#  survival, and forces a Nelson-Aalen hazard estimate
+#
+plist <-  c(1, 2, 5, 1:8 *10)/100
+plot(qsurvreg(plist, cfit$coef, cfit$scale), tfun(plist), log='x',
+     yaxt='n', type='l',
+     xlab="Weibull Plot for Time", ylab="Percent")
+axis(2, tfun(plist), format(100*plist), adj=1)
+
+kfit <- survfit(Surv(time1, time2, type='interval2') ~1, data=cracks,
+                weight=n, type='fleming')
+# Only plot point where n.event > 0 
+# Why?  I'm trying to match them.  Personally, all should be plotted.
+who <- (kfit$n.event > 0)
+points(kfit$time[who], tfun(1-kfit$surv[who]), pch='+')
+points(kfit$time[who], tfun(1-kfit$upper[who]), pch='-')
+points(kfit$time[who], tfun(1-kfit$lower[who]), pch='-')
+
+text(rep(3,6), seq(.5, -1.0, length=6), 
+         c("Scale", "Shape", "Right Censored", "Left Censored", 
+           "Interval Censored", "Fit"), adj=0)
+text(rep(9,6), seq(.5, -1.0, length=6), 
+         c(format(round(exp(cfit$coef), 2)),
+           format(round(1/cfit$scale, 2)),
+           format(tapply(cracks$n, cfit$y[,3], sum)), "ML"), adj=1)
+
+# Now a portion of his percentiles table
+#  I don't get the same SE as SAS, I haven't checked out why.  The
+#  estimates and se for the underlying Weibull model are the same.
+temp <- predict(cfit, type='quantile', p=plist, se=T)
+tempse <- sqrt(temp$se[1,])
+mat <- cbind(temp$fit[1,], tempse, 
+             temp$fit[1,] -1.96*tempse, temp$fit[1,] + 1.96*tempse)
+dimnames(mat) <- list(plist*100, c("Estimate", "SE", "Lower .95", "Upper .95"))
+print(mat)
+
+#
+# The cracks data has a particularly easy estimate, so use
+# it to double check code
+time <- c(cracks$time2[1], (cracks$time1 + cracks$time2)[2:8]/2, 
+          cracks$time1[9])
+cdf  <- cumsum(cracks$n)/sum(cracks$n)
+all.equal(kfit$time, time)
+all.equal(kfit$surv, 1-cdf[c(1:8,8)]) 
+rm(time, cdf, kfit)
+
+
+#######################################################
+#
+# Valve data
+#   The input data has id, time, and an indicator of whether there was an
+#   event at that time: -1=no, 1=yes.  No one has an event at their last time.
+#  Convert the data to (start, stop] form
+#  The input data has two engines with dual failures: 328 loses 2 valves at 
+#    time 653, and number 402 loses 2 at time 139.  For each, fudge the first
+#    time to be .1 days earlier.
+#
+temp <- matrix(scan('data.valve'), byrow=T, ncol=3)
+
+n <- nrow(temp)
+valve <- data.frame(id=temp[,1], 
+                    time1 = c(0, ifelse(diff(temp[,1])==0, temp[-n,2],0)),
+                    time2 = temp[,2],
+                    status= as.numeric(temp[,3]==1))
+
+indx <- (1:nrow(valve))[valve$time1==valve$time2]
+valve$time1[indx]   <- valve$time1[indx] - .1
+valve$time2[indx-1] <- valve$time2[indx-1] - .1
+
+kfit <- survfit(Surv(time1, time2, status) ~1, valve, type='fh2')
+
+plot(kfit, fun='cumhaz', ylab="Sample Mean Cumulative Failures", xlab='Time',
+     ylim=range(-log(kfit$lower)))
+title("Valve replacement data")
+
+# The summary.survfit function doesn't have an option for printing out
+#   cumulative hazards instead of survival --- need to add that
+#   so I just reprise the central code of print.summary.survfit
+xx <- summary(kfit)
+temp <- cbind(xx$time, xx$n.risk, xx$n.event, -log(xx$surv), 
+              xx$std.err/xx$surv, -log(xx$upper), -log(xx$lower))
+dimnames(temp) <- list(rep("", nrow(temp)),
+                       c("time", "n.risk", "n.event", "Cum haz", "std.err",
+                         "lower 95%", "upper 95%"))
+print(temp, digits=2)
+
+# Note that I have the same estimates but different SE's.  We are using a
+#  different estimator. It's a statistical argument as to which is
+#  better (one could defend both sides): do you favor JASA or Technometrics?
+rm(temp, kfit, indx, xx)
+                    
+######################################################
+# Turbine data, lognormal fit
+turbine <- read.table('data.turbine', 
+                      col.names=c("time1", "time2", "n"))
+
+tfit <- survreg(Surv(time1, time2, type='interval2') ~1, turbine,
+                dist='lognormal', weights=n, subset=(n>0))
+
+summary(tfit)
+
+# Now, do his plot, but put bootstrap confidence bands on it!
+#  First, make a simple data set without weights
+tdata <- turbine[rep(1:nrow(turbine), turbine$n),]
+
+qstat <- function(data) {
+    temp <- survreg(Surv(time1, time2, type='interval2') ~1, data=data,
+                    dist='lognormal')
+    qsurvreg(plist, temp$coef, temp$scale, dist='lognormal')
+    }
+
+{if (exists('bootstrap')) {
+    bfit <- bootstrap(tdata, qstat, B=1000)
+    bci <- limits.bca(bfit, probs=c(.025, .975))
+    }
+else {
+    values <- matrix(0, nrow=1000, ncol=length(plist))
+    n <- nrow(tdata)
+    for (i in 1:1000) {
+        subset <- sample(1:n, n, replace=T)
+        values[i,] <- qstat(tdata[subset,])
+        }
+    bci <- t(apply(values,2, quantile, c(.05, .95)))
+    }
+ }
+xmat <- cbind(qsurvreg(plist, tfit$coef, tfit$scale, dist='lognormal'),
+              bci)
+
+
+matplot(xmat, qnorm(plist), 
+        type='l', lty=c(1,2,2), col=c(1,1,1), 
+        log='x', yaxt='n', ylab='Percent', 
+        xlab='Time of Cracking (Hours x 100)')
+axis(2, qnorm(plist), format(100*plist), adj=1)
+title("Turbine Data")
+kfit <- survfit(Surv(time1, time2, type='interval2') ~1, data=tdata)
+points(kfit$time, qnorm(1-kfit$surv), pch='+')
+
+dev.off()  #close the plot file
+
diff --git a/win32/deps/library/survival/tests/r_sas.Rout.save b/win32/deps/library/survival/tests/r_sas.Rout.save
new file mode 100644
index 0000000..131c6b4
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_sas.Rout.save
@@ -0,0 +1,438 @@
+
+R version 2.12.2 (2011-02-25)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Reproduce example 1 in the SAS lifereg documentation
+> #
+> 
+> # this fit doesn't give the same log-lik that they claim
+> motor <- read.table('data.motor', col.names=c('temp', 'time', 'status'))
+> fit1 <- survreg(Surv(time, status) ~ I(1000/(273.2+temp)), motor,
++ 		subset=(temp>150), dist='lognormal')
+> summary(fit1)
+
+Call:
+survreg(formula = Surv(time, status) ~ I(1000/(273.2 + temp)), 
+    data = motor, subset = (temp > 150), dist = "lognormal")
+                         Value Std. Error     z        p
+(Intercept)            -10.471      2.772 -3.78 1.58e-04
+I(1000/(273.2 + temp))   8.322      1.284  6.48 9.13e-11
+Log(scale)              -0.504      0.183 -2.75 5.96e-03
+
+Scale= 0.604 
+
+Log Normal distribution
+Loglik(model)= -145.9   Loglik(intercept only)= -155
+	Chisq= 18.3 on 1 degrees of freedom, p= 1.9e-05 
+Number of Newton-Raphson Iterations: 6 
+n= 30 
+
+> 
+> # This one, with the loglik on the transformed scale (the inappropriate
+> #   scale, Ripley & Venables would argue) does agree.
+> # All coefs are of course identical.
+> fit2 <- survreg(Surv(log(time), status) ~ I(1000/(273.2+temp)), motor,
++ 		subset=(temp>150), dist='gaussian')
+> 
+> 
+> # Give the quantile estimates, which is the lower half of "output 48.1.5"
+> #  in the SAS 9.2 manual
+> 
+> pp1 <- predict(fit1, newdata=list(temp=c(130,150)), p=c(.1, .5, .9),
++ 		      type='quantile', se=T)
+> pp2 <- predict(fit1, newdata=list(temp=c(130,150)), p=c(.1, .5, .9),
++ 		      type='uquantile', se=T)
+> pp1
+$fit
+          [,1]      [,2]     [,3]
+[1,] 12033.185 26095.677 56592.20
+[2,]  4536.877  9838.864 21336.98
+
+$se.fit
+         [,1]      [,2]      [,3]
+[1,] 5482.338 11359.450 26036.917
+[2,] 1443.072  2901.155  7172.343
+
+> 
+> temp130 <- matrix(0, nrow=3, ncol=6)
+> temp130[,1] <- pp1$fit[1,]
+> temp130[,2] <- pp1$se.fit[1,]
+> temp130[,3] <- pp2$fit[1,]
+> temp130[,4] <- pp2$se.fit[1,]
+> temp130[,5] <- exp(pp2$fit[1,] - 1.64*pp2$se.fit[1,])
+> temp130[,6] <- exp(pp2$fit[1,] + 1.64*pp2$se.fit[1,])
+> dimnames(temp130) <- list(c("p=.1", "p=.2", "p=.3"),
++      c("Time", "se(time)", "log(time)", "se[log(time)]", 
++        "lower 90", "upper 90"))
+> print(temp130)
+         Time  se(time) log(time) se[log(time)]  lower 90  upper 90
+p=.1 12033.18  5482.338  9.395424     0.4556015  5700.089  25402.68
+p=.2 26095.68 11359.450 10.169525     0.4353001 12779.950  53285.37
+p=.3 56592.20 26036.917 10.943626     0.4600796 26611.422 120349.71
+> 
+> # A set of examples, copied from the manual pages of SAS procedure
+> #  "reliability", which is part of their QC product.
+> #
+> 
+> color <- c("black", "red", "green", "blue", "magenta", "red4",
++                         "orange", "DarkGreen", "cyan2", "DarkViolet")
+> palette(color)
+> pdf(file='reliability.pdf')
+> 
+> #
+> # Insulating fluids example
+> #
+> fluid <- read.table('data.fluid', col.names=c('time', 'voltage'))
+> 
+> # Adding a -1 to the fit just causes the each group to have it's own
+> # intercept, rather than a global intercept + constrasts.  The strata
+> # statement allows each to have a separate scale
+> ffit <- survreg(Surv(time) ~ voltage + strata(voltage) -1, fluid)
+> 
+> # Get predicted quantiles at each of the voltages
+> # By default predict() would give a line of results for each observation,
+> #  I only want the unique set of x's, i.e., only 4 cases
+> uvolt <- sort(unique(fluid$voltage))      #the unique levels
+> plist <- c(1, 2, 5, 1:9 *10, 95, 99)/100
+> pred  <- predict(ffit, type='quantile', p=plist,
++                  newdata=data.frame(voltage=factor(uvolt)))
+> tfun <- function(x) log(-log(1-x))
+> 
+> matplot(t(pred), tfun(plist), type='l', log='x', lty=1,
++         col=1:4, yaxt='n')
+> axis(2, tfun(plist), format(100*plist), adj=1)
+> 
+> kfit <- survfit(Surv(time) ~ voltage, fluid, type='fleming') #KM fit
+> for (i in 1:4) {
++     temp <- kfit[i]
++     points(temp$time, tfun(1-temp$surv), col=i, pch=i)
++     }
+> 
+> # Now a table
+> temp <- array(0, dim=c(4,4,4))  #4 groups by 4 parameters by 4 stats
+> temp[,1,1] <- ffit$coef         # "EV Location" in SAS manual
+> temp[,2,1] <- ffit$scale        # "EV scale"
+> temp[,3,1] <- exp(ffit$coef)    # "Weibull Scale"
+> temp[,4,1] <- 1/ffit$scale      # "Weibull Shape"
+>  
+> temp[,1,2] <- sqrt(diag(ffit$var))[1:4]   #standard error
+> temp[,2,2] <- sqrt(diag(ffit$var))[5:8] * ffit$scale
+> temp[,3,2] <- temp[,1,2] * temp[,3,1]
+> temp[,4,2] <- temp[,2,2] / (temp[,2,1])^2
+> 
+> temp[,1,3] <- temp[,1,1] - 1.96*temp[,1,2]  #lower conf limits 
+> temp[,1,4]  <- temp[,1,1] + 1.96*temp[,1,2] # upper
+> # log(scale) is the natural parameter, in which the routine did its fitting
+> #  and on which the std errors were computed
+> temp[,2, 3] <- exp(log(ffit$scale) - 1.96*sqrt(diag(ffit$var))[5:8])
+> temp[,2, 4] <- exp(log(ffit$scale) + 1.96*sqrt(diag(ffit$var))[5:8])
+> 
+> temp[,3, 3:4] <- exp(temp[,1,3:4])
+> temp[,4, 3:4] <- 1/temp[,2,4:3]
+> 
+> dimnames(temp) <- list(uvolt, c("EV Location", "EV Scale", "Weibull scale",
++                                 "Weibull shape"),
++                        c("Estimate", "SE", "lower 95% CI", "uppper 95% CI"))
+> print(aperm(temp, c(2,3,1)), digits=5)
+, , 26kV
+
+               Estimate         SE lower 95% CI uppper 95% CI
+EV Location     6.86249    1.10404      4.69857        9.0264
+EV Scale        1.83423    0.96114      0.65677        5.1227
+Weibull scale 955.74665 1055.18620    109.78973     8320.0103
+Weibull shape   0.54519    0.28568      0.19521        1.5226
+
+, , 30kV
+
+              Estimate       SE lower 95% CI uppper 95% CI
+EV Location    4.35133  0.30151      3.76037        4.9423
+EV Scale       0.94446  0.22544      0.59156        1.5079
+Weibull scale 77.58159 23.39176     42.96420      140.0911
+Weibull shape  1.05881  0.25274      0.66318        1.6904
+
+, , 34kV
+
+              Estimate      SE lower 95% CI uppper 95% CI
+EV Location    2.50326 0.31476      1.88632        3.1202
+EV Scale       1.29732 0.22895      0.91796        1.8334
+Weibull scale 12.22222 3.84707      6.59509       22.6506
+Weibull shape  0.77082 0.13603      0.54542        1.0894
+
+, , 38kV
+
+                Estimate      SE lower 95% CI uppper 95% CI
+EV Location   0.00092629 0.27318     -0.53450       0.53635
+EV Scale      0.73367610 0.20380      0.42565       1.26460
+Weibull scale 1.00092672 0.27343      0.58596       1.70976
+Weibull shape 1.36299929 0.37861      0.79077       2.34933
+
+> 
+> rm(temp, uvolt, plist, pred, ffit, kfit) 
+> 
+> #####################################################################
+> # Turbine cracks data
+> cracks <- read.table('data.cracks', col.names=c('time1', 'time2', 'n'))
+> cfit <- survreg(Surv(time1, time2, type='interval2') ~1, 
++                 dist='weibull', data=cracks, weight=n)
+> 
+> summary(cfit)
+
+Call:
+survreg(formula = Surv(time1, time2, type = "interval2") ~ 1, 
+    data = cracks, weights = n, dist = "weibull")
+             Value Std. Error     z        p
+(Intercept)  4.272     0.0744 57.43 0.00e+00
+Log(scale)  -0.396     0.0987 -4.01 6.06e-05
+
+Scale= 0.673 
+
+Weibull distribution
+Loglik(model)= -309.7   Loglik(intercept only)= -309.7
+Number of Newton-Raphson Iterations: 5 
+n= 9 
+
+> #Their output also has Wiebull scale = exp(cfit$coef), shape = 1/(cfit$scale)
+> 
+> # Draw the SAS plot
+> #  The "type=fleming" argument reflects that they estimate hazards rather than
+> #  survival, and forces a Nelson-Aalen hazard estimate
+> #
+> plist <-  c(1, 2, 5, 1:8 *10)/100
+> plot(qsurvreg(plist, cfit$coef, cfit$scale), tfun(plist), log='x',
++      yaxt='n', type='l',
++      xlab="Weibull Plot for Time", ylab="Percent")
+> axis(2, tfun(plist), format(100*plist), adj=1)
+> 
+> kfit <- survfit(Surv(time1, time2, type='interval2') ~1, data=cracks,
++                 weight=n, type='fleming')
+> # Only plot point where n.event > 0 
+> # Why?  I'm trying to match them.  Personally, all should be plotted.
+> who <- (kfit$n.event > 0)
+> points(kfit$time[who], tfun(1-kfit$surv[who]), pch='+')
+> points(kfit$time[who], tfun(1-kfit$upper[who]), pch='-')
+> points(kfit$time[who], tfun(1-kfit$lower[who]), pch='-')
+> 
+> text(rep(3,6), seq(.5, -1.0, length=6), 
++          c("Scale", "Shape", "Right Censored", "Left Censored", 
++            "Interval Censored", "Fit"), adj=0)
+> text(rep(9,6), seq(.5, -1.0, length=6), 
++          c(format(round(exp(cfit$coef), 2)),
++            format(round(1/cfit$scale, 2)),
++            format(tapply(cracks$n, cfit$y[,3], sum)), "ML"), adj=1)
+> 
+> # Now a portion of his percentiles table
+> #  I don't get the same SE as SAS, I haven't checked out why.  The
+> #  estimates and se for the underlying Weibull model are the same.
+> temp <- predict(cfit, type='quantile', p=plist, se=T)
+> tempse <- sqrt(temp$se[1,])
+> mat <- cbind(temp$fit[1,], tempse, 
++              temp$fit[1,] -1.96*tempse, temp$fit[1,] + 1.96*tempse)
+> dimnames(mat) <- list(plist*100, c("Estimate", "SE", "Lower .95", "Upper .95"))
+> print(mat)
+    Estimate       SE Lower .95  Upper .95
+1   3.239372 0.965006  1.347960   5.130784
+2   5.183283 1.121677  2.984796   7.381770
+5   9.705766 1.337420  7.084422  12.327109
+10 15.757758 1.491460 12.834497  18.681020
+20 26.115947 1.622573 22.935705  29.296190
+30 35.812585 1.704575 32.471618  39.153553
+40 45.610018 1.809448 42.063500  49.156536
+50 56.014351 1.973350 52.146585  59.882116
+60 67.592818 2.214072 63.253237  71.932400
+70 81.233457 2.543490 76.248217  86.218697
+80 98.764571 2.991889 92.900469 104.628673
+> 
+> #
+> # The cracks data has a particularly easy estimate, so use
+> # it to double check code
+> time <- c(cracks$time2[1], (cracks$time1 + cracks$time2)[2:8]/2, 
++           cracks$time1[9])
+> cdf  <- cumsum(cracks$n)/sum(cracks$n)
+> all.equal(kfit$time, time)
+[1] TRUE
+> all.equal(kfit$surv, 1-cdf[c(1:8,8)]) 
+[1] TRUE
+> rm(time, cdf, kfit)
+> 
+> 
+> #######################################################
+> #
+> # Valve data
+> #   The input data has id, time, and an indicator of whether there was an
+> #   event at that time: -1=no, 1=yes.  No one has an event at their last time.
+> #  Convert the data to (start, stop] form
+> #  The input data has two engines with dual failures: 328 loses 2 valves at 
+> #    time 653, and number 402 loses 2 at time 139.  For each, fudge the first
+> #    time to be .1 days earlier.
+> #
+> temp <- matrix(scan('data.valve'), byrow=T, ncol=3)
+Read 267 items
+> 
+> n <- nrow(temp)
+> valve <- data.frame(id=temp[,1], 
++                     time1 = c(0, ifelse(diff(temp[,1])==0, temp[-n,2],0)),
++                     time2 = temp[,2],
++                     status= as.numeric(temp[,3]==1))
+> 
+> indx <- (1:nrow(valve))[valve$time1==valve$time2]
+> valve$time1[indx]   <- valve$time1[indx] - .1
+> valve$time2[indx-1] <- valve$time2[indx-1] - .1
+> 
+> kfit <- survfit(Surv(time1, time2, status) ~1, valve, type='fh2')
+> 
+> plot(kfit, fun='cumhaz', ylab="Sample Mean Cumulative Failures", xlab='Time',
++      ylim=range(-log(kfit$lower)))
+> title("Valve replacement data")
+> 
+> # The summary.survfit function doesn't have an option for printing out
+> #   cumulative hazards instead of survival --- need to add that
+> #   so I just reprise the central code of print.summary.survfit
+> xx <- summary(kfit)
+> temp <- cbind(xx$time, xx$n.risk, xx$n.event, -log(xx$surv), 
++               xx$std.err/xx$surv, -log(xx$upper), -log(xx$lower))
+> dimnames(temp) <- list(rep("", nrow(temp)),
++                        c("time", "n.risk", "n.event", "Cum haz", "std.err",
++                          "lower 95%", "upper 95%"))
+> print(temp, digits=2)
+ time n.risk n.event Cum haz std.err lower 95% upper 95%
+   61     41       1   0.024   0.025   0.00000     0.073
+   76     41       1   0.049   0.035   0.00000     0.117
+   84     41       1   0.073   0.043   0.00000     0.157
+   87     41       1   0.098   0.049   0.00077     0.194
+   92     41       1   0.122   0.055   0.01373     0.230
+   98     41       1   0.146   0.060   0.02779     0.265
+  120     41       1   0.171   0.065   0.04268     0.299
+  139     41       1   0.195   0.070   0.05823     0.332
+  139     41       1   0.220   0.074   0.07432     0.365
+  165     41       1   0.244   0.078   0.09085     0.397
+  166     41       1   0.268   0.082   0.10778     0.429
+  202     41       1   0.293   0.086   0.12503     0.460
+  206     41       1   0.317   0.089   0.14257     0.492
+  249     41       1   0.341   0.092   0.16038     0.523
+  254     41       1   0.366   0.096   0.17841     0.553
+  258     41       1   0.390   0.099   0.19665     0.584
+  265     41       1   0.415   0.102   0.21508     0.614
+  276     41       1   0.439   0.105   0.23369     0.644
+  298     41       1   0.463   0.108   0.25245     0.674
+  323     41       1   0.488   0.110   0.27136     0.704
+  326     41       1   0.512   0.113   0.29041     0.734
+  328     41       1   0.537   0.116   0.30958     0.764
+  344     41       1   0.561   0.118   0.32887     0.793
+  348     41       1   0.585   0.121   0.34827     0.822
+  349     41       1   0.610   0.123   0.36777     0.852
+  367     41       1   0.634   0.126   0.38736     0.881
+  377     41       1   0.659   0.128   0.40705     0.910
+  404     40       1   0.684   0.131   0.42720     0.940
+  408     40       1   0.709   0.133   0.44745     0.970
+  410     40       1   0.734   0.136   0.46777     0.999
+  449     40       1   0.759   0.138   0.48818     1.029
+  479     40       1   0.784   0.140   0.50866     1.058
+  497     40       1   0.809   0.143   0.52922     1.088
+  538     40       1   0.834   0.145   0.54985     1.117
+  539     40       1   0.859   0.147   0.57054     1.147
+  561     40       1   0.884   0.149   0.59129     1.176
+  563     40       1   0.909   0.151   0.61211     1.205
+  570     40       1   0.934   0.153   0.63299     1.234
+  573     40       1   0.959   0.155   0.65392     1.263
+  581     38       1   0.985   0.158   0.67578     1.294
+  586     34       1   1.014   0.160   0.69970     1.329
+  604     22       1   1.060   0.167   0.73221     1.387
+  621     17       1   1.119   0.178   0.77014     1.467
+  635     16       1   1.181   0.189   0.81038     1.552
+  640     16       1   1.244   0.200   0.85188     1.635
+  646     13       1   1.320   0.215   0.89854     1.742
+  653      9       1   1.432   0.245   0.95056     1.913
+  653      9       1   1.543   0.272   1.00909     2.076
+> 
+> # Note that I have the same estimates but different SE's.  We are using a
+> #  different estimator. It's a statistical argument as to which is
+> #  better (one could defend both sides): do you favor JASA or Technometrics?
+> rm(temp, kfit, indx, xx)
+>                     
+> ######################################################
+> # Turbine data, lognormal fit
+> turbine <- read.table('data.turbine', 
++                       col.names=c("time1", "time2", "n"))
+> 
+> tfit <- survreg(Surv(time1, time2, type='interval2') ~1, turbine,
++                 dist='lognormal', weights=n, subset=(n>0))
+> 
+> summary(tfit)
+
+Call:
+survreg(formula = Surv(time1, time2, type = "interval2") ~ 1, 
+    data = turbine, weights = n, subset = (n > 0), dist = "lognormal")
+             Value Std. Error     z       p
+(Intercept)  3.700     0.0708 52.23 0.00000
+Log(scale)  -0.329     0.1232 -2.67 0.00763
+
+Scale= 0.72 
+
+Log Normal distribution
+Loglik(model)= -190.7   Loglik(intercept only)= -190.7
+Number of Newton-Raphson Iterations: 6 
+n= 21 
+
+> 
+> # Now, do his plot, but put bootstrap confidence bands on it!
+> #  First, make a simple data set without weights
+> tdata <- turbine[rep(1:nrow(turbine), turbine$n),]
+> 
+> qstat <- function(data) {
++     temp <- survreg(Surv(time1, time2, type='interval2') ~1, data=data,
++                     dist='lognormal')
++     qsurvreg(plist, temp$coef, temp$scale, dist='lognormal')
++     }
+> 
+> {if (exists('bootstrap')) {
++     bfit <- bootstrap(tdata, qstat, B=1000)
++     bci <- limits.bca(bfit, probs=c(.025, .975))
++     }
++ else {
++     values <- matrix(0, nrow=1000, ncol=length(plist))
++     n <- nrow(tdata)
++     for (i in 1:1000) {
++         subset <- sample(1:n, n, replace=T)
++         values[i,] <- qstat(tdata[subset,])
++         }
++     bci <- t(apply(values,2, quantile, c(.05, .95)))
++     }
++  }
+> xmat <- cbind(qsurvreg(plist, tfit$coef, tfit$scale, dist='lognormal'),
++               bci)
+> 
+> 
+> matplot(xmat, qnorm(plist), 
++         type='l', lty=c(1,2,2), col=c(1,1,1), 
++         log='x', yaxt='n', ylab='Percent', 
++         xlab='Time of Cracking (Hours x 100)')
+> axis(2, qnorm(plist), format(100*plist), adj=1)
+> title("Turbine Data")
+> kfit <- survfit(Surv(time1, time2, type='interval2') ~1, data=tdata)
+> points(kfit$time, qnorm(1-kfit$surv), pch='+')
+> 
+> dev.off()  #close the plot file
+null device 
+          1 
+> 
+> 
diff --git a/win32/deps/library/survival/tests/r_scale.R b/win32/deps/library/survival/tests/r_scale.R
new file mode 100644
index 0000000..26f02b7
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_scale.R
@@ -0,0 +1,30 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Verify that scale can be fixed at a value
+#    coefs will differ slightly due to different iteration paths
+tol <- .001
+
+# Intercept only models
+fit1 <- survreg(Surv(time,status) ~ 1, lung)
+fit2 <- survreg(Surv(time,status) ~ 1, lung, scale=fit1$scale)
+all.equal(fit1$coef, fit2$coef, tolerance= tol)
+all.equal(fit1$loglik, fit2$loglik, tolerance= tol)
+
+# multiple covariates
+fit1 <- survreg(Surv(time,status) ~ age + ph.karno, lung)
+fit2 <- survreg(Surv(time,status) ~ age + ph.karno, lung,
+		scale=fit1$scale)
+all.equal(fit1$coef, fit2$coef, tolerance=tol)
+all.equal(fit1$loglik[2], fit2$loglik[2], tolerance=tol)
+
+# penalized models
+fit1 <- survreg(Surv(time, status) ~ pspline(age), lung)
+fit2 <- survreg(Surv(time, status) ~ pspline(age), lung, scale=fit1$scale)
+all.equal(fit1$coef, fit2$coef, tolerance=tol)
+all.equal(fit1$loglik[2], fit2$loglik[2], tolerance=tol)
+
+rm(fit1, fit2, tol)
+
diff --git a/win32/deps/library/survival/tests/r_scale.Rout.save b/win32/deps/library/survival/tests/r_scale.Rout.save
new file mode 100644
index 0000000..0f5f141
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_scale.Rout.save
@@ -0,0 +1,55 @@
+
+R version 2.7.1 (2008-06-23)
+Copyright (C) 2008 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Verify that scale can be fixed at a value
+> #    coefs will differ slightly due to different iteration paths
+> tol <- .001
+> 
+> # Intercept only models
+> fit1 <- survreg(Surv(time,status) ~ 1, lung)
+> fit2 <- survreg(Surv(time,status) ~ 1, lung, scale=fit1$scale)
+> all.equal(fit1$coef, fit2$coef, tolerance= tol)
+[1] TRUE
+> all.equal(fit1$loglik, fit2$loglik, tolerance= tol)
+[1] TRUE
+> 
+> # multiple covariates
+> fit1 <- survreg(Surv(time,status) ~ age + ph.karno, lung)
+> fit2 <- survreg(Surv(time,status) ~ age + ph.karno, lung,
++ 		scale=fit1$scale)
+> all.equal(fit1$coef, fit2$coef, tolerance=tol)
+[1] TRUE
+> all.equal(fit1$loglik[2], fit2$loglik[2], tolerance=tol)
+[1] TRUE
+> 
+> # penalized models
+> fit1 <- survreg(Surv(time, status) ~ pspline(age), lung)
+> fit2 <- survreg(Surv(time, status) ~ pspline(age), lung, scale=fit1$scale)
+> all.equal(fit1$coef, fit2$coef, tolerance=tol)
+[1] TRUE
+> all.equal(fit1$loglik[2], fit2$loglik[2], tolerance=tol)
+[1] TRUE
+> 
+> rm(fit1, fit2, tol)
+> 
+> 
diff --git a/win32/deps/library/survival/tests/r_stanford.R b/win32/deps/library/survival/tests/r_stanford.R
new file mode 100644
index 0000000..c79e0a7
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_stanford.R
@@ -0,0 +1,71 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# The Stanford data from 1980 is used in Escobar and Meeker, Biometrics 1992.
+#	t5 = T5 mismatch score
+#  Their case numbers correspond to a data set sorted by age
+#
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+
+stanford2$t5 <- ifelse(stanford2$t5 <0, NA, stanford2$t5)
+stanford2 <- stanford2[order(stanford2$age, stanford2$time),]
+stanford2$time <- ifelse(stanford2$time==0, .5, stanford2$time)
+
+cage <- stanford2$age - mean(stanford2$age)
+fit1 <- survreg(Surv(time, status) ~ cage + I(cage^2), stanford2,
+		dist='lognormal')
+fit1
+ldcase <- resid(fit1, type='ldcase')
+ldresp <- resid(fit1, type='ldresp')
+# The ldcase and ldresp should be compared to table 1 in Escobar and 
+#  Meeker, Biometrics 1992, p519; the colums they label as (1/2) A_{ii}
+#  They give data for selected cases, entered below as mdata
+mdata <- cbind(c(1,2,4,5,12,16,23,61,66,72,172,182,183,184),
+               c(.035, .244, .141, .159, .194, .402, 0,0, .143, .403,
+                 .178, .033, .005, .015),
+               c(.138, .145, .073, .076, .104, .159, 0,0, .109, .184,
+                 .116, .063, .103, .144))
+dimnames(mdata) <- list(NULL, c("case#", "ldcase", "ldresp"))
+aeq(round(ldcase[mdata[,1]],3), mdata[,2])
+aeq(round(ldresp[mdata[,1]],3), mdata[,3])             
+
+plot1 <- function() {
+    # make their figure 1, 2, and 6
+    temp <- predict(fit1, type='quantile', p=c(.1, .5, .9)) 
+    plot(stanford2$age, stanford2$time, log='y', xlab="Age", ylab="Days",
+	 ylim=range(stanford2$time, temp))
+    matlines(stanford2$age, temp, lty=c(1,2,2), col=1)
+
+    n <- length(ldcase)
+    plot(1:n, ldcase, xlab="Case Number", ylab="(1/2) A", type='l')
+    title (main="Case weight pertubations")
+    plot(1:n, ldresp, xlab="Case Number", ylab="(1/2) A", 
+         ylim=c(0, .2), type='l')
+    title(main="Response pertubations")
+    indx <- which(ldresp > .07)
+    text(indx, ldresp[indx]+ .005, indx%%10, cex=.6)
+    }
+
+postscript('meekerplot.ps')
+plot1()
+dev.off()
+#
+# Stanford predictions in other ways
+#
+fit2 <- survreg(Surv(time, status) ~ poly(age,2), stanford2,
+		dist='lognormal')
+
+p1 <- predict(fit1, type='response')
+p2 <- predict(fit2, type='response')
+aeq(p1, p2)
+
+p3 <- predict(fit2, type='terms', se=T)
+p4 <- predict(fit2, type='lp', se=T)
+p5 <- predict(fit1, type='lp', se=T)
+# aeq(p3$fit + attr(p3$fit, 'constant'), p4$fit)  #R is missing the attribute
+aeq(p4$fit, p5$fit)
+aeq(p3$se.fit, p4$se.fit)  #this one should be false
+aeq(p4$se.fit, p5$se.fit)  #this one true
+
diff --git a/win32/deps/library/survival/tests/r_stanford.Rout.save b/win32/deps/library/survival/tests/r_stanford.Rout.save
new file mode 100644
index 0000000..9d369f9
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_stanford.Rout.save
@@ -0,0 +1,111 @@
+
+R version 2.9.0 (2009-04-17)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # The Stanford data from 1980 is used in Escobar and Meeker, Biometrics 1992.
+> #	t5 = T5 mismatch score
+> #  Their case numbers correspond to a data set sorted by age
+> #
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> stanford2$t5 <- ifelse(stanford2$t5 <0, NA, stanford2$t5)
+> stanford2 <- stanford2[order(stanford2$age, stanford2$time),]
+> stanford2$time <- ifelse(stanford2$time==0, .5, stanford2$time)
+> 
+> cage <- stanford2$age - mean(stanford2$age)
+> fit1 <- survreg(Surv(time, status) ~ cage + I(cage^2), stanford2,
++ 		dist='lognormal')
+> fit1
+Call:
+survreg(formula = Surv(time, status) ~ cage + I(cage^2), data = stanford2, 
+    dist = "lognormal")
+
+Coefficients:
+ (Intercept)         cage    I(cage^2) 
+ 6.717591081 -0.061908619 -0.003504315 
+
+Scale= 2.362872 
+
+Loglik(model)= -863.6   Loglik(intercept only)= -868.8
+	Chisq= 10.5 on 2 degrees of freedom, p= 0.0053 
+n= 184 
+> ldcase <- resid(fit1, type='ldcase')
+> ldresp <- resid(fit1, type='ldresp')
+> # The ldcase and ldresp should be compared to table 1 in Escobar and 
+> #  Meeker, Biometrics 1992, p519; the colums they label as (1/2) A_{ii}
+> #  They give data for selected cases, entered below as mdata
+> mdata <- cbind(c(1,2,4,5,12,16,23,61,66,72,172,182,183,184),
++                c(.035, .244, .141, .159, .194, .402, 0,0, .143, .403,
++                  .178, .033, .005, .015),
++                c(.138, .145, .073, .076, .104, .159, 0,0, .109, .184,
++                  .116, .063, .103, .144))
+> dimnames(mdata) <- list(NULL, c("case#", "ldcase", "ldresp"))
+> aeq(round(ldcase[mdata[,1]],3), mdata[,2])
+[1] TRUE
+> aeq(round(ldresp[mdata[,1]],3), mdata[,3])             
+[1] TRUE
+> 
+> plot1 <- function() {
++     # make their figure 1, 2, and 6
++     temp <- predict(fit1, type='quantile', p=c(.1, .5, .9)) 
++     plot(stanford2$age, stanford2$time, log='y', xlab="Age", ylab="Days",
++ 	 ylim=range(stanford2$time, temp))
++     matlines(stanford2$age, temp, lty=c(1,2,2), col=1)
++ 
++     n <- length(ldcase)
++     plot(1:n, ldcase, xlab="Case Number", ylab="(1/2) A", type='l')
++     title (main="Case weight pertubations")
++     plot(1:n, ldresp, xlab="Case Number", ylab="(1/2) A", 
++          ylim=c(0, .2), type='l')
++     title(main="Response pertubations")
++     indx <- which(ldresp > .07)
++     text(indx, ldresp[indx]+ .005, indx%%10, cex=.6)
++     }
+> 
+> postscript('meekerplot.ps')
+> plot1()
+> dev.off()
+null device 
+          1 
+> #
+> # Stanford predictions in other ways
+> #
+> fit2 <- survreg(Surv(time, status) ~ poly(age,2), stanford2,
++ 		dist='lognormal')
+> 
+> p1 <- predict(fit1, type='response')
+> p2 <- predict(fit2, type='response')
+> aeq(p1, p2)
+[1] TRUE
+> 
+> p3 <- predict(fit2, type='terms', se=T)
+> p4 <- predict(fit2, type='lp', se=T)
+> p5 <- predict(fit1, type='lp', se=T)
+> # aeq(p3$fit + attr(p3$fit, 'constant'), p4$fit)  #R is missing the attribute
+> aeq(p4$fit, p5$fit)
+[1] TRUE
+> aeq(p3$se.fit, p4$se.fit)  #this one should be false
+[1] "Mean relative difference: 0.758395"
+> aeq(p4$se.fit, p5$se.fit)  #this one true
+[1] TRUE
+> 
+> 
diff --git a/win32/deps/library/survival/tests/r_strata.R b/win32/deps/library/survival/tests/r_strata.R
new file mode 100644
index 0000000..35d9f47
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_strata.R
@@ -0,0 +1,60 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Test out the strata capabilities
+#
+tol <- survreg.control()$rel.tolerance
+aeq <- function(x,y,...) all.equal(as.vector(x), as.vector(y), ...)
+
+# intercept only models
+fit1 <- survreg(Surv(time, status) ~ strata(sex), lung)
+fit2 <- survreg(Surv(time, status) ~ strata(sex) + sex, lung)
+fit3a<- survreg(Surv(time,status) ~1, lung, subset=(sex==1))
+fit3b<- survreg(Surv(time,status) ~1, lung, subset=(sex==2))
+
+fit1
+fit2
+aeq(fit2$scale, c(fit3a$scale, fit3b$scale), tolerance=tol)
+aeq(fit2$loglik[2], (fit3a$loglik + fit3b$loglik)[2], tolerance=tol)
+aeq(fit2$coef[1] + 1:2*fit2$coef[2], c(fit3a$coef, fit3b$coef), tolerance=tol)
+
+#penalized models
+fit1 <- survreg(Surv(time, status) ~ pspline(age, theta=.92)+
+                strata(sex), lung)
+fit2 <- survreg(Surv(time, status) ~  pspline(age, theta=.92)+ 
+		strata(sex) + sex, lung)
+fit1
+fit2
+
+age1 <- ifelse(lung$sex==1, lung$age, mean(lung$age))
+age2 <- ifelse(lung$sex==2, lung$age, mean(lung$age))
+fit3 <- survreg(Surv(time,status) ~ pspline(age1, theta=.92) +
+		pspline(age2, theta=.95) + sex + strata(sex), lung)
+fit3a<- survreg(Surv(time,status) ~pspline(age, theta=.92), lung, 
+		    subset=(sex==1))
+fit3b<- survreg(Surv(time,status) ~pspline(age, theta=.95), lung, 
+		     subset=(sex==2))
+fit3b<- survreg(Surv(time,status) ~pspline(age, theta=.95),
+                lung[lung$sex==2,], x=T) 
+#
+# The above line is tricky, and it took me a long time to realize
+#  it's necessity.  The range of age1 = range(age) = 39-82.  That for
+#  age2 = range of females = 41-77.  The basis functions for pspline are
+#  based on age.  If I used data=lung, subset=(sex==2) in fit3b (earlier
+#  form of the test, the pspline function is called before the subset
+#  occurs, and fit3b has a different basis for the second spline than
+#  fit3 does; leading to failure of the all.equal tests below.  A theta
+#  of .95 on one basis is not exactly the same as a theta of .95 on the
+#  other. Coefficients were within 1%, but not the same.  
+
+aeq(fit3$scale, c(fit3a$scale, fit3b$scale))
+aeq(fit3$loglik[2], (fit3a$loglik + fit3b$loglik)[2])
+pred <- predict(fit3)
+aeq(pred[lung$sex==1] , predict(fit3a))
+aeq(pred[lung$sex==2],  predict(fit3b))
+
+
+
+
diff --git a/win32/deps/library/survival/tests/r_strata.Rout.save b/win32/deps/library/survival/tests/r_strata.Rout.save
new file mode 100644
index 0000000..617dad0
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_strata.Rout.save
@@ -0,0 +1,148 @@
+
+R version 2.11.1 (2010-05-31)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Test out the strata capabilities
+> #
+> tol <- survreg.control()$rel.tolerance
+> aeq <- function(x,y,...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> # intercept only models
+> fit1 <- survreg(Surv(time, status) ~ strata(sex), lung)
+> fit2 <- survreg(Surv(time, status) ~ strata(sex) + sex, lung)
+> fit3a<- survreg(Surv(time,status) ~1, lung, subset=(sex==1))
+> fit3b<- survreg(Surv(time,status) ~1, lung, subset=(sex==2))
+> 
+> fit1
+Call:
+survreg(formula = Surv(time, status) ~ strata(sex), data = lung)
+
+Coefficients:
+(Intercept) 
+   6.062171 
+
+Scale:
+    sex=1     sex=2 
+0.8167551 0.6533036 
+
+Loglik(model)= -1152.5   Loglik(intercept only)= -1152.5
+n= 228 
+> fit2
+Call:
+survreg(formula = Surv(time, status) ~ strata(sex) + sex, data = lung)
+
+Coefficients:
+(Intercept)         sex 
+   5.494409    0.380171 
+
+Scale:
+    sex=1     sex=2 
+0.8084294 0.6355816 
+
+Loglik(model)= -1147.1   Loglik(intercept only)= -1152.5
+	Chisq= 10.9 on 1 degrees of freedom, p= 0.00096 
+n= 228 
+> aeq(fit2$scale, c(fit3a$scale, fit3b$scale), tolerance=tol)
+[1] TRUE
+> aeq(fit2$loglik[2], (fit3a$loglik + fit3b$loglik)[2], tolerance=tol)
+[1] TRUE
+> aeq(fit2$coef[1] + 1:2*fit2$coef[2], c(fit3a$coef, fit3b$coef), tolerance=tol)
+[1] TRUE
+> 
+> #penalized models
+> fit1 <- survreg(Surv(time, status) ~ pspline(age, theta=.92)+
++                 strata(sex), lung)
+> fit2 <- survreg(Surv(time, status) ~  pspline(age, theta=.92)+ 
++ 		strata(sex) + sex, lung)
+> fit1
+Call:
+survreg(formula = Surv(time, status) ~ pspline(age, theta = 0.92) + 
+    strata(sex), data = lung)
+
+                          coef    se(coef) se2    Chisq DF   p      
+(Intercept)                6.9036 0.8469   0.5688 66.45 1.00 3.3e-16
+pspline(age, theta = 0.92 -0.0124 0.0067   0.0067  3.45 1.00 6.3e-02
+pspline(age, theta = 0.92                          2.53 2.65 4.0e-01
+
+Scale:
+sex=1 sex=2 
+0.807 0.654 
+
+Iterations: 1 outer, 4 Newton-Raphson
+     Theta= 0.92 
+Degrees of freedom for terms= 0.5 3.6 2.0 
+Likelihood ratio test=6.54  on 3.1 df, p=0.0937  n= 228 
+> fit2
+Call:
+survreg(formula = Surv(time, status) ~ pspline(age, theta = 0.92) + 
+    strata(sex) + sex, data = lung)
+
+                          coef    se(coef) se2     Chisq DF   p      
+(Intercept)                6.3729 0.84471  0.59118 56.92 1.00 4.5e-14
+pspline(age, theta = 0.92 -0.0111 0.00666  0.00666  2.77 1.00 9.6e-02
+pspline(age, theta = 0.92                           2.46 2.68 4.2e-01
+sex                        0.3686 0.11711  0.11685  9.91 1.00 1.6e-03
+
+Scale:
+sex=1 sex=2 
+0.800 0.636 
+
+Iterations: 1 outer, 5 Newton-Raphson
+     Theta= 0.92 
+Degrees of freedom for terms= 0.5 3.7 1.0 2.0 
+Likelihood ratio test=16.8  on 4.2 df, p=0.00245  n= 228 
+> 
+> age1 <- ifelse(lung$sex==1, lung$age, mean(lung$age))
+> age2 <- ifelse(lung$sex==2, lung$age, mean(lung$age))
+> fit3 <- survreg(Surv(time,status) ~ pspline(age1, theta=.92) +
++ 		pspline(age2, theta=.95) + sex + strata(sex), lung)
+> fit3a<- survreg(Surv(time,status) ~pspline(age, theta=.92), lung, 
++ 		    subset=(sex==1))
+> fit3b<- survreg(Surv(time,status) ~pspline(age, theta=.95), lung, 
++ 		     subset=(sex==2))
+> fit3b<- survreg(Surv(time,status) ~pspline(age, theta=.95),
++                 lung[lung$sex==2,], x=T) 
+> #
+> # The above line is tricky, and it took me a long time to realize
+> #  it's necessity.  The range of age1 = range(age) = 39-82.  That for
+> #  age2 = range of females = 41-77.  The basis functions for pspline are
+> #  based on age.  If I used data=lung, subset=(sex==2) in fit3b (earlier
+> #  form of the test, the pspline function is called before the subset
+> #  occurs, and fit3b has a different basis for the second spline than
+> #  fit3 does; leading to failure of the all.equal tests below.  A theta
+> #  of .95 on one basis is not exactly the same as a theta of .95 on the
+> #  other. Coefficients were within 1%, but not the same.  
+> 
+> aeq(fit3$scale, c(fit3a$scale, fit3b$scale))
+[1] TRUE
+> aeq(fit3$loglik[2], (fit3a$loglik + fit3b$loglik)[2])
+[1] TRUE
+> pred <- predict(fit3)
+> aeq(pred[lung$sex==1] , predict(fit3a))
+[1] TRUE
+> aeq(pred[lung$sex==2],  predict(fit3b))
+[1] TRUE
+> 
+> 
+> 
+> 
+> 
diff --git a/win32/deps/library/survival/tests/r_tdist.R b/win32/deps/library/survival/tests/r_tdist.R
new file mode 100644
index 0000000..3e7d572
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_tdist.R
@@ -0,0 +1,41 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Test out the t-distribution
+#
+
+capacitor <- read.table('data.capacitor', row.names=1,
+			col.names=c('', 'days', 'event', 'voltage'))
+# First, a t-dist with 500 df should be nearly identical to the Gaussian
+
+fitig <- survreg(Surv(days, event)~voltage, 
+        dist = "gaussian", data = capacitor)
+fit1 <- survreg(Surv(days, event) ~ voltage,
+		 dist='t', parms=500, capacitor)
+fitig
+summary(fit1, corr=F)
+
+# A more realistic fit
+fit2 <- survreg(Surv(days, event) ~ voltage,
+		 dist='t', parms=5, capacitor)
+print(fit2)
+
+xx <- seq(1,125, by=10)
+resid(fit2, type='response')[xx]
+resid(fit2, type='deviance')[xx]
+resid(fit2, type='working') [xx]
+resid(fit2, type='dfbeta')[xx,]
+resid(fit2, type='dfbetas')[xx,]
+resid(fit2, type='ldresp')[xx]
+resid(fit2, type='ldshape')[xx]
+resid(fit2, type='ldcase')[xx]
+resid(fit2, type='matrix')[xx,]
+
+predict(fit2, type='response')[xx]
+predict(fit2, type='link')[xx]
+predict(fit2, type='terms')[xx,]
+predict(fit2, type='quantile')[xx]
+
+rm(fitig, fit1, fit2, xx)
diff --git a/win32/deps/library/survival/tests/r_tdist.Rout.save b/win32/deps/library/survival/tests/r_tdist.Rout.save
new file mode 100644
index 0000000..24ab699
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_tdist.Rout.save
@@ -0,0 +1,200 @@
+
+R version 2.7.1 (2008-06-23)
+Copyright (C) 2008 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Test out the t-distribution
+> #
+> 
+> capacitor <- read.table('data.capacitor', row.names=1,
++ 			col.names=c('', 'days', 'event', 'voltage'))
+> # First, a t-dist with 500 df should be nearly identical to the Gaussian
+> 
+> fitig <- survreg(Surv(days, event)~voltage, 
++         dist = "gaussian", data = capacitor)
+> fit1 <- survreg(Surv(days, event) ~ voltage,
++ 		 dist='t', parms=500, capacitor)
+> fitig
+Call:
+survreg(formula = Surv(days, event) ~ voltage, data = capacitor, 
+    dist = "gaussian")
+
+Coefficients:
+(Intercept)     voltage 
+ 1764.93485   -53.87917 
+
+Scale= 121.4319 
+
+Loglik(model)= -361.9   Loglik(intercept only)= -420.1
+	Chisq= 116.33 on 1 degrees of freedom, p= 0 
+n= 125 
+> summary(fit1, corr=F)
+
+Call:
+survreg(formula = Surv(days, event) ~ voltage, data = capacitor, 
+    dist = "t", parms = 500)
+             Value Std. Error     z        p
+(Intercept) 1765.8    163.137 10.82 2.64e-27
+voltage      -53.9      5.536 -9.74 2.06e-22
+Log(scale)     4.8      0.106 45.44 0.00e+00
+
+Scale= 121 
+
+Student-t distribution: parmameters= 500
+Loglik(model)= -361.9   Loglik(intercept only)= -420.1
+	Chisq= 116.48 on 1 degrees of freedom, p= 0 
+Number of Newton-Raphson Iterations: 6 
+n= 125 
+
+> 
+> # A more realistic fit
+> fit2 <- survreg(Surv(days, event) ~ voltage,
++ 		 dist='t', parms=5, capacitor)
+> print(fit2)
+Call:
+survreg(formula = Surv(days, event) ~ voltage, data = capacitor, 
+    dist = "t", parms = 5)
+
+Coefficients:
+(Intercept)     voltage 
+ 1819.28554   -55.74915 
+
+Scale= 96.84073 
+
+Loglik(model)= -360.4   Loglik(intercept only)= -424.7
+	Chisq= 128.55 on 1 degrees of freedom, p= 0 
+n= 125 
+> 
+> xx <- seq(1,125, by=10)
+> resid(fit2, type='response')[xx]
+         1         11         21         31         41         51         61 
+-404.30257 -404.30257 -404.30257  -98.07767  -69.80767  -69.80767  -69.80767 
+        71         81         91        101        111        121 
+ -69.80767  -93.94023   97.43977  113.88722  -33.24278  -20.67278 
+> resid(fit2, type='deviance')[xx]
+         1         11         21         31         41         51         61 
+ 0.0933622  0.0933622  0.0933622 -2.2347398  0.7614136  0.7614136  0.7614136 
+        71         81         91        101        111        121 
+ 0.7614136 -2.2156512  1.8511554  2.3107823 -2.0035571 -1.9821491 
+> resid(fit2, type='working') [xx]
+         1         11         21         31         41         51         61 
+  86.38692   86.38692   86.38692 -148.70263   83.43717   83.43717   83.43717 
+        71         81         91        101        111        121 
+  83.43717 -137.49634  467.64123  200.98252  -34.84748  -21.05308 
+> resid(fit2, type='dfbeta')[xx,]
+    (Intercept)     voltage    Log(scale)
+1     0.2105054 -0.00703909 -1.743331e-04
+11    0.2105054 -0.00703909 -1.743331e-04
+21    0.2105054 -0.00703909 -1.743331e-04
+31  -29.7982886  0.93975839 -1.076889e-02
+41    9.6554540 -0.30502561  3.507039e-05
+51    9.6554540 -0.30502561  3.507039e-05
+61    9.6554540 -0.30502561  3.507039e-05
+71    9.6554540 -0.30502561  3.507039e-05
+81   -7.9425298  0.20791541 -6.194989e-03
+91   16.3379622 -0.46035101  2.516742e-02
+101 -13.8131372  0.53202477  4.665894e-03
+111   0.7894992 -0.06147045 -1.308494e-02
+121  -1.7672591  0.03187567 -1.433810e-02
+> resid(fit2, type='dfbetas')[xx,]
+            [,1]         [,2]          [,3]
+1    0.001445482 -0.001447807 -0.0014173482
+11   0.001445482 -0.001447807 -0.0014173482
+21   0.001445482 -0.001447807 -0.0014173482
+31  -0.204616568  0.193290466 -0.0875522695
+41   0.066301320 -0.062737980  0.0002851263
+51   0.066301320 -0.062737980  0.0002851263
+61   0.066301320 -0.062737980  0.0002851263
+71   0.066301320 -0.062737980  0.0002851263
+81  -0.054539145  0.042764254 -0.0503659665
+91   0.112188247 -0.094685467  0.2046140370
+101 -0.094850975  0.109427398  0.0379342550
+111  0.005421271 -0.012643305 -0.1063820631
+121 -0.012135277  0.006556221 -0.1165704260
+> resid(fit2, type='ldresp')[xx]
+           1           11           21           31           41           51 
+6.303033e-06 6.303033e-06 6.303033e-06 4.198946e-02 1.121526e-02 1.121526e-02 
+          61           71           81           91          101          111 
+1.121526e-02 1.121526e-02 3.796054e-02 3.773652e-02 5.409081e-02 4.663892e-02 
+         121 
+4.455789e-02 
+> resid(fit2, type='ldshape')[xx]
+           1           11           21           31           41           51 
+8.281125e-05 8.281125e-05 8.281125e-05 1.355729e-01 1.789400e-04 1.789400e-04 
+          61           71           81           91          101          111 
+1.789400e-04 1.789400e-04 6.346182e-02 9.934752e-02 1.534546e-01 1.958545e-02 
+         121 
+7.748320e-03 
+> resid(fit2, type='ldcase')[xx]
+           1           11           21           31           41           51 
+6.114509e-06 6.114509e-06 6.114509e-06 5.563427e-02 6.706055e-03 6.706055e-03 
+          61           71           81           91          101          111 
+6.706055e-03 6.706055e-03 1.966021e-02 6.803951e-02 3.806159e-02 1.617087e-02 
+         121 
+1.551988e-02 
+> resid(fit2, type='matrix')[xx,]
+              g            dg           ddg          ds         dds
+1   -0.00435825  4.361059e-05 -5.048286e-07 -0.01763187 -0.06488770
+11  -0.00435825  4.361059e-05 -5.048286e-07 -0.01763187 -0.06488770
+21  -0.00435825  4.361059e-05 -5.048286e-07 -0.01763187 -0.06488770
+31  -6.10147902 -1.041351e-02 -7.002908e-05  0.02133278 -1.69495867
+41  -0.28987533  3.893573e-03 -4.666473e-05 -0.27180126  0.04439884
+51  -0.28987533  3.893573e-03 -4.666473e-05 -0.27180126  0.04439884
+61  -0.28987533  3.893573e-03 -4.666473e-05 -0.27180126  0.04439884
+71  -0.28987533  3.893573e-03 -4.666473e-05 -0.27180126  0.04439884
+81  -6.05900320 -1.011644e-02 -7.357605e-05 -0.04965962 -1.59963182
+91  -1.71338808  1.250705e-02 -2.674498e-05  1.21868456 -1.47261500
+101 -6.27430559  1.141518e-02 -5.679687e-05  0.30004293 -2.03671532
+111 -5.61156875 -4.155718e-03 -1.192545e-04 -0.86185235 -0.26993370
+121 -5.56890563 -2.621343e-03 -1.245112e-04 -0.94580955 -0.10740203
+              dsg
+1    0.0001604929
+11   0.0001604929
+21   0.0001604929
+31   0.0172817991
+41  -0.0006360167
+51  -0.0006360167
+61  -0.0006360167
+71  -0.0006360167
+81   0.0170281873
+91  -0.0151130795
+101 -0.0178836167
+111  0.0081200691
+121  0.0051953348
+> 
+> predict(fit2, type='response')[xx]
+ [1] 704.30257 704.30257 704.30257 369.80767 369.80767 369.80767 369.80767
+ [8] 369.80767 202.56023 202.56023  35.31278  35.31278  35.31278
+> predict(fit2, type='link')[xx]
+ [1] 704.30257 704.30257 704.30257 369.80767 369.80767 369.80767 369.80767
+ [8] 369.80767 202.56023 202.56023  35.31278  35.31278  35.31278
+> predict(fit2, type='terms')[xx,]
+         1         11         21         31         41         51         61 
+ 374.63428  374.63428  374.63428   40.13939   40.13939   40.13939   40.13939 
+        71         81         91        101        111        121 
+  40.13939 -127.10806 -127.10806 -294.35550 -294.35550 -294.35550 
+> predict(fit2, type='quantile')[xx]
+ [1]  561.37687  561.37687  561.37687  226.88198  226.88198  226.88198
+ [7]  226.88198  226.88198   59.63453   59.63453 -107.61291 -107.61291
+[13] -107.61291
+> 
+> rm(fitig, fit1, fit2, xx)
+> 
diff --git a/win32/deps/library/survival/tests/r_user.R b/win32/deps/library/survival/tests/r_user.R
new file mode 100644
index 0000000..6b9580e
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_user.R
@@ -0,0 +1,29 @@
+options(na.action=na.exclude)  #preserve length of missings
+library(survival)
+
+#
+# Check out using a "user specified" distribution
+#
+mydist <- c(survreg.distributions$extreme, survreg.distributions$weibull[-1])
+mydist$name <- "Weibull2"
+mydist$dist <- NULL
+
+fit1 <- survreg(Surv(time, status) ~ age + ph.ecog, lung)
+fit2 <- survreg(Surv(time, status) ~ age + ph.ecog, lung, dist=mydist)
+
+all.equal(fit1$coef, fit2$coef)
+all.equal(fit1$var, fit2$var)
+
+#
+# And with an data set containing interval censoring
+#
+idat <- read.table('data.interval', skip=3, header=T, sep=',')
+
+fit1 <- survreg(Surv(ltime, rtime, type='interval2') ~ age + ecog.ps, idat)
+fit2 <- survreg(Surv(ltime, rtime, type='interval2') ~ age + ecog.ps, 
+                data=idat, dist=mydist)
+
+all.equal(fit1$coef, fit2$coef)
+all.equal(fit1$var, fit2$var)
+all.equal(fit1$log, fit2$log)
+
diff --git a/win32/deps/library/survival/tests/r_user.Rout.save b/win32/deps/library/survival/tests/r_user.Rout.save
new file mode 100644
index 0000000..84406e4
--- /dev/null
+++ b/win32/deps/library/survival/tests/r_user.Rout.save
@@ -0,0 +1,53 @@
+
+R version 2.9.0 (2009-04-17)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude)  #preserve length of missings
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Check out using a "user specified" distribution
+> #
+> mydist <- c(survreg.distributions$extreme, survreg.distributions$weibull[-1])
+> mydist$name <- "Weibull2"
+> mydist$dist <- NULL
+> 
+> fit1 <- survreg(Surv(time, status) ~ age + ph.ecog, lung)
+> fit2 <- survreg(Surv(time, status) ~ age + ph.ecog, lung, dist=mydist)
+> 
+> all.equal(fit1$coef, fit2$coef)
+[1] TRUE
+> all.equal(fit1$var, fit2$var)
+[1] TRUE
+> 
+> #
+> # And with an data set containing interval censoring
+> #
+> idat <- read.table('data.interval', skip=3, header=T, sep=',')
+> 
+> fit1 <- survreg(Surv(ltime, rtime, type='interval2') ~ age + ecog.ps, idat)
+> fit2 <- survreg(Surv(ltime, rtime, type='interval2') ~ age + ecog.ps, 
++                 data=idat, dist=mydist)
+> 
+> all.equal(fit1$coef, fit2$coef)
+[1] TRUE
+> all.equal(fit1$var, fit2$var)
+[1] TRUE
+> all.equal(fit1$log, fit2$log)
+[1] TRUE
+> 
+> 
diff --git a/win32/deps/library/survival/tests/ratetable.R b/win32/deps/library/survival/tests/ratetable.R
new file mode 100644
index 0000000..f841a9c
--- /dev/null
+++ b/win32/deps/library/survival/tests/ratetable.R
@@ -0,0 +1,63 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Generate each of the messages from is.ratetable
+#
+{if (is.R()) mdy.date <- function(m, d, y) {
+    y <- ifelse(y<100, y+1900, y)
+    as.Date(paste(m,d,y, sep='/'), "%m/%d/%Y")
+    }
+else mdy.date <- function(m,d,y) {
+    y <- ifelse(y<100, y+1900, y)
+    timeDate(paste(y, m, d, sep='/'), in.format="%Y/%m/%d")
+    }
+ }
+
+temp <- runif(21*2*4)
+
+# Good
+attributes(temp) <- list(dim=c(21,2,4),
+    dimnames=list(c(as.character(75:95)), c("male","female"),
+                  c(as.character(2000:2003))),
+    dimid=c("age","sex","year"),
+    type=c(2,1,4),
+    cutpoints=list(c(75:95), NULL, mdy.date(1,1,2000) +c(0:3)*366.25),
+    class='ratetable')
+is.ratetable(temp)
+
+# Factor problem + cutpoints length
+attributes(temp) <- list(dim=c(21,2,4),
+    dimnames=list(c(as.character(75:95)), c("male","female"),
+                  c(as.character(2000:2003))),
+    dimid=c("age","sex","year"),
+    type=c(1,1,2),
+    cutpoints=list(c(75:95), NULL, mdy.date(1,1,2000) +c(0:4)*366.25),
+    class='ratetable')
+is.ratetable(temp, verbose=T)
+ 
+                    
+# missing dimid attribute + unsorted cutpoint
+attributes(temp) <- list(dim=c(21,2,4),
+    dimnames=list(c(as.character(75:95)), c("male","female"),
+                  c(as.character(2000:2003))),
+    type=c(2,1,3),
+    cutpoints=list(c(75:95), NULL, mdy.date(1,1,2000) +c(4:1)*366.25),
+    class='ratetable')
+is.ratetable(temp, verbose=T)
+
+# wrong length for dimid and type, illegal type
+attributes(temp) <- list(dim=c(21,2,4),
+    dimnames=list(c(as.character(75:95)), c("male","female"),
+                  c(as.character(2000:2003))),
+    dimid=c("age","sex","year", "zed"),
+    type=c(2,1,3,6),
+    cutpoints=list(c(75:95), NULL, mdy.date(1,1,2000) +c(0:3)*366.25),
+    class='ratetable')
+is.ratetable(temp, verbose=T)
+
+
+# Print and summary
+print(survexp.us[1:30,,c('1953', '1985')] )
+summary(survexp.usr)
diff --git a/win32/deps/library/survival/tests/ratetable.Rout.save b/win32/deps/library/survival/tests/ratetable.Rout.save
new file mode 100644
index 0000000..89c28b9
--- /dev/null
+++ b/win32/deps/library/survival/tests/ratetable.Rout.save
@@ -0,0 +1,164 @@
+
+R version 2.11.1 (2010-05-31)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Generate each of the messages from is.ratetable
+> #
+> {if (is.R()) mdy.date <- function(m, d, y) {
++     y <- ifelse(y<100, y+1900, y)
++     as.Date(paste(m,d,y, sep='/'), "%m/%d/%Y")
++     }
++ else mdy.date <- function(m,d,y) {
++     y <- ifelse(y<100, y+1900, y)
++     timeDate(paste(y, m, d, sep='/'), in.format="%Y/%m/%d")
++     }
++  }
+> 
+> temp <- runif(21*2*4)
+> 
+> # Good
+> attributes(temp) <- list(dim=c(21,2,4),
++     dimnames=list(c(as.character(75:95)), c("male","female"),
++                   c(as.character(2000:2003))),
++     dimid=c("age","sex","year"),
++     type=c(2,1,4),
++     cutpoints=list(c(75:95), NULL, mdy.date(1,1,2000) +c(0:3)*366.25),
++     class='ratetable')
+> is.ratetable(temp)
+[1] TRUE
+> 
+> # Factor problem + cutpoints length
+> attributes(temp) <- list(dim=c(21,2,4),
++     dimnames=list(c(as.character(75:95)), c("male","female"),
++                   c(as.character(2000:2003))),
++     dimid=c("age","sex","year"),
++     type=c(1,1,2),
++     cutpoints=list(c(75:95), NULL, mdy.date(1,1,2000) +c(0:4)*366.25),
++     class='ratetable')
+> is.ratetable(temp, verbose=T)
+[1] "type[ 1 ] is 1; cutpoint should be null"
+[2] "wrong length for cutpoints 3"           
+>  
+>                     
+> # missing dimid attribute + unsorted cutpoint
+> attributes(temp) <- list(dim=c(21,2,4),
++     dimnames=list(c(as.character(75:95)), c("male","female"),
++                   c(as.character(2000:2003))),
++     type=c(2,1,3),
++     cutpoints=list(c(75:95), NULL, mdy.date(1,1,2000) +c(4:1)*366.25),
++     class='ratetable')
+> is.ratetable(temp, verbose=T)
+[1] "missing attribute: dimid"           "wrong length for dimid"            
+[3] "unsorted cutpoints for dimension 3"
+> 
+> # wrong length for dimid and type, illegal type
+> attributes(temp) <- list(dim=c(21,2,4),
++     dimnames=list(c(as.character(75:95)), c("male","female"),
++                   c(as.character(2000:2003))),
++     dimid=c("age","sex","year", "zed"),
++     type=c(2,1,3,6),
++     cutpoints=list(c(75:95), NULL, mdy.date(1,1,2000) +c(0:3)*366.25),
++     class='ratetable')
+> is.ratetable(temp, verbose=T)
+[1] "wrong length for dimid"              
+[2] "type attribute must be 1, 2, 3, or 4"
+[3] "wrong length for type attribute"     
+> 
+> 
+> # Print and summary
+> print(survexp.us[1:30,,c('1953', '1985')] )
+Rate table with dimension(s): age sex year 
+, , 1953
+
+                male       female
+0-1d    1.157372e-02 8.844000e-03
+1-7d    1.446302e-03 1.027012e-03
+7-28d   1.379175e-04 1.106070e-04
+28-365d 2.814865e-05 2.346732e-05
+1       6.169963e-06 5.423669e-06
+2       3.860391e-06 3.161334e-06
+3       2.909162e-06 2.424089e-06
+4       2.448747e-06 1.950051e-06
+5       2.210350e-06 1.692520e-06
+6       1.988411e-06 1.481583e-06
+7       1.813065e-06 1.298053e-06
+8       1.684303e-06 1.169315e-06
+9       1.593900e-06 1.087146e-06
+10      1.569249e-06 1.051541e-06
+11      1.626780e-06 1.043325e-06
+12      1.771975e-06 1.089887e-06
+13      2.062389e-06 1.199447e-06
+14      2.462443e-06 1.347361e-06
+15      2.944779e-06 1.550072e-06
+16      3.410754e-06 1.752797e-06
+17      3.819231e-06 1.928140e-06
+18      4.164702e-06 2.056914e-06
+19      4.504735e-06 2.169256e-06
+20      4.822866e-06 2.289823e-06
+21      5.086174e-06 2.410395e-06
+22      5.278187e-06 2.511789e-06
+23      5.335795e-06 2.613186e-06
+24      5.286423e-06 2.714587e-06
+25      5.198648e-06 2.815992e-06
+26      5.130079e-06 2.917400e-06
+
+, , 1985
+
+                male       female
+0-1d    4.429985e-03 3.701977e-03
+1-7d    3.595869e-04 2.735770e-04
+7-28d   6.385309e-05 5.193376e-05
+28-365d 1.277308e-05 9.947467e-06
+1       2.451492e-06 2.108968e-06
+2       1.739100e-06 1.341882e-06
+3       1.369277e-06 1.013196e-06
+4       1.122754e-06 7.940941e-07
+5       9.995021e-07 7.530142e-07
+6       9.173378e-07 6.571643e-07
+7       8.488687e-07 5.887021e-07
+8       7.530153e-07 5.339338e-07
+9       6.297793e-07 4.791661e-07
+10      5.202416e-07 4.517830e-07
+11      5.202416e-07 4.517830e-07
+12      7.530134e-07 5.202412e-07
+13      1.232311e-06 6.571636e-07
+14      1.862374e-06 8.351727e-07
+15      2.533686e-06 1.026887e-06
+16      3.150341e-06 1.204921e-06
+17      3.657474e-06 1.341877e-06
+18      4.041315e-06 1.424054e-06
+19      4.315527e-06 1.465144e-06
+20      4.603481e-06 1.506233e-06
+21      4.864041e-06 1.561021e-06
+22      5.069759e-06 1.615810e-06
+23      5.138331e-06 1.643205e-06
+24      5.152035e-06 1.670600e-06
+25      5.110881e-06 1.697995e-06
+26      5.097158e-06 1.725391e-06
+
+> summary(survexp.usr)
+ Rate table with 4 dimensions:
+	age ranges from 0 to 39812.25; with 113 categories
+	sex has levels of: male female
+	race has levels of: white black
+	year ranges from 1940-01-01 to 2004-01-01; with 65 categories
+> 
diff --git a/win32/deps/library/survival/tests/rounding.R b/win32/deps/library/survival/tests/rounding.R
new file mode 100644
index 0000000..4b94256
--- /dev/null
+++ b/win32/deps/library/survival/tests/rounding.R
@@ -0,0 +1,14 @@
+library(survival)
+#
+# Survival curves could fail with data that was almost exact.
+#  The calculations use both unique() and table(), which don't 
+#  necessarily give the same number of values.
+# Check that the routine handles this properly
+#  
+
+tdata <- data.frame(time=c(1,2, sqrt(2)^2, 2, sqrt(2)^2),
+                    status=rep(1,5), 
+                    group=c(1,1,1,2,2))
+fit <- survfit(Surv(time, status) ~ group, data=tdata)
+
+all.equal(sum(fit$strata), length(fit$time))
diff --git a/win32/deps/library/survival/tests/rounding.Rout.save b/win32/deps/library/survival/tests/rounding.Rout.save
new file mode 100644
index 0000000..6d314cc
--- /dev/null
+++ b/win32/deps/library/survival/tests/rounding.Rout.save
@@ -0,0 +1,34 @@
+
+R version 2.11.0 (2010-04-22)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(survival)
+Loading required package: splines
+> #
+> # Survival curves could fail with data that was almost exact.
+> #  The calculations use both unique() and table(), which don't 
+> #  necessarily give the same number of values.
+> # Check that the routine handles this properly
+> #  
+> 
+> tdata <- data.frame(time=c(1,2, sqrt(2)^2, 2, sqrt(2)^2),
++                     status=rep(1,5), 
++                     group=c(1,1,1,2,2))
+> fit <- survfit(Surv(time, status) ~ group, data=tdata)
+> 
+> all.equal(sum(fit$strata), length(fit$time))
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/singtest.R b/win32/deps/library/survival/tests/singtest.R
new file mode 100644
index 0000000..5fd21d6
--- /dev/null
+++ b/win32/deps/library/survival/tests/singtest.R
@@ -0,0 +1,22 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# A simple test of the singular=ok option
+#
+test1 <- data.frame(time=  c(4, 3,1,1,2,2,3),
+		    status=c(1,NA,1,0,1,1,0),
+		    x=     c(0, 2,1,1,1,0,0))
+
+temp <- rep(0:3, rep(7,4))
+
+stest <- data.frame(start  = 10*temp,
+		    stop   = 10*temp + test1$time,
+		    status = rep(test1$status,4),
+		    x      = c(test1$x+ 1:7, rep(test1$x,3)),
+		    epoch  = rep(1:4, rep(7,4)))
+
+fit1 <- coxph(Surv(start, stop, status) ~ x * factor(epoch), stest)
+fit1$coef    # elements 2:4 should be NA
+all.equal(is.na(fit1$coef), c(F,T,T,T,F,F,F), check.attributes=FALSE)
diff --git a/win32/deps/library/survival/tests/singtest.Rout.save b/win32/deps/library/survival/tests/singtest.Rout.save
new file mode 100644
index 0000000..8036046
--- /dev/null
+++ b/win32/deps/library/survival/tests/singtest.Rout.save
@@ -0,0 +1,50 @@
+
+R version 2.12.2 (2011-02-25)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # A simple test of the singular=ok option
+> #
+> test1 <- data.frame(time=  c(4, 3,1,1,2,2,3),
++ 		    status=c(1,NA,1,0,1,1,0),
++ 		    x=     c(0, 2,1,1,1,0,0))
+> 
+> temp <- rep(0:3, rep(7,4))
+> 
+> stest <- data.frame(start  = 10*temp,
++ 		    stop   = 10*temp + test1$time,
++ 		    status = rep(test1$status,4),
++ 		    x      = c(test1$x+ 1:7, rep(test1$x,3)),
++ 		    epoch  = rep(1:4, rep(7,4)))
+> 
+> fit1 <- coxph(Surv(start, stop, status) ~ x * factor(epoch), stest)
+Warning message:
+In coxph(Surv(start, stop, status) ~ x * factor(epoch), stest) :
+  X matrix deemed to be singular; variable 2 3 4
+> fit1$coef    # elements 2:4 should be NA
+               x   factor(epoch)2   factor(epoch)3   factor(epoch)4 
+       0.1041579               NA               NA               NA 
+x:factor(epoch)2 x:factor(epoch)3 x:factor(epoch)4 
+       1.5726996        1.5726996        1.5726996 
+> all.equal(is.na(fit1$coef), c(F,T,T,T,F,F,F), check.attributes=FALSE)
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/strata2.R b/win32/deps/library/survival/tests/strata2.R
new file mode 100644
index 0000000..1436177
--- /dev/null
+++ b/win32/deps/library/survival/tests/strata2.R
@@ -0,0 +1,17 @@
+# 
+# New tests 4/2010 to validate strata by covariate interactions
+#
+library(survival)
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+
+tdata <- lung
+tdata$sex <- lung$sex +3
+
+fit1 <- coxph(Surv(time, status) ~ age + sex:strata(ph.ecog), lung)
+fit2 <- coxph(Surv(time, status) ~ age + sex:strata(ph.ecog), tdata)
+
+aeq(fit1$coef, fit2$coef)
+aeq(fit1$var, fit2$var)
+aeq(predict(fit1), predict(fit2))
diff --git a/win32/deps/library/survival/tests/strata2.Rout.save b/win32/deps/library/survival/tests/strata2.Rout.save
new file mode 100644
index 0000000..3ed6108
--- /dev/null
+++ b/win32/deps/library/survival/tests/strata2.Rout.save
@@ -0,0 +1,45 @@
+
+R version 2.11.1 (2010-05-31)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> # 
+> # New tests 4/2010 to validate strata by covariate interactions
+> #
+> library(survival)
+Loading required package: splines
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> 
+> tdata <- lung
+> tdata$sex <- lung$sex +3
+> 
+> fit1 <- coxph(Surv(time, status) ~ age + sex:strata(ph.ecog), lung)
+Warning message:
+In coxph(Surv(time, status) ~ age + sex:strata(ph.ecog), lung) :
+  X matrix deemed to be singular; variable 5
+> fit2 <- coxph(Surv(time, status) ~ age + sex:strata(ph.ecog), tdata)
+Warning message:
+In coxph(Surv(time, status) ~ age + sex:strata(ph.ecog), tdata) :
+  X matrix deemed to be singular; variable 5
+> 
+> aeq(fit1$coef, fit2$coef)
+[1] TRUE
+> aeq(fit1$var, fit2$var)
+[1] TRUE
+> aeq(predict(fit1), predict(fit2))
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/stratatest.R b/win32/deps/library/survival/tests/stratatest.R
new file mode 100644
index 0000000..c0dee39
--- /dev/null
+++ b/win32/deps/library/survival/tests/stratatest.R
@@ -0,0 +1,43 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Trivial test of stratified residuals
+#   Make a second strata = replicate of the first, and I should get the
+#   exact same answers
+test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0))
+test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
+                    stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
+                    event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
+                    x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+
+temp <- as.matrix(test1)
+n    <- nrow(temp)
+ndead<- sum(test1$status[!is.na(test1$status)])
+temp <- data.frame(rbind(temp, temp)) #later releases of S have rbind.data.frame
+tstrat <- rep(1:2, c(n,n))
+
+fit1 <- coxph(Surv(time, status) ~x, test1)
+fit2 <- coxph(Surv(time, status) ~x + strata(tstrat), temp)
+
+all.equal(resid(fit1) , (resid(fit2))[1:n])
+all.equal(resid(fit1, type='score') , (resid(fit2, type='score'))[1:n])
+all.equal(resid(fit1, type='schoe') , (resid(fit2, type='schoe'))[1:ndead])
+
+
+#AG model
+temp <- as.matrix(test2)
+n    <- nrow(temp)
+ndead<- sum(test2$event[!is.na(test2$event)])
+temp <- data.frame(rbind(temp, temp))
+tstrat <- rep(1:2, c(n,n))
+
+fit1 <- coxph(Surv(start, stop, event) ~x, test2)
+fit2 <- coxph(Surv(start, stop, event) ~x + strata(tstrat), temp)
+
+all.equal(resid(fit1) , (resid(fit2))[1:n])
+all.equal(resid(fit1, type='score') , (resid(fit2, type='score'))[1:n])
+all.equal(resid(fit1, type='schoe') , (resid(fit2, type='schoe'))[1:ndead])
diff --git a/win32/deps/library/survival/tests/stratatest.Rout.save b/win32/deps/library/survival/tests/stratatest.Rout.save
new file mode 100644
index 0000000..2e96f3a
--- /dev/null
+++ b/win32/deps/library/survival/tests/stratatest.Rout.save
@@ -0,0 +1,68 @@
+
+R version 2.7.1 (2008-06-23)
+Copyright (C) 2008 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Trivial test of stratified residuals
+> #   Make a second strata = replicate of the first, and I should get the
+> #   exact same answers
+> test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0))
+> test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
++                     stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
++                     event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
++                     x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+> 
+> temp <- as.matrix(test1)
+> n    <- nrow(temp)
+> ndead<- sum(test1$status[!is.na(test1$status)])
+> temp <- data.frame(rbind(temp, temp)) #later releases of S have rbind.data.frame
+> tstrat <- rep(1:2, c(n,n))
+> 
+> fit1 <- coxph(Surv(time, status) ~x, test1)
+> fit2 <- coxph(Surv(time, status) ~x + strata(tstrat), temp)
+> 
+> all.equal(resid(fit1) , (resid(fit2))[1:n])
+[1] TRUE
+> all.equal(resid(fit1, type='score') , (resid(fit2, type='score'))[1:n])
+[1] TRUE
+> all.equal(resid(fit1, type='schoe') , (resid(fit2, type='schoe'))[1:ndead])
+[1] TRUE
+> 
+> 
+> #AG model
+> temp <- as.matrix(test2)
+> n    <- nrow(temp)
+> ndead<- sum(test2$event[!is.na(test2$event)])
+> temp <- data.frame(rbind(temp, temp))
+> tstrat <- rep(1:2, c(n,n))
+> 
+> fit1 <- coxph(Surv(start, stop, event) ~x, test2)
+> fit2 <- coxph(Surv(start, stop, event) ~x + strata(tstrat), temp)
+> 
+> all.equal(resid(fit1) , (resid(fit2))[1:n])
+[1] TRUE
+> all.equal(resid(fit1, type='score') , (resid(fit2, type='score'))[1:n])
+[1] TRUE
+> all.equal(resid(fit1, type='schoe') , (resid(fit2, type='schoe'))[1:ndead])
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/summary_survfit.R b/win32/deps/library/survival/tests/summary_survfit.R
new file mode 100644
index 0000000..9ccdd9e
--- /dev/null
+++ b/win32/deps/library/survival/tests/summary_survfit.R
@@ -0,0 +1,5 @@
+## check that the scale option to summary.survfit works
+##  Marc Schwartz reported this as a bug in 2.35-3.
+library(survival)
+summary( survfit( Surv(futime, fustat)~1, data=ovarian))
+summary( survfit( Surv(futime, fustat)~1, data=ovarian), scale=365.25)
diff --git a/win32/deps/library/survival/tests/summary_survfit.Rout.save b/win32/deps/library/survival/tests/summary_survfit.Rout.save
new file mode 100644
index 0000000..2a2e81a
--- /dev/null
+++ b/win32/deps/library/survival/tests/summary_survfit.Rout.save
@@ -0,0 +1,54 @@
+
+R version 2.9.0 Under development (unstable) (2009-03-17 r48144)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> ## check that the scale option to summary.survfit works
+> ##  Marc Schwartz reported this as a bug in 2.35-3.
+> library(survival)
+Loading required package: splines
+> summary( survfit( Surv(futime, fustat)~1, data=ovarian))
+Call: survfit(formula = Surv(futime, fustat) ~ 1, data = ovarian)
+
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+   59     26       1    0.962  0.0377        0.890        1.000
+  115     25       1    0.923  0.0523        0.826        1.000
+  156     24       1    0.885  0.0627        0.770        1.000
+  268     23       1    0.846  0.0708        0.718        0.997
+  329     22       1    0.808  0.0773        0.670        0.974
+  353     21       1    0.769  0.0826        0.623        0.949
+  365     20       1    0.731  0.0870        0.579        0.923
+  431     17       1    0.688  0.0919        0.529        0.894
+  464     15       1    0.642  0.0965        0.478        0.862
+  475     14       1    0.596  0.0999        0.429        0.828
+  563     12       1    0.546  0.1032        0.377        0.791
+  638     11       1    0.497  0.1051        0.328        0.752
+> summary( survfit( Surv(futime, fustat)~1, data=ovarian), scale=365.25)
+Call: survfit(formula = Surv(futime, fustat) ~ 1, data = ovarian)
+
+  time n.risk n.event survival std.err lower 95% CI upper 95% CI
+ 0.162     26       1    0.962  0.0377        0.890        1.000
+ 0.315     25       1    0.923  0.0523        0.826        1.000
+ 0.427     24       1    0.885  0.0627        0.770        1.000
+ 0.734     23       1    0.846  0.0708        0.718        0.997
+ 0.901     22       1    0.808  0.0773        0.670        0.974
+ 0.966     21       1    0.769  0.0826        0.623        0.949
+ 0.999     20       1    0.731  0.0870        0.579        0.923
+ 1.180     17       1    0.688  0.0919        0.529        0.894
+ 1.270     15       1    0.642  0.0965        0.478        0.862
+ 1.300     14       1    0.596  0.0999        0.429        0.828
+ 1.541     12       1    0.546  0.1032        0.377        0.791
+ 1.747     11       1    0.497  0.1051        0.328        0.752
+> 
diff --git a/win32/deps/library/survival/tests/surv.R b/win32/deps/library/survival/tests/surv.R
new file mode 100644
index 0000000..ec5d6e9
--- /dev/null
+++ b/win32/deps/library/survival/tests/surv.R
@@ -0,0 +1,23 @@
+#
+library(survival)
+
+# Some simple tests of the Surv function
+#  The first two are motivated by a bug, pointed out by Kevin Buhr,
+#    where a mixture of NAs and invalid values didn't work right
+#  Even for the simplest things a test case is good.
+#
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+temp <- Surv(c(1, 10, 20, 30), c(2, NA, 0, 40), c(1,1,1,1))
+aeq(temp, c(1,10,NA,30,  2,NA,0,40, 1,1,1,1))
+
+temp <- Surv(c(1, 10, 20, 30), c(2, NA, 0, 40), type='interval2')
+aeq(temp, c(1,10,NA,30,  2,1,0,40, 3,0,3,3))
+
+temp <- Surv(1:5)
+aeq(temp, c(1:5, 1,1,1,1,1))
+
+temp1 <- Surv(c(1,10,NA, 30, 30), c(1,NA,10,20, 40), type='interval2')
+temp2 <- Surv(c(1,10,10,30,30), c(9, NA, 5, 20,40), c(1, 0, 2,3,3),
+              type='interval')
+aeq(temp1, temp2)
+aeq(temp1, c(1,10,10,NA,30, 1,1,1,20, 40, 1,0,2,3,3))
diff --git a/win32/deps/library/survival/tests/surv.Rout.save b/win32/deps/library/survival/tests/surv.Rout.save
new file mode 100644
index 0000000..5c66f4a
--- /dev/null
+++ b/win32/deps/library/survival/tests/surv.Rout.save
@@ -0,0 +1,59 @@
+
+R version 2.9.0 (2009-04-17)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(survival)
+Loading required package: splines
+> 
+> # Some simple tests of the Surv function
+> #  The first two are motivated by a bug, pointed out by Kevin Buhr,
+> #    where a mixture of NAs and invalid values didn't work right
+> #  Even for the simplest things a test case is good.
+> #
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> temp <- Surv(c(1, 10, 20, 30), c(2, NA, 0, 40), c(1,1,1,1))
+Warning message:
+In Surv(c(1, 10, 20, 30), c(2, NA, 0, 40), c(1, 1, 1, 1)) :
+  Stop time must be > start time, NA created
+> aeq(temp, c(1,10,NA,30,  2,NA,0,40, 1,1,1,1))
+[1] TRUE
+> 
+> temp <- Surv(c(1, 10, 20, 30), c(2, NA, 0, 40), type='interval2')
+Warning message:
+In Surv(c(1, 10, 20, 30), c(2, NA, 0, 40), type = "interval2") :
+  Invalid interval: start > stop, NA created
+> aeq(temp, c(1,10,NA,30,  2,1,0,40, 3,0,3,3))
+[1] TRUE
+> 
+> temp <- Surv(1:5)
+> aeq(temp, c(1:5, 1,1,1,1,1))
+[1] TRUE
+> 
+> temp1 <- Surv(c(1,10,NA, 30, 30), c(1,NA,10,20, 40), type='interval2')
+Warning message:
+In Surv(c(1, 10, NA, 30, 30), c(1, NA, 10, 20, 40), type = "interval2") :
+  Invalid interval: start > stop, NA created
+> temp2 <- Surv(c(1,10,10,30,30), c(9, NA, 5, 20,40), c(1, 0, 2,3,3),
++               type='interval')
+Warning message:
+In Surv(c(1, 10, 10, 30, 30), c(9, NA, 5, 20, 40), c(1, 0, 2, 3,  :
+  Invalid interval: start > stop, NA created
+> aeq(temp1, temp2)
+[1] TRUE
+> aeq(temp1, c(1,10,10,NA,30, 1,1,1,20, 40, 1,0,2,3,3))
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/survfit2.R b/win32/deps/library/survival/tests/survfit2.R
new file mode 100644
index 0000000..04ead6d
--- /dev/null
+++ b/win32/deps/library/survival/tests/survfit2.R
@@ -0,0 +1,13 @@
+library(survival)
+#
+# Check out the Dory&Korn confidence interval option
+#
+tdata <- data.frame(time= 1:10,
+                    status=c(1,0,1,0,1,0,0,0,1,0))
+
+fit1 <- survfit(Surv(time, status) ~1, tdata, conf.lower='modified')
+fit2 <- survfit(Surv(time, status) ~1, tdata)
+
+stdlow <- fit2$std * sqrt(c(1, 10/9, 1, 8/7, 1, 6/5, 6/4, 6/3, 1, 2/1))
+lower <- exp(log(fit2$surv) - qnorm(.975)*stdlow)
+all.equal(fit1$lower, lower, check.attributes=FALSE)
diff --git a/win32/deps/library/survival/tests/survfit2.Rout.save b/win32/deps/library/survival/tests/survfit2.Rout.save
new file mode 100644
index 0000000..8fef50d
--- /dev/null
+++ b/win32/deps/library/survival/tests/survfit2.Rout.save
@@ -0,0 +1,33 @@
+
+R version 2.11.0 (2010-04-22)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(survival)
+Loading required package: splines
+> #
+> # Check out the Dory&Korn confidence interval option
+> #
+> tdata <- data.frame(time= 1:10,
++                     status=c(1,0,1,0,1,0,0,0,1,0))
+> 
+> fit1 <- survfit(Surv(time, status) ~1, tdata, conf.lower='modified')
+> fit2 <- survfit(Surv(time, status) ~1, tdata)
+> 
+> stdlow <- fit2$std * sqrt(c(1, 10/9, 1, 8/7, 1, 6/5, 6/4, 6/3, 1, 2/1))
+> lower <- exp(log(fit2$surv) - qnorm(.975)*stdlow)
+> all.equal(fit1$lower, lower, check.attributes=FALSE)
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/survreg2.R b/win32/deps/library/survival/tests/survreg2.R
new file mode 100644
index 0000000..dd31368
--- /dev/null
+++ b/win32/deps/library/survival/tests/survreg2.R
@@ -0,0 +1,62 @@
+library(survival)
+options(na.action=na.exclude, contrasts=c('contr.treatment', 'contr.poly'))
+
+# Verify stratified fits in a simple way, but combining two data
+#  sets and doing a single fit
+#
+aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+
+tdata <- data.frame(time=c(lung$time, ovarian$futime),
+                    status=c(lung$status-1, ovarian$fustat),
+                    group =rep(0:1, c(nrow(lung), nrow(ovarian))))
+fit1 <- survreg(Surv(time, status) ~ 1, lung)
+fit2 <- survreg(Surv(futime, fustat) ~ 1, ovarian)
+fit3 <- survreg(Surv(time, status) ~ group + strata(group), tdata)
+
+aeq(c(fit1$coef, fit2$coef-fit1$coef), fit3$coef)
+aeq(c(fit1$scale, fit2$scale), fit3$scale)
+aeq(fit1$loglik[2] + fit2$loglik[2], fit3$loglik[2])
+
+#
+# Test out the cluster term in survreg, which means first a test
+#  of the dfbeta residuals
+# I also am checking that missing values propogate
+test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0))
+fit1 <- survreg(Surv(time, status) ~ x + cluster(1:7), test1)
+
+db1 <- resid(fit1, 'dfbeta')
+ijack <-db1
+eps <- 1e-7
+for (i in 1:7) {
+    temp <- rep(1.0,7)
+    temp[i] <- 1-eps
+    tfit <- survreg(Surv(time, status) ~ x, test1, weight=temp)
+    ijack[i,] <- c(tfit$coef, log(tfit$scale)) 
+    }
+ijack[2,] <- NA  # stick the NA back in
+ijack <- (rep(c(fit1$coef, log(fit1$scale)), each=nrow(db1)) - ijack)/eps
+all.equal(db1, ijack, tol=eps)
+all.equal(t(db1[-2,])%*% db1[-2,], fit1$var)
+
+# This is a harder test since there are multiple strata and multiple 
+#  obs/subject.  Use of enum + strata(enum) in essenence fits a different
+#  baseline Weibull to each strata, with common coefficients for rx, size, and
+#  number.
+fit1 <- survreg(Surv(stop-start, event) ~  rx + size + number + 
+                factor(enum) + strata(enum), data=bladder2)
+
+db1 <- resid(fit1, type='dfbeta', collapse=bladder2$id)
+ijack <- db1  # a matrix of the same size
+for (i in 1:nrow(db1)) {
+    twt <- rep(1., nrow(bladder2))
+    twt[bladder2$id==i] <- 1-eps
+    tfit <- survreg(Surv(stop-start, event) ~ rx + size + number + 
+                    factor(enum) + strata(enum), data=bladder2, 
+                    weight=twt)
+    ijack[i,] <- c(coef(tfit), log(tfit$scale)) 
+    }
+ijack <- (rep(c(fit1$coef, log(fit1$scale)), each=nrow(db1)) - ijack)/eps
+all.equal(db1, ijack, tol=eps*2)
+
diff --git a/win32/deps/library/survival/tests/survreg2.Rout.save b/win32/deps/library/survival/tests/survreg2.Rout.save
new file mode 100644
index 0000000..f0c79bf
--- /dev/null
+++ b/win32/deps/library/survival/tests/survreg2.Rout.save
@@ -0,0 +1,87 @@
+
+R version 2.9.0 (2009-04-17)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(survival)
+Loading required package: splines
+> options(na.action=na.exclude, contrasts=c('contr.treatment', 'contr.poly'))
+> 
+> # Verify stratified fits in a simple way, but combining two data
+> #  sets and doing a single fit
+> #
+> aeq <- function(x,y) all.equal(as.vector(x), as.vector(y))
+> 
+> tdata <- data.frame(time=c(lung$time, ovarian$futime),
++                     status=c(lung$status-1, ovarian$fustat),
++                     group =rep(0:1, c(nrow(lung), nrow(ovarian))))
+> fit1 <- survreg(Surv(time, status) ~ 1, lung)
+> fit2 <- survreg(Surv(futime, fustat) ~ 1, ovarian)
+> fit3 <- survreg(Surv(time, status) ~ group + strata(group), tdata)
+> 
+> aeq(c(fit1$coef, fit2$coef-fit1$coef), fit3$coef)
+[1] TRUE
+> aeq(c(fit1$scale, fit2$scale), fit3$scale)
+[1] TRUE
+> aeq(fit1$loglik[2] + fit2$loglik[2], fit3$loglik[2])
+[1] TRUE
+> 
+> #
+> # Test out the cluster term in survreg, which means first a test
+> #  of the dfbeta residuals
+> # I also am checking that missing values propogate
+> test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0))
+> fit1 <- survreg(Surv(time, status) ~ x + cluster(1:7), test1)
+> 
+> db1 <- resid(fit1, 'dfbeta')
+> ijack <-db1
+> eps <- 1e-7
+> for (i in 1:7) {
++     temp <- rep(1.0,7)
++     temp[i] <- 1-eps
++     tfit <- survreg(Surv(time, status) ~ x, test1, weight=temp)
++     ijack[i,] <- c(tfit$coef, log(tfit$scale)) 
++     }
+> ijack[2,] <- NA  # stick the NA back in
+> ijack <- (rep(c(fit1$coef, log(fit1$scale)), each=nrow(db1)) - ijack)/eps
+> all.equal(db1, ijack, tol=eps)
+[1] TRUE
+> all.equal(t(db1[-2,])%*% db1[-2,], fit1$var)
+[1] TRUE
+> 
+> # This is a harder test since there are multiple strata and multiple 
+> #  obs/subject.  Use of enum + strata(enum) in essenence fits a different
+> #  baseline Weibull to each strata, with common coefficients for rx, size, and
+> #  number.
+> fit1 <- survreg(Surv(stop-start, event) ~  rx + size + number + 
++                 factor(enum) + strata(enum), data=bladder2)
+> 
+> db1 <- resid(fit1, type='dfbeta', collapse=bladder2$id)
+> ijack <- db1  # a matrix of the same size
+> for (i in 1:nrow(db1)) {
++     twt <- rep(1., nrow(bladder2))
++     twt[bladder2$id==i] <- 1-eps
++     tfit <- survreg(Surv(stop-start, event) ~ rx + size + number + 
++                     factor(enum) + strata(enum), data=bladder2, 
++                     weight=twt)
++     ijack[i,] <- c(coef(tfit), log(tfit$scale)) 
++     }
+> ijack <- (rep(c(fit1$coef, log(fit1$scale)), each=nrow(db1)) - ijack)/eps
+> all.equal(db1, ijack, tol=eps*2)
+[1] TRUE
+> 
+> 
diff --git a/win32/deps/library/survival/tests/survtest.R b/win32/deps/library/survival/tests/survtest.R
new file mode 100644
index 0000000..1715a8c
--- /dev/null
+++ b/win32/deps/library/survival/tests/survtest.R
@@ -0,0 +1,60 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Simple test of (start, stop] Kaplan-Meier curves, using the test2 data
+#   set
+#
+test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0))
+test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
+                    stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
+                    event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
+                    x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+
+fit1 <- survfit(Surv(start, stop, event) ~1, test2, type='fh2',
+                error='tsiatis')
+fit2 <- survfit(Surv(start, stop, event) ~x, test2, start.time=3,
+		type='fh2')
+
+cfit1<- survfit(coxph(Surv(start, stop, event)~1, test2))
+cfit2<- survfit(coxph(Surv(start, stop, event) ~ strata(x), test2, subset=-1))
+
+deaths <- (fit1$n.event + fit1$n.censor)>0
+aeq(fit1$time[deaths], cfit1$time)
+aeq(fit1$n.risk[deaths], cfit1$n.risk)
+aeq(fit1$n.event[deaths], cfit1$n.event)
+aeq(fit1$surv[deaths], cfit1$surv)
+aeq(fit1$std.err[deaths], cfit1$std.err)
+
+deaths <- (fit2$n.event + fit2$n.censor)>0
+aeq(fit2$time[deaths], cfit2$time)
+aeq(fit2$n.risk[deaths], cfit2$n.risk)
+aeq(fit2$n.event[deaths], cfit2$n.event)
+aeq(fit2$surv[deaths], cfit2$surv)
+
+fit3 <- survfit(Surv(start, stop, event) ~1, test2) #Kaplan-Meier
+aeq(fit3$n, 10)
+aeq(fit3$time, c(1:9,14,17))
+aeq(fit3$n.risk, c(0,2,3,3,4,5,4,4,5,2,1))
+aeq(fit3$n.event,c(0,1,1,0,0,1,1,1,2,0,0))
+aeq(fit3$surv[fit3$n.event>0], c(.5, 1/3, 4/15, 1/5, 3/20, 9/100))
+#
+#  Verify that both surv AND n.risk are right between time points.
+#
+fit <- survfit(Surv(time, status) ~1, test1)
+temp <- summary(fit, time=c(.5,1, 1.5, 6, 7.5, 8, 8.9, 9, 10), extend=TRUE)
+
+aeq(temp$n.risk, c(6,6,4,4,2,2,1,1,0))
+aeq(temp$surv, c(1, fit$surv[c(1,1,2,2,3,3,4,4)]))
+aeq(temp$n.event, c(0,1,0,2,0,0,0,1,0))
+aeq(temp$std.err, c(0, (fit$surv*fit$std.err)[c(1,1,2,2,3,3,4,4)]))
+
+
+fit <- survfit(Surv(start, stop, event) ~1, test2)
+temp <- summary(fit, times=c(.5, 1.5, 2.5, 3, 6.5, 14.5, 16.5))
+aeq(temp$surv, c(1, fit$surv[c(1,2,3,6, 10,10)]))
+aeq(temp$n.risk, c(0, 2, 3, 3, 4, 1,1))
diff --git a/win32/deps/library/survival/tests/survtest.Rout.save b/win32/deps/library/survival/tests/survtest.Rout.save
new file mode 100644
index 0000000..d10c401
--- /dev/null
+++ b/win32/deps/library/survival/tests/survtest.Rout.save
@@ -0,0 +1,99 @@
+
+R version 2.11.1 (2010-05-31)
+Copyright (C) 2010 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Simple test of (start, stop] Kaplan-Meier curves, using the test2 data
+> #   set
+> #
+> test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0))
+> test2 <- data.frame(start=c(1, 2, 5, 2, 1, 7, 3, 4, 8, 8),
++                     stop =c(2, 3, 6, 7, 8, 9, 9, 9,14,17),
++                     event=c(1, 1, 1, 1, 1, 1, 1, 0, 0, 0),
++                     x    =c(1, 0, 0, 1, 0, 1, 1, 1, 0, 0) )
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> fit1 <- survfit(Surv(start, stop, event) ~1, test2, type='fh2',
++                 error='tsiatis')
+> fit2 <- survfit(Surv(start, stop, event) ~x, test2, start.time=3,
++ 		type='fh2')
+> 
+> cfit1<- survfit(coxph(Surv(start, stop, event)~1, test2))
+> cfit2<- survfit(coxph(Surv(start, stop, event) ~ strata(x), test2, subset=-1))
+> 
+> deaths <- (fit1$n.event + fit1$n.censor)>0
+> aeq(fit1$time[deaths], cfit1$time)
+[1] TRUE
+> aeq(fit1$n.risk[deaths], cfit1$n.risk)
+[1] TRUE
+> aeq(fit1$n.event[deaths], cfit1$n.event)
+[1] TRUE
+> aeq(fit1$surv[deaths], cfit1$surv)
+[1] TRUE
+> aeq(fit1$std.err[deaths], cfit1$std.err)
+[1] TRUE
+> 
+> deaths <- (fit2$n.event + fit2$n.censor)>0
+> aeq(fit2$time[deaths], cfit2$time)
+[1] TRUE
+> aeq(fit2$n.risk[deaths], cfit2$n.risk)
+[1] TRUE
+> aeq(fit2$n.event[deaths], cfit2$n.event)
+[1] TRUE
+> aeq(fit2$surv[deaths], cfit2$surv)
+[1] TRUE
+> 
+> fit3 <- survfit(Surv(start, stop, event) ~1, test2) #Kaplan-Meier
+> aeq(fit3$n, 10)
+[1] TRUE
+> aeq(fit3$time, c(1:9,14,17))
+[1] TRUE
+> aeq(fit3$n.risk, c(0,2,3,3,4,5,4,4,5,2,1))
+[1] TRUE
+> aeq(fit3$n.event,c(0,1,1,0,0,1,1,1,2,0,0))
+[1] TRUE
+> aeq(fit3$surv[fit3$n.event>0], c(.5, 1/3, 4/15, 1/5, 3/20, 9/100))
+[1] TRUE
+> #
+> #  Verify that both surv AND n.risk are right between time points.
+> #
+> fit <- survfit(Surv(time, status) ~1, test1)
+> temp <- summary(fit, time=c(.5,1, 1.5, 6, 7.5, 8, 8.9, 9, 10), extend=TRUE)
+> 
+> aeq(temp$n.risk, c(6,6,4,4,2,2,1,1,0))
+[1] TRUE
+> aeq(temp$surv, c(1, fit$surv[c(1,1,2,2,3,3,4,4)]))
+[1] TRUE
+> aeq(temp$n.event, c(0,1,0,2,0,0,0,1,0))
+[1] TRUE
+> aeq(temp$std.err, c(0, (fit$surv*fit$std.err)[c(1,1,2,2,3,3,4,4)]))
+[1] TRUE
+> 
+> 
+> fit <- survfit(Surv(start, stop, event) ~1, test2)
+> temp <- summary(fit, times=c(.5, 1.5, 2.5, 3, 6.5, 14.5, 16.5))
+> aeq(temp$surv, c(1, fit$surv[c(1,2,3,6, 10,10)]))
+[1] TRUE
+> aeq(temp$n.risk, c(0, 2, 3, 3, 4, 1,1))
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/testci.R b/win32/deps/library/survival/tests/testci.R
new file mode 100644
index 0000000..4129b6c
--- /dev/null
+++ b/win32/deps/library/survival/tests/testci.R
@@ -0,0 +1,67 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# Test out the survfit.ci function, which does competing risk
+#   estimates
+#
+# For this we need the sequential MGUS data set, using the first
+#   obs for each subject
+#
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+
+tdata <- data.frame(time=mgus1$stop,
+                    status=mgus1$status,
+                    event=mgus1$event,
+                    sex=mgus1$sex)[mgus1$start==0,]
+
+fit1 <- survfit(Surv(time, status) ~ 1, etype=event, tdata)
+
+# Now get the overall survival, and the hazard for progression
+fit2 <- survfit(Surv(time, status) ~1, tdata)  #overall to "first bad thing"
+fit3 <- survfit(Surv(time, status*(event=='progression')) ~1, tdata,
+                type='fleming')
+
+# Classic CI formula
+#  integral [hazard(t) S(t-0) dt], where S= "survival to first event"
+haz <- diff(c(0, -log(fit3$surv))) #Aalen hazard estimate
+tsurv <- c(1, fit2$surv[-length(fit2$surv)])  #lagged survival
+ci <- cumsum(haz *tsurv)
+aeq(1-ci, fit1$surv[,1])
+
+#
+# Now, make sure that it works for subgroups
+#
+fit1 <- survfit(Surv(time, status) ~ sex, etype=event, tdata)
+fit2 <- survfit(Surv(time, status) ~ 1, etype=event, tdata,
+                        subset=(sex=='male'))
+fit3 <- survfit(Surv(time, status) ~ 1, etype=event, tdata,
+                   subset=(sex=='female'))
+
+aeq(fit2$surv, fit1$surv[1:fit1$strata[1],])
+aeq(fit3$surv, fit1$surv[-(1:fit1$strata[1]),])
+
+#  A second test of cumulative incidence
+# compare results to Bob Gray's functions
+#  The file gray1 is the result of 
+#
+#    tstat <- ifelse(tdata$status==0, 0, 1+ (tdata$event=='death'))
+#    gray1 <- cuminc(tdata$time, tstat)
+load("gray1.rda")
+plot(gray1[[1]]$time, gray1[[1]]$est, type='l',
+     ylim=range(c(gray1[[1]]$est, gray1[[2]]$est)),
+     xlab="Time")
+lines(gray1[[2]]$time, gray1[[2]]$est, lty=2)
+
+fit2 <- survfit(Surv(time, status) ~ 1, etype=event, tdata)
+matlines(fit2$time, 1-fit2$surv, col=2, lty=1:2, type='s')
+
+# To formally match these is a bit of a nuisance.
+#  The cuminc function returns full step function, and survfit.ci only
+# the bottoms of the steps.
+#  The survfit.ci function returns all time points, cuminc only the jumps.
+temp1 <- tapply(gray1[[1]]$est, gray1[[1]]$time, max)
+indx1 <- match(names(temp1), fit2$time)
+aeq(temp1, 1-fit2$surv[indx1,1])
+    
diff --git a/win32/deps/library/survival/tests/testci.Rout.save b/win32/deps/library/survival/tests/testci.Rout.save
new file mode 100644
index 0000000..d650a44
--- /dev/null
+++ b/win32/deps/library/survival/tests/testci.Rout.save
@@ -0,0 +1,91 @@
+
+R version 2.13.0 RC (2011-04-12 r55424)
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Test out the survfit.ci function, which does competing risk
+> #   estimates
+> #
+> # For this we need the sequential MGUS data set, using the first
+> #   obs for each subject
+> #
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> tdata <- data.frame(time=mgus1$stop,
++                     status=mgus1$status,
++                     event=mgus1$event,
++                     sex=mgus1$sex)[mgus1$start==0,]
+> 
+> fit1 <- survfit(Surv(time, status) ~ 1, etype=event, tdata)
+> 
+> # Now get the overall survival, and the hazard for progression
+> fit2 <- survfit(Surv(time, status) ~1, tdata)  #overall to "first bad thing"
+> fit3 <- survfit(Surv(time, status*(event=='progression')) ~1, tdata,
++                 type='fleming')
+> 
+> # Classic CI formula
+> #  integral [hazard(t) S(t-0) dt], where S= "survival to first event"
+> haz <- diff(c(0, -log(fit3$surv))) #Aalen hazard estimate
+> tsurv <- c(1, fit2$surv[-length(fit2$surv)])  #lagged survival
+> ci <- cumsum(haz *tsurv)
+> aeq(1-ci, fit1$surv[,1])
+[1] TRUE
+> 
+> #
+> # Now, make sure that it works for subgroups
+> #
+> fit1 <- survfit(Surv(time, status) ~ sex, etype=event, tdata)
+> fit2 <- survfit(Surv(time, status) ~ 1, etype=event, tdata,
++                         subset=(sex=='male'))
+> fit3 <- survfit(Surv(time, status) ~ 1, etype=event, tdata,
++                    subset=(sex=='female'))
+> 
+> aeq(fit2$surv, fit1$surv[1:fit1$strata[1],])
+[1] TRUE
+> aeq(fit3$surv, fit1$surv[-(1:fit1$strata[1]),])
+[1] TRUE
+> 
+> #  A second test of cumulative incidence
+> # compare results to Bob Gray's functions
+> #  The file gray1 is the result of 
+> #
+> #    tstat <- ifelse(tdata$status==0, 0, 1+ (tdata$event=='death'))
+> #    gray1 <- cuminc(tdata$time, tstat)
+> load("gray1.rda")
+> plot(gray1[[1]]$time, gray1[[1]]$est, type='l',
++      ylim=range(c(gray1[[1]]$est, gray1[[2]]$est)),
++      xlab="Time")
+> lines(gray1[[2]]$time, gray1[[2]]$est, lty=2)
+> 
+> fit2 <- survfit(Surv(time, status) ~ 1, etype=event, tdata)
+> matlines(fit2$time, 1-fit2$surv, col=2, lty=1:2, type='s')
+> 
+> # To formally match these is a bit of a nuisance.
+> #  The cuminc function returns full step function, and survfit.ci only
+> # the bottoms of the steps.
+> #  The survfit.ci function returns all time points, cuminc only the jumps.
+> temp1 <- tapply(gray1[[1]]$est, gray1[[1]]$time, max)
+> indx1 <- match(names(temp1), fit2$time)
+> aeq(temp1, 1-fit2$surv[indx1,1])
+[1] TRUE
+>     
+> 
diff --git a/win32/deps/library/survival/tests/testci2.R b/win32/deps/library/survival/tests/testci2.R
new file mode 100644
index 0000000..ced4d87
--- /dev/null
+++ b/win32/deps/library/survival/tests/testci2.R
@@ -0,0 +1,52 @@
+library(survival)
+
+#
+# Test the current prevalence version of the CI curve
+#
+tdata <- data.frame(id=c(1,1,1,1, 2,2,2, 3,3, 4,4,4,4, 5, 6, 6),
+                    time=c(10,20,30,40, 5, 15,25, 20, 22, 6,18,34,50,10,15,20),
+                    status=c(1,1,1,1, 1,1,1, 1,0, 1,1,1,0,0,1,0),
+                    event= letters[c(1,2,3,4, 2,4,3, 2,2, 3,1,2,2,1, 1,1)],
+                    wt = c(2,2,2,2, 1,1,1, 3,3, 1,1,1,1, 2, 1,1))
+
+fit <- survfit(Surv(time, status) ~1, etype=event, id=id, weight=wt, tdata)
+all.equal(as.vector(1-fit$surv),
+          as.vector(matrix(c(0,0,2,3.5, 4.5, 2.5, 2.5, 2.5, 2.5, 0,0,0,
+                             1,1,1,0,0, 6.5, 6.5, 6.5, 0, 2.5, 2.5, 2.5,
+                             0,1,1,1,0,0,0,1, 7.5, 7.5, 1,1,
+                             0,0,0,1,1,1,1,0,0,0, 6.5, 6.5)/10, ncol=4)))
+
+# The exact figures for testci2.
+
+# The subject data of  id, weight, (transition time, transition)
+
+#1: 2 (10, 0->1)  (20, 1->2)  (30, 2->3)  (40, 3->4)
+#2: 1 ( 5, 0->2)  (15, 2->4)  (25, 4->3)
+#3: 3 (20, 0->2)  (22, censor)
+#4: 1 ( 6, 0->3)  (18, 3->1)  (34, 1->2)  (50, censor)
+#5: 2 (10, censor)
+#6: 1 (15, 0->1)  (20, censor)
+
+#Each line below follows a subject through time as a (state, weight) pair
+
+#        |   Time
+#Subject |  5     6   10   10+     15    18      20      20+    22+    25    
+#----------------------------------------------------------------------
+#1         0,2   0,2  1,2  1,2    1,2    1,2    2,2      2,2    2,6.5  2,6.5
+#2         2,1   2,1  2,1  2,1    4,1    4,1    4,1      4,1    4,1    3,1
+#3         0,3   0,3  0,3  0,4.5  0,4.5  0,4.5  2,4.5    2,4.5  
+#4         0,1   3,1  3,1  3,1    3,1    1,1    1,1      1,2.5  1,2.5  1,2.5
+#5         0,2   0,2  0,2  
+#6         0,1   0,1  0,1  0,1.5  1,1.5  1,1.5  1,1.5    
+#
+# 
+#          30      34    40      50
+#--------------------------------------
+#1         3,6.5  3,6.5  4,6.5   4,6.5
+#2         3,1    3,1    3,1     3,1
+#4         1,2,5  2,2.5  2,2.5 
+
+
+# 1-fit$surv for time i and state j = total weight at that time/state in the
+#  above table, divided by 10.
+
diff --git a/win32/deps/library/survival/tests/testci2.Rout.save b/win32/deps/library/survival/tests/testci2.Rout.save
new file mode 100644
index 0000000..0841b11
--- /dev/null
+++ b/win32/deps/library/survival/tests/testci2.Rout.save
@@ -0,0 +1,72 @@
+
+R version 2.9.0 (2009-04-17)
+Copyright (C) 2009 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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(survival)
+Loading required package: splines
+> 
+> #
+> # Test the current prevalence version of the CI curve
+> #
+> tdata <- data.frame(id=c(1,1,1,1, 2,2,2, 3,3, 4,4,4,4, 5, 6, 6),
++                     time=c(10,20,30,40, 5, 15,25, 20, 22, 6,18,34,50,10,15,20),
++                     status=c(1,1,1,1, 1,1,1, 1,0, 1,1,1,0,0,1,0),
++                     event= letters[c(1,2,3,4, 2,4,3, 2,2, 3,1,2,2,1, 1,1)],
++                     wt = c(2,2,2,2, 1,1,1, 3,3, 1,1,1,1, 2, 1,1))
+> 
+> fit <- survfit(Surv(time, status) ~1, etype=event, id=id, weight=wt, tdata)
+> all.equal(as.vector(1-fit$surv),
++           as.vector(matrix(c(0,0,2,3.5, 4.5, 2.5, 2.5, 2.5, 2.5, 0,0,0,
++                              1,1,1,0,0, 6.5, 6.5, 6.5, 0, 2.5, 2.5, 2.5,
++                              0,1,1,1,0,0,0,1, 7.5, 7.5, 1,1,
++                              0,0,0,1,1,1,1,0,0,0, 6.5, 6.5)/10, ncol=4)))
+[1] TRUE
+> 
+> # The exact figures for testci2.
+> 
+> # The subject data of  id, weight, (transition time, transition)
+> 
+> #1: 2 (10, 0->1)  (20, 1->2)  (30, 2->3)  (40, 3->4)
+> #2: 1 ( 5, 0->2)  (15, 2->4)  (25, 4->3)
+> #3: 3 (20, 0->2)  (22, censor)
+> #4: 1 ( 6, 0->3)  (18, 3->1)  (34, 1->2)  (50, censor)
+> #5: 2 (10, censor)
+> #6: 1 (15, 0->1)  (20, censor)
+> 
+> #Each line below follows a subject through time as a (state, weight) pair
+> 
+> #        |   Time
+> #Subject |  5     6   10   10+     15    18      20      20+    22+    25    
+> #----------------------------------------------------------------------
+> #1         0,2   0,2  1,2  1,2    1,2    1,2    2,2      2,2    2,6.5  2,6.5
+> #2         2,1   2,1  2,1  2,1    4,1    4,1    4,1      4,1    4,1    3,1
+> #3         0,3   0,3  0,3  0,4.5  0,4.5  0,4.5  2,4.5    2,4.5  
+> #4         0,1   3,1  3,1  3,1    3,1    1,1    1,1      1,2.5  1,2.5  1,2.5
+> #5         0,2   0,2  0,2  
+> #6         0,1   0,1  0,1  0,1.5  1,1.5  1,1.5  1,1.5    
+> #
+> # 
+> #          30      34    40      50
+> #--------------------------------------
+> #1         3,6.5  3,6.5  4,6.5   4,6.5
+> #2         3,1    3,1    3,1     3,1
+> #4         1,2,5  2,2.5  2,2.5 
+> 
+> 
+> # 1-fit$surv for time i and state j = total weight at that time/state in the
+> #  above table, divided by 10.
+> 
+> 
diff --git a/win32/deps/library/survival/tests/testnull.R b/win32/deps/library/survival/tests/testnull.R
new file mode 100644
index 0000000..bef18e7
--- /dev/null
+++ b/win32/deps/library/survival/tests/testnull.R
@@ -0,0 +1,19 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# A test of  NULL models
+#
+fit1 <- coxph(Surv(stop, event) ~ rx + strata(number), bladder, iter=0)
+fit2 <- coxph(Surv(stop, event) ~ strata(number), bladder)
+
+all.equal(fit1$loglik[2], fit2$loglik)
+all.equal(fit1$resid, fit2$resid)
+
+
+fit1 <- coxph(Surv(start, stop, event) ~ rx + strata(number), bladder2, iter=0)
+fit2 <- coxph(Surv(start, stop, event) ~ strata(number), bladder2)
+
+all.equal(fit1$loglik[2], fit2$loglik)
+all.equal(fit1$resid, fit2$resid)
diff --git a/win32/deps/library/survival/tests/testnull.Rout.save b/win32/deps/library/survival/tests/testnull.Rout.save
new file mode 100644
index 0000000..30cd77a
--- /dev/null
+++ b/win32/deps/library/survival/tests/testnull.Rout.save
@@ -0,0 +1,42 @@
+
+R version 2.7.1 (2008-06-23)
+Copyright (C) 2008 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # A test of  NULL models
+> #
+> fit1 <- coxph(Surv(stop, event) ~ rx + strata(number), bladder, iter=0)
+> fit2 <- coxph(Surv(stop, event) ~ strata(number), bladder)
+> 
+> all.equal(fit1$loglik[2], fit2$loglik)
+[1] TRUE
+> all.equal(fit1$resid, fit2$resid)
+[1] TRUE
+> 
+> 
+> fit1 <- coxph(Surv(start, stop, event) ~ rx + strata(number), bladder2, iter=0)
+> fit2 <- coxph(Surv(start, stop, event) ~ strata(number), bladder2)
+> 
+> all.equal(fit1$loglik[2], fit2$loglik)
+[1] TRUE
+> all.equal(fit1$resid, fit2$resid)
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/testreg.R b/win32/deps/library/survival/tests/testreg.R
new file mode 100644
index 0000000..3a9ad77
--- /dev/null
+++ b/win32/deps/library/survival/tests/testreg.R
@@ -0,0 +1,79 @@
+options(na.action=na.exclude)  #preserve length of missings
+library(survival)
+
+#
+# Run a test that can be verified using other packages (we used SAS)
+#
+test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0))
+fit1w <- survreg(Surv(time, status) ~x, test1, dist='weibull')
+fit1w
+summary(fit1w)
+
+fit1e <- survreg(Surv(time, status) ~x, test1, dist='exponential')
+fit1e
+summary(fit1e)
+
+fit1l <- survreg(Surv(time, status) ~x, test1, dist='loglogistic')
+fit1l
+summary(fit1l)
+
+fit1g <- survreg(Surv(time, status) ~x, test1, dist='lognormal')
+summary(fit1g)
+#
+#  Do a test with the ovarian data
+#
+fitfw <- survreg(Surv(futime, fustat) ~ age + ecog.ps, ovarian,
+	dist='weibull')
+fitfw
+
+fitfl <- survreg(Surv(futime, fustat) ~ age + ecog.ps, ovarian,
+	dist='loglogistic')
+fitfl
+
+#test out interval censoring, using some dummy time values
+
+idat <- read.table('data.interval', skip=3, header=T, sep=',')
+flsurv<- Surv(idat$ltime, idat$rtime, type='interval2')
+
+fitfw2 <- survreg(flsurv ~ age + ecog.ps, idat, dist='weibull')
+summary(fitfw2)
+
+fitfl2 <- survreg(flsurv ~ age + ecog.ps, idat, dist='loglogistic')
+summary(fitfl2)
+
+fitfg2 <- survreg(flsurv ~ age + ecog.ps, idat, dist='lognormal')
+summary(fitfg2)
+
+logt <- c(survreg.distributions$t, 
+          survreg.distributions$weibull[c('trans', 'itrans', 'dtrans')])
+logt$name <- 'log(t)'
+
+fitft2 <- survreg(Surv(ltime, rtime, type='interval2') ~ age + ecog.ps,
+            idat, dist=logt, parm=100)
+summary(fitft2)  #should be quite close to fitfg2
+
+#
+# Check out the survreg density and probability functions
+#
+
+# Gaussian
+x <- -10:10
+p <- seq(.1, .95, length=25)
+all.equal(dsurvreg(x, 1, 5, 'gaussian'), dnorm(x, 1, 5))
+all.equal(psurvreg(x, 1, 5, 'gaussian'), pnorm(x, 1, 5))
+all.equal(qsurvreg(p, 1, 5, 'gaussian'), qnorm(p, 1, 5))
+
+# Lognormal
+x <- 1:10
+all.equal(dsurvreg(x, 1, 5, 'lognormal'), dlnorm(x, 1, 5))
+all.equal(psurvreg(x, 1, 5, 'lognormal'), plnorm(x, 1, 5))
+all.equal(qsurvreg(p, 1, 5, 'lognormal'), qlnorm(p, 1, 5))
+
+# Weibull
+lambda <- exp(-2)
+rho    <- 1/3
+temp <- (lambda*x)^rho
+all.equal(psurvreg(x, 2, 3), 1- exp(-temp))
+all.equal(dsurvreg(x, 2, 3), lambda*rho*(lambda*x)^(rho-1)*exp(-temp))
diff --git a/win32/deps/library/survival/tests/testreg.Rout.save b/win32/deps/library/survival/tests/testreg.Rout.save
new file mode 100644
index 0000000..9f6fa28
--- /dev/null
+++ b/win32/deps/library/survival/tests/testreg.Rout.save
@@ -0,0 +1,301 @@
+
+R version 2.14.0 Under development (unstable) (2011-04-10 r55401)
+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.
+
+> options(na.action=na.exclude)  #preserve length of missings
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # Run a test that can be verified using other packages (we used SAS)
+> #
+> test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0))
+> fit1w <- survreg(Surv(time, status) ~x, test1, dist='weibull')
+> fit1w
+Call:
+survreg(formula = Surv(time, status) ~ x, data = test1, dist = "weibull")
+
+Coefficients:
+(Intercept)           x 
+  2.2373335  -0.7442249 
+
+Scale= 0.4563163 
+
+Loglik(model)= -10.3   Loglik(intercept only)= -11.4
+	Chisq= 2.22 on 1 degrees of freedom, p= 0.14 
+n=6 (1 observation deleted due to missingness)
+> summary(fit1w)
+
+Call:
+survreg(formula = Surv(time, status) ~ x, data = test1, dist = "weibull")
+             Value Std. Error     z        p
+(Intercept)  2.237      0.330  6.78 1.18e-11
+x           -0.744      0.486 -1.53 1.26e-01
+Log(scale)  -0.785      0.433 -1.81 6.99e-02
+
+Scale= 0.456 
+
+Weibull distribution
+Loglik(model)= -10.3   Loglik(intercept only)= -11.4
+	Chisq= 2.22 on 1 degrees of freedom, p= 0.14 
+Number of Newton-Raphson Iterations: 8 
+n=6 (1 observation deleted due to missingness)
+
+> 
+> fit1e <- survreg(Surv(time, status) ~x, test1, dist='exponential')
+> fit1e
+Call:
+survreg(formula = Surv(time, status) ~ x, data = test1, dist = "exponential")
+
+Coefficients:
+(Intercept)           x 
+   2.442347   -1.056053 
+
+Scale fixed at 1 
+
+Loglik(model)= -11.7   Loglik(intercept only)= -12.2
+	Chisq= 1.07 on 1 degrees of freedom, p= 0.3 
+n=6 (1 observation deleted due to missingness)
+> summary(fit1e)
+
+Call:
+survreg(formula = Surv(time, status) ~ x, data = test1, dist = "exponential")
+            Value Std. Error     z        p
+(Intercept)  2.44      0.707  3.45 0.000552
+x           -1.06      1.000 -1.06 0.290944
+
+Scale fixed at 1 
+
+Exponential distribution
+Loglik(model)= -11.7   Loglik(intercept only)= -12.2
+	Chisq= 1.07 on 1 degrees of freedom, p= 0.3 
+Number of Newton-Raphson Iterations: 4 
+n=6 (1 observation deleted due to missingness)
+
+> 
+> fit1l <- survreg(Surv(time, status) ~x, test1, dist='loglogistic')
+> fit1l
+Call:
+survreg(formula = Surv(time, status) ~ x, data = test1, dist = "loglogistic")
+
+Coefficients:
+(Intercept)           x 
+   2.177208   -1.195672 
+
+Scale= 0.3847582 
+
+Loglik(model)= -10.7   Loglik(intercept only)= -12
+	Chisq= 2.7 on 1 degrees of freedom, p= 0.1 
+n=6 (1 observation deleted due to missingness)
+> summary(fit1l)
+
+Call:
+survreg(formula = Surv(time, status) ~ x, data = test1, dist = "loglogistic")
+             Value Std. Error     z        p
+(Intercept)  2.177      0.365  5.96 2.48e-09
+x           -1.196      0.711 -1.68 9.25e-02
+Log(scale)  -0.955      0.396 -2.41 1.58e-02
+
+Scale= 0.385 
+
+Log logistic distribution
+Loglik(model)= -10.7   Loglik(intercept only)= -12
+	Chisq= 2.7 on 1 degrees of freedom, p= 0.1 
+Number of Newton-Raphson Iterations: 4 
+n=6 (1 observation deleted due to missingness)
+
+> 
+> fit1g <- survreg(Surv(time, status) ~x, test1, dist='lognormal')
+> summary(fit1g)
+
+Call:
+survreg(formula = Surv(time, status) ~ x, data = test1, dist = "lognormal")
+             Value Std. Error     z        p
+(Intercept)  2.210      0.404  5.48 4.35e-08
+x           -1.268      0.585 -2.17 3.03e-02
+Log(scale)  -0.446      0.342 -1.30 1.93e-01
+
+Scale= 0.64 
+
+Log Normal distribution
+Loglik(model)= -10.5   Loglik(intercept only)= -12.1
+	Chisq= 3.26 on 1 degrees of freedom, p= 0.071 
+Number of Newton-Raphson Iterations: 5 
+n=6 (1 observation deleted due to missingness)
+
+> #
+> #  Do a test with the ovarian data
+> #
+> fitfw <- survreg(Surv(futime, fustat) ~ age + ecog.ps, ovarian,
++ 	dist='weibull')
+> fitfw
+Call:
+survreg(formula = Surv(futime, fustat) ~ age + ecog.ps, data = ovarian, 
+    dist = "weibull")
+
+Coefficients:
+(Intercept)         age     ecog.ps 
+12.28496723 -0.09702669  0.09977342 
+
+Scale= 0.6032744 
+
+Loglik(model)= -90   Loglik(intercept only)= -98
+	Chisq= 15.98 on 2 degrees of freedom, p= 0.00034 
+n= 26 
+> 
+> fitfl <- survreg(Surv(futime, fustat) ~ age + ecog.ps, ovarian,
++ 	dist='loglogistic')
+> fitfl
+Call:
+survreg(formula = Surv(futime, fustat) ~ age + ecog.ps, data = ovarian, 
+    dist = "loglogistic")
+
+Coefficients:
+(Intercept)         age     ecog.ps 
+11.50853384 -0.08876814  0.09033348 
+
+Scale= 0.4464064 
+
+Loglik(model)= -89.5   Loglik(intercept only)= -97.4
+	Chisq= 15.67 on 2 degrees of freedom, p= 4e-04 
+n= 26 
+> 
+> #test out interval censoring, using some dummy time values
+> 
+> idat <- read.table('data.interval', skip=3, header=T, sep=',')
+> flsurv<- Surv(idat$ltime, idat$rtime, type='interval2')
+> 
+> fitfw2 <- survreg(flsurv ~ age + ecog.ps, idat, dist='weibull')
+> summary(fitfw2)
+
+Call:
+survreg(formula = flsurv ~ age + ecog.ps, data = idat, dist = "weibull")
+              Value Std. Error      z        p
+(Intercept) 12.3886     1.6027  7.730 1.08e-14
+age         -0.0986     0.0254 -3.885 1.02e-04
+ecog.ps      0.0971     0.3776  0.257 7.97e-01
+Log(scale)  -0.4773     0.2583 -1.848 6.47e-02
+
+Scale= 0.62 
+
+Weibull distribution
+Loglik(model)= -56.2   Loglik(intercept only)= -64
+	Chisq= 15.57 on 2 degrees of freedom, p= 0.00042 
+Number of Newton-Raphson Iterations: 6 
+n= 26 
+
+> 
+> fitfl2 <- survreg(flsurv ~ age + ecog.ps, idat, dist='loglogistic')
+> summary(fitfl2)
+
+Call:
+survreg(formula = flsurv ~ age + ecog.ps, data = idat, dist = "loglogistic")
+              Value Std. Error      z        p
+(Intercept) 11.5268      1.528  7.542 4.62e-14
+age         -0.0888      0.024 -3.703 2.13e-04
+ecog.ps      0.0818      0.364  0.225 8.22e-01
+Log(scale)  -0.8023      0.271 -2.965 3.03e-03
+
+Scale= 0.448 
+
+Log logistic distribution
+Loglik(model)= -55.9   Loglik(intercept only)= -63.5
+	Chisq= 15.35 on 2 degrees of freedom, p= 0.00046 
+Number of Newton-Raphson Iterations: 5 
+n= 26 
+
+> 
+> fitfg2 <- survreg(flsurv ~ age + ecog.ps, idat, dist='lognormal')
+> summary(fitfg2)
+
+Call:
+survreg(formula = flsurv ~ age + ecog.ps, data = idat, dist = "lognormal")
+              Value Std. Error      z        p
+(Intercept) 11.1548     1.4347  7.775 7.56e-15
+age         -0.0855     0.0238 -3.598 3.20e-04
+ecog.ps      0.2066     0.3828  0.540 5.89e-01
+Log(scale)  -0.2297     0.2508 -0.916 3.60e-01
+
+Scale= 0.795 
+
+Log Normal distribution
+Loglik(model)= -56   Loglik(intercept only)= -63.5
+	Chisq= 14.94 on 2 degrees of freedom, p= 0.00057 
+Number of Newton-Raphson Iterations: 5 
+n= 26 
+
+> 
+> logt <- c(survreg.distributions$t, 
++           survreg.distributions$weibull[c('trans', 'itrans', 'dtrans')])
+> logt$name <- 'log(t)'
+> 
+> fitft2 <- survreg(Surv(ltime, rtime, type='interval2') ~ age + ecog.ps,
++             idat, dist=logt, parm=100)
+> summary(fitft2)  #should be quite close to fitfg2
+
+Call:
+survreg(formula = Surv(ltime, rtime, type = "interval2") ~ age + 
+    ecog.ps, data = idat, dist = logt, parms = 100)
+              Value Std. Error      z        p
+(Intercept) 11.1856     1.4419  7.758 8.66e-15
+age         -0.0858     0.0238 -3.609 3.07e-04
+ecog.ps      0.1978     0.3814  0.519 6.04e-01
+Log(scale)  -0.2394     0.2522 -0.949 3.43e-01
+
+Scale= 0.787 
+
+log(t) distribution: parmameters= 100
+Loglik(model)= -56   Loglik(intercept only)= -63.5
+	Chisq= 14.97 on 2 degrees of freedom, p= 0.00056 
+Number of Newton-Raphson Iterations: 5 
+n= 26 
+
+> 
+> #
+> # Check out the survreg density and probability functions
+> #
+> 
+> # Gaussian
+> x <- -10:10
+> p <- seq(.1, .95, length=25)
+> all.equal(dsurvreg(x, 1, 5, 'gaussian'), dnorm(x, 1, 5))
+[1] TRUE
+> all.equal(psurvreg(x, 1, 5, 'gaussian'), pnorm(x, 1, 5))
+[1] TRUE
+> all.equal(qsurvreg(p, 1, 5, 'gaussian'), qnorm(p, 1, 5))
+[1] TRUE
+> 
+> # Lognormal
+> x <- 1:10
+> all.equal(dsurvreg(x, 1, 5, 'lognormal'), dlnorm(x, 1, 5))
+[1] TRUE
+> all.equal(psurvreg(x, 1, 5, 'lognormal'), plnorm(x, 1, 5))
+[1] TRUE
+> all.equal(qsurvreg(p, 1, 5, 'lognormal'), qlnorm(p, 1, 5))
+[1] TRUE
+> 
+> # Weibull
+> lambda <- exp(-2)
+> rho    <- 1/3
+> temp <- (lambda*x)^rho
+> all.equal(psurvreg(x, 2, 3), 1- exp(-temp))
+[1] TRUE
+> all.equal(dsurvreg(x, 2, 3), lambda*rho*(lambda*x)^(rho-1)*exp(-temp))
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/tiedtime.R b/win32/deps/library/survival/tests/tiedtime.R
new file mode 100644
index 0000000..647b996
--- /dev/null
+++ b/win32/deps/library/survival/tests/tiedtime.R
@@ -0,0 +1,23 @@
+library(survival)
+
+#
+# The survival code was failing for certain data sets when called as
+#    survfit(Surv(time2-time1, status) ~ ......
+# The issue was how tied floating point numbers are handled, and the
+#    fact that unique(x), factor(x) and tapply(x) are not guarranteed to
+#    all be the same.  
+# This test fails in survival 2.36-5, fixed in 2.36-6.  Data sets that
+#    can cause it are few and far between.
+#
+
+load('ties.rda')
+x <- time2 -time1
+
+#  Here is the heart of the old problem
+#       length(unique(x))== length(table(x))
+#  And the prior fix which worked ALMOST always
+#       x <- round(x, 15)
+#       length(unique(round(x,15)))== length(table(round(x,15)))
+
+fit1 <- survfit(Surv(x) ~1)
+length(fit1$time) == length(fit1$surv)
diff --git a/win32/deps/library/survival/tests/tiedtime.Rout.save b/win32/deps/library/survival/tests/tiedtime.Rout.save
new file mode 100644
index 0000000..4a1d84b
--- /dev/null
+++ b/win32/deps/library/survival/tests/tiedtime.Rout.save
@@ -0,0 +1,44 @@
+
+R version 2.12.2 (2011-02-25)
+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(survival)
+Loading required package: splines
+> 
+> #
+> # The survival code was failing for certain data sets when called as
+> #    survfit(Surv(time2-time1, status) ~ ......
+> # The issue was how tied floating point numbers are handled, and the
+> #    fact that unique(x), factor(x) and tapply(x) are not guarranteed to
+> #    all be the same.  
+> # This test fails in survival 2.36-5, fixed in 2.36-6.  Data sets that
+> #    can cause it are few and far between.
+> #
+> 
+> load('ties.rda')
+> x <- time2 -time1
+> 
+> #  Here is the heart of the old problem
+> #       length(unique(x))== length(table(x))
+> #  And the prior fix which worked ALMOST always
+> #       x <- round(x, 15)
+> #       length(unique(round(x,15)))== length(table(round(x,15)))
+> 
+> fit1 <- survfit(Surv(x) ~1)
+> length(fit1$time) == length(fit1$surv)
+[1] TRUE
+> 
diff --git a/win32/deps/library/survival/tests/ties.rda b/win32/deps/library/survival/tests/ties.rda
new file mode 100644
index 0000000..f92af90
Binary files /dev/null and b/win32/deps/library/survival/tests/ties.rda differ
diff --git a/win32/deps/library/survival/tests/tt.R b/win32/deps/library/survival/tests/tt.R
new file mode 100644
index 0000000..e33f3ee
--- /dev/null
+++ b/win32/deps/library/survival/tests/tt.R
@@ -0,0 +1,38 @@
+library(survival)
+
+# A contrived example for the tt function
+#
+mkdata <- function(n, beta) {
+    age <- runif(n, 20, 60)
+    x <- rbinom(n, 1, .5)
+
+    futime <- rep(40, n)   # everyone has 40 years of follow-up
+    status <- rep(0, n)
+    dtime <-  runif(n/2, 1, 40)  # 1/2 of them die
+    dtime <- sort(dtime)
+
+    # The risk is set to beta[1]*x + beta[2]* f(current_age)
+    #   where f= 0 up to age 40, rises linear to age 70, flat after that
+    for (i in 1:length(dtime)) {
+        atrisk <- (futime >= dtime[i])
+        c.age <- age + dtime
+        age2 <- pmin(30, pmax(0, c.age-40))
+        xbeta <- beta[1]*x + beta[2]*age2
+        
+        # Select a death according to risk
+        risk <- ifelse(atrisk, exp(xbeta), 0)
+        dead <- sample(1:n, 1, prob=risk/sum(risk))
+        
+        futime[dead] <- dtime[i]
+        status[dead] <- 1
+    }
+    data.frame(futime=futime, status=status, age=age, x=x, risk=risk)
+}
+tdata <- mkdata(500, c(log(1.5), 2/30))
+
+fit1 <- coxph(Surv(futime, status) ~ x + pspline(age), tdata)
+fit2 <- coxph(Surv(futime, status) ~ x + tt(age), tdata,
+              tt= function(x, t, ...) pspline(x+t))
+
+dfit <- coxph(Surv(futime, status) ~ x + tt(age), tdata,
+              tt= function(x, t, ...) x+t, iter=0, x=T)
diff --git a/win32/deps/library/survival/tests/turnbull.R b/win32/deps/library/survival/tests/turnbull.R
new file mode 100644
index 0000000..9085298
--- /dev/null
+++ b/win32/deps/library/survival/tests/turnbull.R
@@ -0,0 +1,156 @@
+options(na.action=na.exclude) # preserve missings
+options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+library(survival)
+
+#
+# The test data set from Turnbull, JASA 1974, 169-73.
+#
+#  status  0=right censored
+#          1=exact
+#          2=left censored
+#
+aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+
+
+turnbull <- data.frame( time  =c( 1,1,1, 2,2,2, 3,3,3, 4,4,4),
+			status=c( 1,0,2, 1,0,2, 1,0,2, 1,0,2),
+			  n   =c(12,3,2, 6,2,4, 2,0,2, 3,3,5))
+#
+# Compute the K-M for the Turnbull data
+#      via a slow EM calculation
+#
+
+emsurv <- function(time, status, wt, verbose=T) {
+    left.cen <- (status==2)
+    if (!any(left.cen)) stop("No left censored data!")
+    if (!any(status==1))stop("Must have some exact death times")
+
+    tempy <- Surv(time[!left.cen], status[!left.cen])
+    ww <- wt[!left.cen]
+    tempx <- factor(rep(1, sum(!left.cen)))
+    tfit <- survfit(tempy~tempx, weight=ww)
+    if (verbose)
+       cat("Iteration 0, survival=", format(round(tfit$surv[tfit$n.event>0],3)),
+		       "\n")
+
+    stimes <- tfit$time[tfit$n.event>0]
+    ltime <- time[left.cen]
+    lwt   <- wt[left.cen]
+    tempx <- factor(rep(1, length(stimes) + sum(!left.cen)))
+    tempy <- Surv(c(time[!left.cen], stimes),
+		  c(status[!left.cen], rep(1, length(stimes))))
+    for (iter in 1:4) {
+	wt2 <- stimes*0
+	ssurv <- tfit$surv[tfit$n.event>0]
+	sjump <- diff(c(1, ssurv))
+	for (j in 1:(length(ltime))) {
+	    k <- sum(ltime[j]>=stimes)   #index of the death time
+	    if (k==0)
+		stop("Left censored observation before the first death")
+	    wt2[1:k] <- wt2[1:k] + lwt[j]*sjump[1:k] /(ssurv[k]-1)
+	    }
+	tfit <- survfit(tempy~tempx, weight=c(ww, wt2))
+	if (verbose) {
+	   cat("Iteration", iter, "survival=",
+		 format(round(tfit$surv[tfit$n.event>0],3)),  "\n")
+	   cat("             weights=", format(round(wt2,3)), "\n")
+	   }
+	}
+    survfit(tempy ~ tempx, weights=c(ww, wt2))
+    }
+
+temp <-emsurv(turnbull$time, turnbull$status, turnbull$n)
+print(summary(temp))
+# First check, use the data from Turnbull, JASA 1974, 169-173.
+
+tdata <- data.frame(time  =c(1,1,1,2,2,2,3,3,3,4,4,4),
+		    status=rep(c(1,0,2),4),
+		    n     =c(12,3,2,6,2,4,2,0,2,3,3,5))
+
+tfit <- survfit(Surv(time, time, status, type='interval') ~1, tdata, weight=n)
+all.equal(round(tfit$surv,3), c(.538, .295, .210, .095))
+
+
+# Second check, compare to a reversed survival curve
+# This is not as simple a test as one might think, because left and right
+#  censored observations are not treated symmetrically by the routine:
+#  time <= y for left and time> y for right (this is to make the routine
+#  correct for the common situation of panel data).
+# To get equivalence, make the left censoreds happen just a little bit
+#  earlier.  The left-continuous/right-continuous shift is also a bother.
+#
+test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
+                    status=c(1,NA,1,0,1,1,0),
+                    x=     c(0, 2,1,1,1,0,0))
+fit1 <- survfit(Surv(time, status) ~1, test1)
+temp <- ifelse(test1$status==0, 4.99,5) - test1$time
+fit2 <- survfit(Surv(temp, status, type='left') ~1, test1)
+
+all.equal(round(fit1$surv[1:2],5), round(1-fit2$surv[3:2],5))
+
+rm(tdata, tfit, fit1, temp, fit2)
+#
+# Create a data set similar to the one provided by Al Zinsmeister
+#  It is a hard test case for survfit.turnbull
+#
+time1 <- c(rep(0,100), rep(1,200), 100, 200, 210, 220,
+           rep(365,100), rep(366,5), 731:741)
+
+time2 <- c((1:100)*3,  10+1:100, rep(365:366, c(60,40)), NA, 500, NA, 450,
+           rep(730,90), rep(NA,10), c(528,571,691,730,731),
+           NA, 1095:1099, NA, 1400, 1200, 772, 1461)
+
+zfit <- survfit(Surv(time1, time2, type='interval2') ~1)
+
+#
+# There are 100 intervals of the form (0,x) where x is from 3 to 300,
+#  and 200 more of the form (1,x) where x is from 11 to 366.  These
+#  lead to a mass point in the interval (1,3), which is placed at 2.
+#  The starting estimate has far too little mass placed here, and it takes
+#  the EM a long time to realize that most of the weight for the first 300
+#  subjects goes here.  With acceleration, it takes 16 iterations, without
+#  it takes >40.  (On Al's orginal data, without accel still wasn't there after
+#  165 iters!)
+#
+# The next 4 obs give rise to potential jumps at 100.5, 200.5, 211.5, and
+#  221.  However, the final estimate has no mass at all on any of these.
+#  Assume mass of a,b, and c at 2, 100.5 and 365.5, and consider the 
+#  contributions: 
+#    123 obs that overlap a only
+#    137 obs that overlap a and b
+#     40 obs that overlap a, b, c
+#      1 obs that overlap b, c
+#    108 obs that overlap c   (200, 210,200, 365, and 366 starting points)
+#  For some trial values of a,b,c, compare the loglik to that of (a+b),0,c
+#   First one: a^123 (a+b)^137 (a+b+c)^40 (b+c) c^108
+#   Second:    (a+b)^123 (a+b)^137 (a+b+c)^40 c c^108
+#   Likelhood improves if (1 + b/a)^123 > 1+ b/c, which is true for almost
+#     all a and c.  In particular, at the solution a and c are approx .7 and
+#     .18, respectively.
+#
+# The program can't see this coming, of course, and so iterates towards a
+#  KM with epsilon sized jumps at 100.5, 200.5, and 211.5.  Whether these
+#  intervals should be removed during iteration, as detected, is an open
+#  question for me.
+#
+#
+# True solution: mass points at 2, 365.5, 408, and 756.5, of sizes a, b, c, d
+# Likelihood:    a^260 (a+b)^40 (b+c)^92 (b+c+d)^12 c^5 d^11
+# Solution: a=0.6958, b=0.1674, c=0.1079, d=0.0289
+
+tfun <- function(x) {
+    if (length(x) ==3) x <- c(x, .03)
+    x <- x/sum(x)  #make probabilities sum to 1
+    loglik <- 260*log(x[1]) + 40*log(x[1]+x[2]) + 92*log(x[2] + x[3]) +
+                       12*log(x[2]+x[3]+x[4]) + 5*log(x[3]) + 11*log(x[4])
+    -loglik  #find the max, not the min
+    }
+
+nfit <- nlminb(start=c(.7,.15, .1), tfun, lower=0, upper=1)
+nparm <- c(nfit$par, .03)
+nparm <- nparm / sum(nparm)
+zparm <- -diff(c(1, zfit$surv[match(c(2, 365.5, 408, 756.5), zfit$time)]))
+aeq(round(tfun(nparm),4), round(tfun(zparm),4))
+# .0001 is the tolerance in survfit.turnbull
+
+rm(tfun, nfit, nparm, zparm, time1, time2, zfit) 
diff --git a/win32/deps/library/survival/tests/turnbull.Rout.save b/win32/deps/library/survival/tests/turnbull.Rout.save
new file mode 100644
index 0000000..06c2c6c
--- /dev/null
+++ b/win32/deps/library/survival/tests/turnbull.Rout.save
@@ -0,0 +1,194 @@
+
+R version 2.7.1 (2008-06-23)
+Copyright (C) 2008 The R Foundation for Statistical Computing
+ISBN 3-900051-07-0
+
+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.
+
+> options(na.action=na.exclude) # preserve missings
+> options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type
+> library(survival)
+Loading required package: splines
+> 
+> #
+> # The test data set from Turnbull, JASA 1974, 169-73.
+> #
+> #  status  0=right censored
+> #          1=exact
+> #          2=left censored
+> #
+> aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...)
+> 
+> 
+> turnbull <- data.frame( time  =c( 1,1,1, 2,2,2, 3,3,3, 4,4,4),
++ 			status=c( 1,0,2, 1,0,2, 1,0,2, 1,0,2),
++ 			  n   =c(12,3,2, 6,2,4, 2,0,2, 3,3,5))
+> #
+> # Compute the K-M for the Turnbull data
+> #      via a slow EM calculation
+> #
+> 
+> emsurv <- function(time, status, wt, verbose=T) {
++     left.cen <- (status==2)
++     if (!any(left.cen)) stop("No left censored data!")
++     if (!any(status==1))stop("Must have some exact death times")
++ 
++     tempy <- Surv(time[!left.cen], status[!left.cen])
++     ww <- wt[!left.cen]
++     tempx <- factor(rep(1, sum(!left.cen)))
++     tfit <- survfit(tempy~tempx, weight=ww)
++     if (verbose)
++        cat("Iteration 0, survival=", format(round(tfit$surv[tfit$n.event>0],3)),
++ 		       "\n")
++ 
++     stimes <- tfit$time[tfit$n.event>0]
++     ltime <- time[left.cen]
++     lwt   <- wt[left.cen]
++     tempx <- factor(rep(1, length(stimes) + sum(!left.cen)))
++     tempy <- Surv(c(time[!left.cen], stimes),
++ 		  c(status[!left.cen], rep(1, length(stimes))))
++     for (iter in 1:4) {
++ 	wt2 <- stimes*0
++ 	ssurv <- tfit$surv[tfit$n.event>0]
++ 	sjump <- diff(c(1, ssurv))
++ 	for (j in 1:(length(ltime))) {
++ 	    k <- sum(ltime[j]>=stimes)   #index of the death time
++ 	    if (k==0)
++ 		stop("Left censored observation before the first death")
++ 	    wt2[1:k] <- wt2[1:k] + lwt[j]*sjump[1:k] /(ssurv[k]-1)
++ 	    }
++ 	tfit <- survfit(tempy~tempx, weight=c(ww, wt2))
++ 	if (verbose) {
++ 	   cat("Iteration", iter, "survival=",
++ 		 format(round(tfit$surv[tfit$n.event>0],3)),  "\n")
++ 	   cat("             weights=", format(round(wt2,3)), "\n")
++ 	   }
++ 	}
++     survfit(tempy ~ tempx, weights=c(ww, wt2))
++     }
+> 
+> temp <-emsurv(turnbull$time, turnbull$status, turnbull$n)
+Iteration 0, survival= 0.613 0.383 0.287 0.144 
+Iteration 1 survival= 0.549 0.303 0.214 0.094 
+             weights= 7.856 3.477 0.828 0.839 
+Iteration 2 survival= 0.540 0.296 0.210 0.095 
+             weights= 8.228 3.394 0.714 0.664 
+Iteration 3 survival= 0.538 0.295 0.210 0.095 
+             weights= 8.315 3.356 0.690 0.638 
+Iteration 4 survival= 0.538 0.295 0.210 0.095 
+             weights= 8.338 3.342 0.685 0.635 
+> print(summary(temp))
+Call: survfit(formula = tempy ~ tempx, weights = c(ww, wt2))
+
+ time n.risk n.event survival std.err lower 95% CI upper 95% CI
+    1  44.00   20.34   0.5378  0.0752       0.4089        0.707
+    2  20.66    9.34   0.2946  0.0719       0.1827        0.475
+    3   9.32    2.68   0.2098  0.0673       0.1119        0.393
+    4   6.64    3.64   0.0948  0.0507       0.0333        0.270
+> # First check, use the data from Turnbull, JASA 1974, 169-173.
+> 
+> tdata <- data.frame(time  =c(1,1,1,2,2,2,3,3,3,4,4,4),
++ 		    status=rep(c(1,0,2),4),
++ 		    n     =c(12,3,2,6,2,4,2,0,2,3,3,5))
+> 
+> tfit <- survfit(Surv(time, time, status, type='interval') ~1, tdata, weight=n)
+> all.equal(round(tfit$surv,3), c(.538, .295, .210, .095))
+[1] TRUE
+> 
+> 
+> # Second check, compare to a reversed survival curve
+> # This is not as simple a test as one might think, because left and right
+> #  censored observations are not treated symmetrically by the routine:
+> #  time <= y for left and time> y for right (this is to make the routine
+> #  correct for the common situation of panel data).
+> # To get equivalence, make the left censoreds happen just a little bit
+> #  earlier.  The left-continuous/right-continuous shift is also a bother.
+> #
+> test1 <- data.frame(time=  c(9, 3,1,1,6,6,8),
++                     status=c(1,NA,1,0,1,1,0),
++                     x=     c(0, 2,1,1,1,0,0))
+> fit1 <- survfit(Surv(time, status) ~1, test1)
+> temp <- ifelse(test1$status==0, 4.99,5) - test1$time
+> fit2 <- survfit(Surv(temp, status, type='left') ~1, test1)
+> 
+> all.equal(round(fit1$surv[1:2],5), round(1-fit2$surv[3:2],5))
+[1] TRUE
+> 
+> rm(tdata, tfit, fit1, temp, fit2)
+> #
+> # Create a data set similar to the one provided by Al Zinsmeister
+> #  It is a hard test case for survfit.turnbull
+> #
+> time1 <- c(rep(0,100), rep(1,200), 100, 200, 210, 220,
++            rep(365,100), rep(366,5), 731:741)
+> 
+> time2 <- c((1:100)*3,  10+1:100, rep(365:366, c(60,40)), NA, 500, NA, 450,
++            rep(730,90), rep(NA,10), c(528,571,691,730,731),
++            NA, 1095:1099, NA, 1400, 1200, 772, 1461)
+> 
+> zfit <- survfit(Surv(time1, time2, type='interval2') ~1)
+> 
+> #
+> # There are 100 intervals of the form (0,x) where x is from 3 to 300,
+> #  and 200 more of the form (1,x) where x is from 11 to 366.  These
+> #  lead to a mass point in the interval (1,3), which is placed at 2.
+> #  The starting estimate has far too little mass placed here, and it takes
+> #  the EM a long time to realize that most of the weight for the first 300
+> #  subjects goes here.  With acceleration, it takes 16 iterations, without
+> #  it takes >40.  (On Al's orginal data, without accel still wasn't there after
+> #  165 iters!)
+> #
+> # The next 4 obs give rise to potential jumps at 100.5, 200.5, 211.5, and
+> #  221.  However, the final estimate has no mass at all on any of these.
+> #  Assume mass of a,b, and c at 2, 100.5 and 365.5, and consider the 
+> #  contributions: 
+> #    123 obs that overlap a only
+> #    137 obs that overlap a and b
+> #     40 obs that overlap a, b, c
+> #      1 obs that overlap b, c
+> #    108 obs that overlap c   (200, 210,200, 365, and 366 starting points)
+> #  For some trial values of a,b,c, compare the loglik to that of (a+b),0,c
+> #   First one: a^123 (a+b)^137 (a+b+c)^40 (b+c) c^108
+> #   Second:    (a+b)^123 (a+b)^137 (a+b+c)^40 c c^108
+> #   Likelhood improves if (1 + b/a)^123 > 1+ b/c, which is true for almost
+> #     all a and c.  In particular, at the solution a and c are approx .7 and
+> #     .18, respectively.
+> #
+> # The program can't see this coming, of course, and so iterates towards a
+> #  KM with epsilon sized jumps at 100.5, 200.5, and 211.5.  Whether these
+> #  intervals should be removed during iteration, as detected, is an open
+> #  question for me.
+> #
+> #
+> # True solution: mass points at 2, 365.5, 408, and 756.5, of sizes a, b, c, d
+> # Likelihood:    a^260 (a+b)^40 (b+c)^92 (b+c+d)^12 c^5 d^11
+> # Solution: a=0.6958, b=0.1674, c=0.1079, d=0.0289
+> 
+> tfun <- function(x) {
++     if (length(x) ==3) x <- c(x, .03)
++     x <- x/sum(x)  #make probabilities sum to 1
++     loglik <- 260*log(x[1]) + 40*log(x[1]+x[2]) + 92*log(x[2] + x[3]) +
++                        12*log(x[2]+x[3]+x[4]) + 5*log(x[3]) + 11*log(x[4])
++     -loglik  #find the max, not the min
++     }
+> 
+> nfit <- nlminb(start=c(.7,.15, .1), tfun, lower=0, upper=1)
+> nparm <- c(nfit$par, .03)
+> nparm <- nparm / sum(nparm)
+> zparm <- -diff(c(1, zfit$surv[match(c(2, 365.5, 408, 756.5), zfit$time)]))
+> aeq(round(tfun(nparm),4), round(tfun(zparm),4))
+[1] TRUE
+> # .0001 is the tolerance in survfit.turnbull
+> 
+> rm(tfun, nfit, nparm, zparm, time1, time2, zfit) 
+> 
diff --git a/win32/deps/library/tcltk/DESCRIPTION b/win32/deps/library/tcltk/DESCRIPTION
index e751aa4..f6775a6 100644
--- a/win32/deps/library/tcltk/DESCRIPTION
+++ b/win32/deps/library/tcltk/DESCRIPTION
@@ -1,9 +1,9 @@
 Package: tcltk
-Version: 2.9.2
+Version: 2.15.2
 Priority: base
 Title: Tcl/Tk Interface
-Author: R Development Core Team
+Author: R Core Team
 Maintainer: R Core Team <R-core r-project org>
 Description: Interface and language bindings to Tcl/Tk GUI elements
-License: Part of R 2.9.2
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 12:46:17 UTC; windows
+License: Part of R 2.15.2
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:07:59 UTC; windows
diff --git a/win32/deps/library/tcltk/Meta/Rd.rds b/win32/deps/library/tcltk/Meta/Rd.rds
index f6dcf06..8ba6f84 100644
Binary files a/win32/deps/library/tcltk/Meta/Rd.rds and b/win32/deps/library/tcltk/Meta/Rd.rds differ
diff --git a/win32/deps/library/tcltk/Meta/demo.rds b/win32/deps/library/tcltk/Meta/demo.rds
index cbee420..05fbae2 100644
Binary files a/win32/deps/library/tcltk/Meta/demo.rds and b/win32/deps/library/tcltk/Meta/demo.rds differ
diff --git a/win32/deps/library/tcltk/Meta/hsearch.rds b/win32/deps/library/tcltk/Meta/hsearch.rds
index 505542f..7d39ba5 100644
Binary files a/win32/deps/library/tcltk/Meta/hsearch.rds and b/win32/deps/library/tcltk/Meta/hsearch.rds differ
diff --git a/win32/deps/library/tcltk/Meta/links.rds b/win32/deps/library/tcltk/Meta/links.rds
new file mode 100644
index 0000000..6e932d4
Binary files /dev/null and b/win32/deps/library/tcltk/Meta/links.rds differ
diff --git a/win32/deps/library/tcltk/Meta/nsInfo.rds b/win32/deps/library/tcltk/Meta/nsInfo.rds
index 34b622b..e199a7d 100644
Binary files a/win32/deps/library/tcltk/Meta/nsInfo.rds and b/win32/deps/library/tcltk/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/tcltk/Meta/package.rds b/win32/deps/library/tcltk/Meta/package.rds
index a06ad86..78663cf 100644
Binary files a/win32/deps/library/tcltk/Meta/package.rds and b/win32/deps/library/tcltk/Meta/package.rds differ
diff --git a/win32/deps/library/tcltk/NAMESPACE b/win32/deps/library/tcltk/NAMESPACE
index a78c001..03cc88e 100644
--- a/win32/deps/library/tcltk/NAMESPACE
+++ b/win32/deps/library/tcltk/NAMESPACE
@@ -14,6 +14,7 @@ S3method(as.character, tclVar)
 S3method(as.double, tclObj)
 S3method(as.integer, tclObj)
 S3method(as.logical, tclObj)
+S3method(as.raw, tclObj)
 S3method(print, tclObj)
 S3method("[[", tclArray)
 S3method("[[<-", tclArray)
diff --git a/win32/deps/library/tcltk/R/tcltk b/win32/deps/library/tcltk/R/tcltk
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/tcltk/R/tcltk
+++ b/win32/deps/library/tcltk/R/tcltk
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/tcltk/R/tcltk.rdb b/win32/deps/library/tcltk/R/tcltk.rdb
index 332bdca..dc96e7c 100644
Binary files a/win32/deps/library/tcltk/R/tcltk.rdb and b/win32/deps/library/tcltk/R/tcltk.rdb differ
diff --git a/win32/deps/library/tcltk/R/tcltk.rdx b/win32/deps/library/tcltk/R/tcltk.rdx
index 43741c0..f49bb47 100644
Binary files a/win32/deps/library/tcltk/R/tcltk.rdx and b/win32/deps/library/tcltk/R/tcltk.rdx differ
diff --git a/win32/deps/library/tcltk/demo/tkcanvas.R b/win32/deps/library/tcltk/demo/tkcanvas.R
index 249ba2e..9783f4e 100644
--- a/win32/deps/library/tcltk/demo/tkcanvas.R
+++ b/win32/deps/library/tcltk/demo/tkcanvas.R
@@ -5,6 +5,8 @@
 ### It is a ripoff of the plot.tcl demo from the tk 8.0 distribution
 ### All I did was to add the code to plot the fitted regression line.
 
+#  Copyright (C) 2000-2008 The R Core Team
+
 require(tcltk) || stop("tcl/tk library not available")
 require(graphics); require(stats)
 local({
diff --git a/win32/deps/library/tcltk/demo/tkdensity.R b/win32/deps/library/tcltk/demo/tkdensity.R
index 6144ab5..1abf94f 100644
--- a/win32/deps/library/tcltk/demo/tkdensity.R
+++ b/win32/deps/library/tcltk/demo/tkdensity.R
@@ -1,4 +1,6 @@
-### Interactive density plots. Based on TCL version by Guido Masarotto
+### Interactive density plots. Based on Tcl version by Guido Masarotto
+
+#  Copyright (C) 2000-2009 The R Core Team
 
 require(tcltk) || stop("tcltk support is absent")
 require(graphics); require(stats)
@@ -40,7 +42,7 @@ local({
         replot()
     }
 
-
+    grDevices::devAskNewPage(FALSE) # override setting in demo()
     tclServiceMode(FALSE)
     base <- tktoplevel()
     tkwm.title(base, "Density")
diff --git a/win32/deps/library/tcltk/demo/tkfaq.R b/win32/deps/library/tcltk/demo/tkfaq.R
index 21c5bd0..a4556e8 100644
--- a/win32/deps/library/tcltk/demo/tkfaq.R
+++ b/win32/deps/library/tcltk/demo/tkfaq.R
@@ -1,3 +1,5 @@
+#  Copyright (C) 2000-2008 The R Core Team
+
 require(tcltk) || stop("tcltk support is absent")
 local({
     have_ttk <- as.character(tcl("info", "tclversion")) >= "8.5"
diff --git a/win32/deps/library/tcltk/demo/tkttest.R b/win32/deps/library/tcltk/demo/tkttest.R
index c2f8393..b0f37b9 100644
--- a/win32/deps/library/tcltk/demo/tkttest.R
+++ b/win32/deps/library/tcltk/demo/tkttest.R
@@ -1,3 +1,5 @@
+#  Copyright (C) 2000-2008 The R Core Team
+
 require(tcltk) || stop("tcltk support is absent")
 require(stats)
 
diff --git a/win32/deps/library/tcltk/exec/Tk-frontend.R b/win32/deps/library/tcltk/exec/Tk-frontend.R
index e828e7b..93c0cbf 100644
--- a/win32/deps/library/tcltk/exec/Tk-frontend.R
+++ b/win32/deps/library/tcltk/exec/Tk-frontend.R
@@ -1,6 +1,24 @@
+#  File src/library/tools/R/news.R
+#  Part of the R package, http://www.R-project.org
+#
+#  Copyright (C) 2003 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/
+
 {
     # NOTE: This file resides in the exec directory rather than the R
-    # directory  because it does not define functions but is intended to 
+    # directory  because it does not define functions but is intended to
     # be sourced into a running R.
     library(tcltk)
     tkStartGUI()
diff --git a/win32/deps/library/tcltk/exec/console.tcl b/win32/deps/library/tcltk/exec/console.tcl
index f41924f..3c63022 100644
--- a/win32/deps/library/tcltk/exec/console.tcl
+++ b/win32/deps/library/tcltk/exec/console.tcl
@@ -2,7 +2,7 @@ menu .menu
 toplevel .tk-R -menu .menu
 wm protocol .tk-R WM_DELETE_WINDOW {}
 pack [frame .tk-R.toolbar] -anchor n -fill x
-pack [text .tk-R.term -bg white -font 9x15]
+pack [text .tk-R.term -bg white -font [list Courier 14]] -expand true -fill both
 
 ## Implements a "stop button" which sends SIGINT to the R process.
 ## Unfortunately, SIGINTs are not handled gracefully...
diff --git a/win32/deps/library/tcltk/help/AnIndex b/win32/deps/library/tcltk/help/AnIndex
index 0943aaf..7f5e625 100644
--- a/win32/deps/library/tcltk/help/AnIndex
+++ b/win32/deps/library/tcltk/help/AnIndex
@@ -17,6 +17,8 @@ as.character.tclObj	TclInterface
 as.character.tclVar	TclInterface
 as.double.tclObj	TclInterface
 as.integer.tclObj	TclInterface
+as.logical.tclObj	TclInterface
+as.raw.tclObj	TclInterface
 as.tclObj	TclInterface
 close.tkProgressBar	tkProgressBar
 getTkProgressBar	tkProgressBar
diff --git a/win32/deps/library/tcltk/help/aliases.rds b/win32/deps/library/tcltk/help/aliases.rds
new file mode 100644
index 0000000..e03797f
Binary files /dev/null and b/win32/deps/library/tcltk/help/aliases.rds differ
diff --git a/win32/deps/library/tcltk/help/paths.rds b/win32/deps/library/tcltk/help/paths.rds
new file mode 100644
index 0000000..6c9c9c7
Binary files /dev/null and b/win32/deps/library/tcltk/help/paths.rds differ
diff --git a/win32/deps/library/tcltk/help/tcltk.rdb b/win32/deps/library/tcltk/help/tcltk.rdb
new file mode 100644
index 0000000..c2eee4a
Binary files /dev/null and b/win32/deps/library/tcltk/help/tcltk.rdb differ
diff --git a/win32/deps/library/tcltk/help/tcltk.rdx b/win32/deps/library/tcltk/help/tcltk.rdx
new file mode 100644
index 0000000..40ce073
Binary files /dev/null and b/win32/deps/library/tcltk/help/tcltk.rdx differ
diff --git a/win32/deps/library/tcltk/html/00Index.html b/win32/deps/library/tcltk/html/00Index.html
new file mode 100644
index 0000000..2ffbdeb
--- /dev/null
+++ b/win32/deps/library/tcltk/html/00Index.html
@@ -0,0 +1,664 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Tcl/Tk Interface</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Tcl/Tk Interface
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;tcltk&rsquo; version 2.15.2</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>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p align="center">
+<a href="# "> </a>
+<a href="#A">A</a>
+<a href="#C">C</a>
+<a href="#G">G</a>
+<a href="#I">I</a>
+<a href="#L">L</a>
+<a href="#N">N</a>
+<a href="#P">P</a>
+<a href="#S">S</a>
+<a href="#T">T</a>
+<a href="#misc">misc</a>
+</p>
+
+<table width="100%">
+<tr><td width="25%"><a href="tcltk-package.html">tcltk-package</a></td>
+<td>Tcl/Tk Interface</td></tr>
+</table>
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="TclInterface.html">addTclPath</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">as.character.tclObj</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">as.character.tclVar</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">as.double.tclObj</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">as.integer.tclObj</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">as.logical.tclObj</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">as.raw.tclObj</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">as.tclObj</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="tkProgressBar.html">close.tkProgressBar</a></td>
+<td>Progress Bars via Tk</td></tr>
+</table>
+
+<h2><a name="G">-- G --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="tkProgressBar.html">getTkProgressBar</a></td>
+<td>Progress Bars via Tk</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="TclInterface.html">is.tclObj</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">is.tkwin</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="TclInterface.html">length.tclArray</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">length&lt;-.tclArray</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="TclInterface.html">names.tclArray</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">names&lt;-.tclArray</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="TclInterface.html">print.tclObj</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="tkProgressBar.html">setTkProgressBar</a></td>
+<td>Progress Bars via Tk</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="TkCommands.html">tcl</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclArray</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tclclose</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tclfile.dir</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tclfile.tail</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">TclInterface</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclObj</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclObj.tclVar</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclObj&lt;-</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclObj&lt;-.tclVar</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tclopen</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tclputs</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tclread</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclRequire</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="tclServiceMode.html">tclServiceMode</a></td>
+<td>Allow Tcl events to be serviced or not</td></tr>
+<tr><td width="25%"><a href="tcltk-package.html">tcltk</a></td>
+<td>Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclvalue</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclvalue.default</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclvalue.tclObj</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclvalue.tclVar</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclvalue&lt;-</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclvalue&lt;-.default</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclvalue&lt;-.tclVar</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclVar</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tclvar</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkactivate</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkadd</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkaddtag</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkbbox</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkbell</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkbind</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkbindtags</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tkbutton</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tkcanvas</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkcanvasx</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkcanvasy</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkcget</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tkcheckbutton</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkchooseDirectory</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkclipboard.append</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkclipboard.clear</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">TkCommands</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkcompare</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkconfigure</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkcoords</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkcreate</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkcurselection</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkdchars</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkdebug</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkdelete</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkdelta</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkdeselect</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">tkdestroy</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkdialog</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkdlineinfo</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkdtag</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkdump</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tkentry</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkentrycget</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkentryconfigure</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkevent.add</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkevent.delete</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkevent.generate</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkevent.info</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkfind</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkflash</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkfocus</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkfont.actual</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkfont.configure</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkfont.create</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkfont.delete</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkfont.families</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkfont.measure</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkfont.metrics</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkfont.names</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkfraction</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tkframe</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkget</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgetOpenFile</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgetSaveFile</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkgettags</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrab</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrab.current</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrab.release</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrab.set</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrab.status</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrid</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrid.bbox</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrid.columnconfigure</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrid.configure</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrid.forget</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrid.info</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrid.location</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrid.propagate</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrid.remove</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrid.rowconfigure</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrid.size</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkgrid.slaves</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkicursor</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkidentify</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkimage.cget</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkimage.configure</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkimage.create</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkimage.names</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkindex</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkinsert</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkinvoke</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkitembind</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkitemcget</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkitemconfigure</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkitemfocus</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkitemlower</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkitemraise</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkitemscale</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tklabel</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tklistbox</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tklower</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkmark.gravity</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkmark.names</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkmark.next</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkmark.previous</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkmark.set</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkmark.unset</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tkmenu</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tkmenubutton</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tkmessage</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkmessageBox</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkmove</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tknearest</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkpack</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkpack.configure</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkpack.forget</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkpack.info</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkpack.propagate</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkpack.slaves</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="tkpager.html">tkpager</a></td>
+<td>Page file using Tk text widget</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkplace</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkplace.configure</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkplace.forget</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkplace.info</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkplace.slaves</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkpopup</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkpost</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkpostcascade</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkpostscript</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="tkProgressBar.html">tkProgressBar</a></td>
+<td>Progress Bars via Tk</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tkradiobutton</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkraise</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tkscale</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkscan.dragto</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkscan.mark</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tkscrollbar</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tksearch</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tksee</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkselect</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkselection.adjust</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkselection.anchor</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkselection.clear</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkselection.from</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkselection.includes</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkselection.present</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkselection.range</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkselection.set</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkselection.to</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkset</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tksize</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="tkStartGUI.html">tkStartGUI</a></td>
+<td>Tcl/Tk GUI startup</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktag.add</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktag.bind</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktag.cget</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktag.configure</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktag.delete</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktag.lower</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktag.names</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktag.nextrange</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktag.prevrange</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktag.raise</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktag.ranges</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktag.remove</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tktext</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tktitle</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tktitle&lt;-</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktoggle</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tktoplevel</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tktype</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkunpost</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwait.variable</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwait.visibility</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwait.window</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">tkwidget</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">TkWidgetcmds</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">TkWidgets</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkwindow.cget</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkwindow.configure</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkwindow.create</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkwindow.names</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwinfo</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.aspect</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.client</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.colormapwindows</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.command</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.deiconify</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.focusmodel</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.frame</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.geometry</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.grid</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.group</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.iconbitmap</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.iconify</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.iconmask</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.iconname</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.iconposition</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.iconwindow</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.maxsize</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.minsize</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.overrideredirect</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.positionfrom</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.protocol</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.resizable</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.sizefrom</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.state</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.title</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.transient</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkwm.withdraw</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkXselection.clear</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkXselection.get</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkXselection.handle</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkCommands.html">tkXselection.own</a></td>
+<td>Tk non-widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkxview</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkxview.moveto</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkxview.scroll</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkyposition</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkyview</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkyview.moveto</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="TkWidgetcmds.html">tkyview.scroll</a></td>
+<td>Tk widget commands</td></tr>
+<tr><td width="25%"><a href="tk_choose.dir.html">tk_choose.dir</a></td>
+<td>Choose a Folder Interactively</td></tr>
+<tr><td width="25%"><a href="tk_choose.files.html">tk_choose.files</a></td>
+<td>Choose a List of Files Interactively</td></tr>
+<tr><td width="25%"><a href="tk_messageBox.html">tk_messageBox</a></td>
+<td>Tk Message Box</td></tr>
+<tr><td width="25%"><a href="tk_select.list.html">tk_select.list</a></td>
+<td>Select Items from a List</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttkbutton</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttkcheckbutton</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttkcombobox</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttkentry</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttkframe</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttkimage</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttklabel</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttklabelframe</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttkmenubutton</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttknotebook</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttkpanedwindow</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttkprogressbar</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttkradiobutton</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttkscrollbar</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttkseparator</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttksizegrip</a></td>
+<td>Tk widgets</td></tr>
+<tr><td width="25%"><a href="TkWidgets.html">ttktreeview</a></td>
+<td>Tk widgets</td></tr>
+</table>
+
+<h2><a name="misc">-- misc --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="TclInterface.html">$.tclArray</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">$&lt;-.tclArray</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">.Tcl</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">.Tcl.args</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">.Tcl.args.objv</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">.Tcl.callback</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">.Tcl.objv</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">.Tk.ID</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">.Tk.newwin</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">.Tk.subwin</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">.TkRoot</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">[[.tclArray</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+<tr><td width="25%"><a href="TclInterface.html">[[&lt;-.tclArray</a></td>
+<td>Low-level Tcl/Tk Interface</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/tcltk/html/R.css b/win32/deps/library/tcltk/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/tcltk/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/tcltk/libs/i386/tcltk.dll b/win32/deps/library/tcltk/libs/i386/tcltk.dll
new file mode 100644
index 0000000..8bb20d7
Binary files /dev/null and b/win32/deps/library/tcltk/libs/i386/tcltk.dll differ
diff --git a/win32/deps/library/tcltk/po/da/LC_MESSAGES/R-tcltk.mo b/win32/deps/library/tcltk/po/da/LC_MESSAGES/R-tcltk.mo
new file mode 100644
index 0000000..4a39272
Binary files /dev/null and b/win32/deps/library/tcltk/po/da/LC_MESSAGES/R-tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/da/LC_MESSAGES/tcltk.mo b/win32/deps/library/tcltk/po/da/LC_MESSAGES/tcltk.mo
new file mode 100644
index 0000000..19e8f4b
Binary files /dev/null and b/win32/deps/library/tcltk/po/da/LC_MESSAGES/tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/de/LC_MESSAGES/R-tcltk.mo b/win32/deps/library/tcltk/po/de/LC_MESSAGES/R-tcltk.mo
new file mode 100644
index 0000000..315550c
Binary files /dev/null and b/win32/deps/library/tcltk/po/de/LC_MESSAGES/R-tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/de/LC_MESSAGES/tcltk.mo b/win32/deps/library/tcltk/po/de/LC_MESSAGES/tcltk.mo
new file mode 100644
index 0000000..ad384b7
Binary files /dev/null and b/win32/deps/library/tcltk/po/de/LC_MESSAGES/tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/en quot/LC_MESSAGES/R-tcltk.mo b/win32/deps/library/tcltk/po/en quot/LC_MESSAGES/R-tcltk.mo
new file mode 100644
index 0000000..408b232
Binary files /dev/null and b/win32/deps/library/tcltk/po/en quot/LC_MESSAGES/R-tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/en quot/LC_MESSAGES/tcltk.mo b/win32/deps/library/tcltk/po/en quot/LC_MESSAGES/tcltk.mo
new file mode 100644
index 0000000..4bfd5ef
Binary files /dev/null and b/win32/deps/library/tcltk/po/en quot/LC_MESSAGES/tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/fr/LC_MESSAGES/R-tcltk.mo b/win32/deps/library/tcltk/po/fr/LC_MESSAGES/R-tcltk.mo
new file mode 100644
index 0000000..79c88d2
Binary files /dev/null and b/win32/deps/library/tcltk/po/fr/LC_MESSAGES/R-tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/fr/LC_MESSAGES/tcltk.mo b/win32/deps/library/tcltk/po/fr/LC_MESSAGES/tcltk.mo
new file mode 100644
index 0000000..1199726
Binary files /dev/null and b/win32/deps/library/tcltk/po/fr/LC_MESSAGES/tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/it/LC_MESSAGES/R-tcltk.mo b/win32/deps/library/tcltk/po/it/LC_MESSAGES/R-tcltk.mo
new file mode 100644
index 0000000..72efedb
Binary files /dev/null and b/win32/deps/library/tcltk/po/it/LC_MESSAGES/R-tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/ja/LC_MESSAGES/R-tcltk.mo b/win32/deps/library/tcltk/po/ja/LC_MESSAGES/R-tcltk.mo
new file mode 100644
index 0000000..cfa6f57
Binary files /dev/null and b/win32/deps/library/tcltk/po/ja/LC_MESSAGES/R-tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/ja/LC_MESSAGES/tcltk.mo b/win32/deps/library/tcltk/po/ja/LC_MESSAGES/tcltk.mo
new file mode 100644
index 0000000..c2d1317
Binary files /dev/null and b/win32/deps/library/tcltk/po/ja/LC_MESSAGES/tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/ko/LC_MESSAGES/R-tcltk.mo b/win32/deps/library/tcltk/po/ko/LC_MESSAGES/R-tcltk.mo
new file mode 100644
index 0000000..a46a6a9
Binary files /dev/null and b/win32/deps/library/tcltk/po/ko/LC_MESSAGES/R-tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/ko/LC_MESSAGES/tcltk.mo b/win32/deps/library/tcltk/po/ko/LC_MESSAGES/tcltk.mo
new file mode 100644
index 0000000..42f3d81
Binary files /dev/null and b/win32/deps/library/tcltk/po/ko/LC_MESSAGES/tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/pl/LC_MESSAGES/R-tcltk.mo b/win32/deps/library/tcltk/po/pl/LC_MESSAGES/R-tcltk.mo
new file mode 100644
index 0000000..54f4f98
Binary files /dev/null and b/win32/deps/library/tcltk/po/pl/LC_MESSAGES/R-tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/pl/LC_MESSAGES/tcltk.mo b/win32/deps/library/tcltk/po/pl/LC_MESSAGES/tcltk.mo
new file mode 100644
index 0000000..c23aba9
Binary files /dev/null and b/win32/deps/library/tcltk/po/pl/LC_MESSAGES/tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/pt_BR/LC_MESSAGES/R-tcltk.mo b/win32/deps/library/tcltk/po/pt_BR/LC_MESSAGES/R-tcltk.mo
new file mode 100644
index 0000000..6819970
Binary files /dev/null and b/win32/deps/library/tcltk/po/pt_BR/LC_MESSAGES/R-tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/pt_BR/LC_MESSAGES/tcltk.mo b/win32/deps/library/tcltk/po/pt_BR/LC_MESSAGES/tcltk.mo
new file mode 100644
index 0000000..b602c33
Binary files /dev/null and b/win32/deps/library/tcltk/po/pt_BR/LC_MESSAGES/tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/ru/LC_MESSAGES/R-tcltk.mo b/win32/deps/library/tcltk/po/ru/LC_MESSAGES/R-tcltk.mo
new file mode 100644
index 0000000..2ef469a
Binary files /dev/null and b/win32/deps/library/tcltk/po/ru/LC_MESSAGES/R-tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/ru/LC_MESSAGES/tcltk.mo b/win32/deps/library/tcltk/po/ru/LC_MESSAGES/tcltk.mo
new file mode 100644
index 0000000..5a424a5
Binary files /dev/null and b/win32/deps/library/tcltk/po/ru/LC_MESSAGES/tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/zh_CN/LC_MESSAGES/R-tcltk.mo b/win32/deps/library/tcltk/po/zh_CN/LC_MESSAGES/R-tcltk.mo
new file mode 100644
index 0000000..0354ed0
Binary files /dev/null and b/win32/deps/library/tcltk/po/zh_CN/LC_MESSAGES/R-tcltk.mo differ
diff --git a/win32/deps/library/tcltk/po/zh_CN/LC_MESSAGES/tcltk.mo b/win32/deps/library/tcltk/po/zh_CN/LC_MESSAGES/tcltk.mo
new file mode 100644
index 0000000..b66c5e1
Binary files /dev/null and b/win32/deps/library/tcltk/po/zh_CN/LC_MESSAGES/tcltk.mo differ
diff --git a/win32/deps/library/tools/DESCRIPTION b/win32/deps/library/tools/DESCRIPTION
index 68a2ced..388c890 100644
--- a/win32/deps/library/tools/DESCRIPTION
+++ b/win32/deps/library/tools/DESCRIPTION
@@ -1,10 +1,9 @@
 Package: tools
-Version: 2.9.2
+Version: 2.15.2
 Priority: base
 Title: Tools for Package Development
-Author: Kurt Hornik and Friedrich Leisch
+Author: R Core Team
 Maintainer: R Core Team <R-core r-project org>
-Description: Tools for package development, administration and
-        documentation
-License: Part of R 2.9.2
-Built: R 2.9.2; i386-pc-mingw32; 2009-08-24 12:43:32 UTC; windows
+Description: Tools for package development, administration and documentation
+License: Part of R 2.15.2
+Built: R 2.15.2; x86_64-w64-mingw32; 2012-10-27 03:04:38 UTC; windows
diff --git a/win32/deps/library/tools/INDEX b/win32/deps/library/tools/INDEX
index 7ca09f1..c6f7937 100644
--- a/win32/deps/library/tools/INDEX
+++ b/win32/deps/library/tools/INDEX
@@ -1,31 +1,53 @@
 Adobe_glyphs            Conversion Tables between Character Sets
+HTMLheader              Generate a standard HTML header for R help
 QC                      QC Checks for R Code and/or Documentation
-Rd2HTML                 Work with an Rd object
+Rd2HTML                 Rd Converters
+Rd2txt_options          Set formatting options for text help
+RdTextFilter            Select text in an Rd file.
 Rd_db                   Rd Utilities
-Rdiff                   Difference \R Output Files
+Rdiff                   Difference R Output Files
 Rdindex                 Generate Index from Rd Files
+SweaveTeXFilter         Strip R code out of Sweave file
+add_datalist            Add a 'datalist' File to a Package
+bibstyle                Select or define a bibliography style.
 buildVignettes          List and Build Package Vignettes
 checkFF                 Check Foreign Function Calls
 checkMD5sums            Check and Create MD5 Checksum Files
+checkPoFiles            Check translation files for inconsistent format
+                        strings.
+checkRd                 Check an Rd Object
+checkRdaFiles           Report on Details of Saved Images or Re-saves
+                        them
 checkTnF                Check R Packages or Code for T/F
 checkVignettes          Check Package Vignettes
 codoc                   Check Code/Documentation Consistency
+compactPDF              Compact PDF Files
 delimMatch              Delimited Pattern Matching
 dependsOnPkgs           Find Reverse Dependencies
 encoded_text_to_latex   Translate non-ASCII Text to LaTeX Escapes
-file_path_as_absolute   File Utilities
+file_ext                File Utilities
+findHTMLlinks           Collect HTML Links from Package Documentation
 getDepList              Functions to Retrieve Dependency Information
 installFoundDepends     A function to install unresolved dependencies
-makeLazyLoading         Lazy Loading of Packages
 md5sum                  Compute MD5 Checksums
 package.dependencies    Check Package Dependencies
+package_dependencies    Computations on the Dependency Hierarchy of
+                        Packages
+parseLatex              These experimental functions work with a subset
+                        of LaTeX code.
 parse_Rd                Parse an Rd file
+pskill                  Kill a Process
+psnice                  Get or Set the Priority (Niceness) of a Process
 read.00Index            Read 00Index-style Files
 readNEWS                Read R's NEWS file or a similar one
-showNonASCII            Highlight non-ASCII characters
+showNonASCII            Pick Out Non-ASCII Characters
+startDynamicHelp        Start the Dynamic HTML Help System
 testInstalledPackage    Test Installed Packages
 texi2dvi                Compile LaTeX Files
-tools-deprecated        Deprecated Objects in Package tools
+toHTML                  Display an object in HTML.
+toRd                    Generic function to convert object to a
+                        fragment of Rd code.
+tools-deprecated        Deprecated Objects in Package 'tools'
 tools-package           Tools for Package Development
 undoc                   Find Undocumented Objects
 vignetteDepends         Retrieve Dependency Information for a Vignette
diff --git a/win32/deps/library/tools/Meta/Rd.rds b/win32/deps/library/tools/Meta/Rd.rds
index a5af79a..38fba28 100644
Binary files a/win32/deps/library/tools/Meta/Rd.rds and b/win32/deps/library/tools/Meta/Rd.rds differ
diff --git a/win32/deps/library/tools/Meta/hsearch.rds b/win32/deps/library/tools/Meta/hsearch.rds
index 3c2b59b..a40ec81 100644
Binary files a/win32/deps/library/tools/Meta/hsearch.rds and b/win32/deps/library/tools/Meta/hsearch.rds differ
diff --git a/win32/deps/library/tools/Meta/links.rds b/win32/deps/library/tools/Meta/links.rds
new file mode 100644
index 0000000..b60dbac
Binary files /dev/null and b/win32/deps/library/tools/Meta/links.rds differ
diff --git a/win32/deps/library/tools/Meta/nsInfo.rds b/win32/deps/library/tools/Meta/nsInfo.rds
index b65daa7..76a2b4e 100644
Binary files a/win32/deps/library/tools/Meta/nsInfo.rds and b/win32/deps/library/tools/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/tools/Meta/package.rds b/win32/deps/library/tools/Meta/package.rds
index afdea5e..fa975ea 100644
Binary files a/win32/deps/library/tools/Meta/package.rds and b/win32/deps/library/tools/Meta/package.rds differ
diff --git a/win32/deps/library/tools/NAMESPACE b/win32/deps/library/tools/NAMESPACE
index 83ae095..c18cbfb 100644
--- a/win32/deps/library/tools/NAMESPACE
+++ b/win32/deps/library/tools/NAMESPACE
@@ -1,26 +1,80 @@
 useDynLib(tools, .registration = TRUE)
 
-export("Rd2HTML", "Rd2ex", "Rd2latex", "Rd2txt", "Rdindex",
-       "checkDocFiles", "checkDocStyle", "checkFF", "checkMD5sums",
-       "checkReplaceFuns", "checkS3methods", "checkTnF",
-       "checkVignettes", "codoc", "codocClasses", "codocData",
-       "md5sum", "undoc", "file_path_as_absolute",
-       "file_path_sans_ext", "list_files_with_exts", "findHTMLlinks",
-       "list_files_with_type", "showNonASCII", "delimMatch",
-       "parse_Rd", "checkRd", "texi2dvi", "buildVignettes",
-       "pkgVignettes", "pkgDepends", "getDepList",
-       "installFoundDepends", "vignetteDepends", "write_PACKAGES",
-       "xgettext", "xgettext2pot", "xngettext",
-       "encoded_text_to_latex", "charset_to_Unicode", "Adobe_glyphs",
-       "checkNEWS", "readNEWS", "dependsOnPkgs", "Rdiff",
-       "testInstalledBasic", "testInstalledPackage",
-       "testInstalledPackages")
-
-export("Rd_db", "Rd_parse", "package.dependencies", "read.00Index")
+export("Adobe_glyphs", "HTMLheader", "Rd2HTML", "Rd2ex", "Rd2latex",
+       "Rd2txt", "Rd2txt_options", "RdTextFilter", "Rd_db",
+       "Rd_parse", "Rdiff", "Rdindex", "SweaveTeXFilter",
+       "add_datalist", "bibstyle", "buildVignettes",
+       "charset_to_Unicode", "checkDocFiles", "checkDocStyle",
+       "checkFF", "checkMD5sums", "checkNEWS", "checkRd",
+       "checkPoFile", "checkPoFiles", "checkRdaFiles", "checkReplaceFuns",
+       "checkS3methods", "checkTnF", "checkVignettes", "codoc",
+       "codocClasses", "codocData", "compactPDF", "delimMatch",
+       "deparseLatex", "dependsOnPkgs", "encoded_text_to_latex",
+       "file_ext", "file_path_as_absolute", "file_path_sans_ext",
+       "findHTMLlinks", "getDepList", "installFoundDepends",
+       "latexToUtf8", "list_files_with_exts", "list_files_with_type",
+       "md5sum", "package.dependencies", "package_dependencies",
+       "parseLatex", "parse_Rd", "pkgDepends", "pkgVignettes",
+       "pskill", "psnice", "read.00Index", "readNEWS",
+       "resaveRdaFiles", "showNonASCII", "showNonASCIIfile",
+       "startDynamicHelp", "testInstalledBasic",
+       "testInstalledPackage", "testInstalledPackages", "texi2dvi",
+       "texi2pdf", "toHTML", "toRd", "undoc", "vignetteDepends",
+       "write_PACKAGES", "xgettext", "xgettext2pot", "xngettext")
 
+exportPattern("^SIG.+")
+
+S3method("[", "pdf_doc")
+S3method("[[", "pdf_doc")
+
+S3method("as.character", "Rd")
+
+S3method("format", "check_Rd_contents")
+S3method("format", "check_Rd_metadata")
+S3method("format", "check_Rd_xrefs")
+S3method("format", "check_T_and_F")
+S3method("format", "check_code_usage_in_package")
+S3method("format", "check_compiled_code")
+S3method("format", "check_dotInternal")
+S3method("format", "check_make_vars")
+S3method("format", "check_package_CRAN_incoming")
+S3method("format", "check_package_code_startup_functions")
+S3method("format", "check_package_datasets")
+S3method("format", "check_package_depends")
+S3method("format", "check_package_description_encoding")
+S3method("format", "check_package_license")
+S3method("format", "check_packages_used")
+S3method("format", "check_so_symbols")
+S3method("format", "checkDocFiles")
+S3method("format", "checkDocStyle")
+S3method("format", "checkFF")
+S3method("format", "checkReplaceFuns")
+S3method("format", "checkS3methods")
+S3method("format", "checkTnF")
+S3method("format", "codocClasses")
+S3method("format", "codocData")
+S3method("format", "compactPDF")
+S3method("format", "subdir_tests")
+S3method("format", "undoc")
+
+S3method("format", "pdf_fonts")
+S3method("format", "pdf_info")
+S3method("format", "PDF_Array")
+S3method("format", "PDF_Dictionary")
+S3method("format", "PDF_Indirect_Reference")
+S3method("format", "PDF_Stream")
+S3method("format", "PDF_String")
+
+S3method("length", "pdf_doc")
+
+S3method("names", "pdf_doc")
+
+S3method("print", "LaTeX")
+S3method("print", "Rd")
 S3method("print", "checkDocFiles")
 S3method("print", "checkDocStyle")
 S3method("print", "checkFF")
+S3method("print", "checkRd")
 S3method("print", "checkReplaceFuns")
 S3method("print", "checkS3methods")
 S3method("print", "checkTnF")
@@ -28,26 +82,51 @@ S3method("print", "checkVignettes")
 S3method("print", "codoc")
 S3method("print", "codocClasses")
 S3method("print", "codocData")
-S3method("print", "Rd")
+S3method("print", "compactPDF")
 S3method("print", "subdir_tests")
 S3method("print", "undoc")
 S3method("print", "xgettext")
 S3method("print", "xngettext")
 
-S3method("print", "check_Rd_files_in_Rd_db")
+S3method("print", "pdf_doc")
+S3method("print", "pdf_fonts")
+S3method("print", "pdf_info")
+S3method("print", "PDF_Array")
+S3method("print", "PDF_Dictionary")
+S3method("print", "PDF_Indirect_Reference")
+S3method("print", "PDF_Keyword")
+S3method("print", "PDF_Name")
+S3method("print", "PDF_Stream")
+S3method("print", "PDF_String")
+
+S3method("print", "check_Rd_contents")
+S3method("print", "check_Rd_metadata")
 S3method("print", "check_Rd_xrefs")
 S3method("print", "check_T_and_F")
 S3method("print", "check_code_usage_in_package")
+S3method("print", "check_compiled_code")
 S3method("print", "check_demo_index")
 S3method("print", "check_dotInternal")
 S3method("print", "check_make_vars")
+S3method("print", "check_package_CRAN_incoming")
+S3method("print", "check_package_code_startup_functions")
 S3method("print", "check_package_code_syntax")
 S3method("print", "check_package_depends")
 S3method("print", "check_package_description")
 S3method("print", "check_package_description_encoding")
 S3method("print", "check_package_license")
 S3method("print", "check_package_datasets")
+S3method("print", "check_package_compact_datasets")
 S3method("print", "check_packages_used")
+S3method("print", "check_po_files")
+S3method("print", "check_so_symbols")
 S3method("print", "check_vignette_index")
 
-S3method("as.character", "Rd")
+S3method("summary", "PDF_Dictionary")
+S3method("summary", "PDF_Stream")
+
+S3method("toHTML", "news_db")
+S3method("toHTML", "packageIQR")
+
+S3method("toRd", "bibentry")
+S3method("toRd", "default")
diff --git a/win32/deps/library/tools/R/tools b/win32/deps/library/tools/R/tools
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/tools/R/tools
+++ b/win32/deps/library/tools/R/tools
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/tools/R/tools.rdb b/win32/deps/library/tools/R/tools.rdb
index 0efb6b9..b931957 100644
Binary files a/win32/deps/library/tools/R/tools.rdb and b/win32/deps/library/tools/R/tools.rdb differ
diff --git a/win32/deps/library/tools/R/tools.rdx b/win32/deps/library/tools/R/tools.rdx
index 3f93793..57e7927 100644
Binary files a/win32/deps/library/tools/R/tools.rdx and b/win32/deps/library/tools/R/tools.rdx differ
diff --git a/win32/deps/library/tools/help/AnIndex b/win32/deps/library/tools/help/AnIndex
index 7f8ee98..3397017 100644
--- a/win32/deps/library/tools/help/AnIndex
+++ b/win32/deps/library/tools/help/AnIndex
@@ -1,5 +1,8 @@
 tools-package	tools-package
+add_datalist	add_datalist
 Adobe_glyphs	charsets
+as.character.Rd	parse_Rd
+bibstyle	bibstyle
 buildVignettes	buildVignettes
 charset_to_Unicode	charsets
 checkDocFiles	QC
@@ -7,7 +10,10 @@ checkDocStyle	QC
 checkFF	checkFF
 checkMD5sums	checkMD5sums
 checkNEWS	readNEWS
-checkRd	Rd2HTML
+checkPoFile	checkPoFiles
+checkPoFiles	checkPoFiles
+checkRd	checkRd
+checkRdaFiles	checkRdaFiles
 checkReplaceFuns	QC
 checkS3methods	QC
 checkTnF	checkTnF
@@ -15,19 +21,28 @@ checkVignettes	checkVignettes
 codoc	codoc
 codocClasses	codoc
 codocData	codoc
+compactPDF	compactPDF
 delimMatch	delimMatch
+deparseLatex	parseLatex
 dependsOnPkgs	dependsOnPkgs
 encoded_text_to_latex	encoded
+file_ext	fileutils
 file_path_as_absolute	fileutils
 file_path_sans_ext	fileutils
-findHTMLlinks	Rd2HTML
+findHTMLlinks	HTMLlinks
+format.compactPDF	compactPDF
 getDepList	getDepList
+help.ports	startDynamicHelp
+HTMLheader	HTMLheader
 installFoundDepends	installFoundDepends
+latexToUtf8	parseLatex
 list_files_with_exts	fileutils
 list_files_with_type	fileutils
 makeLazyLoading	makeLazyLoading
 md5sum	md5sum
 package.dependencies	package.dependencies
+package_dependencies	package_dependencies
+parseLatex	parseLatex
 parse_Rd	parse_Rd
 pkgDepends	getDepList
 pkgVignettes	buildVignettes
@@ -41,26 +56,53 @@ print.checkVignettes	checkVignettes
 print.codoc	codoc
 print.codocClasses	codoc
 print.codocData	codoc
+print.Rd	parse_Rd
 print.undoc	undoc
+pskill	pskill
+psnice	psnice
 QC	QC
 Rd2ex	Rd2HTML
 Rd2HTML	Rd2HTML
 Rd2latex	Rd2HTML
 Rd2txt	Rd2HTML
+Rd2txt_options	Rd2txt_options
 Rdiff	Rdiff
 Rdindex	Rdindex
+RdTextFilter	RdTextFilter
 Rd_db	Rdutils
-Rd_parse	Rdutils
+Rd_parse	tools-defunct
 read.00Index	read.00Index
 readNEWS	readNEWS
+resaveRdaFiles	checkRdaFiles
 showNonASCII	showNonASCII
+showNonASCIIfile	showNonASCII
+SIGCHLD	pskill
+SIGCONT	pskill
+SIGHUP	pskill
+SIGINT	pskill
+SIGKILL	pskill
+SIGQUIT	pskill
+SIGSTOP	pskill
+SIGTERM	pskill
+SIGTSTP	pskill
+SIGUSR1	pskill
+SIGUSR2	pskill
+startDynamicHelp	startDynamicHelp
+SweaveTeXFilter	SweaveTeXFilter
 testInstalledBasic	testInstalledPackage
 testInstalledPackage	testInstalledPackage
 testInstalledPackages	testInstalledPackage
 texi2dvi	texi2dvi
+texi2pdf	texi2dvi
+toHTML	toHTML
+toHTML.news_db	toHTML
+toHTML.packageIQR	toHTML
 tools	tools-package
 tools-defunct	tools-defunct
 tools-deprecated	tools-deprecated
+toRd	toRd
+toRd.bibentry	toRd
+toRd.default	toRd
 undoc	undoc
 vignetteDepends	vignetteDepends
 write_PACKAGES	writePACKAGES
diff --git a/win32/deps/library/tools/help/aliases.rds b/win32/deps/library/tools/help/aliases.rds
new file mode 100644
index 0000000..f7b0104
Binary files /dev/null and b/win32/deps/library/tools/help/aliases.rds differ
diff --git a/win32/deps/library/tools/help/paths.rds b/win32/deps/library/tools/help/paths.rds
new file mode 100644
index 0000000..234dacf
Binary files /dev/null and b/win32/deps/library/tools/help/paths.rds differ
diff --git a/win32/deps/library/tools/help/tools.rdb b/win32/deps/library/tools/help/tools.rdb
new file mode 100644
index 0000000..fd9ac7e
Binary files /dev/null and b/win32/deps/library/tools/help/tools.rdb differ
diff --git a/win32/deps/library/tools/help/tools.rdx b/win32/deps/library/tools/help/tools.rdx
new file mode 100644
index 0000000..edee4e0
Binary files /dev/null and b/win32/deps/library/tools/help/tools.rdx differ
diff --git a/win32/deps/library/tools/html/00Index.html b/win32/deps/library/tools/html/00Index.html
new file mode 100644
index 0000000..4997d09
--- /dev/null
+++ b/win32/deps/library/tools/html/00Index.html
@@ -0,0 +1,363 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Tools for Package Development</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> Tools for Package Development
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;tools&rsquo; version 2.15.2</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p 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="#H">H</a>
+<a href="#I">I</a>
+<a href="#L">L</a>
+<a href="#M">M</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="#X">X</a>
+</p>
+
+<table width="100%">
+<tr><td width="25%"><a href="tools-package.html">tools-package</a></td>
+<td>Tools for Package Development</td></tr>
+</table>
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="add_datalist.html">add_datalist</a></td>
+<td>Add a 'datalist' File to a Package</td></tr>
+<tr><td width="25%"><a href="charsets.html">Adobe_glyphs</a></td>
+<td>Conversion Tables between Character Sets</td></tr>
+<tr><td width="25%"><a href="parse_Rd.html">as.character.Rd</a></td>
+<td>Parse an Rd file</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="bibstyle.html">bibstyle</a></td>
+<td>Select or define a bibliography style.</td></tr>
+<tr><td width="25%"><a href="buildVignettes.html">buildVignettes</a></td>
+<td>List and Build Package Vignettes</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="charsets.html">charset_to_Unicode</a></td>
+<td>Conversion Tables between Character Sets</td></tr>
+<tr><td width="25%"><a href="QC.html">checkDocFiles</a></td>
+<td>QC Checks for R Code and/or Documentation</td></tr>
+<tr><td width="25%"><a href="QC.html">checkDocStyle</a></td>
+<td>QC Checks for R Code and/or Documentation</td></tr>
+<tr><td width="25%"><a href="checkFF.html">checkFF</a></td>
+<td>Check Foreign Function Calls</td></tr>
+<tr><td width="25%"><a href="checkMD5sums.html">checkMD5sums</a></td>
+<td>Check and Create MD5 Checksum Files</td></tr>
+<tr><td width="25%"><a href="readNEWS.html">checkNEWS</a></td>
+<td>Read R's NEWS file or a similar one</td></tr>
+<tr><td width="25%"><a href="checkPoFiles.html">checkPoFile</a></td>
+<td>Check translation files for inconsistent format strings.</td></tr>
+<tr><td width="25%"><a href="checkPoFiles.html">checkPoFiles</a></td>
+<td>Check translation files for inconsistent format strings.</td></tr>
+<tr><td width="25%"><a href="checkRd.html">checkRd</a></td>
+<td>Check an Rd Object</td></tr>
+<tr><td width="25%"><a href="checkRdaFiles.html">checkRdaFiles</a></td>
+<td>Report on Details of Saved Images or Re-saves them</td></tr>
+<tr><td width="25%"><a href="QC.html">checkReplaceFuns</a></td>
+<td>QC Checks for R Code and/or Documentation</td></tr>
+<tr><td width="25%"><a href="QC.html">checkS3methods</a></td>
+<td>QC Checks for R Code and/or Documentation</td></tr>
+<tr><td width="25%"><a href="checkTnF.html">checkTnF</a></td>
+<td>Check R Packages or Code for T/F</td></tr>
+<tr><td width="25%"><a href="checkVignettes.html">checkVignettes</a></td>
+<td>Check Package Vignettes</td></tr>
+<tr><td width="25%"><a href="codoc.html">codoc</a></td>
+<td>Check Code/Documentation Consistency</td></tr>
+<tr><td width="25%"><a href="codoc.html">codocClasses</a></td>
+<td>Check Code/Documentation Consistency</td></tr>
+<tr><td width="25%"><a href="codoc.html">codocData</a></td>
+<td>Check Code/Documentation Consistency</td></tr>
+<tr><td width="25%"><a href="compactPDF.html">compactPDF</a></td>
+<td>Compact PDF Files</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="delimMatch.html">delimMatch</a></td>
+<td>Delimited Pattern Matching</td></tr>
+<tr><td width="25%"><a href="parseLatex.html">deparseLatex</a></td>
+<td>These experimental functions work with a subset of LaTeX code.</td></tr>
+<tr><td width="25%"><a href="dependsOnPkgs.html">dependsOnPkgs</a></td>
+<td>Find Reverse Dependencies</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="encoded.html">encoded_text_to_latex</a></td>
+<td>Translate non-ASCII Text to LaTeX Escapes</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="fileutils.html">file_ext</a></td>
+<td>File Utilities</td></tr>
+<tr><td width="25%"><a href="fileutils.html">file_path_as_absolute</a></td>
+<td>File Utilities</td></tr>
+<tr><td width="25%"><a href="fileutils.html">file_path_sans_ext</a></td>
+<td>File Utilities</td></tr>
+<tr><td width="25%"><a href="HTMLlinks.html">findHTMLlinks</a></td>
+<td>Collect HTML Links from Package Documentation</td></tr>
+<tr><td width="25%"><a href="compactPDF.html">format.compactPDF</a></td>
+<td>Compact PDF Files</td></tr>
+</table>
+
+<h2><a name="G">-- G --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="getDepList.html">getDepList</a></td>
+<td>Functions to Retrieve Dependency Information</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="startDynamicHelp.html">help.ports</a></td>
+<td>Start the Dynamic HTML Help System</td></tr>
+<tr><td width="25%"><a href="HTMLheader.html">HTMLheader</a></td>
+<td>Generate a standard HTML header for R help</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="installFoundDepends.html">installFoundDepends</a></td>
+<td>A function to install unresolved dependencies</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="parseLatex.html">latexToUtf8</a></td>
+<td>These experimental functions work with a subset of LaTeX code.</td></tr>
+<tr><td width="25%"><a href="fileutils.html">list_files_with_exts</a></td>
+<td>File Utilities</td></tr>
+<tr><td width="25%"><a href="fileutils.html">list_files_with_type</a></td>
+<td>File Utilities</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="md5sum.html">md5sum</a></td>
+<td>Compute MD5 Checksums</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="package.dependencies.html">package.dependencies</a></td>
+<td>Check Package Dependencies</td></tr>
+<tr><td width="25%"><a href="package_dependencies.html">package_dependencies</a></td>
+<td>Computations on the Dependency Hierarchy of Packages</td></tr>
+<tr><td width="25%"><a href="parseLatex.html">parseLatex</a></td>
+<td>These experimental functions work with a subset of LaTeX code.</td></tr>
+<tr><td width="25%"><a href="parse_Rd.html">parse_Rd</a></td>
+<td>Parse an Rd file</td></tr>
+<tr><td width="25%"><a href="getDepList.html">pkgDepends</a></td>
+<td>Functions to Retrieve Dependency Information</td></tr>
+<tr><td width="25%"><a href="buildVignettes.html">pkgVignettes</a></td>
+<td>List and Build Package Vignettes</td></tr>
+<tr><td width="25%"><a href="QC.html">print.checkDocFiles</a></td>
+<td>QC Checks for R Code and/or Documentation</td></tr>
+<tr><td width="25%"><a href="QC.html">print.checkDocStyle</a></td>
+<td>QC Checks for R Code and/or Documentation</td></tr>
+<tr><td width="25%"><a href="checkFF.html">print.checkFF</a></td>
+<td>Check Foreign Function Calls</td></tr>
+<tr><td width="25%"><a href="QC.html">print.checkReplaceFuns</a></td>
+<td>QC Checks for R Code and/or Documentation</td></tr>
+<tr><td width="25%"><a href="QC.html">print.checkS3methods</a></td>
+<td>QC Checks for R Code and/or Documentation</td></tr>
+<tr><td width="25%"><a href="checkTnF.html">print.checkTnF</a></td>
+<td>Check R Packages or Code for T/F</td></tr>
+<tr><td width="25%"><a href="checkVignettes.html">print.checkVignettes</a></td>
+<td>Check Package Vignettes</td></tr>
+<tr><td width="25%"><a href="codoc.html">print.codoc</a></td>
+<td>Check Code/Documentation Consistency</td></tr>
+<tr><td width="25%"><a href="codoc.html">print.codocClasses</a></td>
+<td>Check Code/Documentation Consistency</td></tr>
+<tr><td width="25%"><a href="codoc.html">print.codocData</a></td>
+<td>Check Code/Documentation Consistency</td></tr>
+<tr><td width="25%"><a href="parse_Rd.html">print.Rd</a></td>
+<td>Parse an Rd file</td></tr>
+<tr><td width="25%"><a href="undoc.html">print.undoc</a></td>
+<td>Find Undocumented Objects</td></tr>
+<tr><td width="25%"><a href="pskill.html">pskill</a></td>
+<td>Kill a Process</td></tr>
+<tr><td width="25%"><a href="psnice.html">psnice</a></td>
+<td>Get or Set the Priority (Niceness) of a Process</td></tr>
+</table>
+
+<h2><a name="Q">-- Q --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="QC.html">QC</a></td>
+<td>QC Checks for R Code and/or Documentation</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Rd2HTML.html">Rd2ex</a></td>
+<td>Rd Converters</td></tr>
+<tr><td width="25%"><a href="Rd2HTML.html">Rd2HTML</a></td>
+<td>Rd Converters</td></tr>
+<tr><td width="25%"><a href="Rd2HTML.html">Rd2latex</a></td>
+<td>Rd Converters</td></tr>
+<tr><td width="25%"><a href="Rd2HTML.html">Rd2txt</a></td>
+<td>Rd Converters</td></tr>
+<tr><td width="25%"><a href="Rd2txt_options.html">Rd2txt_options</a></td>
+<td>Set formatting options for text help</td></tr>
+<tr><td width="25%"><a href="Rdiff.html">Rdiff</a></td>
+<td>Difference R Output Files</td></tr>
+<tr><td width="25%"><a href="Rdindex.html">Rdindex</a></td>
+<td>Generate Index from Rd Files</td></tr>
+<tr><td width="25%"><a href="RdTextFilter.html">RdTextFilter</a></td>
+<td>Select text in an Rd file.</td></tr>
+<tr><td width="25%"><a href="Rdutils.html">Rd_db</a></td>
+<td>Rd Utilities</td></tr>
+<tr><td width="25%"><a href="read.00Index.html">read.00Index</a></td>
+<td>Read 00Index-style Files</td></tr>
+<tr><td width="25%"><a href="readNEWS.html">readNEWS</a></td>
+<td>Read R's NEWS file or a similar one</td></tr>
+<tr><td width="25%"><a href="checkRdaFiles.html">resaveRdaFiles</a></td>
+<td>Report on Details of Saved Images or Re-saves them</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="showNonASCII.html">showNonASCII</a></td>
+<td>Pick Out Non-ASCII Characters</td></tr>
+<tr><td width="25%"><a href="showNonASCII.html">showNonASCIIfile</a></td>
+<td>Pick Out Non-ASCII Characters</td></tr>
+<tr><td width="25%"><a href="pskill.html">SIGCHLD</a></td>
+<td>Kill a Process</td></tr>
+<tr><td width="25%"><a href="pskill.html">SIGCONT</a></td>
+<td>Kill a Process</td></tr>
+<tr><td width="25%"><a href="pskill.html">SIGHUP</a></td>
+<td>Kill a Process</td></tr>
+<tr><td width="25%"><a href="pskill.html">SIGINT</a></td>
+<td>Kill a Process</td></tr>
+<tr><td width="25%"><a href="pskill.html">SIGKILL</a></td>
+<td>Kill a Process</td></tr>
+<tr><td width="25%"><a href="pskill.html">SIGQUIT</a></td>
+<td>Kill a Process</td></tr>
+<tr><td width="25%"><a href="pskill.html">SIGSTOP</a></td>
+<td>Kill a Process</td></tr>
+<tr><td width="25%"><a href="pskill.html">SIGTERM</a></td>
+<td>Kill a Process</td></tr>
+<tr><td width="25%"><a href="pskill.html">SIGTSTP</a></td>
+<td>Kill a Process</td></tr>
+<tr><td width="25%"><a href="pskill.html">SIGUSR1</a></td>
+<td>Kill a Process</td></tr>
+<tr><td width="25%"><a href="pskill.html">SIGUSR2</a></td>
+<td>Kill a Process</td></tr>
+<tr><td width="25%"><a href="startDynamicHelp.html">startDynamicHelp</a></td>
+<td>Start the Dynamic HTML Help System</td></tr>
+<tr><td width="25%"><a href="SweaveTeXFilter.html">SweaveTeXFilter</a></td>
+<td>Strip R code out of Sweave file</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="testInstalledPackage.html">testInstalledBasic</a></td>
+<td>Test Installed Packages</td></tr>
+<tr><td width="25%"><a href="testInstalledPackage.html">testInstalledPackage</a></td>
+<td>Test Installed Packages</td></tr>
+<tr><td width="25%"><a href="testInstalledPackage.html">testInstalledPackages</a></td>
+<td>Test Installed Packages</td></tr>
+<tr><td width="25%"><a href="texi2dvi.html">texi2dvi</a></td>
+<td>Compile LaTeX Files</td></tr>
+<tr><td width="25%"><a href="texi2dvi.html">texi2pdf</a></td>
+<td>Compile LaTeX Files</td></tr>
+<tr><td width="25%"><a href="toHTML.html">toHTML</a></td>
+<td>Display an object in HTML.</td></tr>
+<tr><td width="25%"><a href="toHTML.html">toHTML.news_db</a></td>
+<td>Display an object in HTML.</td></tr>
+<tr><td width="25%"><a href="toHTML.html">toHTML.packageIQR</a></td>
+<td>Display an object in HTML.</td></tr>
+<tr><td width="25%"><a href="tools-package.html">tools</a></td>
+<td>Tools for Package Development</td></tr>
+<tr><td width="25%"><a href="tools-deprecated.html">tools-deprecated</a></td>
+<td>Deprecated Objects in Package 'tools'</td></tr>
+<tr><td width="25%"><a href="toRd.html">toRd</a></td>
+<td>Generic function to convert object to a fragment of Rd code.</td></tr>
+<tr><td width="25%"><a href="toRd.html">toRd.bibentry</a></td>
+<td>Generic function to convert object to a fragment of Rd code.</td></tr>
+<tr><td width="25%"><a href="toRd.html">toRd.default</a></td>
+<td>Generic function to convert object to a fragment of Rd code.</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="undoc.html">undoc</a></td>
+<td>Find Undocumented Objects</td></tr>
+</table>
+
+<h2><a name="V">-- V --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="vignetteDepends.html">vignetteDepends</a></td>
+<td>Retrieve Dependency Information for a Vignette</td></tr>
+</table>
+
+<h2><a name="W">-- W --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="writePACKAGES.html">write_PACKAGES</a></td>
+<td>Generate PACKAGES files</td></tr>
+</table>
+
+<h2><a name="X">-- X --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="xgettext.html">xgettext</a></td>
+<td>Extract Translatable Messages from R Files in a Package</td></tr>
+<tr><td width="25%"><a href="xgettext.html">xgettext2pot</a></td>
+<td>Extract Translatable Messages from R Files in a Package</td></tr>
+<tr><td width="25%"><a href="xgettext.html">xngettext</a></td>
+<td>Extract Translatable Messages from R Files in a Package</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/tools/html/R.css b/win32/deps/library/tools/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/tools/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/tools/libs/i386/tools.dll b/win32/deps/library/tools/libs/i386/tools.dll
new file mode 100644
index 0000000..b192243
Binary files /dev/null and b/win32/deps/library/tools/libs/i386/tools.dll differ
diff --git a/win32/deps/library/tools/po/da/LC_MESSAGES/R-tools.mo b/win32/deps/library/tools/po/da/LC_MESSAGES/R-tools.mo
new file mode 100644
index 0000000..4859111
Binary files /dev/null and b/win32/deps/library/tools/po/da/LC_MESSAGES/R-tools.mo differ
diff --git a/win32/deps/library/tools/po/da/LC_MESSAGES/tools.mo b/win32/deps/library/tools/po/da/LC_MESSAGES/tools.mo
new file mode 100644
index 0000000..998bd7b
Binary files /dev/null and b/win32/deps/library/tools/po/da/LC_MESSAGES/tools.mo differ
diff --git a/win32/deps/library/tools/po/de/LC_MESSAGES/R-tools.mo b/win32/deps/library/tools/po/de/LC_MESSAGES/R-tools.mo
new file mode 100644
index 0000000..3c8f8b4
Binary files /dev/null and b/win32/deps/library/tools/po/de/LC_MESSAGES/R-tools.mo differ
diff --git a/win32/deps/library/tools/po/de/LC_MESSAGES/tools.mo b/win32/deps/library/tools/po/de/LC_MESSAGES/tools.mo
new file mode 100644
index 0000000..343a2f3
Binary files /dev/null and b/win32/deps/library/tools/po/de/LC_MESSAGES/tools.mo differ
diff --git a/win32/deps/library/tools/po/en quot/LC_MESSAGES/R-tools.mo b/win32/deps/library/tools/po/en quot/LC_MESSAGES/R-tools.mo
new file mode 100644
index 0000000..f5e4b6b
Binary files /dev/null and b/win32/deps/library/tools/po/en quot/LC_MESSAGES/R-tools.mo differ
diff --git a/win32/deps/library/tools/po/en quot/LC_MESSAGES/tools.mo b/win32/deps/library/tools/po/en quot/LC_MESSAGES/tools.mo
new file mode 100644
index 0000000..3104bbe
Binary files /dev/null and b/win32/deps/library/tools/po/en quot/LC_MESSAGES/tools.mo differ
diff --git a/win32/deps/library/tools/po/fr/LC_MESSAGES/R-tools.mo b/win32/deps/library/tools/po/fr/LC_MESSAGES/R-tools.mo
new file mode 100644
index 0000000..852eac7
Binary files /dev/null and b/win32/deps/library/tools/po/fr/LC_MESSAGES/R-tools.mo differ
diff --git a/win32/deps/library/tools/po/fr/LC_MESSAGES/tools.mo b/win32/deps/library/tools/po/fr/LC_MESSAGES/tools.mo
new file mode 100644
index 0000000..8a29687
Binary files /dev/null and b/win32/deps/library/tools/po/fr/LC_MESSAGES/tools.mo differ
diff --git a/win32/deps/library/tools/po/it/LC_MESSAGES/R-tools.mo b/win32/deps/library/tools/po/it/LC_MESSAGES/R-tools.mo
new file mode 100644
index 0000000..0243224
Binary files /dev/null and b/win32/deps/library/tools/po/it/LC_MESSAGES/R-tools.mo differ
diff --git a/win32/deps/library/tools/po/it/LC_MESSAGES/tools.mo b/win32/deps/library/tools/po/it/LC_MESSAGES/tools.mo
new file mode 100644
index 0000000..57747e7
Binary files /dev/null and b/win32/deps/library/tools/po/it/LC_MESSAGES/tools.mo differ
diff --git a/win32/deps/library/tools/po/ja/LC_MESSAGES/R-tools.mo b/win32/deps/library/tools/po/ja/LC_MESSAGES/R-tools.mo
new file mode 100644
index 0000000..814640c
Binary files /dev/null and b/win32/deps/library/tools/po/ja/LC_MESSAGES/R-tools.mo differ
diff --git a/win32/deps/library/tools/po/ja/LC_MESSAGES/tools.mo b/win32/deps/library/tools/po/ja/LC_MESSAGES/tools.mo
new file mode 100644
index 0000000..4f0448c
Binary files /dev/null and b/win32/deps/library/tools/po/ja/LC_MESSAGES/tools.mo differ
diff --git a/win32/deps/library/tools/po/ko/LC_MESSAGES/R-tools.mo b/win32/deps/library/tools/po/ko/LC_MESSAGES/R-tools.mo
new file mode 100644
index 0000000..2d8bf96
Binary files /dev/null and b/win32/deps/library/tools/po/ko/LC_MESSAGES/R-tools.mo differ
diff --git a/win32/deps/library/tools/po/ko/LC_MESSAGES/tools.mo b/win32/deps/library/tools/po/ko/LC_MESSAGES/tools.mo
new file mode 100644
index 0000000..4a83874
Binary files /dev/null and b/win32/deps/library/tools/po/ko/LC_MESSAGES/tools.mo differ
diff --git a/win32/deps/library/tools/po/pl/LC_MESSAGES/R-tools.mo b/win32/deps/library/tools/po/pl/LC_MESSAGES/R-tools.mo
new file mode 100644
index 0000000..635e08d
Binary files /dev/null and b/win32/deps/library/tools/po/pl/LC_MESSAGES/R-tools.mo differ
diff --git a/win32/deps/library/tools/po/pl/LC_MESSAGES/tools.mo b/win32/deps/library/tools/po/pl/LC_MESSAGES/tools.mo
new file mode 100644
index 0000000..6f1ec90
Binary files /dev/null and b/win32/deps/library/tools/po/pl/LC_MESSAGES/tools.mo differ
diff --git a/win32/deps/library/tools/po/pt_BR/LC_MESSAGES/R-tools.mo b/win32/deps/library/tools/po/pt_BR/LC_MESSAGES/R-tools.mo
new file mode 100644
index 0000000..a458916
Binary files /dev/null and b/win32/deps/library/tools/po/pt_BR/LC_MESSAGES/R-tools.mo differ
diff --git a/win32/deps/library/tools/po/pt_BR/LC_MESSAGES/tools.mo b/win32/deps/library/tools/po/pt_BR/LC_MESSAGES/tools.mo
new file mode 100644
index 0000000..059d978
Binary files /dev/null and b/win32/deps/library/tools/po/pt_BR/LC_MESSAGES/tools.mo differ
diff --git a/win32/deps/library/tools/po/ru/LC_MESSAGES/R-tools.mo b/win32/deps/library/tools/po/ru/LC_MESSAGES/R-tools.mo
new file mode 100644
index 0000000..d579f73
Binary files /dev/null and b/win32/deps/library/tools/po/ru/LC_MESSAGES/R-tools.mo differ
diff --git a/win32/deps/library/tools/po/ru/LC_MESSAGES/tools.mo b/win32/deps/library/tools/po/ru/LC_MESSAGES/tools.mo
new file mode 100644
index 0000000..58d48c9
Binary files /dev/null and b/win32/deps/library/tools/po/ru/LC_MESSAGES/tools.mo differ
diff --git a/win32/deps/library/tools/po/tr/LC_MESSAGES/R-tools.mo b/win32/deps/library/tools/po/tr/LC_MESSAGES/R-tools.mo
new file mode 100644
index 0000000..4e5942e
Binary files /dev/null and b/win32/deps/library/tools/po/tr/LC_MESSAGES/R-tools.mo differ
diff --git a/win32/deps/library/tools/po/zh_CN/LC_MESSAGES/R-tools.mo b/win32/deps/library/tools/po/zh_CN/LC_MESSAGES/R-tools.mo
new file mode 100644
index 0000000..7a9a6b1
Binary files /dev/null and b/win32/deps/library/tools/po/zh_CN/LC_MESSAGES/R-tools.mo differ
diff --git a/win32/deps/library/tools/po/zh_CN/LC_MESSAGES/tools.mo b/win32/deps/library/tools/po/zh_CN/LC_MESSAGES/tools.mo
new file mode 100644
index 0000000..3f3f03f
Binary files /dev/null and b/win32/deps/library/tools/po/zh_CN/LC_MESSAGES/tools.mo differ
diff --git a/win32/deps/library/tools/tests/undoc.R b/win32/deps/library/tools/tests/undoc.R
new file mode 100644
index 0000000..9773008
--- /dev/null
+++ b/win32/deps/library/tools/tests/undoc.R
@@ -0,0 +1,4 @@
+require("tools")
+
+(ud4 <- undoc("stats4"))
+stopifnot(sapply(ud4, length) == 0)
diff --git a/win32/deps/library/utils/DESCRIPTION b/win32/deps/library/utils/DESCRIPTION
index 922f894..79abb38 100644
--- a/win32/deps/library/utils/DESCRIPTION
+++ b/win32/deps/library/utils/DESCRIPTION
@@ -1,9 +1,9 @@
 Package: utils
-Version: 2.9.2
+Version: 2.15.2
 Priority: base
 Title: The R Utils Package
-Author: R Development Core Team and contributors worldwide
+Author: R Core Team and contributors worldwide
 Maintainer: R Core Team <R-core r-project org>
 Description: R utility functions
-License: Part of R 2.9.2
-Built: R 2.9.2; ; 2009-08-24 12:43:33 UTC; windows
+License: Part of R 2.15.2
+Built: R 2.15.2; ; 2012-10-27 03:05:31 UTC; windows
diff --git a/win32/deps/library/utils/INDEX b/win32/deps/library/utils/INDEX
index 995bde3..fe97ffc 100644
--- a/win32/deps/library/utils/INDEX
+++ b/win32/deps/library/utils/INDEX
@@ -1,10 +1,11 @@
 BATCH                   Batch Execution of R
 DLL.version             DLL Version Information
 INSTALL                 Install Add-on Packages
+Question                Documentation Shortcuts
 REMOVE                  Remove Add-on Packages
 RShowDoc                Show R Manuals and Other Documentation
-RSiteSearch             Search for Key Words or Phrases in the R-help
-                        Mailing List Archives or Documentation
+RSiteSearch             Search for Key Words or Phrases in
+                        Documentation
 Rconsole                R for Windows Configuration
 Rprof                   Enable Profiling of R's Execution
 Rprofmem                Enable Profiling of R's Memory Use
@@ -12,63 +13,84 @@ Rscript                 Scripting Front-End for R
 Rtangle                 R Driver for Stangle
 RweaveLatex             R/LaTeX Driver for Sweave
 SHLIB                   Build Shared Object/DLL for Dynamic Loading
-SHLIB                   Build a DLL for Dynamic Loading
 Sweave                  Automatic Generation of Reports
 SweaveSyntConv          Convert Sweave Syntax
 URLencode               Encode or Decode a (partial) URL
 View                    Invoke a Data Viewer
-alarm                   Alert the user
+adist                   Approximate String Distances
+alarm                   Alert the User
 apropos                 Find Objects by (Partial) Name
+aregexec                Approximate String Match Positions
+arrangeWindows          Rearrange windows in the R GUI.
 as.roman                Roman Numerals
+aspell                  Spell Check Interface
+aspell-utils            Spell Check Utilities
+available.packages      List Available Packages at CRAN-like
+                        Repositories
+bibentry                Bibliography Entries
 browseEnv               Browse Objects in Environment
 browseURL               Load URL into a WWW Browser
 browseVignettes         List Vignettes in an HTML Browser
 bug.report              Send a Bug Report
 build                   Utilities for Building and Checking Add-on
                         Packages
-capture.output          Send output to a character string or file
+capture.output          Send Output to a Character String or File
 choose.dir              Choose a Folder Interactively
 choose.files            Choose a List of Files Interactively
+chooseBioCmirror        Select a Bioconductor Mirror
 chooseCRANmirror        Select a CRAN Mirror
-citEntry                Writing Package CITATION Files
+citEntry                Bibliography Entries (Older Interface)
 citation                Citing R and R Packages in Publications
 clipboard               Read/Write to/from the Windows Clipboard
 close.socket            Close a Socket
 combn                   Generate All Combinations of n Elements, Taken
                         m at a Time
 compareVersion          Compare Two Package Version Numbers
+contrib.url             Find Appropriate Paths in CRAN-like
+                        Repositories
 count.fields            Count the Number of Fields per Line
+create.post             Ancillary Function for Preparing Emails and
+                        Postings
 data                    Data Sets
 dataentry               Spreadsheet Interface for Entering Data
 debugger                Post-Mortem Debugging
 demo                    Demonstrations of R Functionality
 download.file           Download File from the Internet
+download.packages       Download Packages from CRAN-like Repositories
 edit                    Invoke a Text Editor
 edit.data.frame         Edit Data Frames and Matrices
 example                 Run an Examples Section from the Online Help
 file.edit               Edit One or More Files
 file_test               Shell-style Tests on Files
+findLineNum             Find the Location of a Line of Source Code, or
+                        Set a Breakpoint There.
 fix                     Fix an Object
 flush.console           Flush Output to A Console
 formatUL                Format Unordered and Ordered Lists
-getAnywhere             Retrieve an R Object, Including from a Name
-                        Space
+getAnywhere             Retrieve an R Object, Including from a
+                        Namespace
 getFromNamespace        Utility functions for Developing Namespaces
 getS3method             Get An S3 Method
+getSrcFilename          Source Reference Utilities
 getWindowsHandle        Get a Windows Handle
+getWindowsHandles       Get handles of windows.
 glob2rx                 Change Wildcard or Globbing Pattern into
                         Regular Expression
+globalVariables         Declare Variables to be Treated as Global in
+                        Checking a Package
 head                    Return the First or Last Part of an Object
 help                    Documentation
 help.request            Send a Post to R-help
 help.search             Search the Help System
 help.start              Hypertext Documentation
-index.search            Search Indices for Help Files
+install.packages        Install Packages from Repositories or Local
+                        Files
 installed.packages      Find Installed Packages
-link.html.help          Update HTML documentation files
 localeToCharset         Select a Suitable Encoding Name from a Locale
                         Name
 ls.str                  List Objects and their Structure
+maintainer              Show Package Maintainer
+make.packages.html      Update HTML Package List
 make.socket             Create a Socket Connection
 memory.size             Report on Memory Allocation
 menu                    Menu Interaction Function
@@ -76,19 +98,19 @@ methods                 List Methods for S3 Generic Functions or
                         Classes
 mirrorAdmin             Managing Repository Mirrors
 modifyList              Recursively Modify Elements of a List
-normalizePath           Express File Paths in Canonical Form
+news                    Build and Query R or Package News Information
 object.size             Report the Space Allocated for an Object
 package.skeleton        Create a Skeleton for a New Source Package
 packageDescription      Package Description
 packageStatus           Package Management Tools
 page                    Invoke a Pager on an R Object
-person                  Person Names and Contact Information
+person                  Persons
 prompt                  Produce Prototype of an R Documentation File
-promptData              Generate a Shell for Documentation of Data Sets
+promptData              Generate Outline Documentation for a Data Set
 promptPackage           Generate a Shell for Documentation of a Package
 rcompgen                A Completion Generator for R
 read.DIF                Data Input from Spreadsheet
-read.fortran            Read fixed-format data
+read.fortran            Read Fixed-Format Data
 read.fwf                Read Fixed Width Format Files
 read.socket             Read from or Write to a Socket
 read.table              Data Input
@@ -96,7 +118,8 @@ readRegistry            Read a Windows Registy Hive
 recover                 Browsing after an Error
 relist                  Allow Re-Listing an unlist()ed Object
 remove.packages         Remove Installed Packages
-rtags                   An etags-like a tagging utility for R
+removeSource            Remove Stored Source from a Function.
+rtags                   An Etags-like Tagging Utility for R
 savehistory             Load or Save or Display the Commands History
 select.list             Select Items from a List
 sessionInfo             Collect Information About the Current R Session
@@ -111,13 +134,16 @@ stack                   Stack or Unstack Vectors from a Data Frame or
 str                     Compactly Display the Structure of an Arbitrary
                         R Object
 summaryRprof            Summarise Output of R Sampling Profiler
+tar                     Create a Tar Archive
 toLatex                 Converting R Objects to BibTeX or LaTeX
 txtProgressBar          Text Progress Bar
 type.convert            Type Conversion on Character Variables
-unzip                   Extract or List Zip archives
-update.packages         Download Packages from CRAN-like repositories
+untar                   Extract or List Tar Archives
+unzip                   Extract or List Zip Archives
+update.packages         Compare Installed Packages with CRAN-like
+                        Repositories
 url.show                Display a text URL
-utils-deprecated        Deprecated Functions in Package utils
+utils-deprecated        Deprecated Functions in Package 'utils'
 utils-package           The R Utils Package
 vignette                View or List Vignettes
 win.version             Auxiliary Functions for the Windows Port
@@ -125,4 +151,4 @@ winDialog               Dialog Boxes under Windows
 winMenuAdd              User Menus under Windows
 winProgressBar          Progress Bars under Windows
 write.table             Data Output
-zip.file.extract        Extract File from a Zip Archive
+zip                     Create Zip archives
diff --git a/win32/deps/library/utils/Meta/Rd.rds b/win32/deps/library/utils/Meta/Rd.rds
index 061318f..2c4c9c5 100644
Binary files a/win32/deps/library/utils/Meta/Rd.rds and b/win32/deps/library/utils/Meta/Rd.rds differ
diff --git a/win32/deps/library/utils/Meta/hsearch.rds b/win32/deps/library/utils/Meta/hsearch.rds
index 1f4beb6..2dff7d3 100644
Binary files a/win32/deps/library/utils/Meta/hsearch.rds and b/win32/deps/library/utils/Meta/hsearch.rds differ
diff --git a/win32/deps/library/utils/Meta/links.rds b/win32/deps/library/utils/Meta/links.rds
new file mode 100644
index 0000000..171c0df
Binary files /dev/null and b/win32/deps/library/utils/Meta/links.rds differ
diff --git a/win32/deps/library/utils/Meta/nsInfo.rds b/win32/deps/library/utils/Meta/nsInfo.rds
index 801872b..ff1b17c 100644
Binary files a/win32/deps/library/utils/Meta/nsInfo.rds and b/win32/deps/library/utils/Meta/nsInfo.rds differ
diff --git a/win32/deps/library/utils/Meta/package.rds b/win32/deps/library/utils/Meta/package.rds
index dc7f97a..ee96422 100644
Binary files a/win32/deps/library/utils/Meta/package.rds and b/win32/deps/library/utils/Meta/package.rds differ
diff --git a/win32/deps/library/utils/Meta/vignette.rds b/win32/deps/library/utils/Meta/vignette.rds
new file mode 100644
index 0000000..1b3038c
Binary files /dev/null and b/win32/deps/library/utils/Meta/vignette.rds differ
diff --git a/win32/deps/library/utils/NAMESPACE b/win32/deps/library/utils/NAMESPACE
index 444807f..c4344c8 100644
--- a/win32/deps/library/utils/NAMESPACE
+++ b/win32/deps/library/utils/NAMESPACE
@@ -1,40 +1,44 @@
-export("?", CRAN.packages, Rprof,Rprofmem, RShowDoc, RSiteSearch,
-       URLdecode, URLencode, View, alarm, apropos, argsAnywhere,
-       assignInNamespace, as.roman, as.person, as.personList,
-       as.relistable, available.packages, browseEnv, browseURL,
-       browseVignettes, bug.report, capture.output, checkCRAN,
-       chooseCRANmirror, citation, citEntry, citHeader, citFooter,
-       close.socket, combn, compareVersion, contrib.url, count.fields,
-       data, data.entry, dataentry, de, de.ncols, de.restore, de.setup,
+export("?", .DollarNames, CRAN.packages, Rprof, Rprofmem, RShowDoc,
+       RSiteSearch, URLdecode, URLencode, View, adist, alarm, apropos,
+       aregexec, argsAnywhere, assignInMyNamespace, assignInNamespace,
+       as.roman, as.person, as.personList, as.relistable, aspell,
+       aspell_package_Rd_files, aspell_package_vignettes,
+       aspell_write_personal_dictionary_file, available.packages,
+       browseEnv, browseURL, browseVignettes, bug.report,
+       capture.output, checkCRAN, chooseBioCmirror, chooseCRANmirror,
+       citation, citEntry, citHeader, citFooter, close.socket, combn,
+       compareVersion, contrib.url, count.fields, create.post, data,
+       data.entry, dataentry, de, de.ncols, de.restore, de.setup,
        debugger, demo, download.file, download.packages, dump.frames,
        edit, emacs, example, file_test, file.edit, find, fix,
-       fixInNamespace, flush.console, formatOL, formatUL, getAnywhere,
-       getCRANmirrors, getFromNamespace, getS3method, glob2rx, head,
-       head.matrix, help, help.request, help.search, help.start,
-       history, index.search, install.packages, installed.packages,
+       fixInNamespace, findLineNum, flush.console, formatOL, formatUL,
+       getAnywhere, getCRANmirrors, getFromNamespace, getS3method,
+       getSrcDirectory, getSrcFilename, getSrcLocation, getSrcref,
+       glob2rx, globalVariables, head, head.matrix, help, help.request, help.search,
+       help.start, history, install.packages, installed.packages,
        is.relistable, limitedLabels, loadhistory, localeToCharset,
-       ls.str, lsf.str, make.packages.html, make.socket, memory.limit,
-       memory.size, menu, methods, mirror2html, modifyList,
-       new.packages, normalizePath, object.size, old.packages,
+       ls.str, lsf.str, maintainer, make.packages.html, make.socket,
+       memory.limit, memory.size, menu, methods, mirror2html,
+       modifyList, new.packages, news, object.size, old.packages,
        package.contents, package.skeleton, packageDescription,
-       packageStatus, page, person, personList, pico, prompt,
-       promptData, promptPackage, rc.getOption, rc.options, rc.settings,
-       rc.status, readCitationFile, read.DIF, read.csv, read.csv2,
-       read.delim, read.delim2, read.fwf, read.fortran, read.socket,
-       read.table, recover, relist, remove.packages, savehistory,
-       select.list, sessionInfo, setRepositories, stack, str,
-       strOptions, summaryRprof, tail, tail.matrix, timestamp, toBibtex,
-       toLatex, type.convert, unstack, unzip, update.packageStatus,
-       update.packages, upgrade, url.show, vi, vignette, write.csv,
-       write.csv2, write.socket, write.table, wsbrowser, xedit, xemacs,
-       zip.file.extract, rtags)
+       packageVersion, packageStatus, page, person, personList, pico,
+       prompt, promptData, promptPackage, rc.getOption, rc.options,
+       rc.settings, rc.status, readCitationFile, read.DIF, read.csv,
+       read.csv2, read.delim, read.delim2, read.fwf, read.fortran,
+       read.socket, read.table, recover, relist, remove.packages,
+       removeSource, rtags, savehistory, select.list, sessionInfo,
+       setBreakpoint, setRepositories, stack, str, strOptions,
+       summaryRprof, tail, tail.matrix, tar, timestamp, toBibtex,
+       toLatex, type.convert, unstack, untar, unzip,
+       update.packageStatus, update.packages, upgrade, url.show, vi,
+       vignette, write.csv, write.csv2, write.socket, write.table,
+       wsbrowser, xedit, xemacs, zip, zip.file.extract)
 
 export(txtProgressBar, getTxtProgressBar, setTxtProgressBar)
 
 S3method("[", getAnywhere)
 S3method("[", roman)
 S3method(as.character, person)
-S3method(as.character, personList)
 S3method(as.character, roman)
 S3method(as.person, default)
 S3method(as.personList, default)
@@ -44,22 +48,24 @@ S3method(edit, data.frame)
 S3method(edit, default)
 S3method(edit, matrix)
 S3method(edit, vignette)
-S3method(format, roman)
+S3method(format, "roman")
 S3method(head, data.frame)
 S3method(head, default)
 S3method(head, "function")
 S3method(head, matrix)
 S3method(head, ftable)
 S3method(head, table)
-S3method(print, citation)
+S3method(print, "aspell")
+S3method(print, "aspell_inspect_context")
 S3method(print, Bibtex)
-S3method(print, citationList)
+S3method(print, findLineNumResult)
 S3method(print, getAnywhere)
 S3method(print, hsearch)
 S3method(print, "help_files_with_topic")
 S3method(print, Latex)
 S3method(print, "ls_str")
 S3method(print, MethodsFunction)
+S3method(print, "news_db")
 S3method(print, "object_size")
 S3method(print, packageDescription)
 S3method(print, packageIQR)
@@ -67,6 +73,7 @@ S3method(print, packageStatus)
 S3method(print, roman)
 S3method(print, sessionInfo)
 S3method(print, socket)
+S3method(print, summary.packageStatus)
 S3method(print, vignette)
 S3method(print, browseVignettes)
 S3method(prompt, data.frame)
@@ -78,8 +85,10 @@ S3method(relist, matrix)
 S3method(stack, data.frame)
 S3method(stack, default)
 S3method(str, POSIXt)
+S3method(str, Date)
 S3method(str, data.frame)
 S3method(str, default)
+S3method(summary, aspell)
 S3method(summary, packageStatus)
 S3method(tail, data.frame)
 S3method(tail, default)
@@ -87,10 +96,7 @@ S3method(tail, "function")
 S3method(tail, matrix)
 S3method(tail, ftable)
 S3method(tail, table)
-S3method(toBibtex, citation)
-S3method(toBibtex, citationList)
 S3method(toBibtex, person)
-S3method(toBibtex, personList)
 S3method(toLatex, sessionInfo)
 S3method(unlist, relistable)
 S3method(unstack, data.frame)
@@ -99,6 +105,28 @@ S3method(upgrade, packageStatus)
 ## can't register update.packageStatus as update is in stats
 ## and would create a cycle.
 
+export("bibentry")
+S3method("$", "bibentry")
+S3method("$", "person")
+S3method("$<-", "bibentry")
+S3method("$<-", "person")
+S3method("[", "bibentry")
+S3method("[", "person")
+S3method("[[", "bibentry")
+S3method("[[", "person")
+S3method("c", "bibentry")
+S3method("c", "person")
+S3method("format", "bibentry")
+S3method("format", "person")
+S3method("print", "bibentry")
+S3method("print", "citation")
+S3method("print", "person")
+S3method("toBibtex", "bibentry")
+
+S3method(.DollarNames, default)
+S3method(.DollarNames, list)
+S3method(.DollarNames, environment)
+
 export(Rtangle, RtangleSetup, RweaveLatex, RweaveLatexSetup, Stangle,
        Sweave, SweaveSyntConv, SweaveSyntaxLatex, SweaveSyntaxNoweb,
        RtangleWritedoc, RweaveLatexOptions, RweaveChunkPrefix,
@@ -111,15 +139,14 @@ export(nsl)
 }
 
 if(tools:::.OStype() == "windows") {
-export(DLL.version, Filters, choose.dir, choose.files,
-       fixup.libraries.URLs, fixup.package.URLs, getClipboardFormats,
-       getIdentification, getWindowsHandle, getWindowTitle,
-       link.html.help, loadRconsole, make.search.html, readClipboard,
+export(DLL.version, Filters, choose.dir, choose.files, getClipboardFormats,
+       getIdentification, getWindowsHandle, getWindowsHandles, getWindowTitle,
+       loadRconsole, readClipboard,
        readRegistry, setStatusBar, setWindowTitle, shortPathName,
        win.version, winDialog, winDialogString, winMenuAdd,
        winMenuAddItem, winMenuDel, winMenuDelItem, winMenuNames,
        winMenuItems, writeClipboard, zip.unpack,
        winProgressBar, getWinProgressBar, setWinProgressBar,
-       setInternet2)
+       setInternet2, arrangeWindows)
 S3method(close, winProgressBar)
 }
diff --git a/win32/deps/library/utils/R/utils b/win32/deps/library/utils/R/utils
index 16b2ccb..ac8cebe 100644
--- a/win32/deps/library/utils/R/utils
+++ b/win32/deps/library/utils/R/utils
@@ -2,7 +2,7 @@ local({
     info <- loadingNamespaceInfo()
     ns <- .Internal(getRegisteredNamespace(as.name(info$pkgname)))
     if (is.null(ns))
-        stop("cannot find name space environment");
+        stop("cannot find namespace environment");
     barepackage <- sub("([^-]+)_.*", "\\1", info$pkgname)
     dbbase <- file.path(info$libname, info$pkgname, "R", barepackage)
     lazyLoad(dbbase, ns, filter = function(n) n != ".__NAMESPACE__.")
diff --git a/win32/deps/library/utils/R/utils.rdb b/win32/deps/library/utils/R/utils.rdb
index bee2778..2c70044 100644
Binary files a/win32/deps/library/utils/R/utils.rdb and b/win32/deps/library/utils/R/utils.rdb differ
diff --git a/win32/deps/library/utils/R/utils.rdx b/win32/deps/library/utils/R/utils.rdx
index 0f2ef5c..e359e6f 100644
Binary files a/win32/deps/library/utils/R/utils.rdx and b/win32/deps/library/utils/R/utils.rdx differ
diff --git a/win32/deps/library/utils/Sweave/Sweave-test-1.Rnw b/win32/deps/library/utils/Sweave/Sweave-test-1.Rnw
index c67e527..ae5bd35 100644
--- a/win32/deps/library/utils/Sweave/Sweave-test-1.Rnw
+++ b/win32/deps/library/utils/Sweave/Sweave-test-1.Rnw
@@ -11,8 +11,7 @@
 
 \maketitle
 
-A simple example that will run in any S engine: The integers from 1 to
-10 are
+A simple example: the integers from 1 to 10 are
 <<print=TRUE>>=
 1:10
 <<results=hide>>=
@@ -38,14 +37,12 @@ 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 iris data set, and we want to
-see the commands in the code chunks:
+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}
 
-% the following code is R-specific, as data(iris) will not run in Splus. 
-% Hence, we mark it as R code. 
-<<engine=R>>=
+<<>>=
 data(iris)
 summary(iris)
 @ %def
@@ -57,7 +54,7 @@ summary(iris)
 library(graphics)
 pairs(iris)
 @
-    \caption{Pairs plot of the iris data.}
+     \caption{Pairs plot of the iris data.}
   \end{center}
 \end{figure}
 
@@ -69,13 +66,6 @@ boxplot(Sepal.Length~Species, data=iris)
     \caption{Boxplot of sepal length grouped by species.}
   \end{center}
 \end{figure}
-
-
-% R is not S-PLUS, hence this chunk will be ignored:
-<<engine=S4>>=
-function.that.comes.only.with.Splus(x)
 @
 
 \end{document}
-
-
diff --git a/win32/deps/library/utils/Sweave/example-1.Rnw b/win32/deps/library/utils/Sweave/example-1.Rnw
new file mode 100644
index 0000000..f9c86cb
--- /dev/null
+++ b/win32/deps/library/utils/Sweave/example-1.Rnw
@@ -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}
diff --git a/win32/deps/library/utils/doc/Sweave.R b/win32/deps/library/utils/doc/Sweave.R
new file mode 100644
index 0000000..3e84422
--- /dev/null
+++ b/win32/deps/library/utils/doc/Sweave.R
@@ -0,0 +1,39 @@
+### R code from vignette source 'Sweave.Rnw'
+
+###################################################
+### code chunk number 1: Sweave.Rnw:122-124
+###################################################
+rnwfile <- system.file("Sweave", "example-1.Rnw", package = "utils")
+Sweave(rnwfile)
+
+
+###################################################
+### code chunk number 2: Sweave.Rnw:129-130
+###################################################
+tools::texi2pdf("example-1.tex")
+
+
+###################################################
+### code chunk number 3: Sweave.Rnw:365-366
+###################################################
+SweaveSyntConv(rnwfile, SweaveSyntaxLatex)
+
+
+###################################################
+### code chunk number 4: Sweave.Rnw:468-469 (eval = FALSE)
+###################################################
+## help("Sweave")
+
+
+###################################################
+### code chunk number 5: Sweave.Rnw:478-479 (eval = FALSE)
+###################################################
+## help("RweaveLatex")
+
+
+###################################################
+### code chunk number 6: Sweave.Rnw:594-595 (eval = FALSE)
+###################################################
+## help("Rtangle")
+
+
diff --git a/win32/deps/library/utils/doc/Sweave.Rnw b/win32/deps/library/utils/doc/Sweave.Rnw
new file mode 100644
index 0000000..430aa47
--- /dev/null
+++ b/win32/deps/library/utils/doc/Sweave.Rnw
@@ -0,0 +1,814 @@
+\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.
+\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{|\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 normally 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}
+
+
+The previous paragraph 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.
+
+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.
+
+Handling non-ASCII vignettes is a work in progress: they do not work
+well before \R{} 2.13.0.
+
+
+\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}\footnote{the latter two available only
+  from \R{} 2.13.0.} 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\footnote{in \R{} 2.13.0 and
+  later.} 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\footnote{from \R{} 2.13.1} \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{http://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:
diff --git a/win32/deps/library/utils/doc/Sweave.pdf b/win32/deps/library/utils/doc/Sweave.pdf
new file mode 100644
index 0000000..01e307a
Binary files /dev/null and b/win32/deps/library/utils/doc/Sweave.pdf differ
diff --git a/win32/deps/library/utils/doc/index.html b/win32/deps/library/utils/doc/index.html
new file mode 100644
index 0000000..b23b063
--- /dev/null
+++ b/win32/deps/library/utils/doc/index.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: Vignettes</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
+<img class="toplogo" src="/doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="/doc/html/index.html"><img src="/doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div>
+<h2>Vignettes from package 'utils'</h2>
+<table width="100%">
+<col width="22%">
+<col width="2%">
+<col width="50%">
+<col width="8%">
+<col width="8%">
+<col width="8%">
+<tr><td align="right" valign="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" nowrap><a href="../../../library/utils/doc/Sweave.R">R code</a></td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/utils/help/AnIndex b/win32/deps/library/utils/help/AnIndex
index 12402d4..13cd0ef 100644
--- a/win32/deps/library/utils/help/AnIndex
+++ b/win32/deps/library/utils/help/AnIndex
@@ -1,11 +1,18 @@
 utils-package	utils-package
-?	help
+$.person	person
+.DollarNames	rcompgen
+.DollarNames.default	rcompgen
+.DollarNames.environment	rcompgen
+.DollarNames.list	rcompgen
+?	Question
 ??	help.search
+adist	adist
 alarm	alarm
 apropos	apropos
+aregexec	aregexec
 argsAnywhere	getAnywhere
+arrangeWindows	arrangeWindows
 as.character.person	person
-as.character.personList	person
 as.person	person
 as.person.default	person
 as.personList	person
@@ -13,21 +20,30 @@ as.personList.default	person
 as.personList.person	person
 as.relistable	relist
 as.roman	roman
+aspell	aspell
+aspell-utils	aspell-utils
+aspell_package_Rd_files	aspell-utils
+aspell_package_vignettes	aspell-utils
+aspell_write_personal_dictionary_file	aspell-utils
+assignInMyNamespace	getFromNamespace
 assignInNamespace	getFromNamespace
-available.packages	update.packages
+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
 check	PkgUtils
 checkCRAN	mirrorAdmin
 choose.dir	choose.dir
 choose.files	choose.files
+chooseBioCmirror	chooseBioCmirror
 chooseCRANmirror	chooseCRANmirror
-CITATION	citEntry
+CITATION	citation
 citation	citation
 citEntry	citEntry
 citFooter	citEntry
@@ -38,9 +54,11 @@ close.txtProgressBar	txtProgressBar
 close.winProgressBar	winProgressBar
 combn	combn
 compareVersion	compareVersion
-contrib.url	update.packages
+completion	rcompgen
+contrib.url	contrib.url
 count.fields	count.fields
 CRAN.packages	utils-deprecated
+create.post	create.post
 data	data
 data.entry	dataentry
 dataentry	dataentry
@@ -52,7 +70,7 @@ debugger	debugger
 demo	demo
 DLL.version	DLL.version
 download.file	download.file
-download.packages	update.packages
+download.packages	download.packages
 dump.frames	debugger
 edit	edit
 edit.data.frame	edit.data.frame
@@ -65,24 +83,31 @@ file.edit	file.edit
 file_test	filetest
 Filters	choose.files
 find	apropos
+findLineNum	findLineNum
 fix	fix
 fixInNamespace	getFromNamespace
-fixup.libraries.URLs	linkhtml
-fixup.package.URLs	linkhtml
 flush.console	flush.console
+format.person	person
 formatOL	format
 formatUL	format
 getAnywhere	getAnywhere
+getBioCmirrors	chooseBioCmirror
 getClipboardFormats	clipboard
 getCRANmirrors	chooseCRANmirror
 getFromNamespace	getFromNamespace
 getIdentification	setWindowTitle
 getS3method	getS3method
+getSrcDirectory	sourceutils
+getSrcFilename	sourceutils
+getSrcLocation	sourceutils
+getSrcref	sourceutils
 getTxtProgressBar	txtProgressBar
 getWindowsHandle	getWindowsHandle
+getWindowsHandles	getWindowsHandles
 getWindowTitle	setWindowTitle
 getWinProgressBar	winProgressBar
 glob2rx	glob2rx
+globalVariables	globalVariables
 head	head
 head.data.frame	head
 head.default	head
@@ -95,20 +120,18 @@ help.request	help.request
 help.search	help.search
 help.start	help.start
 history	savehistory
-index.search	index.search
 INSTALL	INSTALL
-install.packages	update.packages
+install.packages	install.packages
 installed.packages	installed.packages
 is.relistable	relist
 limitedLabels	recover
-link.html.help	linkhtml
 loadhistory	savehistory
 loadRconsole	Rconsole
 localeToCharset	localeToCharset
 ls.str	ls_str
 lsf.str	ls_str
-make.packages.html	linkhtml
-make.search.html	linkhtml
+maintainer	maintainer
+make.packages.html	make.packages.html
 make.socket	make.socket
 makeRweaveLatexCodeRunner	SweaveUtils
 memory.limit	memory.size
@@ -119,17 +142,19 @@ mirror2html	mirrorAdmin
 mirrorAdmin	mirrorAdmin
 modifyList	modifyList
 new.packages	update.packages
-normalizePath	normalizePath
+news	news
 object.size	object.size
 old.packages	update.packages
 package.contents	utils-defunct
 package.skeleton	package.skeleton
 packageDescription	packageDescription
 packageStatus	packageStatus
+packageVersion	packageDescription
 page	page
 person	person
 personList	person
 pico	edit
+print.bibentry	bibentry
 print.Bibtex	toLatex
 print.browseVignettes	browseVignettes
 print.getAnywhere	getAnywhere
@@ -141,6 +166,7 @@ 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
@@ -149,6 +175,7 @@ prompt.data.frame	prompt
 prompt.default	prompt
 promptData	promptData
 promptPackage	promptPackage
+Question	Question
 rc.getOption	rcompgen
 rc.options	rcompgen
 rc.settings	rcompgen
@@ -165,7 +192,7 @@ read.fortran	read.fortran
 read.fwf	read.fwf
 read.socket	read.socket
 read.table	read.table
-readCitationFile	citEntry
+readCitationFile	citation
 readClipboard	clipboard
 readRegistry	readRegistry
 recover	recover
@@ -176,6 +203,7 @@ relist.list	relist
 relist.matrix	relist
 REMOVE	REMOVE
 remove.packages	remove.packages
+removeSource	removeSource
 Rprof	Rprof
 Rprofmem	Rprofmem
 Rscript	Rscript
@@ -196,6 +224,7 @@ RweaveTryStop	SweaveUtils
 savehistory	savehistory
 select.list	select.list
 sessionInfo	sessionInfo
+setBreakpoint	findLineNum
 setInternet2	setInternet2
 setRepositories	setRepositories
 setStatusBar	setWindowTitle
@@ -203,7 +232,6 @@ setTxtProgressBar	txtProgressBar
 setWindowTitle	setWindowTitle
 setWinProgressBar	winProgressBar
 SHLIB	SHLIB
-SHLIB	SHLIB
 shortPathName	shortPathName
 stack	stack
 stack.data.frame	stack
@@ -228,12 +256,10 @@ tail.ftable	head
 tail.function	head
 tail.matrix	head
 tail.table	head
+tar	tar
 timestamp	savehistory
 toBibtex	toLatex
-toBibtex.citation	citation
-toBibtex.citationList	citation
 toBibtex.person	person
-toBibtex.personList	person
 toLatex	toLatex
 toLatex.sessionInfo	sessionInfo
 txtProgressBar	txtProgressBar
@@ -242,6 +268,7 @@ unlist.relistable	relist
 unstack	stack
 unstack.data.frame	stack
 unstack.default	stack
+untar	untar
 unzip	unzip
 update.packages	update.packages
 update.packageStatus	packageStatus
@@ -275,6 +302,8 @@ writeClipboard	clipboard
 wsbrowser	browseEnv
 xedit	edit
 xemacs	edit
-zip.file.extract	zip.file.extract
-zip.unpack	winextras
+zip	zip
+zip.file.extract	utils-defunct
+zip.unpack	utils-defunct
 [.getAnywhere	getAnywhere
+[.person	person
diff --git a/win32/deps/library/utils/help/aliases.rds b/win32/deps/library/utils/help/aliases.rds
new file mode 100644
index 0000000..96d4c85
Binary files /dev/null and b/win32/deps/library/utils/help/aliases.rds differ
diff --git a/win32/deps/library/utils/help/paths.rds b/win32/deps/library/utils/help/paths.rds
new file mode 100644
index 0000000..9b15d15
Binary files /dev/null and b/win32/deps/library/utils/help/paths.rds differ
diff --git a/win32/deps/library/utils/help/utils.rdb b/win32/deps/library/utils/help/utils.rdb
new file mode 100644
index 0000000..e231592
Binary files /dev/null and b/win32/deps/library/utils/help/utils.rdb differ
diff --git a/win32/deps/library/utils/help/utils.rdx b/win32/deps/library/utils/help/utils.rdx
new file mode 100644
index 0000000..317e835
Binary files /dev/null and b/win32/deps/library/utils/help/utils.rdx differ
diff --git a/win32/deps/library/utils/html/00Index.html b/win32/deps/library/utils/html/00Index.html
new file mode 100644
index 0000000..904185e
--- /dev/null
+++ b/win32/deps/library/utils/html/00Index.html
@@ -0,0 +1,670 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><title>R: The R Utils Package</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="R.css">
+</head><body>
+<h1> The R Utils Package
+<img class="toplogo" src="../../../doc/html/logo.jpg" alt="[R logo]">
+</h1>
+<hr>
+<div align="center">
+<a href="../../../doc/html/packages.html"><img src="../../../doc/html/left.jpg" alt="[Up]" width="30" height="30" border="0"></a>
+<a href="../../../doc/html/index.html"><img src="../../../doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+</div><h2>Documentation for package &lsquo;utils&rsquo; version 2.15.2</h2>
+
+<ul><li><a href="../DESCRIPTION">DESCRIPTION file</a>.</li>
+<li><a href="../doc/index.html">Overview of user guides and package vignettes</a>; browse <a href="../doc">directory</a>.</li>
+</ul>
+
+<h2>Help Pages</h2>
+
+
+<p 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="#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="#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="#X">X</a>
+<a href="#Z">Z</a>
+<a href="#misc">misc</a>
+</p>
+
+<table width="100%">
+<tr><td width="25%"><a href="utils-package.html">utils-package</a></td>
+<td>The R Utils Package</td></tr>
+</table>
+
+<h2><a name="A">-- A --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="adist.html">adist</a></td>
+<td>Approximate String Distances</td></tr>
+<tr><td width="25%"><a href="alarm.html">alarm</a></td>
+<td>Alert the User</td></tr>
+<tr><td width="25%"><a href="apropos.html">apropos</a></td>
+<td>Find Objects by (Partial) Name</td></tr>
+<tr><td width="25%"><a href="aregexec.html">aregexec</a></td>
+<td>Approximate String Match Positions</td></tr>
+<tr><td width="25%"><a href="getAnywhere.html">argsAnywhere</a></td>
+<td>Retrieve an R Object, Including from a Namespace</td></tr>
+<tr><td width="25%"><a href="arrangeWindows.html">arrangeWindows</a></td>
+<td>Rearrange windows in the R GUI.</td></tr>
+<tr><td width="25%"><a href="person.html">as.character.person</a></td>
+<td>Persons</td></tr>
+<tr><td width="25%"><a href="person.html">as.person</a></td>
+<td>Persons</td></tr>
+<tr><td width="25%"><a href="person.html">as.personList</a></td>
+<td>Persons</td></tr>
+<tr><td width="25%"><a href="relist.html">as.relistable</a></td>
+<td>Allow Re-Listing an unlist()ed Object</td></tr>
+<tr><td width="25%"><a href="roman.html">as.roman</a></td>
+<td>Roman Numerals</td></tr>
+<tr><td width="25%"><a href="aspell.html">aspell</a></td>
+<td>Spell Check Interface</td></tr>
+<tr><td width="25%"><a href="aspell-utils.html">aspell-utils</a></td>
+<td>Spell Check Utilities</td></tr>
+<tr><td width="25%"><a href="aspell-utils.html">aspell_package_Rd_files</a></td>
+<td>Spell Check Utilities</td></tr>
+<tr><td width="25%"><a href="aspell-utils.html">aspell_package_vignettes</a></td>
+<td>Spell Check Utilities</td></tr>
+<tr><td width="25%"><a href="aspell-utils.html">aspell_write_personal_dictionary_file</a></td>
+<td>Spell Check Utilities</td></tr>
+<tr><td width="25%"><a href="getFromNamespace.html">assignInMyNamespace</a></td>
+<td>Utility functions for Developing Namespaces</td></tr>
+<tr><td width="25%"><a href="getFromNamespace.html">assignInNamespace</a></td>
+<td>Utility functions for Developing Namespaces</td></tr>
+<tr><td width="25%"><a href="available.packages.html">available.packages</a></td>
+<td>List Available Packages at CRAN-like Repositories</td></tr>
+</table>
+
+<h2><a name="B">-- B --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="BATCH.html">BATCH</a></td>
+<td>Batch Execution of R</td></tr>
+<tr><td width="25%"><a href="bibentry.html">bibentry</a></td>
+<td>Bibliography Entries</td></tr>
+<tr><td width="25%"><a href="browseEnv.html">browseEnv</a></td>
+<td>Browse Objects in Environment</td></tr>
+<tr><td width="25%"><a href="browseURL.html">browseURL</a></td>
+<td>Load URL into a WWW Browser</td></tr>
+<tr><td width="25%"><a href="browseVignettes.html">browseVignettes</a></td>
+<td>List Vignettes in an HTML Browser</td></tr>
+<tr><td width="25%"><a href="bug.report.html">bug.report</a></td>
+<td>Send a Bug Report</td></tr>
+<tr><td width="25%"><a href="PkgUtils.html">build</a></td>
+<td>Utilities for Building and Checking Add-on Packages</td></tr>
+</table>
+
+<h2><a name="C">-- C --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="person.html">c.person</a></td>
+<td>Persons</td></tr>
+<tr><td width="25%"><a href="capture.output.html">capture.output</a></td>
+<td>Send Output to a Character String or File</td></tr>
+<tr><td width="25%"><a href="PkgUtils.html">check</a></td>
+<td>Utilities for Building and Checking Add-on Packages</td></tr>
+<tr><td width="25%"><a href="mirrorAdmin.html">checkCRAN</a></td>
+<td>Managing Repository Mirrors</td></tr>
+<tr><td width="25%"><a href="choose.dir.html">choose.dir</a></td>
+<td>Choose a Folder Interactively</td></tr>
+<tr><td width="25%"><a href="choose.files.html">choose.files</a></td>
+<td>Choose a List of Files Interactively</td></tr>
+<tr><td width="25%"><a href="chooseBioCmirror.html">chooseBioCmirror</a></td>
+<td>Select a Bioconductor Mirror</td></tr>
+<tr><td width="25%"><a href="chooseCRANmirror.html">chooseCRANmirror</a></td>
+<td>Select a CRAN Mirror</td></tr>
+<tr><td width="25%"><a href="citation.html">CITATION</a></td>
+<td>Citing R and R Packages in Publications</td></tr>
+<tr><td width="25%"><a href="citation.html">citation</a></td>
+<td>Citing R and R Packages in Publications</td></tr>
+<tr><td width="25%"><a href="citEntry.html">citEntry</a></td>
+<td>Bibliography Entries (Older Interface)</td></tr>
+<tr><td width="25%"><a href="citEntry.html">citFooter</a></td>
+<td>Bibliography Entries (Older Interface)</td></tr>
+<tr><td width="25%"><a href="citEntry.html">citHeader</a></td>
+<td>Bibliography Entries (Older Interface)</td></tr>
+<tr><td width="25%"><a href="clipboard.html">clipboard</a></td>
+<td>Read/Write to/from the Windows Clipboard</td></tr>
+<tr><td width="25%"><a href="close.socket.html">close.socket</a></td>
+<td>Close a Socket</td></tr>
+<tr><td width="25%"><a href="txtProgressBar.html">close.txtProgressBar</a></td>
+<td>Text Progress Bar</td></tr>
+<tr><td width="25%"><a href="winProgressBar.html">close.winProgressBar</a></td>
+<td>Progress Bars under Windows</td></tr>
+<tr><td width="25%"><a href="combn.html">combn</a></td>
+<td>Generate All Combinations of n Elements, Taken m at a Time</td></tr>
+<tr><td width="25%"><a href="compareVersion.html">compareVersion</a></td>
+<td>Compare Two Package Version Numbers</td></tr>
+<tr><td width="25%"><a href="rcompgen.html">completion</a></td>
+<td>A Completion Generator for R</td></tr>
+<tr><td width="25%"><a href="contrib.url.html">contrib.url</a></td>
+<td>Find Appropriate Paths in CRAN-like Repositories</td></tr>
+<tr><td width="25%"><a href="count.fields.html">count.fields</a></td>
+<td>Count the Number of Fields per Line</td></tr>
+<tr><td width="25%"><a href="utils-deprecated.html">CRAN.packages</a></td>
+<td>Deprecated Functions in Package 'utils'</td></tr>
+<tr><td width="25%"><a href="create.post.html">create.post</a></td>
+<td>Ancillary Function for Preparing Emails and Postings</td></tr>
+</table>
+
+<h2><a name="D">-- D --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="data.html">data</a></td>
+<td>Data Sets</td></tr>
+<tr><td width="25%"><a href="dataentry.html">data.entry</a></td>
+<td>Spreadsheet Interface for Entering Data</td></tr>
+<tr><td width="25%"><a href="dataentry.html">dataentry</a></td>
+<td>Spreadsheet Interface for Entering Data</td></tr>
+<tr><td width="25%"><a href="dataentry.html">de</a></td>
+<td>Spreadsheet Interface for Entering Data</td></tr>
+<tr><td width="25%"><a href="debugger.html">debugger</a></td>
+<td>Post-Mortem Debugging</td></tr>
+<tr><td width="25%"><a href="demo.html">demo</a></td>
+<td>Demonstrations of R Functionality</td></tr>
+<tr><td width="25%"><a href="DLL.version.html">DLL.version</a></td>
+<td>DLL Version Information</td></tr>
+<tr><td width="25%"><a href="download.file.html">download.file</a></td>
+<td>Download File from the Internet</td></tr>
+<tr><td width="25%"><a href="download.packages.html">download.packages</a></td>
+<td>Download Packages from CRAN-like Repositories</td></tr>
+<tr><td width="25%"><a href="debugger.html">dump.frames</a></td>
+<td>Post-Mortem Debugging</td></tr>
+</table>
+
+<h2><a name="E">-- E --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="edit.html">edit</a></td>
+<td>Invoke a Text Editor</td></tr>
+<tr><td width="25%"><a href="edit.data.frame.html">edit.data.frame</a></td>
+<td>Edit Data Frames and Matrices</td></tr>
+<tr><td width="25%"><a href="vignette.html">edit.vignette</a></td>
+<td>View or List Vignettes</td></tr>
+<tr><td width="25%"><a href="edit.html">emacs</a></td>
+<td>Invoke a Text Editor</td></tr>
+<tr><td width="25%"><a href="example.html">example</a></td>
+<td>Run an Examples Section from the Online Help</td></tr>
+</table>
+
+<h2><a name="F">-- F --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="file.edit.html">file.edit</a></td>
+<td>Edit One or More Files</td></tr>
+<tr><td width="25%"><a href="filetest.html">file_test</a></td>
+<td>Shell-style Tests on Files</td></tr>
+<tr><td width="25%"><a href="choose.files.html">Filters</a></td>
+<td>Choose a List of Files Interactively</td></tr>
+<tr><td width="25%"><a href="apropos.html">find</a></td>
+<td>Find Objects by (Partial) Name</td></tr>
+<tr><td width="25%"><a href="findLineNum.html">findLineNum</a></td>
+<td>Find the Location of a Line of Source Code, or Set a Breakpoint There.</td></tr>
+<tr><td width="25%"><a href="fix.html">fix</a></td>
+<td>Fix an Object</td></tr>
+<tr><td width="25%"><a href="getFromNamespace.html">fixInNamespace</a></td>
+<td>Utility functions for Developing Namespaces</td></tr>
+<tr><td width="25%"><a href="flush.console.html">flush.console</a></td>
+<td>Flush Output to A Console</td></tr>
+<tr><td width="25%"><a href="person.html">format.person</a></td>
+<td>Persons</td></tr>
+<tr><td width="25%"><a href="format.html">formatOL</a></td>
+<td>Format Unordered and Ordered Lists</td></tr>
+<tr><td width="25%"><a href="format.html">formatUL</a></td>
+<td>Format Unordered and Ordered Lists</td></tr>
+</table>
+
+<h2><a name="G">-- G --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="getAnywhere.html">getAnywhere</a></td>
+<td>Retrieve an R Object, Including from a Namespace</td></tr>
+<tr><td width="25%"><a href="chooseBioCmirror.html">getBioCmirrors</a></td>
+<td>Select a Bioconductor Mirror</td></tr>
+<tr><td width="25%"><a href="clipboard.html">getClipboardFormats</a></td>
+<td>Read/Write to/from the Windows Clipboard</td></tr>
+<tr><td width="25%"><a href="chooseCRANmirror.html">getCRANmirrors</a></td>
+<td>Select a CRAN Mirror</td></tr>
+<tr><td width="25%"><a href="getFromNamespace.html">getFromNamespace</a></td>
+<td>Utility functions for Developing Namespaces</td></tr>
+<tr><td width="25%"><a href="setWindowTitle.html">getIdentification</a></td>
+<td>Set or get the Window Title, or Set the Statusbar</td></tr>
+<tr><td width="25%"><a href="getS3method.html">getS3method</a></td>
+<td>Get An S3 Method</td></tr>
+<tr><td width="25%"><a href="sourceutils.html">getSrcDirectory</a></td>
+<td>Source Reference Utilities</td></tr>
+<tr><td width="25%"><a href="sourceutils.html">getSrcFilename</a></td>
+<td>Source Reference Utilities</td></tr>
+<tr><td width="25%"><a href="sourceutils.html">getSrcLocation</a></td>
+<td>Source Reference Utilities</td></tr>
+<tr><td width="25%"><a href="sourceutils.html">getSrcref</a></td>
+<td>Source Reference Utilities</td></tr>
+<tr><td width="25%"><a href="txtProgressBar.html">getTxtProgressBar</a></td>
+<td>Text Progress Bar</td></tr>
+<tr><td width="25%"><a href="getWindowsHandle.html">getWindowsHandle</a></td>
+<td>Get a Windows Handle</td></tr>
+<tr><td width="25%"><a href="getWindowsHandles.html">getWindowsHandles</a></td>
+<td>Get handles of windows.</td></tr>
+<tr><td width="25%"><a href="setWindowTitle.html">getWindowTitle</a></td>
+<td>Set or get the Window Title, or Set the Statusbar</td></tr>
+<tr><td width="25%"><a href="winProgressBar.html">getWinProgressBar</a></td>
+<td>Progress Bars under Windows</td></tr>
+<tr><td width="25%"><a href="glob2rx.html">glob2rx</a></td>
+<td>Change Wildcard or Globbing Pattern into Regular Expression</td></tr>
+<tr><td width="25%"><a href="globalVariables.html">globalVariables</a></td>
+<td>Declare Variables to be Treated as Global in Checking a Package</td></tr>
+</table>
+
+<h2><a name="H">-- H --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="head.html">head</a></td>
+<td>Return the First or Last Part of an Object</td></tr>
+<tr><td width="25%"><a href="help.html">help</a></td>
+<td>Documentation</td></tr>
+<tr><td width="25%"><a href="help.request.html">help.request</a></td>
+<td>Send a Post to R-help</td></tr>
+<tr><td width="25%"><a href="help.search.html">help.search</a></td>
+<td>Search the Help System</td></tr>
+<tr><td width="25%"><a href="help.start.html">help.start</a></td>
+<td>Hypertext Documentation</td></tr>
+<tr><td width="25%"><a href="savehistory.html">history</a></td>
+<td>Load or Save or Display the Commands History</td></tr>
+</table>
+
+<h2><a name="I">-- I --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="INSTALL.html">INSTALL</a></td>
+<td>Install Add-on Packages</td></tr>
+<tr><td width="25%"><a href="install.packages.html">install.packages</a></td>
+<td>Install Packages from Repositories or Local Files</td></tr>
+<tr><td width="25%"><a href="installed.packages.html">installed.packages</a></td>
+<td>Find Installed Packages</td></tr>
+<tr><td width="25%"><a href="relist.html">is.relistable</a></td>
+<td>Allow Re-Listing an unlist()ed Object</td></tr>
+</table>
+
+<h2><a name="L">-- L --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="recover.html">limitedLabels</a></td>
+<td>Browsing after an Error</td></tr>
+<tr><td width="25%"><a href="savehistory.html">loadhistory</a></td>
+<td>Load or Save or Display the Commands History</td></tr>
+<tr><td width="25%"><a href="Rconsole.html">loadRconsole</a></td>
+<td>R for Windows Configuration</td></tr>
+<tr><td width="25%"><a href="localeToCharset.html">localeToCharset</a></td>
+<td>Select a Suitable Encoding Name from a Locale Name</td></tr>
+<tr><td width="25%"><a href="ls_str.html">ls.str</a></td>
+<td>List Objects and their Structure</td></tr>
+<tr><td width="25%"><a href="ls_str.html">lsf.str</a></td>
+<td>List Objects and their Structure</td></tr>
+</table>
+
+<h2><a name="M">-- M --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="maintainer.html">maintainer</a></td>
+<td>Show Package Maintainer</td></tr>
+<tr><td width="25%"><a href="make.packages.html.html">make.packages.html</a></td>
+<td>Update HTML Package List</td></tr>
+<tr><td width="25%"><a href="make.socket.html">make.socket</a></td>
+<td>Create a Socket Connection</td></tr>
+<tr><td width="25%"><a href="memory.size.html">memory.size</a></td>
+<td>Report on Memory Allocation</td></tr>
+<tr><td width="25%"><a href="menu.html">menu</a></td>
+<td>Menu Interaction Function</td></tr>
+<tr><td width="25%"><a href="methods.html">methods</a></td>
+<td>List Methods for S3 Generic Functions or Classes</td></tr>
+<tr><td width="25%"><a href="mirrorAdmin.html">mirror2html</a></td>
+<td>Managing Repository Mirrors</td></tr>
+<tr><td width="25%"><a href="mirrorAdmin.html">mirrorAdmin</a></td>
+<td>Managing Repository Mirrors</td></tr>
+<tr><td width="25%"><a href="modifyList.html">modifyList</a></td>
+<td>Recursively Modify Elements of a List</td></tr>
+</table>
+
+<h2><a name="N">-- N --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="update.packages.html">new.packages</a></td>
+<td>Compare Installed Packages with CRAN-like Repositories</td></tr>
+<tr><td width="25%"><a href="news.html">news</a></td>
+<td>Build and Query R or Package News Information</td></tr>
+</table>
+
+<h2><a name="O">-- O --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="object.size.html">object.size</a></td>
+<td>Report the Space Allocated for an Object</td></tr>
+<tr><td width="25%"><a href="update.packages.html">old.packages</a></td>
+<td>Compare Installed Packages with CRAN-like Repositories</td></tr>
+</table>
+
+<h2><a name="P">-- P --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="package.skeleton.html">package.skeleton</a></td>
+<td>Create a Skeleton for a New Source Package</td></tr>
+<tr><td width="25%"><a href="packageDescription.html">packageDescription</a></td>
+<td>Package Description</td></tr>
+<tr><td width="25%"><a href="packageStatus.html">packageStatus</a></td>
+<td>Package Management Tools</td></tr>
+<tr><td width="25%"><a href="packageDescription.html">packageVersion</a></td>
+<td>Package Description</td></tr>
+<tr><td width="25%"><a href="page.html">page</a></td>
+<td>Invoke a Pager on an R Object</td></tr>
+<tr><td width="25%"><a href="person.html">person</a></td>
+<td>Persons</td></tr>
+<tr><td width="25%"><a href="person.html">personList</a></td>
+<td>Persons</td></tr>
+<tr><td width="25%"><a href="edit.html">pico</a></td>
+<td>Invoke a Text Editor</td></tr>
+<tr><td width="25%"><a href="bibentry.html">print.bibentry</a></td>
+<td>Bibliography Entries</td></tr>
+<tr><td width="25%"><a href="toLatex.html">print.Bibtex</a></td>
+<td>Converting R Objects to BibTeX or LaTeX</td></tr>
+<tr><td width="25%"><a href="browseVignettes.html">print.browseVignettes</a></td>
+<td>List Vignettes in an HTML Browser</td></tr>
+<tr><td width="25%"><a href="getAnywhere.html">print.getAnywhere</a></td>
+<td>Retrieve an R Object, Including from a Namespace</td></tr>
+<tr><td width="25%"><a href="help.search.html">print.hsearch</a></td>
+<td>Search the Help System</td></tr>
+<tr><td width="25%"><a href="toLatex.html">print.Latex</a></td>
+<td>Converting R Objects to BibTeX or LaTeX</td></tr>
+<tr><td width="25%"><a href="ls_str.html">print.ls_str</a></td>
+<td>List Objects and their Structure</td></tr>
+<tr><td width="25%"><a href="methods.html">print.MethodsFunction</a></td>
+<td>List Methods for S3 Generic Functions or Classes</td></tr>
+<tr><td width="25%"><a href="object.size.html">print.object_size</a></td>
+<td>Report the Space Allocated for an Object</td></tr>
+<tr><td width="25%"><a href="packageDescription.html">print.packageDescription</a></td>
+<td>Package Description</td></tr>
+<tr><td width="25%"><a href="data.html">print.packageIQR</a></td>
+<td>Data Sets</td></tr>
+<tr><td width="25%"><a href="packageStatus.html">print.packageStatus</a></td>
+<td>Package Management Tools</td></tr>
+<tr><td width="25%"><a href="person.html">print.person</a></td>
+<td>Persons</td></tr>
+<tr><td width="25%"><a href="sessionInfo.html">print.sessionInfo</a></td>
+<td>Collect Information About the Current R Session</td></tr>
+<tr><td width="25%"><a href="make.socket.html">print.socket</a></td>
+<td>Create a Socket Connection</td></tr>
+<tr><td width="25%"><a href="vignette.html">print.vignette</a></td>
+<td>View or List Vignettes</td></tr>
+<tr><td width="25%"><a href="prompt.html">prompt</a></td>
+<td>Produce Prototype of an R Documentation File</td></tr>
+<tr><td width="25%"><a href="promptData.html">promptData</a></td>
+<td>Generate Outline Documentation for a Data Set</td></tr>
+<tr><td width="25%"><a href="promptPackage.html">promptPackage</a></td>
+<td>Generate a Shell for Documentation of a Package</td></tr>
+</table>
+
+<h2><a name="Q">-- Q --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="Question.html">Question</a></td>
+<td>Documentation Shortcuts</td></tr>
+</table>
+
+<h2><a name="R">-- R --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="rcompgen.html">rc.settings</a></td>
+<td>A Completion Generator for R</td></tr>
+<tr><td width="25%"><a href="rcompgen.html">rcompgen</a></td>
+<td>A Completion Generator for R</td></tr>
+<tr><td width="25%"><a href="Rconsole.html">Rconsole</a></td>
+<td>R for Windows Configuration</td></tr>
+<tr><td width="25%"><a href="Rconsole.html">Rdevga</a></td>
+<td>R for Windows Configuration</td></tr>
+<tr><td width="25%"><a href="read.DIF.html">read.DIF</a></td>
+<td>Data Input from Spreadsheet</td></tr>
+<tr><td width="25%"><a href="read.fortran.html">read.fortran</a></td>
+<td>Read Fixed-Format Data</td></tr>
+<tr><td width="25%"><a href="read.fwf.html">read.fwf</a></td>
+<td>Read Fixed Width Format Files</td></tr>
+<tr><td width="25%"><a href="read.socket.html">read.socket</a></td>
+<td>Read from or Write to a Socket</td></tr>
+<tr><td width="25%"><a href="read.table.html">read.table</a></td>
+<td>Data Input</td></tr>
+<tr><td width="25%"><a href="citation.html">readCitationFile</a></td>
+<td>Citing R and R Packages in Publications</td></tr>
+<tr><td width="25%"><a href="clipboard.html">readClipboard</a></td>
+<td>Read/Write to/from the Windows Clipboard</td></tr>
+<tr><td width="25%"><a href="readRegistry.html">readRegistry</a></td>
+<td>Read a Windows Registy Hive</td></tr>
+<tr><td width="25%"><a href="recover.html">recover</a></td>
+<td>Browsing after an Error</td></tr>
+<tr><td width="25%"><a href="relist.html">relist</a></td>
+<td>Allow Re-Listing an unlist()ed Object</td></tr>
+<tr><td width="25%"><a href="REMOVE.html">REMOVE</a></td>
+<td>Remove Add-on Packages</td></tr>
+<tr><td width="25%"><a href="remove.packages.html">remove.packages</a></td>
+<td>Remove Installed Packages</td></tr>
+<tr><td width="25%"><a href="removeSource.html">removeSource</a></td>
+<td>Remove Stored Source from a Function.</td></tr>
+<tr><td width="25%"><a href="Rprof.html">Rprof</a></td>
+<td>Enable Profiling of R's Execution</td></tr>
+<tr><td width="25%"><a href="Rprofmem.html">Rprofmem</a></td>
+<td>Enable Profiling of R's Memory Use</td></tr>
+<tr><td width="25%"><a href="Rscript.html">Rscript</a></td>
+<td>Scripting Front-End for R</td></tr>
+<tr><td width="25%"><a href="RShowDoc.html">RShowDoc</a></td>
+<td>Show R Manuals and Other Documentation</td></tr>
+<tr><td width="25%"><a href="RSiteSearch.html">RSiteSearch</a></td>
+<td>Search for Key Words or Phrases in Documentation</td></tr>
+<tr><td width="25%"><a href="rtags.html">rtags</a></td>
+<td>An Etags-like Tagging Utility for R</td></tr>
+<tr><td width="25%"><a href="Rtangle.html">Rtangle</a></td>
+<td>R Driver for Stangle</td></tr>
+<tr><td width="25%"><a href="Rtangle.html">RtangleSetup</a></td>
+<td>R Driver for Stangle</td></tr>
+<tr><td width="25%"><a href="RweaveLatex.html">RweaveLatex</a></td>
+<td>R/LaTeX Driver for Sweave</td></tr>
+<tr><td width="25%"><a href="RweaveLatex.html">RweaveLatexSetup</a></td>
+<td>R/LaTeX Driver for Sweave</td></tr>
+</table>
+
+<h2><a name="S">-- S --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="savehistory.html">savehistory</a></td>
+<td>Load or Save or Display the Commands History</td></tr>
+<tr><td width="25%"><a href="select.list.html">select.list</a></td>
+<td>Select Items from a List</td></tr>
+<tr><td width="25%"><a href="sessionInfo.html">sessionInfo</a></td>
+<td>Collect Information About the Current R Session</td></tr>
+<tr><td width="25%"><a href="findLineNum.html">setBreakpoint</a></td>
+<td>Find the Location of a Line of Source Code, or Set a Breakpoint There.</td></tr>
+<tr><td width="25%"><a href="setInternet2.html">setInternet2</a></td>
+<td>Set or disable the use of Internet Explorer for Internet access.</td></tr>
+<tr><td width="25%"><a href="setRepositories.html">setRepositories</a></td>
+<td>Select Package Repositories</td></tr>
+<tr><td width="25%"><a href="setWindowTitle.html">setStatusBar</a></td>
+<td>Set or get the Window Title, or Set the Statusbar</td></tr>
+<tr><td width="25%"><a href="txtProgressBar.html">setTxtProgressBar</a></td>
+<td>Text Progress Bar</td></tr>
+<tr><td width="25%"><a href="setWindowTitle.html">setWindowTitle</a></td>
+<td>Set or get the Window Title, or Set the Statusbar</td></tr>
+<tr><td width="25%"><a href="winProgressBar.html">setWinProgressBar</a></td>
+<td>Progress Bars under Windows</td></tr>
+<tr><td width="25%"><a href="SHLIB.html">SHLIB</a></td>
+<td>Build Shared Object/DLL for Dynamic Loading</td></tr>
+<tr><td width="25%"><a href="shortPathName.html">shortPathName</a></td>
+<td>Express File Paths in Short Form</td></tr>
+<tr><td width="25%"><a href="stack.html">stack</a></td>
+<td>Stack or Unstack Vectors from a Data Frame or List</td></tr>
+<tr><td width="25%"><a href="Sweave.html">Stangle</a></td>
+<td>Automatic Generation of Reports</td></tr>
+<tr><td width="25%"><a href="str.html">str</a></td>
+<td>Compactly Display the Structure of an Arbitrary R Object</td></tr>
+<tr><td width="25%"><a href="str.html">strOptions</a></td>
+<td>Compactly Display the Structure of an Arbitrary R Object</td></tr>
+<tr><td width="25%"><a href="packageStatus.html">summary.packageStatus</a></td>
+<td>Package Management Tools</td></tr>
+<tr><td width="25%"><a href="summaryRprof.html">summaryRprof</a></td>
+<td>Summarise Output of R Sampling Profiler</td></tr>
+<tr><td width="25%"><a href="Sweave.html">Sweave</a></td>
+<td>Automatic Generation of Reports</td></tr>
+<tr><td width="25%"><a href="Sweave.html">SweaveSyntaxLatex</a></td>
+<td>Automatic Generation of Reports</td></tr>
+<tr><td width="25%"><a href="Sweave.html">SweaveSyntaxNoweb</a></td>
+<td>Automatic Generation of Reports</td></tr>
+<tr><td width="25%"><a href="SweaveSyntConv.html">SweaveSyntConv</a></td>
+<td>Convert Sweave Syntax</td></tr>
+</table>
+
+<h2><a name="T">-- T --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="head.html">tail</a></td>
+<td>Return the First or Last Part of an Object</td></tr>
+<tr><td width="25%"><a href="tar.html">tar</a></td>
+<td>Create a Tar Archive</td></tr>
+<tr><td width="25%"><a href="savehistory.html">timestamp</a></td>
+<td>Load or Save or Display the Commands History</td></tr>
+<tr><td width="25%"><a href="toLatex.html">toBibtex</a></td>
+<td>Converting R Objects to BibTeX or LaTeX</td></tr>
+<tr><td width="25%"><a href="person.html">toBibtex.person</a></td>
+<td>Persons</td></tr>
+<tr><td width="25%"><a href="toLatex.html">toLatex</a></td>
+<td>Converting R Objects to BibTeX or LaTeX</td></tr>
+<tr><td width="25%"><a href="sessionInfo.html">toLatex.sessionInfo</a></td>
+<td>Collect Information About the Current R Session</td></tr>
+<tr><td width="25%"><a href="txtProgressBar.html">txtProgressBar</a></td>
+<td>Text Progress Bar</td></tr>
+<tr><td width="25%"><a href="type.convert.html">type.convert</a></td>
+<td>Type Conversion on Character Variables</td></tr>
+</table>
+
+<h2><a name="U">-- U --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="relist.html">unlist.relistable</a></td>
+<td>Allow Re-Listing an unlist()ed Object</td></tr>
+<tr><td width="25%"><a href="stack.html">unstack</a></td>
+<td>Stack or Unstack Vectors from a Data Frame or List</td></tr>
+<tr><td width="25%"><a href="untar.html">untar</a></td>
+<td>Extract or List Tar Archives</td></tr>
+<tr><td width="25%"><a href="unzip.html">unzip</a></td>
+<td>Extract or List Zip Archives</td></tr>
+<tr><td width="25%"><a href="update.packages.html">update.packages</a></td>
+<td>Compare Installed Packages with CRAN-like Repositories</td></tr>
+<tr><td width="25%"><a href="packageStatus.html">update.packageStatus</a></td>
+<td>Package Management Tools</td></tr>
+<tr><td width="25%"><a href="packageStatus.html">upgrade.packageStatus</a></td>
+<td>Package Management Tools</td></tr>
+<tr><td width="25%"><a href="url.show.html">url.show</a></td>
+<td>Display a text URL</td></tr>
+<tr><td width="25%"><a href="URLencode.html">URLdecode</a></td>
+<td>Encode or Decode a (partial) URL</td></tr>
+<tr><td width="25%"><a href="URLencode.html">URLencode</a></td>
+<td>Encode or Decode a (partial) URL</td></tr>
+<tr><td width="25%"><a href="utils-package.html">utils</a></td>
+<td>The R Utils Package</td></tr>
+<tr><td width="25%"><a href="utils-deprecated.html">utils-deprecated</a></td>
+<td>Deprecated Functions in Package 'utils'</td></tr>
+</table>
+
+<h2><a name="V">-- V --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="edit.html">vi</a></td>
+<td>Invoke a Text Editor</td></tr>
+<tr><td width="25%"><a href="View.html">View</a></td>
+<td>Invoke a Data Viewer</td></tr>
+<tr><td width="25%"><a href="vignette.html">vignette</a></td>
+<td>View or List Vignettes</td></tr>
+<tr><td width="25%"><a href="vignette.html">vignettes</a></td>
+<td>View or List Vignettes</td></tr>
+</table>
+
+<h2><a name="W">-- W --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="winextras.html">win.version</a></td>
+<td>Auxiliary Functions for the Windows Port</td></tr>
+<tr><td width="25%"><a href="winDialog.html">winDialog</a></td>
+<td>Dialog Boxes under Windows</td></tr>
+<tr><td width="25%"><a href="winDialog.html">winDialogString</a></td>
+<td>Dialog Boxes under Windows</td></tr>
+<tr><td width="25%"><a href="winMenus.html">winMenuAdd</a></td>
+<td>User Menus under Windows</td></tr>
+<tr><td width="25%"><a href="winMenus.html">winMenuAddItem</a></td>
+<td>User Menus under Windows</td></tr>
+<tr><td width="25%"><a href="winMenus.html">winMenuDel</a></td>
+<td>User Menus under Windows</td></tr>
+<tr><td width="25%"><a href="winMenus.html">winMenuDelItem</a></td>
+<td>User Menus under Windows</td></tr>
+<tr><td width="25%"><a href="winMenus.html">winMenuItems</a></td>
+<td>User Menus under Windows</td></tr>
+<tr><td width="25%"><a href="winMenus.html">winMenuNames</a></td>
+<td>User Menus under Windows</td></tr>
+<tr><td width="25%"><a href="winProgressBar.html">winProgressBar</a></td>
+<td>Progress Bars under Windows</td></tr>
+<tr><td width="25%"><a href="read.socket.html">write.socket</a></td>
+<td>Read from or Write to a Socket</td></tr>
+<tr><td width="25%"><a href="write.table.html">write.table</a></td>
+<td>Data Output</td></tr>
+<tr><td width="25%"><a href="clipboard.html">writeClipboard</a></td>
+<td>Read/Write to/from the Windows Clipboard</td></tr>
+<tr><td width="25%"><a href="browseEnv.html">wsbrowser</a></td>
+<td>Browse Objects in Environment</td></tr>
+</table>
+
+<h2><a name="X">-- X --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="edit.html">xedit</a></td>
+<td>Invoke a Text Editor</td></tr>
+<tr><td width="25%"><a href="edit.html">xemacs</a></td>
+<td>Invoke a Text Editor</td></tr>
+</table>
+
+<h2><a name="Z">-- Z --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="zip.html">zip</a></td>
+<td>Create Zip archives</td></tr>
+</table>
+
+<h2><a name="misc">-- misc --</a></h2>
+
+<table width="100%">
+<tr><td width="25%"><a href="person.html">$.person</a></td>
+<td>Persons</td></tr>
+<tr><td width="25%"><a href="rcompgen.html">.DollarNames</a></td>
+<td>A Completion Generator for R</td></tr>
+<tr><td width="25%"><a href="Question.html">?</a></td>
+<td>Documentation Shortcuts</td></tr>
+<tr><td width="25%"><a href="help.search.html">??</a></td>
+<td>Search the Help System</td></tr>
+<tr><td width="25%"><a href="getAnywhere.html">[.getAnywhere</a></td>
+<td>Retrieve an R Object, Including from a Namespace</td></tr>
+<tr><td width="25%"><a href="person.html">[.person</a></td>
+<td>Persons</td></tr>
+</table>
+</body></html>
diff --git a/win32/deps/library/utils/html/R.css b/win32/deps/library/utils/html/R.css
new file mode 100644
index 0000000..6f058f3
--- /dev/null
+++ b/win32/deps/library/utils/html/R.css
@@ -0,0 +1,57 @@
+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{	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%);
+}
+
diff --git a/win32/deps/library/utils/po/da/LC_MESSAGES/R-utils.mo b/win32/deps/library/utils/po/da/LC_MESSAGES/R-utils.mo
new file mode 100644
index 0000000..ff85027
Binary files /dev/null and b/win32/deps/library/utils/po/da/LC_MESSAGES/R-utils.mo differ
diff --git a/win32/deps/library/utils/po/de/LC_MESSAGES/R-utils.mo b/win32/deps/library/utils/po/de/LC_MESSAGES/R-utils.mo
new file mode 100644
index 0000000..1ad3e7b
Binary files /dev/null and b/win32/deps/library/utils/po/de/LC_MESSAGES/R-utils.mo differ
diff --git a/win32/deps/library/utils/po/en quot/LC_MESSAGES/R-utils.mo b/win32/deps/library/utils/po/en quot/LC_MESSAGES/R-utils.mo
new file mode 100644
index 0000000..4155c5d
Binary files /dev/null and b/win32/deps/library/utils/po/en quot/LC_MESSAGES/R-utils.mo differ
diff --git a/win32/deps/library/utils/po/fr/LC_MESSAGES/R-utils.mo b/win32/deps/library/utils/po/fr/LC_MESSAGES/R-utils.mo
new file mode 100644
index 0000000..ebd3ab1
Binary files /dev/null and b/win32/deps/library/utils/po/fr/LC_MESSAGES/R-utils.mo differ
diff --git a/win32/deps/library/utils/po/ja/LC_MESSAGES/R-utils.mo b/win32/deps/library/utils/po/ja/LC_MESSAGES/R-utils.mo
new file mode 100644
index 0000000..7aaeb64
Binary files /dev/null and b/win32/deps/library/utils/po/ja/LC_MESSAGES/R-utils.mo differ
diff --git a/win32/deps/library/utils/po/ko/LC_MESSAGES/R-utils.mo b/win32/deps/library/utils/po/ko/LC_MESSAGES/R-utils.mo
new file mode 100644
index 0000000..88d772e
Binary files /dev/null and b/win32/deps/library/utils/po/ko/LC_MESSAGES/R-utils.mo differ
diff --git a/win32/deps/library/utils/po/pl/LC_MESSAGES/R-utils.mo b/win32/deps/library/utils/po/pl/LC_MESSAGES/R-utils.mo
new file mode 100644
index 0000000..7d19ad0
Binary files /dev/null and b/win32/deps/library/utils/po/pl/LC_MESSAGES/R-utils.mo differ
diff --git a/win32/deps/library/utils/po/pt_BR/LC_MESSAGES/R-utils.mo b/win32/deps/library/utils/po/pt_BR/LC_MESSAGES/R-utils.mo
new file mode 100644
index 0000000..c33ad40
Binary files /dev/null and b/win32/deps/library/utils/po/pt_BR/LC_MESSAGES/R-utils.mo differ
diff --git a/win32/deps/library/utils/po/ru/LC_MESSAGES/R-utils.mo b/win32/deps/library/utils/po/ru/LC_MESSAGES/R-utils.mo
new file mode 100644
index 0000000..41a1391
Binary files /dev/null and b/win32/deps/library/utils/po/ru/LC_MESSAGES/R-utils.mo differ
diff --git a/win32/deps/library/utils/po/tr/LC_MESSAGES/R-utils.mo b/win32/deps/library/utils/po/tr/LC_MESSAGES/R-utils.mo
new file mode 100644
index 0000000..b8cf282
Binary files /dev/null and b/win32/deps/library/utils/po/tr/LC_MESSAGES/R-utils.mo differ
diff --git a/win32/deps/library/utils/po/zh_CN/LC_MESSAGES/R-utils.mo b/win32/deps/library/utils/po/zh_CN/LC_MESSAGES/R-utils.mo
new file mode 100644
index 0000000..d0f81b4
Binary files /dev/null and b/win32/deps/library/utils/po/zh_CN/LC_MESSAGES/R-utils.mo differ
diff --git a/win32/deps/library/utils/tests/Sexpr-verb-ex.Rnw b/win32/deps/library/utils/tests/Sexpr-verb-ex.Rnw
new file mode 100644
index 0000000..f8acd06
--- /dev/null
+++ b/win32/deps/library/utils/tests/Sexpr-verb-ex.Rnw
@@ -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}
diff --git a/win32/deps/library/utils/tests/Sweave-tst.R b/win32/deps/library/utils/tests/Sweave-tst.R
new file mode 100644
index 0000000..a943c7f
--- /dev/null
+++ b/win32/deps/library/utils/tests/Sweave-tst.R
@@ -0,0 +1,84 @@
+#  File src/library/utils/tests/Sweave-tst.R
+#  Part of the R package, http://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
+#  http://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 <- function(...) paste(..., sep="")
+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')
diff --git a/win32/deps/library/utils/tests/completion.R b/win32/deps/library/utils/tests/completion.R
new file mode 100644
index 0000000..d608361
--- /dev/null
+++ b/win32/deps/library/utils/tests/completion.R
@@ -0,0 +1,29 @@
+
+## 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("")
+## testLine("")
+## testLine("")
diff --git a/win32/deps/library/utils/tests/customgraphics.Rnw b/win32/deps/library/utils/tests/customgraphics.Rnw
new file mode 100644
index 0000000..785afbc
--- /dev/null
+++ b/win32/deps/library/utils/tests/customgraphics.Rnw
@@ -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!
diff --git a/win32/deps/library/utils/tests/keepsource.Rnw b/win32/deps/library/utils/tests/keepsource.Rnw
new file mode 100644
index 0000000..9622141
--- /dev/null
+++ b/win32/deps/library/utils/tests/keepsource.Rnw
@@ -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.
diff --git a/win32/deps/library/utils/tests/swv-keepSrc-1.Rnw b/win32/deps/library/utils/tests/swv-keepSrc-1.Rnw
new file mode 100644
index 0000000..3cfcb48
--- /dev/null
+++ b/win32/deps/library/utils/tests/swv-keepSrc-1.Rnw
@@ -0,0 +1,47 @@
+\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,
+<<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>>=
+require("lattice")
+@
+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}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]