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 #5372] dropping the last column deletes all rows #52

Closed
arunsrinivasan opened this issue Jun 8, 2014 · 0 comments
Closed

[R-Forge #5372] dropping the last column deletes all rows #52

arunsrinivasan opened this issue Jun 8, 2014 · 0 comments
Labels

Comments

@arunsrinivasan
Copy link
Member

Submitted by: Malcolm Cook; Assigned to: Nobody; R-Forge link

I find that the data.table does NOT behave like data.frame in the case of with=FALSE and selecting no columns.

data.frame will retain empty columns whereas data.table will drop them.

viz:

data.frame(x=1:10)
x
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
data.frame(x=1:10)[,-1]
data frame with 0 columns and 10 rows
data.table(x=1:10)
x
1: 1
2: 2
3: 3
4: 4
5: 5
6: 6
7: 7
8: 8
9: 9
10: 10
data.table(x=1:10)[,-1,with=FALSE]
Null data.table (0 rows and 0 cols)

@arunsrinivasan arunsrinivasan modified the milestone: v1.9.4 Jun 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant