Created
January 27, 2015 16:29
-
-
Save Dulani/ffef9389dbe460078c90 to your computer and use it in GitHub Desktop.
Excel style "fill down" in R using data.table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#An Excel style "fill down" for Data Table. (.SD is the Subset of Data for each 'by' group) | |
dataTable[,setId:=.SD[1,setId],by=setNum] #TAG:USEFUL (Excel style fill down) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment