Manipulation of atom-to-molecule conversion in a magnetic lattice