ID EN
Vector & List

chkDots

R Base 3.6.2 🇮🇩 Bahasa Indonesia

Peringatkan tentang argumen asing di ... peneleponnya. Utilitas yang akan digunakan misalnya, dalam metode S3 yang memerlukan argumen ... formal tetapi tidak menggunakannya. Ini membantu menangkap kesalahan pengguna dalam memanggil fungsi yang dimaksud (yang merupakan pemanggil chkDots()).

Syntax

R
chkDots(..., which.call = -1, allowed = character(0))

Arguments

Parameter Deskripsi
... “the dots”, as passed from the caller.
which.call passed to sys.call(). A caller may use -2 if the message should mention its caller.
allowed not yet implemented: character vector of named elements in ... which are “allowed” and hence not warned about.

Contoh

Example
R
# NOT RUN {
seq.default ## <- you will see  ' chkDots(...) '

seq(1,5, foo = "bar") # gives warning via chkDots()

## warning with more than one ...-entry:
density.f <- function(x, ...) NextMethod("density")
x <- density(structure(rnorm(10), class="f"), bar=TRUE, baz=TRUE)
# }

See Also

warning ....