In fact, much more is true, see Theorem 3.1 here. In particular, any map $RP^n\to RP^n$ preserving collinearity, whose image contains at least $n+1$ points which do not belong to a common projective hyperplane, is an element of $PGL(n,R)$. Note that injectivity is not required.