Following matrix has repeated eigenvalue $1$.
$$ \begin{pmatrix} 8 & -2 & 1 & -1 \\ 23 & -6 & 3 & -3 \\ -4 & 1 & 1 & 1 \\ -4 & 2 & 0 & 1 \end{pmatrix} $$
How to get $1$ instead of: $$ \underbrace{ \begin{pmatrix} 0.9997 + 0.0000i \\ 1.0000 + 0.0003i \\ 1.0000 - 0.0003i \\ 1.0003 + 0.0000i \end{pmatrix}}_{\text{MATLAB: eig(A)}} \qquad\qquad \underbrace{ \begin{pmatrix} 1.0002024+0.0002024i \\ 1.0002024-0.0002024i \\ 0.9997976+0.0002024i \\ 0.9997976-0.0002024i \end{pmatrix}}_{\text{R: eigen(A)}} $$

You're working with floating point arithmetic, so unless you use a symbolic package, there's going to be some incorrect digits. You could set a tolerance and round to the nearest whole number, but that may impact your computation of other eigenvalues. In Matlab, you could round to the second digit by way of:
Edit: why the downvote, was something I said incorrect?