We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
separate_longer_*()
separate_wider_*()
If they become generics one day: tidyverse/tidyr#1534
library(tidypolars) #> Registered S3 method overwritten by 'tidypolars': #> method from #> print.DataFrame polars library(polars) library(tibble) df <- tibble(id = 1:4, x = c("x", "x y", "x y z", NA)) pl_df <- as_polars_df(df) df #> # A tibble: 4 × 2 #> id x #> <int> <chr> #> 1 1 x #> 2 2 x y #> 3 3 x y z #> 4 4 <NA> pl_df #> shape: (4, 2) #> ┌─────┬───────┐ #> │ id ┆ x │ #> │ --- ┆ --- │ #> │ i32 ┆ str │ #> ╞═════╪═══════╡ #> │ 1 ┆ x │ #> │ 2 ┆ x y │ #> │ 3 ┆ x y z │ #> │ 4 ┆ null │ #> └─────┴───────┘ tidyr::separate_longer_delim(df, x, delim = " ") #> # A tibble: 7 × 2 #> id x #> <int> <chr> #> 1 1 x #> 2 2 x #> 3 2 y #> 4 3 x #> 5 3 y #> 6 3 z #> 7 4 <NA> pl_df$with_columns(pl$col("x")$str$split(by = " "))$explode("x") #> shape: (7, 2) #> ┌─────┬──────┐ #> │ id ┆ x │ #> │ --- ┆ --- │ #> │ i32 ┆ str │ #> ╞═════╪══════╡ #> │ 1 ┆ x │ #> │ 2 ┆ x │ #> │ 2 ┆ y │ #> │ 3 ┆ x │ #> │ 3 ┆ y │ #> │ 3 ┆ z │ #> │ 4 ┆ null │ #> └─────┴──────┘
The text was updated successfully, but these errors were encountered:
select()
No branches or pull requests
If they become generics one day: tidyverse/tidyr#1534
The text was updated successfully, but these errors were encountered: