Basic cross-validation in R
My advice is to use the caret-package in which you can easily define your own metrics. The use of CV is described here in a clear manner: 

https://machinelearningmastery.com/how-to-estimate-model-accuracy-in-r-using-the-caret-package/

The ingredients to your metrics requirements should be deriveable from the output via str(model). Here's a small example that should help you to get to your results:

library(caret)
library(ModelMetrics)

# Generate some data
Xs&lt;- matrix(rnorm(300*20), nrow = 300, ncol = 20)
Yvec&lt;- rnorm(300)

# Define your metrics
maeSummary &lt;- function (data,
                        lev = NULL,
                        model = NULL) {
  mae &lt;- mae(data$obs, data$pred)  
  names(mae) &lt;- "MAE"

  mse &lt;- rmse(data$obs,data$pred)
  names(mse) &lt;- "RMSE"

  out = c(mae,mse)
  out
}


# Initialize 
train= trainControl(method="CV", number=10, summaryFunction = maeSummary, returnResamp="all", savePredictions="all")

# Train
model = train(x= Xs, y = Yvec, trControl=train, method="lm")

# Overall results
print(model)

# Metrics per fold
model$resample


Good luck!