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("Rpad-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('Rpad') Loading required package: R2HTML > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "RpadGraphing" > > ### * RpadGraphing > > flush(stderr()); flush(stdout()) > > ### Name: RpadGraphing > ### Title: Rpad graphing utilities > ### Aliases: fspdf graphoptions newgraph showgraph RpadPlotName > ### Keywords: math > > ### ** Examples > > # make some graphs (a default graphics device is already available) > x <- 1:10 > y <- x^2 > y2 <- x^3 > if (capabilities("png")) graphoptions(type="Rpng") > newgraph() > plot(x, y) # does the plot > plot(x, y2) # does the second plot > HTMLon() # sets Rpad to HTML output > showgraph() # closes the device, outputs the HTML for the both > # images, and creates the next device > plot(x, y2) > showgraph() > > # graphs with named files: > newgraph("graph_A") > plot(x, y) > showgraph("graph_A") > newgraph("graph_B", width = 4, height = 6) # also adjust the width and height > plot(x, y2) > showgraph("graph_B") > > > > cleanEx(); ..nameEx <- "RpadHTML" > > ### * RpadHTML > > flush(stderr()); flush(stdout()) > > ### Name: RpadHTML > ### Title: Rpad utilities > ### Aliases: ROutputFormat HTMLon HTMLoff HTMLh1 HTMLh2 HTMLh3 HTMLh4 > ### HTMLh5 HTMLargs HTMLtag HTMLetag HTMLradio HTMLcheckbox HTMLselect > ### HTMLinput HTMLlink HTMLimg HTMLembed print.condition HTML.data.frame > ### Keywords: math > > ### ** Examples > > #make some graphs (a default graphics device is already available) > x <- 1:10 > y2 <- x^3 > > # fancy HTML output > HTMLon() > ROutputFormat('html') > summary(y2) Min. 1st Qu. Median Mean 3rd Qu. Max. 1.00 36.25 170.50 302.50 469.80 1000.00 > HTMLoff() > ROutputFormat('text') > summary(y2) Min. 1st Qu. Median Mean 3rd Qu. Max. 1.00 36.25 170.50 302.50 469.80 1000.00 > > # generate some GUI elements > # - normally done in an Rpad_input section with rpad_run="init" > HTMLon() # switch to html mode > data(state) > HTMLselect("favoriteAmericanState", state.name) # generate the select box Warning in if (optionvalue != "") optionvalue = paste("value='", optionvalue, : the condition has length > 1 and only the first element will be used > > > > cleanEx(); ..nameEx <- "RpadUtil" > > ### * RpadUtil > > flush(stderr()); flush(stdout()) > > ### Name: RpadUtil > ### Title: Rpad utilities > ### Aliases: RpadURL RpadBaseURL RpadBaseFile RpadIsLocal > ### Keywords: math > > ### ** Examples > > # make some data > x <- 1:10 > y2 <- x^3 > save(x, y2, file = RpadBaseFile("testdata.RData")) > # output a link to the user: > HTMLon() > cat(" cat("'>Click to download the test data.") '>Click to download the test data.> > > > ### *