SyntaxFix
Write A Post
Hire A Developer
Questions
Why not this:
rsq <- function(x, y) summary(lm(y~x))$r.squared rsq(obs, mod) #[1] 0.8560185