Mercurial > repos > mingchen0919 > rmarkdown_collection_builder
view collection_list.Rmd @ 8:f555686ca340 draft default tip
planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 88ca36a41aa577ba888cee39cf81b176bf7e68db-dirty
author | mingchen0919 |
---|---|
date | Tue, 26 Sep 2017 16:22:18 -0400 |
parents | a0c8b2b25774 |
children |
line wrap: on
line source
--- title: 'Build collection: a list of datasets' output: html_document: number_sections: true toc: true theme: cosmo highlight: tango --- ```{r setup, include=FALSE, warning=FALSE, message=FALSE} knitr::opts_chunk$set( echo = ECHO ) ``` # Command line arguments ```{r 'command line arguments'} str(opt) ``` # Rename files ```{r 'rename files'} # create directory dir.create('./files_directory') # get full paths of original files from_files = strsplit("FILE_LIST", ',')[[1]] # copy files to the created directory. file.copy(from_files, './files_directory') # get original file names original_files = list.files('./files_directory') # create new files names from original file names new_files = gsub('\\.dat', '\\.FORMAT', original_files) # rename files file.copy(paste0('./files_directory/', original_files), paste0('./files_directory/', new_files)) ```