Ulam() function causes error

You need some additional compiler flags for rtools42, see this post for the fix: Problem with cmdstan unpacking - #5 by andrjohns