Follow-up: From reading the source for reprex(), it appears that where the output is rendered depends on whether the getOption("viewer") returns a null value. Here's the block where the rendering occurs:
if (show) {
html_file <- files[["html_file"]]
rmarkdown::render(md_file, output_file = html_file,
clean = FALSE, quiet = TRUE, encoding = "UTF-8",
output_options = if (pandoc2.0())
list(pandoc_args = "--quiet"))
html_file <- force_tempdir(html_file)
viewer <- getOption("viewer") %||% utils::browseURL
viewer(html_file)
}
In the next to last line, viewer is set to utils::browseURL if getOption("viewer") returns a null value, which must be happening on my student's machine. Why would this happen, and how could this be changed so the output is render in the RStudio 'Viewer' tab?