This is an R Project that uses the Bookdown package to develop a lab manual for Introduction to Statistics (STAT 202) with Prof. Arend Kuyper.
- An installation of the RStudio IDE for R programming
- An installation of the Bookdown R package
- (Recommend) GitHub Desktop for pushing changes from your local repository to GitHub (Note: pushing from RStudio requires ssh key to be set up or entering your GitHub username and password every time you push)
- Open RStudio
- Create a New Project
File -> New Project...
- Choose 'Git'
https://github.com/nulib/kuyper-stat202.gitas the repository URL
- Clone the repository into a directory on your computer
- The cloning process will require you enter in your GitHub username and password
Preview the Book
You can view a preview version of the book on your computer with RStudio.
- Open the Build tab
- Click the arrow next to
- Change the selection to
- Click on
RStudio will open a new window with a preview version of the book.
Cloning projects with Git will create local copies of the files of a GitHub repository onto your computer. Git automatically tracks changes you make to the local files, which you can then push to the repository on GitHub. All of this can be done from the
Git tab in the
Here is a basic Git workflow:
- Edit project files on your computer
- Commit the changes you've made to the files to your local code repository
- Push the commit from your local code repository to the GitHub code repository
Make a commit
- Edit files in the project and save the changes
- Click on the check box in the staged column for the changes you want to include in the commit
- click on the
Commitbutton in the
- Write a brief commit message (e.g.
Updates the README with instructions on contributing to the project)
- Finish the commit
Push changes to GitHub
After you satisfied with changes you have made and are ready to update the GitHub repository, push your change from your local branch to the origin branch.
- In the
Gittab, click on the
- Enter in your username and password
With GitHub Desktop
The first time you use GitHub Desktop, you will need to open your cloned (local) repository. You can do so by clicking... File -> Add local Repository and finding the project folder on your computer.
Once you're ready to push to GitHub, you will see that your local repository is one or more commits ahead of the GitHub repository.
Simply click on the
Push Origin button and GitHub Desktop will do the rest.