Repository navigation
Word report
fao_report()对一个FAO主要渔区运行本包的分析,并写成中文或英文的Word报告:封面、标题、摘要、数据来源与分析方法、结果与结论(含图表)、参考文献和附录表格。文字由模板根据结果生成,是需要人工核对和补充的初稿,灰色字为待补充的内容。
fao_report() runs the analyses for one FAO major fishing area and writes a Word report in Chinese or English. The text is a first draft written from templates; grey notes mark what to complete by hand.
详细说明 Full guide:一键生成评估报告(English)· 参数 Arguments:fao_report()中文说明
report <- fao_report(27, lang = "zh") # 默认章节
report <- fao_report(27, lang = "en", citation = "apa") # 英文报告,APA引用
report <- fao_report(27, lang = "zh", cmsy = TRUE, shocks = TRUE, mtc = TRUE)
View(report$main_species) # 报告中的表格以数据框返回format可选"docx"(默认)、"latex"和"pdf"中的一个或多个;分析只运行一次,各格式内容相同。format is one or more of "docx", "latex" and "pdf".
report <- fao_report(27, lang = "zh", format = c("docx", "latex", "pdf"))
report$file # docx、latex、pdf的路径- LaTeX:
reports/FAO27_report_zh.tex,图片在reports/FAO27_report_zh_figures/;中文用ctexart,英文用article,用XeLaTeX编译。 - PDF:用XeLaTeX编译。先安装一次TinyTeX:
install.packages("tinytex"),然后tinytex::install_tinytex()(见安装与配置);第一次会自动安装缺少的LaTeX宏包;旧版TinyTeX用tinytex::reinstall_tinytex()更新;没有tinytex时使用系统的xelatex。PDF needs XeLaTeX: install TinyTeX once withtinytex::install_tinytex(). - 字体取自本机:Windows为仿宋、黑体、楷体;macOS为STFangsong、Heiti SC、Kaiti SC;Linux为TeX Live的Fandol字体。
| 开关 Switch | 默认 Default | 函数 Function | 前缀 Prefix |
|---|---|---|---|
total |
TRUE | fishing_area_data() |
total_ |
species |
TRUE | fishing_area_species() |
species_ |
countries |
TRUE | fishing_area_country() |
countries_ |
groups |
TRUE | species_group_composition() |
groups_ |
status |
TRUE | stock_status() |
status_ |
quality |
TRUE | data_quality() |
quality_ |
diversity |
TRUE | diversity_concentration() |
diversity_ |
fleets |
TRUE | coastal_distant() |
fleets_ |
shocks |
FALSE | catch_shocks() |
shocks_ |
collapse |
FALSE | collapse_analysis() |
collapse_(另有collapse_seed) |
synchrony |
FALSE | catch_synchrony() |
synchrony_ |
pelagic |
FALSE | pelagic_demersal() |
pelagic_ |
mtc |
FALSE | mean_temperature_catch() |
mtc_ |
distant |
FALSE | distant_water_profile() |
distant_(另有distant_countries) |
cmsy |
FALSE |
cmsy_area()、cmsy_input()
|
cmsy_ |
摘要、方法、结论和参考文献都随打开的章节变化。The abstract, methods, conclusions and references follow the sections switched on.
各章节函数的参数加上章节名前缀即可在报告中设置,例如:Give the arguments of a section's function with the section name as prefix:
fao_report(27,
species_h_value = 0.2, # fishing_area_species(h_value = 0.2)
status_smooth = TRUE, # stock_status(smooth = TRUE)
collapse = TRUE, collapse_method = "worm2006",
cmsy = TRUE, cmsy_top = 5, # cmsy_area(top = 5)
cmsy_settings = list(n.iter = 100000))名称写错时会报错并列出该函数的参数。报告自行设定的参数(area_data、area_name、area、lang、table、pptx)不能更改。A wrong name gives an error listing the arguments.
- 中文报告:A4;正文仿宋和Times New Roman,小四,1.5倍行距,首行缩进2字符;三线表;参考文献按GB/T 7714—2015顺序编码制。
- English reports: Arial by default (or Times New Roman), APA (default) or FAO citations.
- 学名用斜体。Scientific names in italics.
- 图表分辨率:
dpi参数,默认300 dpi,印刷可用dpi = 600。Chart resolution:dpi(300 by default, e.g.dpi = 600for print). - 修改文字模板:
inst/extdata/report_text.csv;参考文献:inst/extdata/report_references.csv。
faofishingreport · 网站 Website · GitHub · 问题反馈 Issues · GPL-3 · 本包与FAO无关联,数据来源为FAO。This package is not affiliated with FAO; the data come from FAO.
faofishingreport 1.0.0
- 首页 Home
- 安装与配置 Installation
- 教程 Tutorial(FAO 67区)
- 快速入门 Quick start
- 函数一览 Function index
- 数据与版本 Data and versions
- 评估报告 Report
- 扩展 Extensions
- CMSY++资源评估
- 常见问题 FAQ
- 开发说明 Development
网站 Website