When I run a simple logit regression between a binary variable $y$ over another binary variable $x$, the average marginal effects obtained by the function
mfx package) are different from those obtained by the function
margins (from the eponymous package).
Because there is only one covariate ($x$), this discrepancy cannot be linked to a difference in concepts between average marginal effects (AME) and marginal effects at mean (MEM), as both coincide in this case.
Hence, what explains the gap?