Mercurial > repos > mingchen0919 > elastic_expose_data
comparison list_render.R @ 7:23cbb0daf18d draft default tip
planemo upload commit d1d9c6fc42729b4194adac13d1b71062bf19ad0b-dirty
author | mingchen0919 |
---|---|
date | Mon, 02 Apr 2018 10:53:05 -0400 |
parents | 4f9f1e76f7e6 |
children |
comparison
equal
deleted
inserted
replaced
6:52ecc1cfd205 | 7:23cbb0daf18d |
---|---|
17 | 17 |
18 #------------------------------------------------ | 18 #------------------------------------------------ |
19 # create three folders within working directory | 19 # create three folders within working directory |
20 dir.create('list') | 20 dir.create('list') |
21 | 21 |
22 job_working_dir = getwd() | 22 # job_working_dir = getwd() |
23 list_path = paste0(job_working_dir, '/list/') | 23 # list_path = paste0(job_working_dir, '/list/') |
24 | 24 |
25 #-----------------render Rmd-------------- | 25 #-----------------render Rmd-------------- |
26 # copy R markdown file to working directory and render it within the working directory. | 26 # copy R markdown file to working directory and render it within the working directory. |
27 render(paste0(Sys.getenv('TOOL_INSTALL_DIR'), '/list.Rmd'), | 27 render(paste0(Sys.getenv('TOOL_INSTALL_DIR'), '/list.Rmd'), |
28 output_file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/report.html')) | 28 output_file = paste0(Sys.getenv('REPORT_FILES_PATH'), '/report.html')) |
30 # for some unknow reason, directly using REPORT as the input value for output_file parameter | 30 # for some unknow reason, directly using REPORT as the input value for output_file parameter |
31 # in the render function can cause empty report file when the tool runs in batch mode. | 31 # in the render function can cause empty report file when the tool runs in batch mode. |
32 # the solution is to render the rmarkdown to a explicitly specified file and then copy the | 32 # the solution is to render the rmarkdown to a explicitly specified file and then copy the |
33 # file to ${REPORT} | 33 # file to ${REPORT} |
34 system(command = 'cp ${REPORT_FILES_PATH}/report.html ${REPORT}') | 34 system(command = 'cp ${REPORT_FILES_PATH}/report.html ${REPORT}') |
35 # system(command = 'sh ${REPORT_FILES_PATH}/script.sh') | 35 system(command = 'sh ${REPORT_FILES_PATH}/script.sh') |
36 #------------------------------------------ | 36 #------------------------------------------ |
37 | 37 |
38 | 38 |
39 ##--------end of code rendering .Rmd templates---------------- | 39 ##--------end of code rendering .Rmd templates---------------- |
40 sink() | 40 sink() |