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

Commas in numbers not handled by vector_paste() #94

Open
MilesMcBain opened this issue May 14, 2019 · 2 comments
Open

Commas in numbers not handled by vector_paste() #94

MilesMcBain opened this issue May 14, 2019 · 2 comments
Labels

Comments

@MilesMcBain
Copy link
Owner

Only just come across this great addin. Will be really useful!

However, I need to add that this is quite an important issue. Many official reports, especially those with budgets involved, quote numbers with the thousands separator (e.g. www.sfc.ac.uk/nmsruntime/saveasdialog.aspx?lID=19286&sID=11697).

There's a locale issue here also. In most continental European countries the comma is used as the decimal point marker.

Both of the above don't work well without manual intervention.

Originally posted by @drchriscole in #7 (comment)

@MilesMcBain
Copy link
Owner Author

E.g. trying to paste this as vector:

43,369,258 , -1,639,060 , 41,730,197

Gives this:

datapasta::vector_paste()
c("43", "369", "258", "-1", "639", "060", "41", "730", "197")

@MilesMcBain MilesMcBain added this to the 3.1.0 milestone Jun 29, 2019
@MilesMcBain
Copy link
Owner Author

This turns out to be quite difficult in practice. I don't try to guess the separator for vectors since the heuristic I have for tables works on minimising the variance in number of columns per line.

So the split is just a simple comma or space split. readr guesses the type from there.

@MilesMcBain MilesMcBain added wontfix and removed bug labels Jul 20, 2019
@MilesMcBain MilesMcBain removed this from the 3.1.0 milestone Jan 11, 2020
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