
Give an atlas built before display existed its display names
Source: R/core_contract.R
migrate_atlas_display.Rddisplay holds the source's own name for a region, and an atlas built
before the column existed looks as though that name is lost. It is not:
label is the source name with a hemisphere affix on it, so the display
name is recoverable exactly. Verified against every atlas that already
carries the column – 1996 rows, no disagreement.
Details
Atlases that already carry display are returned unchanged, so this is
safe to run over a whole library.
Examples
atlas <- dk()
atlas$core$display <- NULL
atlas_display(migrate_atlas_display(atlas))[1:3]
#> [1] "bankssts" "caudalanteriorcingulate"
#> [3] "caudalmiddlefrontal"