Automatic styling with styleR
The tidyverse style guide provides all the detail you could need on the specifics of styling code. However, applying it manually can be time consuming. Instead, you can use styler, an R package that helps format your code automatically. If you haven’t already installed it, run install.packages(“install.packages("styler").
Once this is installed (which only needs to be done once), you can click the ‘Addins’ button. Then scroll down to the ‘STYLER’ section and click ‘style active file’.

