The lapply() function in R can be used as an alternative to a for loop to apply a function to each element of a ________.

  • Vector
  • List
  • Matrix
  • Array
The lapply() function in R can be used as an alternative to a for loop to apply a function to each element of a list. It returns a list containing the results of applying the function to each element of the list.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *