Mercurial > repos > mingchen0919 > one_command_liners
changeset 9:a9f93a4742b1 draft
update
author | mingchen0919 |
---|---|
date | Fri, 23 Feb 2018 15:42:48 -0500 |
parents | ac0c560845dc |
children | 49cabfe55b61 |
files | extract_fields.xml tool_template.Rmd tool_template_render.R |
diffstat | 3 files changed, 16 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/extract_fields.xml Fri Feb 23 14:34:05 2018 -0500 +++ b/extract_fields.xml Fri Feb 23 15:42:48 2018 -0500 @@ -5,6 +5,7 @@ <requirement type="package" version="1.3">r-rmarkdown</requirement> <requirement type="package" version="0.3.5">r-htmltools</requirement> <requirement type="package" version="0.5.0">r-dplyr</requirement> + <requirement type="package" version="v0.9.8">xorg-libxrender</requirement> </requirements> <description>some descriptions about the tool.</description> <stdio>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_template.Rmd Fri Feb 23 15:42:48 2018 -0500 @@ -0,0 +1,14 @@ + +## R Markdown + +This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>. + +When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: + + +## Including Plots + +You can also embed plots, for example: + + +Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
--- a/tool_template_render.R Fri Feb 23 14:34:05 2018 -0500 +++ b/tool_template_render.R Fri Feb 23 15:42:48 2018 -0500 @@ -17,9 +17,6 @@ opt = getopt::getopt(spec_matrix) opt -# build command: awk '{print $1,$2}' > output.txt and run -X_A = paste0(paste0('$', trimws(strsplit(opt$X_A, ',')[[1]])), collapse = ',') -extract_field_command = paste0("awk '{print ", X_A, " }' ", opt$X_B, " > ", opt$X_O) -system(command = extract_field_command) +rmarkdown::render(input = opt$X_t, output_file = opt$X_O) sink()