Step_dummy. Dealing with duplicated column names generated by recipe() steps, Tidymodels

Dear community,

I have been struggeling for extensive amount of time now trying to understand what is going on here, when I perform my recipe() steps for my linear (glm) model using the Tidymodels framework. The recipe() step_dummy(all_nominal(), -all_outcomes()) was suggested by the usemodels() function Boilerplate Code for Tidymodels Analyses • usemodels .

When I commend out the step_dummy() the recipe() and prep() works fine, however its important to me that these categorical variables are dummyfied (..is that a word!?).

This is the first time I making use of and including a reprex in a question on stackoverflow, so please let me know if you need more information to assist on this matter.

I have looked everywhere, e.g. including a one_hot = TRUE or keep_original_cols argument in the step_dummy() but it does not seem to be effective.

It should be quite easy as it is a matter of renaming the generated columns as unique, but do not succeed. Here is the era.af_train set.

Can you please provide a minimal reprex (reproducible example)? The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it: please help me help you!

If you've never heard of a reprex before, start by reading "What is a reprex", and follow the advice further down that page.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.