daily pastebin goal
2%
SHARE
TWEET

Untitled

a guest May 16th, 2018 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sq <- function(y){ y**2 }
  2.    
  3. call <- match.call(expand.dots = FALSE)
  4. call[[1]] <- as.name('sq')
  5. call$y <- 0.2
  6. call <- call[c(1,3)]
  7. eval(call)
  8.    
  9. call <- match.call(expand.dots = FALSE)
  10. call[[1]] <- as.name('sq')
  11. call$y <- as.name('sin')
  12. call$x <- 0.2
  13. call <- call[c(1,3:4)]
  14. eval(call)
  15.    
  16. Error in sq(y = sin, x = 0.2) : unused argument (x = 0.2)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top