code/01_make_output.R
- generates regression model table and boxplots
- saves the table as
.rds
object and boxplots as.png
inoutput/
folder
code/02_render_report.R
- renders
final_report.Rmd
final_report.Rmd
- reads regression table generated by
code/01_make_output.R
- reads boxplots generated by
code/01_make_output.R
Makefile
contains rules for building the report
make final_report.html
will generate the final reportmake .outputs
will generate the.rds
and.png
files needed to compile the reportmake clean
will clean all outputsmake install
will synchronize project-specific packages using the lockfilemake final_project_image
will build the docker imagemake report/final_report.html
will automatically generate the final report for the project
renv
associated files:
renv.lock
stores the packages information associated specifically with this project.Rprofile
reads R code fromrenv/activate.R
filerenv/activate.R
is a script file to activate the project-specific environmentrenv/setting.json
is a configuration file to store project-specific settings and preferences
Dockerfile
specifies the environment and configuration needed to build the docker image for automated report construction
-
To check if you have the
renv
package installed- Run
"renv" %in% row.names(installed.packages())
in your R console - If the above command returns
FALSE
, install therenv
package usinginstall.packages('renv')
- Run
-
In your R console, use
setwd
andgetwd
to confirm that the current working directory in the R console is the project directory -
Use
make install
rule for restoring the package environment for the project
- In terminal, use
make final_project_image
rule which runsdocker build
to build your own docker image for this project
-
For Mac users, use
make report/final_report.html
rule in terminal directly, of which will executedocker run
to automate the final report building process;
for Windows users, modify themake report/final_report.html
rule by using"/$$(pwd)"/report:/project/report
instead to specify the mounting path, and then run the rule to automate the final report building process- Here is the link to the Docker image as a public repository on Dockerhub: https://hub.docker.com/repository/docker/ellaxshen7/final_project/general