RStudio with Version Control¶
RStudio can be used with Git or SVN. For today’s lesson we’re going to be using Git with your new GitHub accounts.
Some things to remember about the platform
- You can pull other GitHub repositories using
git clonevia the RStudio terminal.
- Your local commits are not sent to GitHub until you initiate the repository with your GitHub username and password.
- Create a GitHub Repository
- On your local computer, create a directory called
~/githuband change into that directory
- Open RStudio and start a new Project: File > New Project > Version Control > Git. In the
repository URLpaste the URL of your new GitHub repository
- Save your new git repository to the newly created
- Open the directory in RStudio and set the project folder as the workspace.
- Create a new .Rmd format file.
- Set the parameters (e.g. HTML, PDF, etc)
- Create an code block and specify the language, e.g.
We’re going to talk about the
- Install Packages and depends