data.table Tip

Published onesixx on

Using thread

?getDTthreads

To list all objects in the data.table package

> ls("package:data.table")
 [1] ":="                 "address"            "alloc.col"          "as.chron.IDate"     "as.chron.ITime"    
 [6] "as.data.table"      "as.Date.IDate"      "as.IDate"           "as.ITime"           "as.xts.data.table" 
[11] "between"            "%between%"          "chgroup"            "%chin%"             "chmatch"           
[16] "chorder"            "CJ"                 "copy"               "data.table"         "dcast"             
[21] "dcast.data.table"   "fintersect"         "first"              "foverlaps"          "frank"             
[26] "frankv"             "fread"              "fsetdiff"           "fsetequal"          "fsort"             
[31] "funion"             "fwrite"             "getDTthreads"       "getNumericRounding" "haskey"            
[36] "hour"               "IDateTime"          "indices"            "inrange"            "%inrange%"         
[41] "is.data.table"      "isoweek"            "key"                "key<-"              "key2"              
[46] "last"               "like"               "%like%"             "mday"               "melt"              
[51] "melt.data.table"    "minute"             "month"              "quarter"            "rbindlist"         
[56] "rleid"              "rleidv"             "rowid"              "rowidv"             "second"            
[61] "set"                "set2key"            "set2keyv"           "setattr"            "setcolorder"       
[66] "setDF"              "setDT"              "setDTthreads"       "setindex"           "setindexv"         
[71] "setkey"             "setkeyv"            "setnames"           "setNumericRounding" "setorder"          
[76] "setorderv"          "shift"              "shouldPrint"        "SJ"                 "tables"            
[81] "test.data.table"    "timetaken"          "transpose"          "truelength"         "tstrsplit"         
[86] "uniqueN"            "wday"               "week"               "yday"               "year" 

생략된 rows 보기

많지 않은 데이터 전체를 Console창에서 보고 싶을때,  가장 쉽게  View(데이터.테이블)  도 있지만

옵션의 max.print를 늘리는 방법이 있다. options(max.print=6666) 

[ reached getOption("max.print") -- omitted 93 rows ]
# 현재 max.print값 확인 
getOption("max.print")    # [1] 1000

# options값 변경 
options(max.print=2000)

myData %>% print(nrow=666)

display entire row 

data[ , col1 , with=FALSE] %>% print(n=Inf)

Union 

AB <- rbind(A, B)
AB <- AB[!duplicated(AB),]
Categories: Reshaping

onesixx

Blog Owner

Leave a Reply

Your email address will not be published.