Export the polars object as an R DataFrame
Description
This S3 method is a shortcut for as_polars_df(x,
…)$to_struct()$to_r_vector(struct = "dataframe")
.
Usage
## S3 method for class 'polars_data_frame'
as.data.frame(
x,
...,
uint8 = c("integer", "raw"),
int64 = c("double", "character", "integer", "integer64"),
date = c("Date", "IDate"),
time = c("hms", "ITime"),
decimal = c("double", "character"),
as_clock_class = FALSE,
ambiguous = c("raise", "earliest", "latest", "null"),
non_existent = c("raise", "null")
)
# S3 method for class 'polars_lazy_frame'
as.data.frame(
x,
...,
uint8 = c("integer", "raw"),
int64 = c("double", "character", "integer", "integer64"),
date = c("Date", "IDate"),
time = c("hms", "ITime"),
decimal = c("double", "character"),
as_clock_class = FALSE,
ambiguous = c("raise", "earliest", "latest", "null"),
non_existent = c("raise", "null")
)
Arguments
x
|
A polars object |
…
|
Passed to as_polars_df() .
|
uint8
|
Determine how to convert Polars’ UInt8 type values to R type. One of the
followings:
|
int64
|
Determine how to convert Polars’ Int64, UInt32, or UInt64 type values to
R type. One of the followings:
|
date
|
Determine how to convert Polars’ Date type values to R class. One of the
followings:
|
time
|
Determine how to convert Polars’ Time type values to R class. One of the
followings:
|
decimal
|
Determine how to convert Polars’ Decimal type values to R type. One of
the followings:
|
as_clock_class
|
A logical value indicating whether to export datetimes and duration as
the clock package’s classes.
|
ambiguous
|
Determine how to deal with ambiguous datetimes. Only applicable when
as_clock_class is set to FALSE and datetime
without timezone values are exported as POSIXct. Character vector or
expression containing the followings:
|
non_existent
|
Determine how to deal with non-existent datetimes. Only applicable when
as_clock_class is set to FALSE and datetime
without timezone values are exported as POSIXct. One of the followings:
|
Value
An R data frame
Examples
#> a b
#> 1 1 4
#> 2 2 5
#> 3 3 6
#> a b
#> 1 1 4
#> 2 2 5
#> 3 3 6