An RB20 is a 2 litre inline 6 found in a skyline gts. I have never touched one but supposedly the crank is able to handle 400hp+. Nissan labels their engines pretty good. Here is some info for the engines:
SR,RB, etc is the block type
20,24, etc is displacement 20 = 2 litres, 24 = 2.4 litres
D means dual overhead cam
E means fuel injected
S means carbureted
T means turbocharged
TT means twin turbo.
If you look for a RB20 then get a DET version. Don't even look at another one. Of course if for some crazy chance you find a DET-R get that but I see no chance in hell of that. I still think you should look at a nissan SR20DET. It's a 2 litre inline 4 that can get crazy power and it's light so the handling properties of that miata shouldn't change much.