Skip to content

Installing and Running the Research Strategy App

Note: To open links in a new tab, use Ctrl+Click (Windows/Linux) or Cmd+Click (macOS).

To run the application, you'll need to clone or download the source code and install dependencies.


1. Prerequisites

1.1 R and RStudio

  • Install R (version 4.0 or newer recommended).
  • (Optional but recommended) Install RStudio. This provides a more user-friendly interface.

1.2 Git or GitHub Desktop


2. Installation Method

  1. Clone or download the repository:
  2. Using GitHub Desktop:
    1. Open GitHub Desktop
    2. Go to "File" → "Clone a repository from the Internet..."
    3. Select the ResearchStrategy repository
    4. Choose where to save it locally
    5. Click "Clone"
  3. Using Command Line:
    git clone https://github.com/Founders-Pledge-Research-Team/ResearchStrategy.git
    
  4. Or simply click "Code" → "Download ZIP" on the GitHub webpage and extract the folder.

  5. Open R (or RStudio) in the downloaded/cloned folder:

  6. In RStudio, open the ResearchStrategy.Rproj file or the folder containing the app code.

  7. Install dependencies using renv:

    # Install renv if you haven't already
    install.packages("renv")
    
    # Install all dependencies from renv.lock
    renv::restore() 
    

  8. Restart R session:

  9. In RStudio, go to "Session" → "Restart R" to ensure all changes take effect.

  10. Run the Shiny app:

    fprsapp::run_app()
    


3. Keeping the App Up to Date

To ensure you're running the latest version of the app:

  • Using GitHub Desktop:
  • Open GitHub Desktop
  • Select the ResearchStrategy repository
  • Click the "Fetch origin" button at the top
  • If updates are available, click "Pull origin"

  • Using RStudio:

  • Go to the "Git" tab in the upper-right panel
  • Click the "Pull" button (blue downward arrow)
  • If there are conflicts, RStudio will notify you

  • Using Command Line:

    cd path/to/ResearchStrategy
    git pull
    

After pulling updates, you simply need to rebuild the package and re-run the app. You can do so by running the following commands in the R console:

# Install latest dependencies
renv::restore(".")

# Restart the R session
.rs.restartR()

# Run the app
fprsapp::run_app()