The documentation of that function for the two-sample case says it accepts two data frame or matrices and the hypothesized difference in the means, which is assumed to be zero. There is no argument available for the means of the data, so you do not need to calculate that.