Guest User

Untitled

a guest
Dec 17th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. example_func <- function(a, b, c) {
  2. z = a + b + c
  3. return(z)
  4. }
  5.  
  6. ex_list <- list(5, 14, 32)
  7.  
  8. example_func(ex_list[[1]], 45, 43)
  9.  
  10. lapply(ex_list, function(x) (x, 45, 43)
  11.  
  12. c(x, 45, 43)
  13. c(x, 3, 33)
  14. c(x, 23, 22)
  15.  
  16. set.seed(123)
  17. df <- data.frame(x = sample(1:10, 1000, replace = TRUE))
  18. df_list <- split(df, df$x)
Add Comment
Please, Sign In to add comment