tidyselect
A backend for functions taking tidyverse selections
tidyselect is a backend package that provides the column selection infrastructure used by dplyr, tidyr, and other tidyverse packages. It enables functions like dplyr::select() and dplyr::pull() to interpret flexible column selection expressions.
The package implements a consistent selection syntax across the tidyverse ecosystem, allowing users to select columns using bare names, ranges, helpers like starts_with(), and boolean operations. It’s designed primarily for package developers who want to add tidyverse-style column selection to their own functions. The package handles the complex parsing and evaluation of selection expressions so that downstream packages don’t need to implement this logic themselves.
Contributors#
Resources featuring tidyselect#
Open Source Chat - {gt} with Rich Iannone
Join Rich Iannone, maintainer of the {gt} package, as he takes questions from the community about the latest in {gt} v0.7.0, and building great looking data display tables with R.
Key Resources: ⬡ Get started with {gt} - https://gt.rstudio.com
Reach out: 38:48 - How do I ask Rich about {gt}, feature requests, bug reports, how to solve a problem via {gt}? Rich and the {gt} team would love to hear from you. ⬡ Feature requests & bug reports with GitHub Issues, https://github.com/rstudio/gt/issues ⬡ GitHub Discussions, https://github.com/rstudio/gt/discussions ⬡ Ask the community a question, https://community.rstudio.com/tag/gt ⬡ Follow {gt} on Twitter, feel free to reach out and ask questions, https://twitter.com/gt_package
Timestamps
Rich Iannone Introduction.
03:52 - Why {gt}? - What does {gt} bring to the table? Why so much effort into static, data display tables?
05:50 - Why open source? Why is {gt} open source and why have you dedicated your career to develop open source software?
08:30 - {gt} v0.7.0, Tell us about those new vector formatting functions in {gt}. Why did you include them? Could you show us some examples?
{gt}’s vector formatting functions help you customize the styling, look and feel of your values. Converting the output values R gives you, and making them look exactly the way you want them to can be tricky. A lot of work was put into {gt} to give nice value formatting options. You can now access all these outside of a gt table; e.g. in text, in a plot, etc.
22:35 - Could you provide an example or two with the new styling function called opt_stylize()? What kinds of tables can you make with that? Can you extend that with your own tweaks?
28:15 - Can you make your own themes and share them? “How do I create my own custom theme for my table? A theme I can share with the rest of my organization?”
31:58 - What is the distinction between tab_options and the opt_* functions? Why would a function be in opt_* and not tab_options?
34:00 - sub_values() function, to find and replace certain values in your table.
36:50 - What is the current support for latex in {gt} at the moment? “Personally, I much prefer HTML, but for scientific publications, we are asked to provide a LaTeX file.”
42:50 - “In my work, I often produce A4 output in PDF, mainly with ggplot2 content. It would be nice to be able to combine ggplot + gt tables in a similar way {patchwork} works. Having the plot and the table next to it is very useful sometimes.”
44:30 - Interactive Tables with {gt}?
47:45 - “Any plans to make applying of same style to several columns easier? Unless I’m mistaken, the locations argument of tab_style requires one to specify an individual column. See here: https://gt.rstudio.com/reference/tab_style.html#examples."
Yes, supply a vector of columns or use tidyselect functions.
49:15 - “Excel output with {gt}? Would be a huge improvement. I often have to produce tabular output that can be easily reused. Usually it means Excel tables. So far I have mainly done this with Python and openpyxl or PyWin32 (through COM). A simple solution in R would be great.”
50:20 - Support for additional output formats with {gt}? Excel, PowerPoint, etc.?
50:25 - {pointplank}, a package to methodically validate your data whether in the form of data frames or as database tables., https://rich-iannone.github.io/pointblank/
. Check out the workshop materials at https://github.com/rich-iannone/pointblank-workshop
55:50 - “Are there ways to have grouped rows? I mean when repeated rows have same characters can we merge them to one?”
58:00 - “Is there an ability to add ‘battleship coordinates’ (e.g. column letters & row numbers) to a gt object? This is a standard for table across my org and I’ve been trying to figure out how to implement it.”
59:59 “Do you have suggestions or examples of building out & applying corporate formatting to gt tables (e.g. adding a company logo, company colors, etc.)?”
01:04:30 - “With PDF/LaTeX output for wide tables, it does not shrink the table.”


