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("epsi-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('epsi') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "CGGM.mean" > > ### * CGGM.mean > > flush(stderr()); flush(stdout()) > > ### Name: CGGM.mean > ### Title: Corner-Preserving Smoothing > ### Aliases: CGGM.mean CGGM.lts CGGM.autoscale > ### Keywords: cluster regression robust nonparametric smooth > > ### ** Examples > > > y <- matrix(rep(0,60*60),nrow=60) > y[21:40,21:40]<-1 > y <- y + matrix(rnorm(60*60,0,0.1),nrow=60) > image(y,col=gray(seq(0,1,1/255))) > > ymean <- CGGM.mean(y,0.04) calculating scale parameter....................................................... scale parameter: 0.1391103 Row: 1 / 60 Row: 2 / 60 Row: 3 / 60 Row: 4 / 60 Row: 5 / 60 Row: 6 / 60 Row: 7 / 60 Row: 8 / 60 Row: 9 / 60 Row: 10 / 60 Row: 11 / 60 Row: 12 / 60 Row: 13 / 60 Row: 14 / 60 Row: 15 / 60 Row: 16 / 60 Row: 17 / 60 Row: 18 / 60 Row: 19 / 60 Row: 20 / 60 Row: 21 / 60 Row: 22 / 60 Row: 23 / 60 Row: 24 / 60 Row: 25 / 60 Row: 26 / 60 Row: 27 / 60 Row: 28 / 60 Row: 29 / 60 Row: 30 / 60 Row: 31 / 60 Row: 32 / 60 Row: 33 / 60 Row: 34 / 60 Row: 35 / 60 Row: 36 / 60 Row: 37 / 60 Row: 38 / 60 Row: 39 / 60 Row: 40 / 60 Row: 41 / 60 Row: 42 / 60 Row: 43 / 60 Row: 44 / 60 Row: 45 / 60 Row: 46 / 60 Row: 47 / 60 Row: 48 / 60 Row: 49 / 60 Row: 50 / 60 Row: 51 / 60 Row: 52 / 60 Row: 53 / 60 Row: 54 / 60 Row: 55 / 60 Row: 56 / 60 Row: 57 / 60 Row: 58 / 60 Row: 59 / 60 Row: 60 / 60 > image(ymean,col=gray(seq(0,1,1/255))) > > > > ### *