I imagine that the same result can be achieved by a proper use of quantile, but I like to have an easy way to obtain summary statistics every n entries of my dataset be it a vector or data.frame. The function takes three parameters: the R object on which we need to obtain statistics (x),