Skip to content
HongyuLin edited this page Oct 12, 2026 · 4 revisions

常见问题 · FAQ

图表中文显示为方框 · Chinese text shows as boxes

本包按系统选择中文字体(Windows:SimSun;macOS:Songti SC;Linux:Noto Serif CJK SC)。字体缺失时,安装字体(Linux:fonts-noto-cjk),或用fao_font("字体名")指定已安装的中文字体。The font is chosen per system; install it or set another with fao_font().

不想保存PowerPoint,或想保存 · PowerPoint charts

图表默认只保存PNG。需要可编辑的PowerPoint时,在函数中加pptx = TRUE,或用fao_settings(pptx = TRUE)对所有函数生效。macOS上需要安装XQuartz。Charts are PNG by default; add pptx = TRUE or set fao_settings(pptx = TRUE).

离线使用 · Offline

包内自带FAO 2026.1.0数据、FishBase和SeaLifeBase 26.06物种特征表和ERSST v5海表温度,离线也能完成分析和报告。已下载的FAO版本、FishBase数据表会直接从本机读取;fao_settings(online = FALSE)可强制离线。The bundled data work offline; fao_settings(online = FALSE) forces it.

数据放在哪里 · Where is the data

fao_data_dir()返回数据文件夹。多台电脑共用时,在~/.Renviron中设置FAOFISHINGREPORT_DATA_DIR。见安装与配置。

输出数字的格式变了 · Number printing changed

0.3.0之前,species_country()、country_species()和country_analysis()会修改options(digits)且不恢复;0.3.0起会在函数结束时恢复。Before 0.3.0 these functions changed options(digits) for the session.

CMSY++运行失败 · CMSY++ fails

先运行cmsy_system()检查JAGS和rjags是否匹配(见CMSY)。每个种群的运行日志在其运行文件夹的log.txt中。Run cmsy_system() first; each stock's log is in log.txt of its run folder.

渔获平均温度的偏好温度不对 · Wrong preferred temperature

偏好温度来自自动匹配,需要核对:用fishbase_match()结果中的链接检查,并在corrections.csv中更正(见FishBase文章)。Preferred temperatures are automatic matches; check them and correct them in corrections.csv.

报告中的文字或参考文献要修改 · Change the report text

报告文字模板在inst/extdata/report_text.csv,参考文献在inst/extdata/report_references.csv;修改后重新安装本包。生成的报告是初稿,灰色字为需要补充的内容。

PDF报告编译失败 · The PDF report does not compile

PDF由XeLaTeX编译。先安装一次TinyTeX:install.packages("tinytex"),然后tinytex::install_tinytex(),重启R后用tinytex::is_tinytex()检查(见安装与配置);之后缺少的宏包会自动安装。如果提示"Local TeX Live (2024) is older than remote repository",可用tinytex::reinstall_tinytex()更新TeX Live,或从对应年份的存档安装宏包:tlmgr --repository https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2024/tlnet-final install ctex。也可以只输出format = "latex",再自行编译.tex文件。PDFs are compiled with XeLaTeX; with tinytex, missing LaTeX packages are installed automatically.

rank_range = c(1, 10) 只显示了第1和第10名 · rank_range = c(1, 10) shows two ranks only

1.0.0起rank_range列出要显示的名次:前十名写1:10,第五和第六名写c(5, 6)。0.9.0及以前c(1, 10)表示第1到第10名,现在只显示第1和第10名。Since 1.0.0, rank_range lists the ranks: 1:10 for the first ten, c(5, 6) for the fifth and sixth.

运行后控制台显示摘要,或想直接看图 · Summaries in the console, charts on screen

每个分析函数运行完会在控制台显示结果摘要(主要结果表、保存的图表和表格),结果以不可见方式返回,需赋值保存,例如x <- stock_status(data)。fao_settings(show_data = FALSE)关闭摘要;plot_show = TRUE(或fao_settings(plot_show = TRUE))在保存图表的同时在RStudio的Plots窗格显示图。Analyses show a summary when they finish; fao_settings(show_data = FALSE) turns it off, and plot_show = TRUE also draws each chart in the Plots pane.

问题反馈 · Report a problem

请在GitHub Issues中提交,附上sessionInfo()、fao_data_info()和出错的代码。

Clone this wiki locally