| 1 | 
| x | |
| y | |
| type | |
| xout | |
| outfun | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.
## The function is currently defined as
function (x, y, type = "lasso", xout = FALSE, outfun = out) 
{
    library(lars)
    p = ncol(x)
    p1 = p + 1
    xy = elimna(cbind(x, y))
    if (xout) {
        x <- xy[, 1:p]
        y <- xy[, p1]
        m <- cbind(x, y)
        flag <- outfun(x, plotit = FALSE)$keep
        m <- m[flag, ]
        x <- m[, 1:p]
        y <- m[, p1]
        xy = cbind(x, y)
    }
    result = lars(xy[, 1:p], xy[, p1], type = type)
    result
  }
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.