-
Notifications
You must be signed in to change notification settings - Fork 183
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
Need some way to control digits
used by jsonlite
#320
Comments
@philbrierley, do you posing repex with data to make it easier to investigate this. Also, an you clarify
Does it mean that uploading |
hi @byapparov, thanks for the response.
bq_table_upload(x=myBQTable, values=BQ_data_table, create_disposition='CREATE_NEVER', write_disposition='WRITE_APPEND') where BQ_data_table is the data table, making sure some of the values have lots of decimal place.
|
ok. I can reproduce this, with both this rounding is done when data is transformed to json, see ratio values: cars$ratio <- cars$dist / cars$speed
jsonlite::stream_out(cars)
# {"speed":24,"dist":92,"ratio":3.83333} Solution to this would be to put jsonlite::stream_out(cars, digits = 10)
# {"speed":24,"dist":92,"ratio":3.8333333333} |
Related to r-lib/httr#153, r-lib/httr#455, and r-lib/httr#539. Yes, some way needs to be chosen to expose |
digits
used by jsonlite
Thanks for finding the issue. As my data set has some small numbers then a digits parameter would be much welcomed. |
Any updates regarding this issue? |
The |
Any updates regarging this issue? |
I am finding that when uploading a data.table to big query, all values seem to end up in big query but rounded to 5 decimal places. Below is the call I'm making. The same data uploaded by other libraries has no such issue. Any pointers appreciated.
bq_table_upload(x=myBQTable, values=BQ_data_table, create_disposition='CREATE_NEVER', write_disposition='WRITE_APPEND')
The text was updated successfully, but these errors were encountered: