R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.0 Patched (2005-05-12), 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("Zelig-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('Zelig') Loading required package: MASS Loading required package: boot Please refer to http://gking.harvard.edu/zelig for full documentation or help.zelig() for help with commands and models supported by Zelig. > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "dims" > > ### * dims > > flush(stderr()); flush(stdout()) > > ### Name: dims > ### Title: Return Dimensions of Vectors, Arrays, and Data Frames > ### Aliases: dims > ### Keywords: file > > ### ** Examples > > a <- 1:12 > dims(a) [1] 12 > > a <- matrix(1, nrow = 4, ncol = 9) > dims(a) [1] 4 9 > > > > cleanEx(); ..nameEx <- "gsource" > > ### * gsource > > flush(stderr()); flush(stdout()) > > ### Name: gsource > ### Title: Read Data As a Space-Delimited Table > ### Aliases: gsource > ### Keywords: file > > ### ** Examples > > ## Not run: > ##D data <- gsource(variables = " > ##D 1 2 3 4 5 > ##D 6 7 8 9 10 > ##D 3 4 5 1 3 > ##D 6 7 8 1 9 ") > ##D > ##D data <- gsource(var.names = "Vote Age Party", variables = " > ##D 0 23 Democrat > ##D 0 27 Democrat > ##D 1 45 Republican > ##D 1 65 Democrat ") > ## End(Not run) > > > > cleanEx(); ..nameEx <- "rocplot" > > ### * rocplot > > flush(stderr()); flush(stdout()) > > ### Name: rocplot > ### Title: Receiver Operator Characteristic Plots > ### Aliases: rocplot roc ROC ROCplot > ### Keywords: file > > ### ** Examples > > data(turnout) > z.out1 <- zelig(vote ~ race + educate + age, model = "logit", + data = turnout) > z.out2 <- zelig(vote ~ race + educate, model = "logit", + data = turnout) > rocplot(z.out1$y, z.out2$y, fitted(z.out1), fitted(z.out2)) > > > > cleanEx(); ..nameEx <- "user.prompt" > > ### * user.prompt > > flush(stderr()); flush(stdout()) > > ### Name: user.prompt > ### Title: Pause in demo files > ### Aliases: user.prompt > ### Keywords: file > > ### ** Examples > > ## Not run: > ##D user.prompt() > ## End(Not run) > > > > ### *