Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R-Forge #2489] edit() retaining class of data.table would be nice #593

Closed
arunsrinivasan opened this issue Jun 8, 2014 · 1 comment · Fixed by #3773
Closed

[R-Forge #2489] edit() retaining class of data.table would be nice #593

arunsrinivasan opened this issue Jun 8, 2014 · 1 comment · Fixed by #3773

Comments

@arunsrinivasan
Copy link
Member

@arunsrinivasan arunsrinivasan commented Jun 8, 2014

Submitted by: Matt Dowle; Assigned to: Nobody; R-Forge link

Currently edit() changes the data.table to data.frame.

@MichaelChirico
Copy link
Member

@MichaelChirico MichaelChirico commented Aug 2, 2016

Seems solving this would require doing something in C:

getAnywhere("edit.default")
A single object matching ‘edit.default’ was found
It was found in the following places
  registered S3 method for edit from namespace utils
  namespace:utils
with value

function (name = NULL, file = "", title = NULL, editor = getOption("editor"), 
    ...) 
{
    if (is.null(title)) 
        title <- deparse(substitute(name))
    if (is.function(editor)) 
        invisible(editor(name = name, file = file, title = title))
    else .External2(C_edit, name, file, title, editor)
}
<bytecode: 0x4cf9e70>
<environment: namespace:utils>

I tried doing some stuff with adding edit.data.table, running it through edit.default, and setDTing the output but that was getting me nowhere.

Perhaps up to r-devel to fix this?

Either way, neither edit.default nor edit.data.frame are exported from utils...

Seems to me simply requiring users working through edit (are there any?) to run setDT afterwards isn't too much too ask...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants