This repository contains the analysis for the project "Association between Mental Health & Work." The project aims to explore the implications of remote work on employees' mental well-being using a dataset of 5,000 records from various industries and regions.
code/
: Directory containing R scripts used for the analysis.
01_tabular_analysis.R
: Script for generating the summary table.02_figure_generate.R
: Script for creating the figures.03_render_report.R
: Script for rendering the final report.output/
: Directory containing output files.
table_one.rds
: Saved RDS file for the summary table.figure_one.rds
: Saved RDS file for the generated plot.report.Rmd
: R Markdown file for the final report.Makefile
: Makefile for automating the generation of the report and outputs.README.md
: This file, describing the repository contents and instructions.You can generate the final report by running the Makefile, which will execute the necessary scripts to create the required outputs and render the report.
Ensure Required Packages are Installed:
install.packages(c("here", "readr", "ggplot2", "dplyr", "gtsummary", "rmarkdown"))
Run the Makefile:
make
This will execute the following steps:
code/01_tabular_analysis.R
to generate the summary table and save it as output/table_one.rds
.code/02_figure_generate.R
to create the figure and save it as output/figure_one.rds
.code/03_render_report.R
to render the R Markdown file and generate the final report report.html
.View the Final Report:
report.html
to view the final report.