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("httpRequest-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('httpRequest') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "GetToHost" > > ### * GetToHost > > flush(stderr()); flush(stdout()) > > ### Name: getToHost > ### Title: Sends Get Request to HTTP Server (host) > ### Aliases: getToHost > ### Keywords: misc > > ### ** Examples > > #check first if www.molgen.mpg.de is running. > #port<-80 > #getToHost("www.molgen.mpg.de","/~wolski/test.php4?test=test1&test2=test2&test3=3","www.test.pl",port=port) > > > > cleanEx(); ..nameEx <- "PostToHost" > > ### * PostToHost > > flush(stderr()); flush(stdout()) > > ### Name: postToHost > ### Title: Sends Multiform Post Request to HTTP Server > ### Aliases: postToHost > ### Keywords: misc > > ### ** Examples > > > #to test uncomment. First check that the host ist running. > #port <- 80 > #test2 <- list( > # "fruit"="apple" > # ,"dat_defs"="20021204/F113213.dat" > # ,"upsa"="test" > # ) > #postToHost("www.molgen.mpg.de","/~wolski/test.php4",test2,referer="www.test.de",port=port) > > > > cleanEx(); ..nameEx <- "SimplePostToHost" > > ### * SimplePostToHost > > flush(stderr()); flush(stdout()) > > ### Name: simplePostToHost > ### Title: Sends Simple Post Request to HTTP Server (host) > ### Aliases: simplePostToHost > ### Keywords: misc > > ### ** Examples > > #before you use the example check that the server www.molgen.mpg.de is running. > #port <- 80 > #data = "pid=14&poll_vote_number=2"; > #simplePostToHost("www.molgen.mpg.de","/~wolski/test.php4","",data,port=port) > > > > ### *