Hi @SimonAustria, welcome to RStudio Community.
Please do not post screenshots of code as it just creates more work for the people trying to replicate it. Code pre-formatted as text is preferable.
As for your question, it's just a matter of combining the unwanted factor levels into the new level "No AD" before creating the contingency table.
library(HRM)
#> Loading required package: MASS
#> Loading required package: matrixcalc
#> Loading required package: plyr
#> Loading required package: ggplot2
EEG$group <- factor(EEG$group,
levels = c("SCC+", "SCC-", "MCI", "AD"),
labels = c("No AD", "No AD", "No AD", "AD"))
Kontingenz1 <- prop.table(table(EEG$sex, EEG$group), margin = 1)
addmargins(Kontingenz1, margin = 2)
#>
#> No AD AD Sum
#> M 0.7966102 0.2033898 1.0000000
#> W 0.7623762 0.2376238 1.0000000
Created on 2020-04-19 by the reprex package (v0.3.0)