# SCM Repository

[inlinedocs] Diff of /pkg/inlinedocs/inst/testfiles/softThreshExAttr.R
 [inlinedocs] / pkg / inlinedocs / inst / testfiles / softThreshExAttr.R # Diff of /pkg/inlinedocs/inst/testfiles/softThreshExAttr.R

revision 135, Tue Oct 19 15:43:38 2010 UTC revision 138, Tue Oct 19 22:51:59 2010 UTC
# Line 9  Line 9
9    ifelse(abs(x)<lambda,0,x-sign(x)*lambda)    ifelse(abs(x)<lambda,0,x-sign(x)*lambda)
10  ### The vector of observations after applying  ### The vector of observations after applying
11  ### the soft-thresholding function.  ### the soft-thresholding function.
12  },ex={  },ex=function(){
13    x <- seq(-5,5,l=50)    x <- seq(-5,5,l=50)
14    y <- soft.threshold(x)    y <- soft.threshold(x)
15    plot(x,y)    plot(x,y)
16  })  })
17
18  .result <-  .result <-
19   list(soft.threshold = list(definition = "soft.threshold <- function # Soft-thresholding\n### Apply the soft-threshold function to a vector.\n(x,\n### A vector of numeric data.\n lambda=1\n### The largest absolute value that will be mapped to zero.\n ){\n  stopifnot(lambda>=0)\n  st <- ifelse(abs(x)<lambda,0,x-sign(x)*lambda)\n  return(st)\n### The vector of observations after applying \n### the soft-thresholding function.\n  ##examples<<\n  x <- seq(-5,5,l=50)\n  y <- soft.threshold(x)\n  plot(x,y)\n}",   list(soft.threshold = list(definition = "soft.threshold <- structure(function # Soft-thresholding\n### Apply the soft-threshold function to a vector.\n(x,\n### A vector of numeric data.\n lambda=1\n### The largest absolute value that will be mapped to zero.\n ){\n  stopifnot(lambda>=0)\n  ifelse(abs(x)<lambda,0,x-sign(x)*lambda)\n### The vector of observations after applying \n### the soft-thresholding function.\n},ex=function(){\n  x <- seq(-5,5,l=50)\n  y <- soft.threshold(x)\n  plot(x,y)\n})",
20       title = "Soft-thresholding",       title = "Soft-thresholding",
21            format="",
22       description = "Apply the soft-threshold function to a vector.",       description = "Apply the soft-threshold function to a vector.",
23       `item{x}` = "A vector of numeric data.",       `item{x}` = "A vector of numeric data.",
24       `item{lambda}`= "The largest absolute value that will be mapped to zero.",       `item{lambda}`= "The largest absolute value that will be mapped to zero.",

Legend:
 Removed from v.135 changed lines Added in v.138

 root@r-forge.r-project.org ViewVC Help Powered by ViewVC 1.0.0
Thanks to:  