-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
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
tib_id()
to create id columns
#21
Comments
Supporting some kind of id columns sounds great to me. But sometimes one also has integer ids. So it might make sense to have something similar for integers. Does In case you haven't seen it you can also simulate new vectors with library(tibblify)
df <- tibblify(
list(
list(x = "asdfasdfadsfadsfadsfasdf"),
list(x = "moinboenoibnoiegbn")
),
lcols(
lcol_vec(path = "x", ptype = pillar::char("a", min_chars = Inf)),
x2 = lcol_chr(path = "x")
)
)
df
#> # A tibble: 2 × 2
#> x x2
#> <char> <chr>
#> 1 asdfasdfadsfadsfadsfasdf asdfasdfadsfadsfadsfasdf
#> 2 moinboenoibnoiegbn moinboenoibnoiegbn
dplyr::glimpse(df)
#> Rows: 2
#> Columns: 2
#> $ x <char> "asdfasdfadsfadsfadsfasdf", "moinboenoibnoiegbn"
#> $ x2 <chr> "asdfasdfadsfadsfadsfasdf", "moinboenoibnoiegbn" Created on 2021-10-18 by the reprex package (v2.0.1) |
@krlmlr pillar also supports some kind of focus columns, right? It might make sense to set |
I think IDs are usually integer (resp. big int) or character. It would make sense to support both, e.g. |
ID columns are often key columns too. In dm there will be a data structure for tibble-like things with keys, these keys would become focus columns. Would that work for a start? |
Generates a column of type
pillar::char(min_width = Inf)
.The text was updated successfully, but these errors were encountered: