Anonymous user
Sort three variables: Difference between revisions
→{{header|R}}
Line 1,685:
assignVec <- Vectorize("assign", c("x", "value"))
`%<<-%` <- function(x, value) invisible(assignVec(x, value, envir = .GlobalEnv)) #
</lang>
Line 1,695:
z <- '(from the "Wizard of OZ")'
c("x", "y", "z") %<<-% sort(c(x, y, z))
x
Line 1,709:
z <- 0
c("x", "y", "z") %<<-% sort(c(x, y, z))
x
|