test[,(factcols) := lapply(.SD, factor), .SDcols = factcols] factcols has a list columns for which the above needs to be applied. I am trying to understand what does .SD and .SDcols mean in the above code. Thanks in advance!!
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)