[Distr-commits] r616 - in branches/distr-2.2/pkg/distrTeach: . tests tests/Examples
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Oct 16 06:03:32 CEST 2009
Author: stamats
Date: 2009-10-16 06:03:32 +0200 (Fri, 16 Oct 2009)
New Revision: 616
Added:
branches/distr-2.2/pkg/distrTeach/tests/
branches/distr-2.2/pkg/distrTeach/tests/Examples/
branches/distr-2.2/pkg/distrTeach/tests/Examples/distrTeach-Ex.Rout.save
Log:
added *-Ex.Rout.save to new tests/Examples folder. We will have to check and probably to slightly modify these files with every new R version.
Added: branches/distr-2.2/pkg/distrTeach/tests/Examples/distrTeach-Ex.Rout.save
===================================================================
--- branches/distr-2.2/pkg/distrTeach/tests/Examples/distrTeach-Ex.Rout.save (rev 0)
+++ branches/distr-2.2/pkg/distrTeach/tests/Examples/distrTeach-Ex.Rout.save 2009-10-16 04:03:32 UTC (rev 616)
@@ -0,0 +1,417 @@
+
+R version 2.10.0 beta (2009-10-15 r50107)
+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.
+
+> ### * <HEADER>
+> ###
+> attach(NULL, name = "CheckExEnv")
+> assign("nameEx",
++ local({
++ s <- "__{must remake R-ex/*.R}__"
++ function(new) {
++ if(!missing(new)) s <<- new else s
++ }
++ }),
++ pos = "CheckExEnv")
+> ## Add some hooks to label plot pages for base and grid graphics
+> assign("base_plot_hook",
++ function() {
++ pp <- par(c("mfg","mfcol","oma","mar"))
++ if(all(pp$mfg[1:2] == c(1, pp$mfcol[2]))) {
++ outer <- (oma4 <- pp$oma[4]) > 0; mar4 <- pp$mar[4]
++ mtext(sprintf("help(\"%s\")", nameEx()), side = 4,
++ line = if(outer)max(1, oma4 - 1) else min(1, mar4 - 1),
++ outer = outer, adj = 1, cex = .8, col = "orchid", las=3)
++ }
++ },
++ pos = "CheckExEnv")
+> assign("grid_plot_hook",
++ function() {
++ grid::pushViewport(grid::viewport(width=grid::unit(1, "npc") -
++ grid::unit(1, "lines"), x=0, just="left"))
++ grid::grid.text(sprintf("help(\"%s\")", nameEx()),
++ x=grid::unit(1, "npc") + grid::unit(0.5, "lines"),
++ y=grid::unit(0.8, "npc"), rot=90,
++ gp=grid::gpar(col="orchid"))
++ },
++ pos = "CheckExEnv")
+> setHook("plot.new", get("base_plot_hook", pos = "CheckExEnv"))
+> setHook("persp", get("base_plot_hook", pos = "CheckExEnv"))
+> setHook("grid.newpage", get("grid_plot_hook", pos = "CheckExEnv"))
+> assign("cleanEx",
++ function(env = .GlobalEnv) {
++ rm(list = ls(envir = env, all.names = TRUE), envir = env)
++ RNGkind("default", "default")
++ set.seed(1)
++ options(warn = 1)
++ .CheckExEnv <- as.environment("CheckExEnv")
++ delayedAssign("T", stop("T used instead of TRUE"),
++ assign.env = .CheckExEnv)
++ delayedAssign("F", stop("F used instead of FALSE"),
++ assign.env = .CheckExEnv)
++ sch <- search()
++ newitems <- sch[! sch %in% .oldSearch]
++ for(item in rev(newitems))
++ eval(substitute(detach(item), list(item=item)))
++ missitems <- .oldSearch[! .oldSearch %in% sch]
++ if(length(missitems))
++ warning("items ", paste(missitems, collapse=", "),
++ " have been removed from the search path")
++ },
++ pos = "CheckExEnv")
+> assign("ptime", proc.time(), pos = "CheckExEnv")
+> ## at least one package changes these via ps.options(), so do this
+> ## before loading the package.
+> ## Use postscript as incomplete files may be viewable, unlike PDF.
+> ## Choose a size that is close to on-screen devices, fix paper
+> grDevices::ps.options(width = 7, height = 7, paper = "a4", reset = TRUE)
+> grDevices::postscript("distrTeach-Ex.ps")
+>
+> assign("par.postscript", graphics::par(no.readonly = TRUE), pos = "CheckExEnv")
+> options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly"))
+> options(warn = 1)
+> library('distrTeach')
+Loading required package: distr
+Loading required package: startupmsg
+:startupmsg> Utilities for start-up messages (version 0.7)
+:startupmsg>
+:startupmsg> For more information see ?"startupmsg",
+:startupmsg> NEWS("startupmsg")
+
+Loading required package: sfsmisc
+Loading required package: SweaveListingUtils
+:SweaveListingUtils> Utilities for Sweave together with
+:SweaveListingUtils> TeX listings package (version 0.4)
+:SweaveListingUtils>
+:SweaveListingUtils> Some functions from package 'base'
+:SweaveListingUtils> are intentionally masked ---see
+:SweaveListingUtils> SweaveListingMASK().
+:SweaveListingUtils>
+:SweaveListingUtils> Note that global options are
+:SweaveListingUtils> controlled by
+:SweaveListingUtils> SweaveListingoptions() ---c.f.
+:SweaveListingUtils> ?"SweaveListingoptions".
+:SweaveListingUtils>
+:SweaveListingUtils> For more information see
+:SweaveListingUtils> ?"SweaveListingUtils",
+:SweaveListingUtils> NEWS("SweaveListingUtils")
+:SweaveListingUtils> There is a vignette to this
+:SweaveListingUtils> package; try
+:SweaveListingUtils> vignette("ExampleSweaveListingUtils").
+
+
+Attaching package: 'SweaveListingUtils'
+
+
+ The following object(s) are masked from package:base :
+
+ library,
+ require
+
+:distr> Object orientated implementation of distributions (version
+:distr> 2.2)
+:distr>
+:distr> Attention: Arithmetics on distribution objects are
+:distr> understood as operations on corresponding random variables
+:distr> (r.v.s); see distrARITH().
+:distr>
+:distr> Some functions from package 'stats' are intentionally masked
+:distr> ---see distrMASK().
+:distr>
+:distr> Note that global options are controlled by distroptions()
+:distr> ---c.f. ?"distroptions".
+:distr>
+:distr> For more information see ?"distr", NEWS("distr"), as well as
+:distr> http://distr.r-forge.r-project.org/
+:distr> Package "distrDoc" provides a vignette to this package as
+:distr> well as to several extension packages; try
+:distr> vignette("distr").
+
+
+Attaching package: 'distr'
+
+
+ The following object(s) are masked from package:stats :
+
+ df,
+ qqplot,
+ sd
+
+Loading required package: distrEx
+Loading required package: evd
+Loading required package: actuar
+
+Attaching package: 'actuar'
+
+
+ The following object(s) are masked from package:grDevices :
+
+ cm
+
+:distrEx> Extensions of package distr (version 2.2)
+:distrEx>
+:distrEx> Note: Packages "e1071", "moments", "fBasics" should be
+:distrEx> attached /before/ package "distrEx". See distrExMASK().
+:distrEx>
+:distrEx> For more information see ?"distrEx", NEWS("distrEx"), as
+:distrEx> well as
+:distrEx> http://distr.r-forge.r-project.org/
+:distrEx> Package "distrDoc" provides a vignette to this package
+:distrEx> as well as to several related packages; try
+:distrEx> vignette("distr").
+
+
+Attaching package: 'distrEx'
+
+
+ The following object(s) are masked from package:stats :
+
+ IQR,
+ mad,
+ median,
+ var
+
+:distrTeach> Extensions of package distr for teaching
+:distrTeach> Stochastics/Statistics
+:distrTeach>
+:distrTeach> in secondary school (version 2.2)
+:distrTeach>
+:distrTeach> For more information see ?"distrTeach",
+:distrTeach> NEWS("distrTeach"), as well as
+:distrTeach> http://distr.r-forge.r-project.org/
+:distrTeach> Package "distrDoc" provides a vignette to this
+:distrTeach> package as well as to several related packages;
+:distrTeach> try vignette("distr").
+
+>
+> assign(".oldSearch", search(), pos = 'CheckExEnv')
+> assign(".oldNS", loadedNamespaces(), pos = 'CheckExEnv')
+> cleanEx(); nameEx("IllustCLT")
+> ### * IllustCLT
+>
+> flush(stderr()); flush(stdout())
+>
+> ### Name: illustrateCLT
+> ### Title: Functions for Illustrating the CLT
+> ### Aliases: illustrateCLT illustrateCLT.tcl
+> ### Keywords: distribution methods dynamic
+>
+> ### ** Examples
+>
+> distroptions("DefaultNrFFTGridPointsExponent" = 13)
+> illustrateCLT(Distr = Unif(), len = 20)
+> distroptions("DefaultNrFFTGridPointsExponent" = 12)
+> illustrateCLT(Distr = Pois(lambda = 2), len = 20)
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+Warning in par(opar) : graphical parameter "cin" cannot be set
+Warning in par(opar) : graphical parameter "cra" cannot be set
+Warning in par(opar) : graphical parameter "csi" cannot be set
+Warning in par(opar) : graphical parameter "cxy" cannot be set
+Warning in par(opar) : graphical parameter "din" cannot be set
+> distroptions("DefaultNrFFTGridPointsExponent" = 13)
+> illustrateCLT(Distr = Pois(lambda = 2)+Unif(), len = 20)
+> illustrateCLT.tcl(Distr = Unif(), k = 4, "Unif()")
+>
+>
+>
+> cleanEx(); nameEx("IllustLLN")
+> ### * IllustLLN
+>
+> flush(stderr()); flush(stdout())
+>
+> ### Name: illustrateLLN
+> ### Title: Functions for Illustrating the LLN
+> ### Aliases: illustrateLLN
+> ### Keywords: distribution methods dynamic
+>
+> ### ** Examples
+>
+> illustrateLLN(Distr = Unif())
+Warning in any(c(lapply(inp, is.language))) :
+ coercing argument of type 'list' to logical
+Warning in par(omar) : graphical parameter "cin" cannot be set
+Warning in par(omar) : graphical parameter "cra" cannot be set
+Warning in par(omar) : graphical parameter "csi" cannot be set
+Warning in par(omar) : graphical parameter "cxy" cannot be set
+Warning in par(omar) : graphical parameter "din" cannot be set
+> illustrateLLN(Distr = Pois(lambda = 2))
+Warning in any(c(lapply(inp, is.language))) :
+ coercing argument of type 'list' to logical
+Warning in par(omar) : graphical parameter "cin" cannot be set
+Warning in par(omar) : graphical parameter "cra" cannot be set
+Warning in par(omar) : graphical parameter "csi" cannot be set
+Warning in par(omar) : graphical parameter "cxy" cannot be set
+Warning in par(omar) : graphical parameter "din" cannot be set
+> illustrateLLN(Distr = Pois(lambda = 2)+Unif())
+Warning in any(c(lapply(inp, is.language))) :
+ coercing argument of type 'list' to logical
+Warning in par(omar) : graphical parameter "cin" cannot be set
+Warning in par(omar) : graphical parameter "cra" cannot be set
+Warning in par(omar) : graphical parameter "csi" cannot be set
+Warning in par(omar) : graphical parameter "cxy" cannot be set
+Warning in par(omar) : graphical parameter "din" cannot be set
+> illustrateLLN(Td(3), m = 50, col.Eline = "green", lwd = 2, cex = 0.6, main =
++ "My LLN %C%Q", sub = "generated %D")
+Warning in par(omar) : graphical parameter "cin" cannot be set
+Warning in par(omar) : graphical parameter "cra" cannot be set
+Warning in par(omar) : graphical parameter "csi" cannot be set
+Warning in par(omar) : graphical parameter "cxy" cannot be set
+Warning in par(omar) : graphical parameter "din" cannot be set
+> illustrateLLN(Td(3), m = 50, CLTorCheb = "Chebyshev")
+Warning in any(c(lapply(inp, is.language))) :
+ coercing argument of type 'list' to logical
+Warning in par(omar) : graphical parameter "cin" cannot be set
+Warning in par(omar) : graphical parameter "cra" cannot be set
+Warning in par(omar) : graphical parameter "csi" cannot be set
+Warning in par(omar) : graphical parameter "cxy" cannot be set
+Warning in par(omar) : graphical parameter "din" cannot be set
+> illustrateLLN(Td(3), m = 50, CLTorCheb = "Chebyshev", coverage = 0.75)
+Warning in any(c(lapply(inp, is.language))) :
+ coercing argument of type 'list' to logical
+Warning in par(omar) : graphical parameter "cin" cannot be set
+Warning in par(omar) : graphical parameter "cra" cannot be set
+Warning in par(omar) : graphical parameter "csi" cannot be set
+Warning in par(omar) : graphical parameter "cxy" cannot be set
+Warning in par(omar) : graphical parameter "din" cannot be set
+>
+>
+>
+> cleanEx(); nameEx("plotCLT")
+> ### * plotCLT
+>
+> flush(stderr()); flush(stdout())
+>
+> ### Name: plotCLT
+> ### Title: Generic Plot Function for Illustrating the CLT
+> ### Aliases: plotCLT plotCLT-methods plotCLT,AbscontDistribution-method
+> ### plotCLT,DiscreteDistribution-method
+> ### Keywords: internal methods hplot distribution
+>
+> ### ** Examples
+>
+> illustrateCLT(Distr = Unif(), len = 20)
+>
+>
+>
+> ### * <FOOTER>
+> ###
+> cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed: 18.733 0.236 20.043 0.004 0.004
+> grDevices::dev.off()
+null device
+ 1
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
More information about the Distr-commits
mailing list