Usually the S model has the same engine as the previous year's R model.
I believe this is the case with the 998S being the same engine as the 996R, with the 998cc testastretta engine and the 998R being the 999cc version, as explained here:
http://www.ducati.com/bikes/techcafe...alue=technical