How to create a new dummy column from multiple dummy columns

Can you provide a REPRoducible EXample (reprex) for this?