R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), 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. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + 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") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("NORMT3-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('NORMT3') NORMT3 loaded > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "dnormt3" > > ### * dnormt3 > > flush(stderr()); flush(stdout()) > > ### Name: dnormt3 > ### Title: Density function of sum of Gaussian and Student's t on 3 df > ### Aliases: dnormt3 > ### Keywords: distribution > > ### ** Examples > > dnormt3(0) [1] 0.4501582 > # > # Should be 0.4501582 = sqrt(2)/pi > # > x <- seq(from=-5, to=5, length=100) > plot(x, dnormt3(x), type="l") # Density plot > > > > cleanEx(); ..nameEx <- "dst" > > ### * dst > > flush(stderr()); flush(stdout()) > > ### Name: dst > ### Title: Density function of sphered Student's t distribution > ### Aliases: dst > ### Keywords: distribution > > ### ** Examples > > dst(0) [1] 0.6366198 > # > # Should be 2/pi = 0.6366198 > # > x <- seq(from=-5, to=5, length=100) > plot(x, dst(x), type="l") # Produces a density plot > > > > cleanEx(); ..nameEx <- "erf" > > ### * erf > > flush(stderr()); flush(stdout()) > > ### Name: erf > ### Title: Error function > ### Aliases: erf > ### Keywords: math > > ### ** Examples > > erf(0) [1] 0+0i > # > # Should give 0 > # > erf(1) [1] 0.8427008+0i > # > # Should give 0.8427008+0i > # > erf(complex(re=1, im=1)) [1] 1.316151+0.1904534i > # > # Should give 1.316151+0.1904535i > # > > > > cleanEx(); ..nameEx <- "erfc" > > ### * erfc > > flush(stderr()); flush(stdout()) > > ### Name: erfc > ### Title: Complementary error function > ### Aliases: erfc > ### Keywords: math > > ### ** Examples > > erfc(0) [1] 1+0i > # > # Should give 1 > # > erfc(1) [1] 0.1572992+0i > # > # Should give 0.1572992+0i > # > erfc(complex(re=1, im=1)) [1] -0.3161513-0.1904534i > # > # Should give -0.3161513-0.1904535i > # > > > > cleanEx(); ..nameEx <- "ic1" > > ### * ic1 > > flush(stderr()); flush(stdout()) > > ### Name: ic1 > ### Title: Compute IC1 formula from Nason (2005) > ### Aliases: ic1 > ### Keywords: math > > ### ** Examples > > ic1(1,1) [1] 0.03401986 > # > # Should give 0.03401986. > # > > > > cleanEx(); ..nameEx <- "is1" > > ### * is1 > > flush(stderr()); flush(stdout()) > > ### Name: is1 > ### Title: Compute IS1 formula from Nason (2005) > ### Aliases: is1 > ### Keywords: math > > ### ** Examples > > is1(1,1) [1] 0.1297382 > # > # Should give 0.1297382. > # > > > > cleanEx(); ..nameEx <- "normt3ip" > > ### * normt3ip > > flush(stderr()); flush(stdout()) > > ### Name: normt3ip > ### Title: Compute inner product function of Gaussian and t3 distribution > ### Aliases: normt3ip > ### Keywords: math > > ### ** Examples > > #normt3ip(0,1) > # > # Answer should be 0.3183099 which is 1/pi > # > x <- 3 > > > > ### *