You’ve just made a ton of changes!
- Save or export the new data set to your computer.
- Edit the codebook to reflect the changes that you made.
- Keep the data, codebook and data management file in the same folder.
Now every time you run your data cleaning script file, it will make all the changes and save/overwrite the
depress_clean.Rdata data file. This ensures that any analysis script that uses this data has the most up to date varibles.
Need to export to a different software program? Look into the
SPSS users commonly save cleaned data as a
/KEEP = Variable_Name1 Variable_Name2.
Saving only selected variables
- In SPSS the
/KEEPstatement demonstrated above only writes the variable names listed to the saved data set. This can be very useful when dealing with data sets with a large number of variables.
- For R users, using
dplyrselect is generally the fastest.