I am trying to create a sample auto correlation function $r_k$ in R using the following definitions:
$r_k = \\frac{c_k}{c_0}$
$c_k = \\frac{1}{n}\