I forgot to include the directions by @kevinushey:
See the documentation in ?tempdir . In particular:
By default, tmpdir will be the directory given by tempdir() . This will be a subdirectory of the per-session temporary directory found by the following rule when the R session is started. The environment variables TMPDIR, TMP and TEMPare checked in turn and the first found which points to a writable directory is used: if none succeeds ‘/tmp’ is used. The path should not contain spaces. Note that setting any of these environment variables in the R session has no effect on tempdir() : the per-session temporary directory is created before the interpreter is started.
In other words, you likely need to set the TMPDIR environment variable, and need to set it in a project-specific way. You could accomplish this by setting this in a project-local .Renviron file; e.g.
TMPDIR = /path/to/tmpdir
See ?Startup for more details on how .Renviron works and how those files are read during startup.