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("lpridge-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('lpridge') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "lpepa" > > ### * lpepa > > flush(stderr()); flush(stdout()) > > ### Encoding: latin1 > > ### Name: lpepa > ### Title: Local polynomial regression fitting with Epanechnikov weights > ### Aliases: lpepa > ### Keywords: smooth > > ### ** Examples > > data(cars) > attach(cars) > > epa.sd <- lpepa(speed,dist, bandw=5) # local polynomials > > plot(speed, dist, main = "data(cars) & lp epanechnikov regression") > lines(epa.sd$x.out, epa.sd$est, col="red") > lines(lowess(speed,dist, f= .5), col="orange") > detach() > > > > cleanEx(); ..nameEx <- "lpridge" > > ### * lpridge > > flush(stderr()); flush(stdout()) > > ### Name: lpridge > ### Title: Local polynomial regression fitting with ridging > ### Aliases: lpridge > ### Keywords: smooth > > ### ** Examples > > data(cars) > attach(cars) > plot(speed, dist, main = "data(cars) & lpRIDGE Regression") > > myfit <- lpridge(speed,dist,bandw = 5, ridge=0) # local polynomials > lines(myfit$x.out,myfit$est,col=2) > > myridge <- lpridge(speed,dist,bandw = 5) # local pol. ridge > lines(myridge$x.out,myridge$est,col=3) > mtext("bandw = 5") > legend(5,120, c("ridge = 0", "default ridging"), col = 2:3, lty = 1) > detach() > > > > ### *