【发布时间】:2020-12-04 06:12:39
【问题描述】:
我更新了Strawberry Perl 64-bit 5.30.2001 和gdata 包。现在,在加载 library(gdata) 时,我总是收到此警告消息,似乎与 Perl 相关。
suppressPackageStartupMessages(library(gdata))
# Warning messages:
# 1: In system(cmd, intern = intern, wait = wait | intern, show.output.on.console = wait, :
# running command 'C:\Windows\system32\cmd.exe /c ftype perl' had status 2
# 2: In system(cmd, intern = intern, wait = wait | intern, show.output.on.console = wait, :
# running command 'C:\Windows\system32\cmd.exe /c ftype perl' had status 2
不过,read.xls这个我需要的功能,似乎运行的不错,只是每次使用都会重复警告。
read.xls("http://file-examples-com.github.io/uploads/2017/02/file_example_XLS_10.xls")
# trying URL 'http://file-examples-com.github.io/uploads/2017/02/file_example_XLS_10.xls'
# Content type 'application/vnd.ms-excel' length 8704 bytes
# downloaded 8704 bytes
# X0 First.Name Last.Name Gender Country Age Date Id
# 1 1 Dulce Abril Female United States 32 15/10/2017 1562
# 2 2 Mara Hashimoto Female Great Britain 25 16/08/2016 1582
# 3 3 Philip Gent Male France 36 21/05/2015 2587
# 4 4 Kathleen Hanner Female United States 25 15/10/2017 3549
# 5 5 Nereida Magwood Female United States 58 16/08/2016 2468
# 6 6 Gaston Brumm Male United States 24 21/05/2015 2554
# 7 7 Etta Hurn Female Great Britain 56 15/10/2017 3598
# 8 8 Earlean Melgar Female United States 27 16/08/2016 2456
# 9 9 Vincenza Weiland Female United States 40 21/05/2015 6548
# Warning messages:
# 1: In system(cmd, intern = intern, wait = wait | intern, show.output.on.console = wait, :
# running command 'C:\Windows\system32\cmd.exe /c ftype perl' had status 2
# 2: In system(cmd, intern = intern, wait = wait | intern, show.output.on.console = wait, :
# running command 'C:\Windows\system32\cmd.exe /c ftype perl' had status 2
我不确定如何处理此警告,因为它对我没有任何意义,我可能会忽略它并在其周围加上 suppressWarnings()。
但是,有人知道解决此问题的方法吗?我通过谷歌搜索找不到任何东西,不知道从哪里开始以及实际出了什么问题。
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gdata_2.18.0
loaded via a namespace (and not attached):
[1] compiler_4.0.2 tools_4.0.2 gtools_3.8.2
【问题讨论】:
-
对不起,只是无关紧要的问题。你说你更新了perl?因为我在我的电脑上看到最新的 perl 是 5.32
-
@Onyambu 是的,我发现 Strawberry Perl 64 位 5.30.2001 是最新的。你会建议安装另一个 Perl “发行版”,或者你怎么称呼它?
-
可能是路径,在我的 Windows 电脑上,它类似于 c:/strawberry/perl/bin(来自内存)
-
并非如此。我使用 Windows,因为我不想单独安装很多东西,即(perl、gcc、grep、python、Rtools、sed、bash、gawk 等),所以我只安装了 MSYS2,然后不需要安装任何东西(甚至 Rtools我不必安装它)
-
@jay.sf;不,看起来不错