Skip to contents

Renders a .qmd from write_connectivity_report(). The document carries its own figure sizes, so rendering it yourself with the Render button or quarto::quarto_render() gives the same figures; this adds the choice of format by extension, the Typst routing for a .pdf, and puts the output where you ask rather than beside the input.

Usage

render_connectivity_report(input, path = NULL, format = report_format(path))

Arguments

input

The .qmd to render, from write_connectivity_report(). Its -data.rds must still be beside it.

path

File to write. The extension sets the format, as it does for ggplot2::ggsave(). Defaults to input with a .html extension. The directory must already exist.

format

The Quarto format, when path can't say. See generate_connectivity_report().

Value

The absolute path written, invisibly.

See also

write_connectivity_report() to write the source.

Examples

# \donttest{
report_data <- connectivity_report_data(
  habitat = example_habitat(),
  barrier = example_barrier(),
  species = "Blue Tongue Lizard",
  interpatch_distance = 20,
  verbose = FALSE
)

qmd <- write_connectivity_report(
  report_data,
  file.path(tempdir(), "lizard-report.qmd")
)

# rendering needs the Quarto command line tool
if (quarto_available()) {
  render_connectivity_report(qmd)
}
#> Rendering html report...
#> Wrote /tmp/RtmpkGCSr6/lizard-report.html
# }