Notwithstanding the "wholly attributable" requirement, where a specific area within a building is set aside exclusively for R&D for the foreseeable future, RC will allow a reasonable proportion of the cost of the building.
Generally, "all or substantially all" means at least 90%.