The Inspire Pin contest has begun! Win a free pass to Inspire by submitting your design to be made into a real-life pin! Submission details can be found here.
Be sure to review our Idea Submission Guidelines for more information!
Submission GuidelinesA seemingly minor task that has popped up several times on my team is the ability to select a subset of columns using an input list. Different people have achieved this in different ways (transpose/join/cross-tab, dynamic rename/select), but it seems like a common enough task to warrant a single-tool solution.
R has a simple way to do this:
# create a vector of the columns we would like to select
columns <- c("column_b", "column_d")
# subset based on the column names we defined in our "columns" vector
df_subset <- df[columns]
We have built a macro to achieve this (attached), but I would love if there was a second input anchor on the Dynamic Select tool, with list-based select mode as an option in the dropdown.
The macro currently has a minor annoyance, where the user gets a "RecordInfo::CreateRecord" error presented on their palette when they choose the "Keep Columns in List" entry. This error goes away with a run or an F5 refresh, but if anyone has a suggestion for getting rid of this, it would also be appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.