Data.table objects turn into data.frame after calling fix()

Every time I run the command fix(DT) on a data.table , after closing the fix window, DT turns into a data.frame object. Is this normal?

library(data.table)
DT <- data.table(a = 1:2, b = 2:3)

> class(DT)
[1] "data.table" "data.frame"

fix(DT) 

# close the window

> class(DT)
[1] "data.frame"

EDIT:

some session info:

R version 3.0.0 (2013-04-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)

fix invokes edit . However, there is not data.table method for edit (check using methods(edit) ). Because a data.table is also a data.frame, edit.data.frame is used instead and it returns a data.frame as documented.

You could write your own edit.data.table , but I don't recommend it, since data.tables are often way too big to be edited that way in a sensible way.

链接地址: http://www.djcxy.com/p/13528.html

上一篇: 在Python中访问未知类型的Protobuf消息的字段

下一篇: 调用fix()后,Data.table对象变为data.frame