Skip to content

When clean_names and make_clean_names appear to produce different results #486

Answered by sfirke
sfirke asked this question in Q&A
Discussion options

You must be logged in to vote

In the first instance, read_excel() is performing its own minimal name repair while ingesting data. Due to the malformed and missing column names in the target spreadsheet, this caused a change in names from the raw data before it reached clean_names. Switching to .name_repair = janitor::make_clean_names avoids this initial name repair performed by read_excel.

In particular, with the clean_names in a subsequent step I got x2, x3, x4 for three missing column names, while with .name_repair = make_clean_names I got the column names x, x_2, x_3.

Replies: 1 comment

Comment options

sfirke
Jul 5, 2022
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by sfirke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant