Open-cell foam cures at roughly half a pound per cubic foot and gives about R-3.6 to R-3.9 per inch. It stays vapour permeable, so an assembly can dry, and it costs less per board foot. Closed-cell cures around two pounds per cubic foot, delivers roughly R-6 to R-7 per inch, acts as its own vapour retarder and adds rigidity to the assembly.
The practical rule: closed-cell anywhere moisture is a risk or space is tight — rim joists, below grade, unvented roof decks, crawl spaces. Open-cell where you want the assembly to dry and you have depth to fill, such as interior walls and vented attic floors.