I have arrived to the following equations in polar coordinates
$$\vec{v}=\dot{r}\hat{r}+r\dot{\theta}\hat{\theta}$$
$$\vec{a}=(\ddot{r}-r\dot{\theta}^2 )\hat{r}+(2\dot{r}\dot{\theta}+r\ddot{\theta})\hat{\theta}$$
Then in the lecture note it is written that if the movement is in uniform angular velocity $\omega = \dot{\theta}$ in radius $R$ then $$\vec{a}=-R\omega^2\hat{r}$$
How did he arrived to this formula? maybe I written the formula wrong
First of all, let's sort out the notation: I take it that our OP newhere intends the "hat" symbol, as in "$\hat x$", to indicate a unit vector in the direction of $\vec x \ne 0$:
$\hat x = \dfrac{\vec x}{\vert \vec x \vert}, \tag 1$
where the customary "arrow" is used for general vectors as in "$\vec x$"
Second, the derivations of
$\vec v = \dot r \hat r + r\dot \theta \hat \theta \tag 2$
and
$\vec a = (\ddot r - r\dot \theta^2) \hat r + (2\dot r \dot \theta + r \ddot \theta)\hat \theta \tag 3$
are in their own right worthy of presentation:
We may introduce cartesian coordinates $(x, y)$ on $\Bbb R^2$ such that
$x = r \cos \theta, \tag 4$
$y = r \sin \theta; \tag 5$
if we write
$\vec r = (x, y) = (r\cos \theta, r \sin \theta) = r(\cos \theta, \sin \theta), \tag 6$
we see that
$\vec n = (\cos \theta, \sin \theta) \tag 7$
is the unit vector in the radial ($r$) direction, that is
$\hat r = \vec n; \tag 8$
the unit vector $\hat \theta$ in the $\theta$ direction is tangent to the curve (6) with constant $r$ at any point $(x, y) \ne (0, 0)$; thus it must be collinear with
$\dfrac{d{\vec n(\theta)}}{d\theta} = (-\sin \theta, \cos \theta); \tag 9$
since
$\left \vert \dfrac{d{\vec n(\theta)}}{d\theta} \right \vert = 1, \tag{10}$
we infer that
$\hat \theta = (-\sin \theta, \cos \theta) = \dfrac{d{\vec n(\theta)}}{d\theta} \tag{11}$
for $\theta$ increasing in the counter-clockwise direction.
Now any curve
$\phi(t): I \to \Bbb R^2, \tag{12}$
where $I \subset \Bbb R$ is some open interval, may be written
$\phi(t) = r(t)\vec n(\theta(t)) = r(t)(\cos \theta(t), \sin \theta(t)); \tag{13}$
thus,
$\vec v = \dot \phi(t) = \dot r(t) \vec n(\theta) + r(t) \dot{\vec n(\theta)}; \tag{14}$
by virtue of (7)-(11) this may be written
$\vec v = \dot \phi(t) = \dot r(t) \hat r + r(t) \dot \theta \hat \theta, \tag{15}$
thus establishing (2). We may then differentiate this equation and find
$\vec a = \dot{\vec v} = \ddot r \hat r + \dot r \dot{\hat r} + \dot r \dot \theta \hat \theta + r \ddot \theta \hat \theta + r\dot \theta \dot{\hat \theta}; \tag{16}$
between (7)-(11) we see that
$\dot{\hat r} = \dot \theta \hat \theta, \tag{17}$
$\dot{\hat \theta} = -\dot \theta \hat r; \tag{18}$
assembling (16)-(18) together we reach
$\vec a = \ddot r \hat r + \dot r \dot\theta \hat \theta + \dot r \dot \theta \hat \theta + r \ddot \theta \hat \theta - r\dot \theta^2 \hat r$ $= (\ddot r - r\dot \theta^2)\hat r + (2\dot r \dot \theta + r\ddot \theta) \hat \theta, \tag{19}$
which is (3).
Having derived (2) and (3), we take
$r = R = \text{constant} \tag{20}$
and
$\omega = \dot \theta = \text{constant}, \tag{21}$
so that
$\dot r = \ddot r = \dot \omega = \ddot \theta = 0; \tag{22}$
then (19) yields
$\vec a = -R\omega^2 \hat r, \tag{23}$
as was to be shown.