R/sum_of_products.R

sum_of_products <- function(x, y){
  sum((x - mean(x)) * (y - mean(y)))
}

sum_of_squares <- function(x){
  sum((x - mean(x))^2)
}

Try the abd package in your browser

Any scripts or data that you put into this service are public.

abd documentation built on May 2, 2019, 4:46 p.m.