You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Nic Crane (Jira)" <ji...@apache.org> on 2021/07/21 11:00:00 UTC
[jira] [Comment Edited] (ARROW-13421) [R] Add choice for decimal
marker in read_delim_arrow
[ https://issues.apache.org/jira/browse/ARROW-13421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17384829#comment-17384829 ]
Nic Crane edited comment on ARROW-13421 at 7/21/21, 10:59 AM:
--------------------------------------------------------------
Hi [~Ruser], thanks for reporting this! Would you be able to provide a short reproducible example of what you're trying to do? I tried writing my own example based on the description above, but the data was read in as a double and not a string.
{code:r}
set.seed(1)
# create a table of values
tbl <- tibble::tibble(x = rnorm(5))
tbl
# A tibble: 5 x 1
# x
# <dbl>
# 1 -0.626
# 2 0.184
# 3 -0.836
# 4 1.60
# 5 0.330
# create file to write to
tf <- tempfile()
# write table to file
write.table(tbl, tf , sep = "\t", row.names = FALSE)
# read back in
tab <- read_delim_arrow(tf, delim = "\t")
# display results
tab
# A tibble: 5 x 1
# x
# <dbl>
# 1 -0.626
# 2 0.184
# 3 -0.836
# 4 1.60
# 5 0.330
# {code}
was (Author: thisisnic):
Hi [~Ruser], thanks for reporting this! Would you be able to provide a short reproducible example of what you're trying to do? I tried writing my own example based on the description above, but the data was read in as a double and not a string.
{code:r}
set.seed(1)
# create a table of value
tbl <- tibble::tibble(x = rnorm(5))
tbl
# A tibble: 5 x 1
# x
# <dbl>
# 1 -0.626
# 2 0.184
# 3 -0.836
# 4 1.60
# 5 0.330
# create file to write to
tf <- tempfile()
# write table to file
write.table(tbl, tf , sep = "\t", row.names = FALSE)
# read back in
tab <- read_delim_arrow(tf, delim = "\t")
# display results
tab
# A tibble: 5 x 1
# x
# <dbl>
# 1 -0.626
# 2 0.184
# 3 -0.836
# 4 1.60
# 5 0.330
# {code}
> [R] Add choice for decimal marker in read_delim_arrow
> -----------------------------------------------------
>
> Key: ARROW-13421
> URL: https://issues.apache.org/jira/browse/ARROW-13421
> Project: Apache Arrow
> Issue Type: Improvement
> Components: R
> Affects Versions: 4.0.1
> Reporter: Daniel Paierl
> Priority: Minor
> Labels: R
>
> In the R arrow package read_delim_arrow lacks the option to specify the decimal marker (e.g. comma or point) in the parsing options.
> This is a major inconvenience for data with a _point_ as a decimal marker (european users) since the data is read in as astring which requires post-hoc conversion of the string to double.
>
> Request: Add a parsing option to set the decimal marker if that is possible.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)