Author: Jacob S. Zelko
Date: 2023-02-20
Summary: Instructions on setting up the environment for analysis with necessary installation instructions
For this characterizatopm assessment, you will need:
Furthermore, I am assuming that RStudio is the client being used for this assessment. As RStudio can be configured very differently depending on what sort of operating system you are using, please see this RStudio guide on how to switch the version of R being used in RStudio.
NOTE: If you do not want to manually deal with multiple versions of R on your system, I suggest checking out the great Rust tool, rig which allows you to have multiple R versions on the same machine simultaneously and switch between them seamlessly.
For Windows only users, one will need to download the tool RTools42. To do this, click this link which will download the installer. Execute the installer and follow the instructions there. Make sure after you have installed the tool, restart RStudio if it is running on your computer!
Java is required to be installed for this to work. In practical deployment, I have found Java 1.8 to be sufficient for assessments:
I have left out specific installation instructions for which executable to use due to the instructions and types differing between operating systems.
For this tutorial, you will need the renv
package installed into your main R environment (for more information about this package, refer to the Appendix).
This can be done via:
install.packages("renv")
NOTE: For steps 2, 3 and 4, RStudio may have already done or attempted to do this for you. If it did, you may not see anything when you run these steps in the console.
Then, from within RStudio, navigate to the folder MentalHealthEquity/study
.
Within that directory, do the following steps within the RStudio console:
MentalHealthEquity
folder or run devtools::load_all()
to load the packagerenv
package: library(renv)
renv
environment: renv::activate()
renv::restore()
and accepting The following code block shows how this would run:
library(renv) renv::activate() renv::restore()
If everything worked correctly up to this point, you should be prepared to run the study!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.