Renaming variables with dplyr in R

Here are the datasets used in this video:
* quantpsych.net/data/data_qualt...
* quantpsych.net/data/abstract_n...
Learning objectives
1. two reasons variable names aren't nice (either unnamed, or given abstract names)
2. four best practices
select only variables for analysis
rename variables to something easy to remember
use lowercase for variable names
use good labels for plots/tables
3. Two ways to rename variables (rename and set_names)
4. Difference between the two
5. How to change axis labels
6. How to remove the legend

Пікірлер: 4

  • @leonidaskyrgiakos6881
    @leonidaskyrgiakos6881 Жыл бұрын

    Took me half an hour just to understand that rename function wants the opposite order! C'mon R guys! Thanks a lot for your content!

  • @QuantPsych

    @QuantPsych

    Жыл бұрын

    Srsly.

  • @haraldurkarlsson1147
    @haraldurkarlsson1147 Жыл бұрын

    Very nicely done. I have one small thing to add to renaming column. The janitor package has a great function called clean_names(). It will change all the names to snake case or variable_name. If there are spaces it takes care of that.

  • @dryinpan9860
    @dryinpan9860 Жыл бұрын

    Love your content! Not sure if you've done any introduction to forecasting / trend / or anomaly detection in R. That would awesome, especially if/how flexplot can be used for those types of analyses.