Nic Crane created ARROW-13891:
---------------------------------

             Summary: [R] Docs should be more explicit about why float32 
objects report type as "float" and float64 objects report type as "double"
                 Key: ARROW-13891
                 URL: https://issues.apache.org/jira/browse/ARROW-13891
             Project: Apache Arrow
          Issue Type: Improvement
          Components: R
            Reporter: Nic Crane


There is a discrepancy between how fields created via {{float32()}} and 
{{float64}} report their data types.
{code:java}
tbl <- tibble::tibble(a = c(1:3), b = c(4:6))
Table$create(tbl, schema = schema(a = float32(), b = float64()))
## Table
## 3 rows x 2 columns
## $a <float>
## $b <double>
{code}
Whilst this canonical (see 
[https://github.com/apache/arrow/pull/10327#discussion_r640240623),] this is 
confusing, especially as our docs (see \{{?float64()}} say:

> "When called inside an arrow function, such as schema() or cast(), double() 
> also is supported as a way of creating a float64()"

We should either rephrase this part of our docs to swap {{double()}} and 
{{float64()}}, or add another sentence to explain this in more detail.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to