Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- v <- c(1, 2, 3, 4, 5)
- add_choice <- function (num, choice) {
- return(num + choice)
- }
- result <- sapply(v , add_choice, choice = 10)
- print(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement