Bug 14947 - R CMD BUILD fails when sysdata.rda is in R directory
R CMD BUILD fails when sysdata.rda is in R directory
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: Misc
R 2.15.0
ix86 (32-bit) Linux
: P1 minor
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-18 13:08 UTC by Vitalie Spinu
Modified: 2014-02-16 11:41 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitalie Spinu 2012-06-18 13:08:31 UTC
The following building script fails both on R.15.0 and the most recent R-devel

Start R session:

sysdata <- "blabla"
package.skeleton()  ## create anRpackage package
system("mv anRpackage/data/sysdata.rda anRpackage/R/sysdata.rda")
system("R CMD build anRpackage")

Gives:

* checking for file ‘anRpackage/DESCRIPTION’ ... OK
* preparing ‘anRpackage’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
Removed empty directory ‘anRpackage/data’
* looking to see if a ‘data/datalist’ file should be added
Error in if (any(update)) { : missing value where TRUE/FALSE needed
Execution halted


This is clearly a problem with re-saving data. This works:

system("R CMD build anRpackage --no-resave-data ")


Best,
Vitalie.


 sessionInfo()
R Under development (unstable) (2012-06-16 r59569)
Platform: i686-pc-linux-gnu (32-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base    

platform       i686-pc-linux-gnu                                 
arch           i686                                              
os             linux-gnu                                         
system         i686, linux-gnu                                   
status         Under development (unstable)                      
major          2                                                 
minor          16.0                                              
year           2012                                              
month          06                                                
day            16                                                
svn rev        59569                                             
language       R                                                 
version.string R Under development (unstable) (2012-06-16 r59569)
nickname       Unsuffered Consequences
Comment 1 Brian Ripley 2012-06-25 11:56:55 UTC
Use of R CMD build is a convenience, as is --reseave-data.  It is an abuse to call this critical.

The reproduction instructions do not actually work: there is no directory anRpackage/R  to move to.  

This only fails if there is no data directory in the package.

R CMD build --no-resave-data
R CMD build --resave-data="best"

both worked even in that case.
Comment 2 Vitalie Spinu 2012-06-28 13:06:58 UTC
(In reply to comment #1)
> Use of R CMD build is a convenience, as is --reseave-data.  It is an abuse to
> call this critical.

If you cannot build a package,it's critical IMO.  Latter I found the workarounds which you  have also mentioned. 

> 
> The reproduction instructions do not actually work: there is no directory
> anRpackage/R  to move to.  
> 

package.skeleton()  creates anPackage/R/ directory  in the working dir unless you specify otherwise. 

> This only fails if there is no data directory in the package.
> 
> R CMD build --no-resave-data
> R CMD build --resave-data="best"
> 
> both worked even in that case.

In above example package.skeleton() creates /data directory, and BUILD failed.

 Thanks for fixing.
Comment 3 Jackie Rosen 2014-02-16 11:41:39 UTC
(spam comment removed)