Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apacheGH-37842: [R] Implement infer_schema.data.frame() (apache#37843)
### Rationale for this change Users will be able to easily see the schema which their `data.frame` object will have when it's converted into an Arrwo table. ### What changes are included in this PR? Implements `infer_schema()` method for `data.frame` objects. Before: ``` r library(arrow) schema(mtcars) #> Error in UseMethod("infer_schema"): no applicable method for 'infer_schema' applied to an object of class "data.frame" ``` After: ``` r library(arrow) schema(mtcars) #> Schema #> mpg: double #> cyl: double #> disp: double #> hp: double #> drat: double #> wt: double #> qsec: double #> vs: double #> am: double #> gear: double #> carb: double #> #> See $metadata for additional Schema metadata ``` ### Are these changes tested? Yes ### Are there any user-facing changes? Yes * Closes: apache#37842 Authored-by: Nic Crane <[email protected]> Signed-off-by: Nic Crane <[email protected]>
- Loading branch information