r package practice
Steps:
-
Create package localy R -> file -> new project -> New Directory -> R Package
-
push local package file to Github
- Create a new repository on github, having the same name with local file
- Open git bash and change the current working directory to the local project with cd ..
- Initialize the local directory as a Git repository $ git init
- Add the files in the new local repository $ git add .
- Commit the files in local repository $ git commit -m "Initiate commit"
- In the command prompt add the URL for the remote repository where the local repository will be pushed $ git remote add origin https://github.com/YujieSu/suur.git
- Push the changes in the local repository to Github $ git push -u origin mastere
- install the package locally to R devtools::install_github("YujieSu/suur")