My understanding is that CryptoNightR randomly creates different calculations for each block, and that RandomX does the same, but using a system where any bytecode can be translated into a calculation. What makes RandomX a more long-term solution that requires more auditing/testing?
Quoting SChernykh (one of the CryptonightR authors):
CryptonightR is a modification to Cryptonight whereas RandomX is done completely from scratch. The main purpose of CryptonightR is to be the next PoW for Monero until RandomX is ready.
Which leads to why RandomX needs more auditing/testing. RandomX is a completely new PoW algorithm, not just a modified version of CryptoNight.
There is also the question/issue remaining of what can be done with RandomX in regards to GPU mining.