opp_render_report | R Documentation |
This function will generate a KBA report using the 'opp-kba-report' RMarkdown template in OPPtools
, with options to save the generated report as an .Rmd file in addition to the output PDF.
opp_render_report(
params,
iterations = 5,
level_ud = 95,
save_rmd = FALSE,
save_shp = TRUE,
save_pts = TRUE,
output_dir = "temp",
out_format = "pdf_document",
...
)
params |
List of 19 parameter values used to generate report. |
iterations |
Numeric. Number of iterations to perform for track2KBA::repAssess. More iterations will result in a more accurate assessment, but take longer to run. Default 5. |
level_ud |
Numeric, from 0 to 100. Utilization distribution volume to extract from kernel densities. Defaults to 95. |
save_rmd |
Logical (T/F). Should the .Rmd file used to generate the PDF report be saved as well? |
save_shp |
Logical (T/F). Should the final OPP key area polygon be saved as a shapefile? |
save_pts |
Logical (T/F). Should the raw downloaded Movebank points be saved as a shapefile? |
output_dir |
Output directory for generated files, relative to your working directory. Defaults to 'temp'. If the directory does not exist, the script will create the directory. |
out_format |
Output file format for the knitted document. Defaults to 'pdf_document'. |
The analysis run using the Rmarkdown template expects reporting parameters available in cpf_report_params. See the help for this dataset for a description of each parameter. If you would like to permanently modify or add to these parameters within the package, open an issue or make a pull request to the Github repo at: https://github.com/popovs/OPPtools
Saving shapefiles from this template may only work when run within an R Project. If you are getting errors using save_shp == TRUE or save_pts == TRUE, try working from an R project. Within RStudio go to File>>NewProject or use OPPtools::CreateProject() to create a new project.
## Not run:
for (i in 1:nrow(cpf_report_params)) {
opp_render_report(params = cpf_report_params[i,],
kernel_smoother = cpf_report_params$smoother[i],
iterations = 10,
level_ud = 95,
save_rmd = FALSE,
save_pts = TRUE,
output_dir = 'temp',
out_format = 'pdf_document')
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.