If a file was produced by code (e.g. an intermediate dataset, table, figure) then there is already a record of how it got there.
If I downloaded data from the web, I like to include a "_datasource.txt" file that describes the URL, date of download, and any notes.
Similarly, if you had to do anything "by hand" to your data (e.g. format it somehow in Excel before import to R), it's good to keep a record of exactly what you did (e.g. in some sort of ``notes" file or perhaps as comments in your R code).
"R.exe CMD BATCH myscript.R"in Windows Command Prompt. Might be necessary if running on a server.
We'll shortly discuss some basic syntax and tips for getting started quickly in R. But more important is knowing where to turn and how to make use of resources as you go.
stackoverflow.com is your friend!
For syntax of a particular function, can use "??" in RStudio, e.g.
??readstata13. Online, official PDF documentation will look like: