search for: valini

Displaying 1 result from an estimated 1 matches for "valini".

Did you mean: valin
2012 Apr 01
2
A function like sum but with functions other than '+'
Because I didn't find in R any functions similar to the function 'reduce' from Python, I'm writing a function "freduce" as follows: freduce <- function(f, vec, ValIni=NULL, StopIn=NULL) { # f: is any function that takes two arguments of the same type # vec: is a vector of n values accepted by 'f' # # Initially f starts with ValIni, if it's given or the first element # of 'vec', and then applies sequentially f to that value and one...