Adding
"terminal.integrated.env.osx": {
"RSTUDIO_PANDOC":"/Applications/RStudio.app/Contents/MacOS/pandoc"
}
into settings.json worked for me. Adding to .zshrc didn't work at all since the System environment wasn't being passed on to the integrated terminal.