code/01_make_output.R
- generates regression model table and boxplots
- saves the table as
.rdsobject and boxplots as.pnginoutput/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
Makefilecontains rules for building the report
make final_report.htmlwill generate the final reportmake .outputswill generate the.rdsand.pngfiles needed to compile the reportmake cleanwill clean all outputsmake installwill synchronize project-specific packages using the lockfilemake final_project_imagewill build the docker imagemake report/final_report.htmlwill automatically generate the final report for the project
renvassociated files:
renv.lockstores the packages information associated specifically with this project.Rprofilereads R code fromrenv/activate.Rfilerenv/activate.Ris a script file to activate the project-specific environmentrenv/setting.jsonis a configuration file to store project-specific settings and preferences
Dockerfilespecifies the environment and configuration needed to build the docker image for automated report construction
-
To check if you have the
renvpackage installed- Run
"renv" %in% row.names(installed.packages())in your R console - If the above command returns
FALSE, install therenvpackage usinginstall.packages('renv')
- Run
-
In your R console, use
setwdandgetwdto confirm that the current working directory in the R console is the project directory -
Use
make installrule for restoring the package environment for the project
- In terminal, use
make final_project_imagerule which runsdocker buildto build your own docker image for this project
-
For Mac users, use
make report/final_report.htmlrule in terminal directly, of which will executedocker runto automate the final report building process;
for Windows users, modify themake report/final_report.htmlrule by using"/$$(pwd)"/report:/project/reportinstead 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