R2 w Rstudio

rsq <- function (x, y) cor(x, y) ^ 2
Rocku0