| isargunnamed | R Documentation |
Check if a component of a list is not named.
isargunnamed(x, k)
x |
a list. |
k |
an integer, specifies a position in |
isargunnamed(x,k) returns TRUE if the k-th component of
x is not named and FALSE otherwise.
Argument x is typically a list of arguments used in a call
to a function, such as the one obtained by list(...) in the
body of a function definition.
If k is not positive, isargunnamed returns FALSE.
TRUE or FALSE
Georgi N. Boshnakov
match.call in base package
li1 <- list(a=1, 2, 3)
isargunnamed(li1, 1)
isargunnamed(li1, 2)
## wholly unnamed list
li2 <- list(1, 2, 3)
isargunnamed(li2, 1)
isargunnamed(li2, 2)
## using in a function definition
f1 <- function(...){
dots <- list(...)
for(i in seq(along=dots))
cat(i, isargunnamed(dots, i), "\n")
}
f1(1)
f1(a = 3, 4, c = 5)
f1(x = "a", y = "b")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.