A reminder to myself of something I did quite a while go, how to do integration with [R].
dj <- c(6.8543973e+00,6.0742026e+00, 5.1180908e+00, 6.8335044e+00, 5.5119610e+00, 5.5103389e+00, 4.8272714e+00, 6.3162468e+00, 4.9450749e+00, 6.0684488e+00, 3.9246411e+00, 5.1356979e+00, 5.3176933e+00, 5.0402740e+00)integrand <- function(i) {sum(dj[i] - i - 5 )^2}
integrate(Vectorize(integrand), lower = 0, upper = 10)
Of course the [R documentation] is of great use too.







