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

Add an optional argument (key= ...) to as.data.table #890

Closed
cooldome opened this issue Oct 14, 2014 · 2 comments · Fixed by #3573
Closed

Add an optional argument (key= ...) to as.data.table #890

cooldome opened this issue Oct 14, 2014 · 2 comments · Fixed by #3573

Comments

@cooldome
Copy link

@cooldome cooldome commented Oct 14, 2014

This is for convenience, a bit tired of writing:

dt = as.data.table(x)
setkeyv(dt, c("s1", "s2"))
dt

I would be much nicer to have

dt = as.data.table(x, key = c("s1", "s2"))

Thank you,
You are doing amazing work with data.table.

@arunsrinivasan
Copy link
Member

@arunsrinivasan arunsrinivasan commented Oct 15, 2014

Thanks! Yes, this would be useful. Also in setDT probably.

@Thell
Copy link

@Thell Thell commented Nov 21, 2014

👍

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.

4 participants