diff tool_template_render.R @ 9:a9f93a4742b1 draft

update
author mingchen0919
date Fri, 23 Feb 2018 15:42:48 -0500
parents ac0c560845dc
children 670e1591cc65
line wrap: on
line diff
--- 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()