Skip to content
Rob Cavanaugh edited this page Oct 3, 2022 · 3 revisions

Installation instructions for the PNT-CAT application

Installation Option 1. Installing the app locally via remotes::install_github()

  1. Install R (required) and RStudio (strongly recommended)

    • A guide to installing R and RStudio can be found here: https://psyteachr.github.io/reprores-v2/installingr.html. In this guide "R" refers to the statistical programming language and basic GUI that comes with R (shown below on the left). RStudio refers to the application that runs R and has many additional features (shown below on the right).
    • A guide to using RStudio can be found here: https://psyteachr.github.io/reprores-v2/intro.html

    • Each of the commands below can be run by copying and pasting them into the console and hitting the enter key.

    • From this point forward, we strongly recommend using RStudio instead of the R GUI

    • If your computer is through your university/hospital and there are restrictions on installing software, you may need to request administration rights for the installation process. If you're unable to install R/RStudio, you can create an RStudio Cloud account (https://rstudio.cloud/) and install and run the acom application there.

    • If you already have R installed on your computer, we recommend making sure your R-version is > 3.6.0. You can check which R version you have installed by running sessionInfo() in the console.

  2. Enable LaTeX and install pandoc (recommended, if you would like the app to generate a PDF performance report)

    If you're using R/R GUI (not Rstudio), you'll need to install rmarkdown (the R package) and pandoc (install pandoc from https://pandoc.org/installing.html) to use the report function (Rstudio comes with pandoc, but R/R GUI do not).

    install.packages("rmarkdown")
    

    Install a LaTeX distribution: TinyTex is a lightweight LaTeX distribution and is typically recommended for R and Rmarkdown (https://bookdown.org/yihui/rmarkdown-cookbook/install-latex.html). Run the following in the console in RStudio or the R GUI.

    tinytex::install_tinytex()
    
  3. Download the PNT package

    Run the following code in the console in RStudio or the R GUI:

    install.packages("remotes")
    remotes::install_github("rbcavanaugh/pnt")
    
    • If asked to install packages from source binaries, we recommended selecting 'no'.
    • If asked to update packages, we recommend selecting yes.
    • Sometimes this can cause errors. Please raise an issue in github (https://github.com/rbcavanaugh/acom/issues) if there are any problems downloading the app. Copy and paste the error into the issue.
  4. Run the app using the built in function

    library(pnt)
    put::run_app()
    

Option 2. Remote access to the app, run locally

  1. Follow steps 1-3 above

  2. Install packages required for the app by running the following in your console

    install.packages(c('config', 'golem','shiny', 'catR','DT', 'here', 'keys', 'shinyjs','tibble','tidyr','dplyr','pkgload','htmltools', 'rmarkdown', 'markdown', 'magrittr', 'knitr', 'ggplot2'))
    
  3. The app can then be run by entering the following code in the console

    shiny::runGitHub("rb-cavanaugh/pnt")
    
  • If you get any errors about missing a package, install it (run install.packages("packagename") in the R console), restart your session, and try again*

Troubleshooting errors

  1. If you get an error saying "Error in loadNamespace(x): there is no package called "rmarkdown'" if means you need to install that package. For example, the following error can be resolved by running install.packages("rmarkdown") in the console, and then re-running rmarkdown::find_pandoc() and tinytex::install_tinytex(). Installing rmarkdown works for both commands, because tinytex is included when you install rmarkdown.