Today's Grand Mal Facepalm: That R Code happily accepts negative masses of radioactive materials. Good news: It does not calculate negative doses. Bad news: It quietly ignores them leaving you none the wiser that your problem is not well-specified and that the results are most definitely garbage.
Looks like I have to hack on the code again to defend against this problem plus report it upstream to the vendor.
I hate finding these sorts of problems but it's my job now and better I find this now rather than someone else find it later. That would make me the fourth person in this whole assurance process who missed this blatantly obvious problem. Actually I'm probably number 7 because three people on the vendor side should have found this before it ever got to us.
(Statler & Waldorf: "We're all doomed! Hahahahahaha!")