Skip to content

Convert to a character vector

Description

Convert to a character vector

Usage

## S3 method for class 'RPolarsSeries'
as.character(x, ..., str_length = NULL)

Arguments

x A Polars Series
Not used.
str_length An integer. If specified, utf8 or categorical type Series will be formatted to a string of this length.

Examples

library("polars")

s = as_polars_series(c("foo", "barbaz"))
as.character(s)
#> [1] "foo"    "barbaz"
as.character(s, str_length = 3)
#> [1] "\"fo…" "\"ba…"