Advertisement
Guest User

Untitled

a guest
Jul 28th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. echo <- function(...) {
  2.  
  3. bits <- list(...)
  4.  
  5. for (i in seq_along(bits)) {
  6. print(sprintf(">> %s", toString(bits[[i]])))
  7. }
  8.  
  9. }
  10.  
  11. echo("hello")
  12. echo("hello", "world")
  13. echo("four score and seven years ago")
  14.  
  15. words <- c("four", "score", "and", "seven", "years", "ago")
  16.  
  17. echo(words)
  18.  
  19. do.call(echo, as.list(words))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement