IIRC the last two years of the R50 had drive by wire. My dad's '03 did. It was one of the things I didn't like about that truck.
I had a look at the FSM and the short answer is to try what Citron said. The sensor's got two separate pots in it, presumably so they can't both fail at once, and they're wired straight to the plug so that you can actually test them. Unhelpfully, the manual does not list their resistance, only their voltage outputs with the key on, engine off, MT in first or AT in D (no idea why). The first pot has two blue wires and a black/red wire, the second has a white with red, a red, and another blue wire (was there a sale on blue wire?). Sensor 1 (one of the blue wires, the one that's not steady 0v or 5v) should be 0.5 to 1v (measure its voltage to body ground, not to one of the 0v wires, apparently the ECU doesn't like that) with the pedal released, 3.9 to 4.7v with it floored, and sensor 2 (the red wire) should be 0.15 to 0.6v released and 1.95 to 2.4v floored. The graph shows straight lines, so yeah, if one of them drops out or bounces around then you've found your problem. Looks like you can also check all of this through OBD live data (SEN1 , SEN 2, and CLSD THL POS), but the ECU tweaks the numbers on one of them for some reason. If you do replace the sensor, the manual says to do three (!) different relearn procedures afterwards. All this starts on EC-708 of the '03 manual.
I'd want to see if the sensor can be disassembled and cleaned. Maybe there's just some schmutz in there that a wiper's riding up on, and a shot of contact cleaner would resolve the problem without having to teach the computer how to tie its shoes again afterwards.
Good luck!