Recursively expand both the correct expression and the user's expression and test for a match. CAUTION: May raise errors, as in rmatch_calls.
Recursively expand both the correct expression and the user's expression and test for a match. CAUTION: May raise errors, as in rmatch_calls.
is_robust_match(expr1, expr2, eval_for_class, eval_env = NULL)
expr1 |
expression |
expr2 |
expression |
eval_for_class |
TRUE or FALSE. If TRUE, evaluate the first argument of an S3 method to determine its class. Default=FALSE. |
eval_env |
parent environment for evaluations to determine class. Ignored if eval_for_class=FALSE |
TRUE or FALSE according to whether expanded expressions match.
## Not run: expr1 <- quote(print(paste("my_name_is", "mud"))) expr2 <- quote(print(paste("my_name_is", "mud", sep=" "))) err <- try(ans <- is_robust_match(expr1, expr2, eval_for_class=TRUE), silent=TRUE) if(is(ans, "try-error")){ ans <- isTRUE(all.equal()) } ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.