maybe write some tests to make sure that your mem_compare function returns a data frame with a certain number of row and certain row names?
either clone an existing repository as a part of the test framework (e.g. hadley/stringr) or use git2r to make a simple repository that you can run your code on.