I might not be fully knowledgeable about the use of frollapply, but as far as I have experimented I was not successful in running rolling custom functions that requires multiple columns.
I found zoo::rollapply function which has by.column=F argument that allowed me to do the job. Thing is, it is not fully compatible with data.table[,by=] arguments so I had to loop manually. Could this by.column argument, or similar be implemented in the future? Or if I'm missing existing feature or workaround, please let me know. Thank you.
I might not be fully knowledgeable about the use of
frollapply, but as far as I have experimented I was not successful in running rolling custom functions that requires multiple columns.I found zoo::rollapply function which has
by.column=Fargument that allowed me to do the job. Thing is, it is not fully compatible withdata.table[,by=]arguments so I had to loop manually. Could thisby.columnargument, or similar be implemented in the future? Or if I'm missing existing feature or workaround, please let me know. Thank you.