Most voted "sapply" questions
sapply is a command in the R language that applies a function to each element of a list. The sapply function returns attempts to simplify the result when possible (hence the s of sapply), generating, in general, vectors or data.frames instead of a new list.
Learn more…2 questions
Sort by count of
-
16
votes2
answers4769
viewsApply, sapply, mapply, lapply, vapply,rapply, tapply, replicate, Aggregate, by and correlates in R. When and how to use?
What is the difference between the functions apply, sapply, mapply, lapply, vapply, rapply, tapply, replicate, aggregate, by and correlates in the R? When and how to use each of them? There are…
-
3
votes1
answer196
viewsAutomatically check quantitative variables in R
I have a database here and I need to automatically check which quantitative variables are. My advisor says I need to use sapply and the function is.numeric and create a code that returns a vector of…