gpt4 book ai didi

Pdf中的R图标题编码

转载 作者:行者123 更新时间:2023-12-04 06:39:39 24 4
gpt4 key购买 nike

这个问题与:Rhtml: Warning: conversion failure on '<var>' in 'mbcsToSbcs': dot substituted for <var>有关和 R doesn't open with UTF-8

我用的是 Ubuntu,我无法显示土耳其语字符,ı , 在情节的标题上:
myScript.r :

pdf(file='/home/sait/Desktop/abc.pdf')
plot(1:7,1:7,main='geziparkı')

当我使用 Rscript myScript.r 运行脚本时,我收到以下警告消息,
Warning messages:
1: In title(...) :
conversion failure on 'geziparkı' in 'mbcsToSbcs': dot substituted for <c4>
2: In title(...) :
conversion failure on 'geziparkı' in 'mbcsToSbcs': dot substituted for <b1>
3: In title(...) :
conversion failure on 'geziparkı' in 'mbcsToSbcs': dot substituted for <c4>
4: In title(...) :
conversion failure on 'geziparkı' in 'mbcsToSbcs': dot substituted for <b1>

我添加了行 pdf.options(encoding='ISOLatin2.enc')在我之前相关问题中提到的脚本顶部,没有帮助。

我需要从我的 locale 中更改某些内容吗? Ubuntu 的设置。我的 sessioinInfo()正在关注,
> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=tr_TR.UTF-8 LC_NUMERIC=C
[3] LC_TIME=tr_TR.UTF-8 LC_COLLATE=tr_TR.UTF-8
[5] LC_MONETARY=tr_TR.UTF-8 LC_MESSAGES=C
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=tr_TR.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

PS:我继续调查这个问题,并意识到如果我使用 .png ,它运行良好,唯一的问题是 .pdf .

最佳答案

终于找到解决办法了

代入 pdf(file='/home/sait/Desktop/abc.pdf')cairo_pdf('/home/sait/Desktop/abc.pdf', family="DejaVu Sans")成功了。

我不知道这实际上做了什么,但是我尝试了很多东西,除了这个之外没有任何效果。

关于Pdf中的R图标题编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18386727/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com