One line change to pass next data.table release please
Thanks for your reply on email supporting this change in data.table.
irg and it's just a one line change that's needed :
fitDT <- DT[rep(1:.N, each = 366)][, t := julseq$t]
fitDT <- DT[rep(1:.N, each = 366)][, t := rep(julseq$t, length.out=.N)]
Will you be able to update irg on CRAN please?
(I wasn't sure how to submit pull request on GitLab. I hope as an issue is ok.)
The error without this fix is :
> fit <- model_ndvi(mods, observed = FALSE) Error in `[.data.table`(DT[rep(1:.N, each = 366)], , `:=`(t, julseq$t)) : Supplied 366 items to be assigned to 40260 items of column 't'. The RHS length must either be 1 (single values are ok) or match the LHS length exactly. If you wish to 'recycle' the RHS please use rep() explicitly to make this intent clear to readers of your code. Calls: model_ndvi -> [ -> [.data.table Execution halted