If you are going to write or say "RJ" as an abbreviation, then you would use "an". This is because the first sound you will hear is effectively a vowel. When we say the letter "R" on its own, it is pronounced "AR".
I think "Earth" is the only planet with which we commonly use an article. For all the other planets, you would simply use the name.
Even with "Earth" the article is not really required, if you are using it as a proper noun. I think it has just become customary to call it "the earth" for no apparent reason!