####################################################################################################################################
################################## ':=' ############################################################################################
# >>
':=' <- function(lhs, rhs) {
frame = parent.frame()
lhs = as.list(substitute(lhs))
if( length(lhs) > 1 ) { lhs = lhs[-1] }
if( length(lhs) == 1 ) {
do.call(`=`, list(lhs[[1]], rhs), envir=frame)
return(invisible(NULL))
}
if( is.function(rhs) || is(rhs, 'formula') ) { rhs <- list(rhs) }
if( length(lhs) > length(rhs) ) { rhs <- c(rhs, rep(list(NULL), length(lhs) - length(rhs))) }
for( i in 1:length(lhs) ) { do.call(`=`, list(lhs[[i]], rhs[[i]]), envir=frame) }
return(invisible(NULL))
}
# <<
################################## ':=' ############################################################################################
####################################################################################################################################
####################################################################################################################################
################################## Help Code #######################################################################################
# >>
# c(a, b) := anotherFunction(arg)
# <<
################################## Help Code #######################################################################################
####################################################################################################################################
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.