Top "Apply" questions

A function to call another function with a list of arguments.

sapply with custom function (series of if statements)

I want to run a function which looks at two vectors, returning different values depending on the signs of the …

r apply lapply sapply
R return the index of the minimum column for each row

I have a data.frame that contains 4 columns (given below). I want to find the index of the minimum column (…

r indexing apply minimum rowwise
Count occurrences of items in Series in each row of a DataFrame

I have a pandas.DataFrame that looks like this. COL1 COL2 COL3 C1 None None C1 C2 None C1 C1 …

python pandas apply
How to monitor progress of an apply function?

I need to work out a 2886*2886 correlation matrix, problem is that building an intermediary datatable (RESULT) takes a long time …

r data.table apply
In Javascript is there equivalent to .apply that doesn't change the value of this?

Seems easy enough, i want to call a function with array of arguments. Sure, i can say func.apply(this, […

javascript function arguments apply
How to nest quantile() function within apply() function in R or RStudio

How can I nest a quantile() within a tapply() in R Studio? Given: tapply(data$x,data$y, quantile) This …

r console rstudio apply quantile
Apply different functions to different items in group object: Python pandas

Suppose I have a dataframe as follows: In [1]: test_dup_df Out[1]: exe_price exe_vol flag 2008-03-13 14:41:07 84.5 200 yes 2008…

python function group-by pandas apply
Is the "*apply" family really not vectorized?

So we are used to say to every R new user that "apply isn't vectorized, check out the Patrick Burns …

r performance loops vectorization apply
How to use apply, cat and print, without getting NULL

I am trying to use cat() as functions inside apply(). I can almost make R do what I want, but …

r apply cat
Is there a R function that applies a function to each pair of columns?

I often need to apply a function to each pair of columns in a dataframe/matrix and return the results …

r apply plyr