For the ard_mcnemartest() function, the data is expected to be one row per subject.
The data is passed as stats::mcnemar.test(x = data[[variable]], y = data[[by]], ...).
Please use table(x = data[[variable]], y = data[[by]]) to check the contingency table.