How would you be able to specify different values for that in the context of lapply()? In the example above I used the default values for min and max. For example, the runif() function has a min and max argument too. In the above example, the first argument of runif() is n, and so the elements of the sequence 1:4 all got passed to the n argument of runif().įunctions that you pass to lapply() may have other arguments. When you pass a function to lapply(), lapply() takes elements of the list and passes them as the first argument of the function you are applying.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |