解决方案“错误:包的lazydata失败...”?

时间:2020-06-23 15:30:15

标签: r

当我尝试安装GitHub软件包时,lazydata会发生此错误。我的csv文件位于“数据”文件夹中。我相信错误可能存在,但还没有。

> install_github("igorcobelo/forestry") 
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo igorcobelo/forestry@master
√  checking for file 'C:\Users\Public\Documents\Wondershare\CreatorTemp\RtmpYJcn76\remotes31fc114d7708\igorcobelo-forestry-64da45c/DESCRIPTION' (1.2s)
-  preparing 'forestry':
√  checking DESCRIPTION meta-information ... 
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  looking to see if a 'data/datalist' file should be added
-  creating default NAMESPACE file
-  building 'forestry_0.1.0.tar.gz'
   
Installing package into ‘C:/Users/Igor/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'forestry' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
Warning in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  :
  entrada inválida na conexão de entrada 'C:\Users\Igor\Documents\R\win-library\3.6\00LOCK-forestry\00new\forestry/data/data3s.csv'
Warning in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  :
  número de itens não é múltiplo do número de colunas
Warning in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  :
  entrada inválida na conexão de entrada 'C:\Users\Igor\Documents\R\win-library\3.6\00LOCK-forestry\00new\forestry/data/data3s.csv'
Warning in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  :
  número de itens não é múltiplo do número de colunas
Warning in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  :
  entrada inválida na conexão de entrada 'C:\Users\Igor\Documents\R\win-library\3.6\00LOCK-forestry\00new\forestry/data/data5e.csv'
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
  line 87 did not have 6 elements
ERROR: lazydata failed for package 'forestry'
* removing 'C:/Users/Igor/Documents/R/win-library/3.6/forestry'
Erro: Failed to install 'forestry' from GitHub:
  (convertido do aviso) installation of package ‘C:/Users/Public/Documents/Wondershare/CreatorTemp/RtmpYJcn76/file31fc43283c/forestry_0.1.0.tar.gz’ had non-zero exit status
> 

1 个答案:

答案 0 :(得分:1)

这是因为您的存储库根目录中有data文件夹,并且其中包含csv文件。您应该对该文件夹中的所有文件使用rda格式。如果要在包中使用csv文件,请将其放在inst/extdata中。