Welcome~~
This repository contains the code and data for analyzing Alzheimer's disease data.
- Since it is a rather big dataset file, Github doesn't allow me to upload it straight in CVS format.
I upload the first 250 rows dataset file, it might alter the result from the word summary.
OR
- You can download it straight from the Kaggle website:
https://www.kaggle.com/datasets/amitvkulkarni/aging-and-memory-alzheimers-statistics?resource=download
To set up the R package environment, you need to restore the package state with renv to ensure reproducibility. Here’s how to do it:
-
Ensure you have R and
renvinstalled on your system. Ifrenvis not installed, you can install it by runninginstall.packages("renv")in R. -
Run the following command in the terminal within the project directory:
make install
This command uses renv to install all necessary packages as specified in the renv.lock file.
To build the Docker image, you need to have Docker installed on your machine. Once installed, you can build the image by running the following command from the root directory of this project:
docker build -t sabrinayan0229/data550_final .The report is generated by running the Docker container, which executes an R script to analyze data and produce a report. To run this process, use the make command specified in the Makefile:
make run-report
run-report:
docker run -v $(PWD)/report:/usr/src/app/report sabrinayan0229/data550_finaldata/: Contains the dataset fileAlzheimers_Disease_Healthy_Aging_data.csv.code/: Contains the R scripts for analysis, generating tables, and figures.analysis.R: Main analysis script.table.R: Script for generating the required table.figure.R: Script for generating the required figure.
report/: Contains the R Markdown file for the final report.Makefile: Contains rules for building the final report and managing dependencies withrenv.Dockerfile: Contains all commands needed to build the Docker image.
To generate the final report, follow these steps:
- Clone the repository.
- Open a terminal and navigate to the project directory.
- Run the command
make allto execute the analysis and generate the report. - The generated report will be saved as
report/report.html.
- The code for creating the required table is located in
code/table.R. - The code for creating the required figure is located in
code/figure.R.