Skip to content

Set up a new repository for an R project #4

Description

@luizaandrade
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions