The $ operator does partial matching by default so for example
> print(b$u)
[1] 1
The [[ operator does not
> print(b[["unit"]])
NULL
> print(b[["unit1"]])
[1] 1
See help("$") for more details and also the warnPartialMatch* arguments
in help("options").
Try
testfunction <- function(x) if (e
Hi,
I am a new user to R.
I am having the following problem while using R:
The defined function is having following a$unit as input but if I define
a$unit1 then still I am getting the output which is not desired.
__
*Function:*
testfunction<-function(a){
stopifnot(a$unit==
2 matches
Mail list logo