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