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("nortest-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('nortest') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "ad.test" > > ### * ad.test > > flush(stderr()); flush(stdout()) > > ### Name: ad.test > ### Title: Anderson-Darling test for normality > ### Aliases: ad.test > ### Keywords: htest > > ### ** Examples > > ad.test(rnorm(100, mean = 5, sd = 3)) Anderson-Darling normality test data: rnorm(100, mean = 5, sd = 3) A = 0.1602, p-value = 0.947 > ad.test(runif(100, min = 2, max = 4)) Anderson-Darling normality test data: runif(100, min = 2, max = 4) A = 1.9481, p-value = 5.316e-05 > > > > > cleanEx(); ..nameEx <- "cvm.test" > > ### * cvm.test > > flush(stderr()); flush(stdout()) > > ### Name: cvm.test > ### Title: Cramer-von Mises test for normality > ### Aliases: cvm.test > ### Keywords: htest > > ### ** Examples > > cvm.test(rnorm(100, mean = 5, sd = 3)) Cramer-von Mises normality test data: rnorm(100, mean = 5, sd = 3) W = 0.026, p-value = 0.8945 > cvm.test(runif(100, min = 2, max = 4)) Cramer-von Mises normality test data: runif(100, min = 2, max = 4) W = 0.2747, p-value = 0.0006342 > > > > > cleanEx(); ..nameEx <- "lillie.test" > > ### * lillie.test > > flush(stderr()); flush(stdout()) > > ### Name: lillie.test > ### Title: Lilliefors (Kolmogorov-Smirnov) test for normality > ### Aliases: lillie.test > ### Keywords: htest > > ### ** Examples > > lillie.test(rnorm(100, mean = 5, sd = 3)) Lilliefors (Kolmogorov-Smirnov) normality test data: rnorm(100, mean = 5, sd = 3) D = 0.047, p-value = 0.848 > lillie.test(runif(100, min = 2, max = 4)) Lilliefors (Kolmogorov-Smirnov) normality test data: runif(100, min = 2, max = 4) D = 0.1008, p-value = 0.014 > > > > > cleanEx(); ..nameEx <- "pearson.test" > > ### * pearson.test > > flush(stderr()); flush(stdout()) > > ### Name: pearson.test > ### Title: Pearson chi-square test for normality > ### Aliases: pearson.test > ### Keywords: htest > > ### ** Examples > > pearson.test(rnorm(100, mean = 5, sd = 3)) Pearson chi-square normality test data: rnorm(100, mean = 5, sd = 3) P = 8.16, p-value = 0.6132 > pearson.test(runif(100, min = 2, max = 4)) Pearson chi-square normality test data: runif(100, min = 2, max = 4) P = 27.66, p-value = 0.002046 > > > > > cleanEx(); ..nameEx <- "sf.test" > > ### * sf.test > > flush(stderr()); flush(stdout()) > > ### Name: sf.test > ### Title: Shapiro-Francia test for normality > ### Aliases: sf.test > ### Keywords: htest > > ### ** Examples > > sf.test(rnorm(100, mean = 5, sd = 3)) Shapiro-Francia normality test data: rnorm(100, mean = 5, sd = 3) W = 0.9958, p-value = 0.9719 > sf.test(runif(100, min = 2, max = 4)) Shapiro-Francia normality test data: runif(100, min = 2, max = 4) W = 0.9386, p-value = 0.0003372 > > > > > ### *