![]() New things should be green (since these files are new, the whole thing is green). If you click on the items, it should tell you what’s different from the previous version. The next screen should be the commit screen. Go to the Git tab on the top right panel…Ĭlick on the two things you want to update (in this case, the Rproj and Rmd files), and hit Commit. We can now send these changes back to the repo. So you’ve already made some changes to the repository than when you first created it, since you 1) Made an R Proj file and 2) Made a R Markdown file. Add in some generally useful initial code as I have in the picture below: Get rid of everything but the first chunk, since you’ll just reuse the first chunk. If you use the default settings, you’ll get a generically prepopulated RMarkdown file. ![]() The file isn’t saved, so save it in the same directory as your Rproj and Readme file, giving it whatever name you want to give it (probably the same name as the repo). Add whatever details you want, and hit “OK”. ![]() To do this, go to File -> New File -> R Markdown…Ī new screen will pop up. For example, let’s make an R Markdown file where you will start making the analysis script. Now let’s start adding things to the project. Add in the web address fo the repo you just made and want to link with your RStudio, make sure you’re happy with the project name, and then enter in where on your computer you want the project to be located.Ĭool, now you have a very blank looking project. ![]() Now go into RStudio (which you should have already installed), and go to File -> New Project. Here’s the blank repo that should now exist: Add some kind of description, click “Add a README file”, and then hit “Create Repository”. If you’ve been added to the lab, then make a new repo within the lab. Log into your account on GitHub (make an account if you don’t already have one). Here are a series of steps we can do to set this up. As I work with more trainees as they join the lab, it could be helpful to have a single RStudio GitHub repo that we share so we can work on the same project / analysis script.
0 Comments
Leave a Reply. |