This function uses a symbolic representation to achieve the same result as the linear intercept model used by CAPM.beta
BetaCoVariance(Ra, Ri, na.rm = FALSE)
$\beta_{a,b}=\frac{CoV_{a,b}}{\sigma_{a}}=\frac{\sum((R_{a}-\bar{R_{a}})(R_{b}-\bar{R_{b}}))}{\sum(R_{a}-\bar{R_{a}})^{2}}$
Ruppert(2004) reports that this equation will give the estimated slope of the linear regression of $R_{a}$on $R_{b}$ and that this slope can be used to determine the risk premium or excess expected return (see Ruppert Eq. 7.9 and 7.10, p. 230-231)
CAPM.beta