使用希腊字母在R中停止和Cat功能

时间:2018-04-19 17:44:06

标签: r

我想知道为什么cat功能在R中打印希腊字母但是当我在停止功能中使用时它看起来不像希腊字母

这是代码

al1 <- paste0(intToUtf8(945),1,sep='')
al2 <- paste0(intToUtf8(945),2,sep='')
msg <- paste0(al2," must be between 0 and ",al1)
stop(msg)
Error: a2 must be between 0 and a1
cat(msg)
α2 must be between 0 and α1

你可以在停止时看到它看起来像“a”?

这是sessioninfo

> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252    LC_MONETARY=English_Canada.1252
[4] LC_NUMERIC=C                    LC_TIME=English_Canada.1252    

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

loaded via a namespace (and not attached):
[1] compiler_3.4.3 tools_3.4.3   

谢谢

0 个答案:

没有答案