Click here to Skip to main content
15,868,019 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
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!!


What I have tried:

I am trying to understand what does .SD and .SDcols does in the lapply command
Posted
Comments
[no name] 24-Sep-16 6:49am    
https://stat.ethz.ch/R-manual/R-devel/library/base/html/lapply.html

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900