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

R “错误:lazydata包失败…”的解决方案?,r,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\Do

当我尝试安装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
> 

这是因为您的数据文件夹位于存储库的根目录中,其中充满了csv文件。您应该对该文件夹中的任何文件使用rda格式。如果您想在软件包中使用csv文件,请将它们放在inst/extdata中。

但直到几小时前它还可以工作。我用数据调用了csv文件。我不知道为什么它停止工作了。我将尝试按照您所说的更改文件夹。@IgorCobelo我无法评论为什么它现在不工作。在数据中总是使用rda,而且效果很好。使用此::使用_数据方便地准备数据集。@IgorCobelo问题已解决?slava kohut,我不知道是否能够澄清另一个疑问。我重命名了数据文件夹中的rda文件。但是,当我使用“data”导入R时,它从GitHub导入,但使用的是旧名称。你知道为什么会发生这样的事情吗?这样,如果有人试图解决同样的问题,它将是有用的