Problem including a large matrix when using devtools install

83 views
Skip to first unread message

Philip Carter

unread,
Jul 31, 2021, 2:12:58 PM7/31/21
to devtools
Hi,

I'm trying to use devtools install with a package that I am developing. I do the following after starting R:

library("devtools")                              
library("roxygen2")                               
setwd("./")                                       
install("myPackage")

But I get the error:

*** moving datasets to lazyload DB
Error in lazyLoadDBinsertVariable(vars[i], from, datafile, ascii, compress,  : 
  long vectors not supported yet: connections.c:5984
ERROR: lazydata failed for package ‘myPackage’
* removing ‘/home/phil/R/x86_64-pc-linux-gnu-library/3.6/myPackage’
* restoring previous ‘/home/phil/R/x86_64-pc-linux-gnu-library/3.6/myPackage’
Error in (function (command = NULL, args = character(), error_on_status = TRUE,  : 
  System command 'R' failed, exit status: 1, stdout & stderr were printed

I think this is caused by a recent addition of a large matrix in the myPackage data/ directory stored as largeMatrix.RData. If I remove that file, the install works fine again. I can load the matrix inside R, although it's big (matrix is 45000x24717).

I've looked at the devtools install documentation, but I didn't see anything like a parameter that I can set.

When I searched for a solution online, I saw some answers for similar problems where cache.lazy = FALSE was recommended for lazyLoadDBinsertVariable, but I'm not sure how to utilise this when working with someone else's package. If of course that is the problem, which I am not sure of.

Thanks very much in advance,

Phil
Reply all
Reply to author
Forward
0 new messages