I was wondering if there was a function that scales down matrices in R statistical software exactly like with image resizing. The function `imresize()` in MATLAB is exactly what I'm looking for (I believe it takes the average of the surrounding points, but I am not sure of this), but I am wondering if there is an R equivalent for this function. 

This question has been posted before on this forum, but with reference to MATLAB, not R:
[Matlab "Scale Down" a Vector with Averages](https://stackoverflow.com/questions/7741808/matlab-scale-down-a-vector-with-averages)
The post starting with "Any reason why you can't use the `imresize()` function?" is exactly what I am looking for, but in R, not MATLAB.

Say I have a latitude-longitude grid of temperatures around the world, and let's say this is represented by a 64\*128 matrix of temperatures. Now let's say I would like to have the same data contained in a new matrix, but I would like to rescale my grid to make it a 71\*114 matrix of temperatures around the world. A function that would allow me to do so is what I'm looking for (again, the imresize() function, but in R, not MATLAB)

Thank you.
Steve