RIM invested 1.4 billion into R&D in 2010
Apple’s R&D numbers are for their entire product line, which includes desktop computers, laptops, portable media players, and Apple TV. Both companies are developing two different operating systems, although Apple's OSX and iOS are both ongoing product lines while the work RIM put into their mobile BlackBerry OS the last year was largely a stopgap until their QNX-based BBX could make it to market.
This isn't an entirely fair comparison; Apple was disrupting the smartphone market and creating a new market for tablets, while RIM had to switch strategies mid-stream in the shift to BBX. Attempting to prop up old older product lines while re-drawing your road map is always a more cost-intensive proposition.
Clearly RIM is investing a lot of coin to try and change their market position. Their execution on the first iteration of BBX - the poorly-received PlayBook - left something to be desired. Market share for BlackBerry handsets has continued to drop in 2011, so for their sake let’s hope that the new BBX phones will be worth all that time, money, and effort.
source: Re$earch Infosource via BlackBerryOS