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

Additional Options for as.character() #102

Open
colearendt opened this issue Jun 14, 2017 · 0 comments
Open

Additional Options for as.character() #102

colearendt opened this issue Jun 14, 2017 · 0 comments

Comments

@colearendt
Copy link
Owner

as.character.tbl_json uses jsonlite::toJSON behind the scenes. However, jsonlite::toJSON has multiple parameters that ought to either be selected wisely or passed along to the user (with ..., perhaps).

In particular:

library(jsonlite)

jsonlite::toJSON(0.123456789,auto_unbox=TRUE)
# 0.1234

jsonlite::toJSON(0.123456789,auto_unbox=TRUE,digits=10)
# 0.123456789

For the digits parameter, at least, setting digits=NA will preserve decimal integrity and is probably a better option in as.character than the default of 4.

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

No branches or pull requests

1 participant