{"action":"created","issue":{"url":"https://api.github.com/repos/johnkerl/miller/issues/76","labels_url":"https://api.github.com/repos/johnkerl/miller/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/johnkerl/miller/issues/76/comments","events_url":"https://api.github.com/repos/johnkerl/miller/issues/76/events","html_url":"https://github.com/johnkerl/miller/issues/76","id":111230517,"number":76,"title":"sum can't compute $","user":{"login":"jungle-boogie","id":1111743,"avatar_url":"https://avatars.githubusercontent.com/u/1111743?v=3","gravatar_id":"","url":"https://api.github.com/users/jungle-boogie","html_url":"https://github.com/jungle-boogie","followers_url":"https://api.github.com/users/jungle-boogie/followers","following_url":"https://api.github.com/users/jungle-boogie/following{/other_user}","gists_url":"https://api.github.com/users/jungle-boogie/gists{/gist_id}","starred_url":"https://api.github.com/users/jungle-boogie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jungle-boogie/subscriptions","organizations_url":"https://api.github.com/users/jungle-boogie/orgs","repos_url":"https://api.github.com/users/jungle-boogie/repos","events_url":"https://api.github.com/users/jungle-boogie/events{/privacy}","received_events_url":"https://api.github.com/users/jungle-boogie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/johnkerl/miller/labels/pending%20feedback%20to%20close","name":"pending feedback to close","color":"5319e7"},{"url":"https://api.github.com/repos/johnkerl/miller/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-13T17:36:07Z","updated_at":"2015-10-14T13:43:22Z","closed_at":null,"body":"Hello,\r\n\r\nSample data:\r\n\r\n    800\r\n    50\r\n    30\r\n    60\r\n    46.67\r\n    1654.48\r\n    $456.1\r\n\r\n`% mlr stats1 -a sum -f 1 numbers`\r\n\r\n`Couldn't parse \"$456.1\" as number.`\r\n\r\nIt's probably impossible to have `mlr` recognize all currency indicators so is there a work around for this?"},"comment":{"url":"https://api.github.com/repos/johnkerl/miller/issues/comments/148053276","html_url":"https://github.com/johnkerl/miller/issues/76#issuecomment-148053276","issue_url":"https://api.github.com/repos/johnkerl/miller/issues/76","id":148053276,"user":{"login":"johnkerl","id":2008794,"avatar_url":"https://avatars.githubusercontent.com/u/2008794?v=3","gravatar_id":"","url":"https://api.github.com/users/johnkerl","html_url":"https://github.com/johnkerl","followers_url":"https://api.github.com/users/johnkerl/followers","following_url":"https://api.github.com/users/johnkerl/following{/other_user}","gists_url":"https://api.github.com/users/johnkerl/gists{/gist_id}","starred_url":"https://api.github.com/users/johnkerl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnkerl/subscriptions","organizations_url":"https://api.github.com/users/johnkerl/orgs","repos_url":"https://api.github.com/users/johnkerl/repos","events_url":"https://api.github.com/users/johnkerl/events{/privacy}","received_events_url":"https://api.github.com/users/johnkerl/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T13:43:22Z","updated_at":"2015-10-14T13:43:22Z","body":"Yes, I used times two to keep it simple, and to emphasize that this is a data-formatting question not specific to stats, and I used a smaller sample dataset to save screen space.\r\n\r\nYour particular example in each of the three cases above would be:\r\n\r\nData:\r\n```\r\n$ cat > x\r\n800\r\n50\r\n30\r\n60\r\n46.67\r\n1654.48\r\n$456.1\r\n```\r\n\r\nUse `sed` to remove the dollar sign:\r\n```\r\n$ sed 's/\\$//g' x | mlr stats1 -a sum -f 1\r\n1_sum=3097.250000\r\n```\r\n\r\nUse `mlr sub` to remove the dollar sign, from 2.2.1:\r\n```\r\n$ cat x | mlr put '$1 = sub(string($1), \"$\", \"\")' then stats1 -a sum -f 1\r\n1_sum=3097.250000\r\n```\r\n\r\nUse `mlr sub` to remove the dollar sign, from head:\r\n```\r\n$ cat x | mlr put '$1 = sub(string($1), \"\\$\", \"\")' then stats1 -a sum -f 1 \r\n1_sum=3097.250000\r\n```\r\n\r\n"}}