Hi:
I got vignette error when I intend to build my packages. I've test all part of my code outside the .Rmd file with same parameter setting and data set, and result is very optimal. But I tried to rebuild my package' vignette in order to improve the result, and I got an error. The point is, I tried very specific duplicate removal for my data set (a.k.a, list of GRanges), for the matter of efficiency, I tried data.table solution and it worked very nice, but this time vignette compilation is failed. I don't know how to debug this unusual error.
for reproducible data, using list of GRanges object with name, score, p.value
is its metadata.
This is my data.table solution to apply duplicate removal for my data:
out <- Map(function(x,y) setDT(x)[x[, .I[(1:.N)<=y] , .(name, score, p.value)]$V1], myList, 1:3)
I got this error message :
Error in 1:.N : argument of length 0 Calls: <Anonymous> ... [.data.table -> [.data.frame -> [ -> [.data.table -> [.data.frame
I don't understand my code works perfectly outside vignette, but have unusual error when I tried to rebuild .Rmd file. Any efficient way to debug vignette error ? How can I get rid of this error? Any idea please ? Thanks a lot
Best regards:
Jurat
Questions about package development belong on the bioc-devel mailing list.
To debug, 'tangle' the vignette
and then source the code into a 'vanilla' R session
It is also possible to create the 'tangled' version of the vignette inside R, using
Stangle()
or perhapsknitr::purl()
.Dear Martin :
Thanks for helpful answer. I'll give it try by using your recommendation. I will keep this in mind that open this sort of question through BiocDevel mailing list.
Best regards :
Jurat
This may be due to a change in the code but still using the cache of the old code. Try removing the cache of the vignette and compiling it again (If you are using cache storage).