Git Product home page Git Product logo

example-project's Introduction

example-project

Example R / Github Project

This repository (repo) provides a template for an Accounting / Finance research project using R. This repo will contain the files needed to follow along with the live coding workshop.

๐Ÿ› ๏ธ Getting Started / Installation Guide

In order to "clone" (copy) this repository to your machine and follow along with the R workshop, you will need to install Git, R, RStudio, and several R packages to your machine. I will provide the installation steps for a Windows machine, but the steps are very similar for MacOS or Linux.

1. Install Git

I think it is a good idea to allow this option to install git into your PATH so that RStudio can find it.

git install 1

It is also helpful to allow git to install the credential manager to help with storing your github credentials.

git install 2

  • Finally, I also recommend to install / allow Git bash during the installation.

2. Install R

If you already have R on your machine, I recommend at least R version 4.0 or better to follow along with the code in this repo. If you use an older version of R, you may see some warnings about R packages being built with a different version, but usually everything will still work.

3. Install RStudio

rstudio install 2

As shown in the screenshot, R should be installed first, as we did in the previous step.

4. Sign up for a Github account

  • If you have not done so already, register for an account at https://github.com/

  • There are some benefits to linking your Github account to your school email (https://education.github.com/benefits).

  • Below, I recommend that you use the same primary email address that you use for github when you set your user.email in git. You can use a personal email as your primary email on Github and also link your Github account to your (secondary) school email as well, if desired.

5. Open RStudio and set your Git credentials

  • To work with Git, you need to set your user name and email.
  • There are many ways to do this, but an easy way is using RStudio's built-in terminal.

rstudio terminal

  • Click on the "terminal" tab that should be next to console.
  • Type the following commands
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
  • NOTE: If this step doesn't work, don't worry. Just keep going. This might not work if you did not install Git bash, but you should still be able to keep going.

6. Clone this repo as a project in RStudio

  • IMPORTANT: You need to create a local directory to hold the local copy of this repository on your computer. DO NOT put this directory inside Dropbox. Dropbox and Git do not play well together unless you are an advanced user. I recommend to use a simple directory on your main drive that is easy to find.

  • At the top of this page, click the green code button and copy the https link to this repo.

clone repo

  • In RStudio, click File -> New Project. On the next menu, click "Version Control" and choose Git.

  • Paste the URL into the box, as follows:

clone repo2

  • Click "Create Project"

7. Open the "--Install-Packages.R" script in the "src" folder in RStudio

  • Run the commands in this file by highlighting them and pushing "ctrl+Enter" or by highlighting them and clicking "run."

  • If you are able to successfully connect to WRDS you should see a line like this output in your console:

postgres

  • If you were able to successfully install the packages and connect to WRDS, you should now be ready to follow along for the coding workshop.

example-project's People

Contributors

eweisbrod avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.