+2 votes
in R Language by (359 points)
Differentiate between lapply and sapply.

1 Answer

0 votes
by (30.6k points)

If the programmers want the output to be a data frame or a vector, then sapply function is used whereas if a programmer wants the output to be a list then lapply is used. There one more function known as vapply which is preferred over sapply as vapply allows the programmer to specific the output type. The disadvantage of using vapply is that it is difficult to be implemented and more verbose.

Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

+3 votes
asked Jul 28, 2019 in R Language by Aarav2017 (359 points)
+4 votes
asked Jul 28, 2019 in R Language by Aarav2017 (359 points)
...