Setup

To prepare to follow along, you will need to have the datasets downloaded, some spreadsheet program (e.g., Excel), and a programming language (e.g., R) installed. See the below sections for how to get everything set up

Datasets

You can find all the datasets needed from the workshop from the book’s GitHub Page:

https://github.com/chendaniely/ds4biomed

You can click on the “Code” dropdown and select “Download Zip” to download the data and files for the lesson materials.

Spreadsheet

Microsoft Excel and Google Sheets are the more common types of spreadsheet software used. If you do not have Excel, there are other free options availiable:

All of these programs can read and write Excel and comma delineated (CSV) files, which you can use to follow along.

Programming language

Below you will find the installation instructions for setting up the programming language we will be using (e.g., R) along with its programming environment (e.g., RStudio)

R

We will be using R and RStudio for the workshop. If you would like a video installation tutorial, please see the R section of The Carpentries workshop template .

The links to install R can be found here: https://cloud.r-project.org/. Navigate to the correct operating system.

Screenshot of the "Download and Install R" section.

Figure 0.3: Screenshot of the “Download and Install R” section.

For mac users, download the .pkg file under the “Latest release” section

Section of the Mac download page to download the Mac .pkg file.

Figure 0.4: Section of the Mac download page to download the Mac .pkg file.

For Windows users, please install both the base version as well as Rtools.

Section of the Windows download page to download both the base and Rtools installers.

Figure 0.5: Section of the Windows download page to download both the base and Rtools installers.

RStudio

After you have installed R, you can install RStudio. We will use RStudio as the integrated development environment (IDE) to write and work with R code. Rstudio can be downloaded from the following location: https://rstudio.com/products/rstudio/download/

Installing R packages

Once we have Within RStudio, there will be a “Packages” tab in the bottom right panel. Click on the “Install” button.

Zoom of the Rstudio Packages tab in the bottom right quadrant showing the Install button.

Figure 0.6: Zoom of the Rstudio Packages tab in the bottom right quadrant showing the Install button.

In the pop-up window type in “tidyverse” and click “install.”

Install Packages dialog box after clicking the Install button showing how to install tidyverse library.

Figure 0.7: Install Packages dialog box after clicking the Install button showing how to install tidyverse library.

The Console section of RStudio will begin installing the “tidyverse” package we will be using.

Testing your installation

When the installation is finished, you can check if the package was installed properly and will load by scrolling down the “Packages” tab and clicking the checkbox next to “tidyverse.”

RStudio Packages tab in the bottom right quadrant with the tidyverse library checked off.

Figure 0.8: RStudio Packages tab in the bottom right quadrant with the tidyverse library checked off.

Binder

You can click one of the Binder badges to launch a programming environment for you in the cloud.

R + RStudio

You may click one of the RStudio Binder badges to launch an RStudio instance.

  • RStudio (complete): Binder
    • This may take a longer time to load, but everything should be set up.
  • RStudio (partial): Binder
    • This may take less time to load, but you need to install some more packages on your own and download the lesson datasets.

To setup the partial RStudio environment, you need to run the following commands in the bottom left “Console” panel.

install.packages("remotes")
Screenshot of running install.packages("remotes").

Figure 0.9: Screenshot of running install.packages(“remotes”).

Then type the following to install the medicaldata package for some of the medical datasets we will be using.

remotes::install_github("higgi13425/medicaldata")
Screenshot of running remotes::install_github("higgi13425/medicaldata").

Figure 0.10: Screenshot of running remotes::install_github(“higgi13425/medicaldata”).

To download the data files go to the top right corner and click the Project (None) drop down, and select New Project...

Screenshot of creating a new RStudio project.

Figure 0.11: Screenshot of creating a new RStudio project.

Then select Version Control > Git and paste in https://github.com/chendaniely/ds4biomed.git for the Repository URL. You can leave the rest of the parameters as their defaults, and then click Create Project.

Screenshot of the Clone Git Repository page.

Figure 0.12: Screenshot of the Clone Git Repository page.

When this process finishes, the bottom right quadrant’s “File” tab should show the ds4biomed folder and you should see the data folder listed.

Screenshot showing the folders after downloading the lesson materials.

Figure 0.13: Screenshot showing the folders after downloading the lesson materials.