How to publish your R project (pakcage development) uisng Github?
Hello guys.
Today, I am going to introduce how to publish your R project using Github. There are many good materials on the web about this topic. I am glad to add mine on the pile.
Today, I am going to introduce how to publish your R project using Github. There are many good materials on the web about this topic. I am glad to add mine on the pile.
Before Doing This
- Create a GitHub account.
- Install any Git program into your computer.
- (Reference for Korean speaker): https://wikidocs.net/book/1897
Create a Project on GitHub
OK. First of all, you need to create a repository for an R project. And copy your "dot.git" file (HTTPS!) as shown in the following exmaple.
Create an R project using RStudio
Go to : File > New Project > New Directory > R Package
Make sure that a git option is checked.
Check if "Git" is shown; otherwise, go to Tools > Glogal Option > Git/SVN. If Git executable is not specified, please fill up a path. And go to Tools > Project Options > Git/SVN to select "Version control system" as Git.
Initialize Upstream Tracking of the Project on the Github Repository
Click Git to switch the interface. Find Option icon to click. Select "Shell".
In the shell console, type the following code. In this tutorial, let's assume https://github.com/someone/somewhere.git as a repository URL.
git remote add origin https://github.com/someone/somewhere.git
Chek all (number 1 in the following screenshot), and click Commit (number 2). Describe what the change is (number 3), and click Commit (number 4).
Open the shell again. Type the following.
git push -u origin master
If you encounter a request for a user name and a password, fill them up.
Good work. Now, your local R project is synced with the remote repository in GitHub.
Commit and Push
When your files are modified, created or deleted, you should decide whether the change is commited. If you need to push or pull the local repository, click an icon you want. The only thing you have to do is type user ID and password now. Congratulations.
댓글
댓글 쓰기