Creating new projects

Starting from scratch

EPI 590R final project

Your goal will be to create an analysis that

  • I can reproduce on my own computer
  • Is easy to rerun if I tell you, for example, to remove the 12th row of your dataset

We’ll start this in class!

New projects

We cloned our first project from GitHub; now we are going to start a new project from scratch

  1. File > New Project > New Directory > New Project
  • If you ever want to convert an existing folder that holds an analysis into an R project, you can choose “Existing Directory”
  • You’ll also see other options besides “New Project” – an R package, a Shiny app, etc.
    • These will get you set up with some initial files for these types of projects
    • You can also make a template of your own!

New projects

  1. Choose a name for your new project and where to store it on your computer
  • Check “Create a git repository”
    • This gets you all set to connect to GitHub and creates a .gitignore file
  • You can leave “Use renv with this project” unchecked (we’ll be introducing the {renv} package later!)

Initial Git commit

  1. Stage and commit the files
  • I usually use “initial commit” as my first commit message since I haven’t don’t anything yet!
  • We can’t yet push because we haven’t connected to a remote repository