Skip to content

Instantly share code, notes, and snippets.

@andreagrioni
Created November 6, 2022 13:44
Show Gist options
  • Save andreagrioni/9a69b75fe30dad8a32b57d0337a2843c to your computer and use it in GitHub Desktop.
Save andreagrioni/9a69b75fe30dad8a32b57d0337a2843c to your computer and use it in GitHub Desktop.
remove suffix from column names.
clean `soluble_responder_tbl` dataframe from cols with suffix.
```{r}
my_table %>%
dplyr::rename_with( ~ stringr::str_remove(., '.x')) %>%
dplyr::select(
!dplyr::ends_with(".y")
)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment