Skip to content

Add vignette map example using native serialization #1440

@shikokuchuo

Description

@shikokuchuo

The custom functions vignette examples currently all involve converting to and from R objects.

With polars using mirai's serialization registry, this is not always going to be necessary.

It might be an idea to add some examples of how users can take advantage of this, e.g.:

library(polars)
library(purrr)
library(mirai)
daemons(6)

dat <- as_polars_df(mtcars)
dat |>
  as.list() |>
  map(in_parallel(\(x) x$sort())) |>
  as_polars_df()

There's no conversion to R types anywhere in this (you can verify line by line that the result is a polars object).

Not the best example, so can I leave it with you to find a more natural one?

Also happy to contribute something, just let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions