pls.options.r
来自「偏最小二乘算法代码及相关说明,在机器学习,实时数值仿真中用得较多」· R 代码 · 共 38 行
R
38 行
### 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 + =
减小字号Ctrl + -
显示快捷键?