Following the general principles of the scientific method, you need to approach data analysis with an eye toward careful note-taking and reproducibility. This is especially important when using programs like RStudio to manipulate and analyze your data. Even though we haven't done anything as complex as scripting in R, we still need to be sure we're keeping detailed notes about the processes and analyses we're working with.
The paper below goes through some best practices and other recommendations for approaching data analysis workflows.
Stoudt, S., Vasquez, V. N., & Martinez, C. C. (2020). Principles for data analysis workflows. http://arxiv.org/abs/2007.08708.