To cite m2r in publications use:

Kahle D, O'Neill C, Sommars J (2020). “A Computer Algebra System for R: Macaulay2 and the m2r Package.” Journal of Statistical Software, 93(9), 1–31. doi:10.18637/jss.v093.i09.

Corresponding BibTeX entry:

    title = {A Computer Algebra System for {R}: {Macaulay2} and the
      {m2r} Package},
    author = {David Kahle and Christopher O'Neill and Jeff Sommars},
    journal = {Journal of Statistical Software},
    year = {2020},
    volume = {93},
    number = {9},
    pages = {1--31},
    doi = {10.18637/jss.v093.i09},