往期精彩戳:NGS精进 |统计精进| py基础 | py绘图 | perl基础 | R绘图
R中读取excel时,执行如下命令
myRegions<-read.xls("myData/gapminder/regions.xlsx", encoding="latin1")
报错 信息
Error in findPerl(verbose = verbose) :
perl executable not found. Use perl= argument to specify the correct path.
Error in file.exists(tfn) : invalid 'file' argument
尝试解决参考:https://stackoverflow.com/questions/10940224/gdata-package-perl-issue
主要问题是需要依赖perl,安装perl,下面指定perl安装路径:C:/Strawberry/perl/bin/perl.exe
注意,如果perl已添加到环境变量,无需再次指定perl安装路径。
myRegions<-read.xls("myData/gapminder/regions.xlsx", encoding="latin1",perl = "C:/Strawberry/perl/bin/perl.exe")
继续报错,缺乏 libexpat-1.dll
安装libexpat-1.dll
下载地址:https://www.dllme.com/getfile.php?file=9382&id=c90dcdc78fd601db5dea6b00bb09622d
解压结果为:libexpat-1.dll
安装:
- 32位系统,复制libexpat-1.dll到C:\Windows\System32\ 文件夹
- 64位系统,复制libexpat-1.dll到C:\Windows\SysWOW64\文件夹