Posts Tagged ‘sapply’

Select numeric columns from a Data frame in R

We can get the list of columns in a data frame using sapply function. In this article, we are going extract the numeric columns of diamonds dataset. 1. Diamonds data frame contains numeric and noon-numeric columns. head(diamonds)

Apply functions in R

Apply functions are alternatives to Loops in R. In this tutorial, we are going to discuss about apply and apply family functions. We are going to explain following apply functions with examples: apply() sapply() lapply() mapply() vapply() rep() rapply() tapply() apply Function:

Powered by k2schools