Skip to content

Test if the object a polars DataType

Source code

Description

Test if the object a polars DataType

Usage

is_polars_dtype(x, include_unknown = FALSE)

Arguments

x An object
include_unknown If FALSE (default), pl$Unknown is considered as an invalid datatype.

Value

A logical value

Examples

library("polars")

is_polars_dtype(pl$Int64)
#> [1] TRUE
is_polars_dtype(mtcars)
#> [1] FALSE
is_polars_dtype(pl$Unknown)
#> [1] FALSE
is_polars_dtype(pl$Unknown, include_unknown = TRUE)
#> [1] TRUE