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

Typo (?) in as.data.table example #1576

Closed
MichaelChirico opened this issue Mar 6, 2016 · 2 comments
Closed

Typo (?) in as.data.table example #1576

MichaelChirico opened this issue Mar 6, 2016 · 2 comments

Comments

@MichaelChirico
Copy link
Member

The first example:

nn = runif(c(a=0.1, b=0.2, c=0.3, d=0.4))
as.data.table(nn)
as.data.table(nn, keep.rownames=TRUE)
as.data.table(nn, keep.rownames="rownames")

Presumably we're passing a named vector to runif in order to show the use of keep.rownames... but this is not what we get. runif strips the names of the output:

runif(c(a=0.1, b=0.2, c=0.3, d=0.4))
# [1] 0.02227326 0.41916132 0.26085452 0.69217186

I guess we should just remove runif? The point is to show what as.data.table.numeric does, presumably, and as.data.table(c(a=0.1, b=0.2, c=0.3, d=0.4)) should suffice here.

@MichaelChirico
Copy link
Member Author

I'm going to combine the fix for this with what I'm working on for #890.

@arunsrinivasan
Copy link
Member

Agreed. But, once again, please don't combine (which I've mentioned multiple times now).

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

No branches or pull requests

2 participants