當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


R update-methods stats4包中函數更新的方法

R語言 update-methods 位於 stats4 包(package)。

說明

更新"mle" 對象。

用法

## S4 method for signature 'mle'
update(object, ..., evaluate = TRUE)

參數

object

現有的配合。

...

調用的其他參數或具有更改值的參數。使用 name = NULL 刪除參數 name

evaluate

如果 true 評估新的調用,否則返回該調用。

方法

signature(object = "ANY")

通用函數:參見update

signature(object = "mle")

更新一下合身。

例子

x <- 0:10
y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)
ll <- function(ymax = 15, xhalf = 6)
    -sum(stats::dpois(y, lambda = ymax/(1+x/xhalf), log = TRUE))
fit <- mle(ll)
## note the recorded call contains ..1, a problem with S4 dispatch
update(fit, fixed = list(xhalf = 3))

相關用法


注:本文由純淨天空篩選整理自R-devel大神的英文原創作品 Methods for Function update in Package stats4。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。