⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pls.options.r

📁 做主成分回归和偏最小二乘回归
💻 R
字号:
### pls.options.R:  Package specific options mechanism.###### $Id: pls.options.R 89 2006-09-20 15:41:09Z bhm $###### Implements a slightly modified version of the sm.options() as found in### sm 2.1-0.## The list of initial options:.pls.Options <-    list(mvralg = "kernelpls", plsralg = "kernelpls", pcralg = "svdpc")pls.options <- function(...) {    if (nargs() == 0) return(.pls.Options)    current <- .pls.Options    temp <- list(...)    if (length(temp) == 1 && is.null(names(temp))) {        arg <- temp[[1]]        switch(mode(arg),               list = temp <- arg,               character = return(.pls.Options[arg]),               stop("invalid argument: ", sQuote(arg)))    }    if (length(temp) == 0) return(current)    n <- names(temp)    if (is.null(n)) stop("options must be given by name")    changed <- current[n]    current[n] <- temp    ## This assigns .pls.Options in the global environment.  That way one    ## can get back to the `factory defaults' by removing the variable from    ## the global environment.  It also means that options are remembered    ## between sessions (if the environment is saved).  Except for renaming    ## .sm.Options to .pls.Options, this is the only modification of the    ## function:    assign(".pls.Options", current, pos = .GlobalEnv)    invisible(current)}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -