Igor Cobelo
Igor Cobelo

Reputation: 459

Solutions for "ERROR: lazydata failed for package..."?

When I try to install my GitHub package, this error occurs with lazydata. My csv files are in the "data" folder. I believe that the error may be there, but not yet what it is.

> 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
> 

Upvotes: 2

Views: 1144

Answers (1)

slava-kohut
slava-kohut

Reputation: 4233

This is because you have the data folder in the root of your repository and it is filled with csv files. You are supposed to use the rda format for any files in that folder. If you want to use csv files with your package, put them in inst/extdata.

Upvotes: 4

Related Questions