Hi, I have observations of building tenants which has a string variable recording the floors they occupy delimited by commas (e.g. ‘GRND,1st,MEZZ,4-6’), and for each of these observations I would like to convert this into separate dummy variables for each floor occupied (i.e. in the case above, create dummy variables coded ‘1’ for GRND, 1, MEZZ, 4, 5, and 6). Does anyone know how I might code this?

Cheers