All responses below are based on the 2012 editions.
I'd say that a fire sprinkler system would be required throughout the building if either IBC Chapter 34 or IEBC Chapter 4, "Prescriptive Compliance Method," is applied.
Chapter 34, IBC, Section 3408.1, and Chapter 4, IEBC, Section 407.1: "No change shall be made in the use or occupancy of any building that would place the building in a different division of the same group of occupancies or in a different group of occupancies, unless such building is made to comply with the requirements of this code for such division or group of occupancies."
If the IEBC "Work Area Compliance Method" is applied, then maybe a sprinkler system is only required in the residential area, if the residential area is the only area altered.
Chapter 10, IEBC, Section 1012.1.1: This gets a little convoluted, so bear with me. Section 1012.1.1 states that compliance with Chapter 9 of the IEBC for Level 3 Alterations is applicable to the entire building if the area of the changed occupancy is not separated from the rest of the existing building. If the changed occupancy is separated from the rest of the building, then Chapter 9 of the IEBC is applicable only to the area of the changed occupancy. Additionally, IEBC Section 1012.2.1 for fire sprinklers states,
"Where a change in occupancy classification occurs that requires an automatic fire sprinkler system to be provided based on on the new occupancy in accordance with Chapter 9 of the
Intenrational Building Code
, such system shall be provided throughout the area where the change of occupancy occurs."
IEBC Section 904.1 requires a sprinkler system be installed in all work areas required by IEBC Section 804.2 (for Level 2 Alterations), and if the work area exceeds 50% of the floor, then the entire floor will need to be sprinklered. There is a caveate regarding "sufficient municipal water supply" to the buiding site.
There are many other requirements for changes in occupancy per IEBC Section 1012, so you should check that section out thoroughly, since many of the requirements are based on relative hazard, and going from a Group B to a Group R-2 is considered an increase in the relative hazard.