Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up a new repository for an R project #4

Open
15 tasks
luizaandrade opened this issue Dec 15, 2022 · 0 comments
Open
15 tasks

Set up a new repository for an R project #4

luizaandrade opened this issue Dec 15, 2022 · 0 comments

Comments

@luizaandrade
Copy link
Member

luizaandrade commented Dec 15, 2022

  • Go to the landing page for this repository and click on "Use this template"
  • Adapt the folder structure to one that fits your project. This template currently only contains four subfolders. Each of them includes a README file with a short description of what it should contain and suggestions for how to organize it. Try to create all the necessary subfolders as you first set up the repository. This will help you think through important aspects of your project. When creating a placeholder folder that will not have any content at first, make sure to include a README.md file inside it so GitHub does not ignore it.
  • Delete the Stata setup files in the root folder
    • main.do
    • The entire code/ado directory
  • Make sure the package renv is installed. If you are unsure whether it is installed or not, install it by typing install.packages("renv").
  • Create a file called .Rprofile in the repository's root directory. This file should contain two lines of code, one activating your R environment and one defining the path to your Box folder. You can use the code below to create it by adjusting the second line to match your computer's installation of the Box client. Note that this file should be called just .Rprofile, without any additional file format indicated in its name (such as .Rprofile.txt).
source("renv/activate.R")
Sys.setenv(BOX = "C:/Users/YourUsername/Box")
  • Rename dil-template-repo.Rproj to match your project's repository name.
  • Launch R by opening the newly renamed R project.
  • Adjust the file paths in main.R.
    • Make sure the objects DATA_BOX and DOC_BOX are pointing to the correct Box folders. You can print these objects to see where they point to.
    • If you made changes to the suggested folder structure, make sure they are reflected in the other file paths as well.
  • Edit the contribution guidelines in CONTRIBUTING.md to match your preferred folder structure, naming conventions, and workflow.
  • Edit the main README in the repository's root directory. The file contains instructions on how to modify it.
  • Set up rules for main branch protection. The suggested rule is to require a pull request with at least one approval.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant