view collection_list.Rmd @ 3:cb6efa0f0cb6 draft

planemo upload for repository https://github.com/statonlab/docker-GRReport/tree/master/my_tools/rmarkdown_collection_builder commit 93b036c66fd754a7af459fa80d3f7f143a68477b-dirty
author mingchen0919
date Mon, 25 Sep 2017 16:33:54 -0400
parents 6be61cb4a1d5
children 63e9500cdeec
line wrap: on
line source

---
title: 'Collection builder (collection type: list)'
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)
```


```{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))
```

# End

```{r 'test'}
ls()
```