This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`%<<%` <- function(con, x) | |
{ | |
UseMethod("%<<%", x) | |
} | |
`%<<%.function` <- function(con, x) | |
{ | |
if (!identical(x, close)) | |
stop("Unknown function provided to <<", call. = FALSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Placeholder function. | |
#' | |
#' @export | |
as_nonstandard <- function() | |
{ | |
stop("This is a placeholder function, and should not be called directly.") | |
} | |
#' Declare symbols for nonstandard evalution. | |
#' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Arm a value with a function which fires when evaluated. | |
#' | |
#' @param expr an expression | |
#' @param fun a function of one argument. | |
#' | |
#' @return an expression which when evaluated returns the result of expr, | |
#' after evaluating fun(expr). | |
arm <- function(expr, fun) | |
{ | |
substitute({ |
NewerOlder