Mercurial > repos > mnhn65mo > tabular_to_csv
view tab2csv.R @ 1:f1b7d0032530 draft default tip
Uploaded
author | ylebras |
---|---|
date | Tue, 11 Sep 2018 10:37:13 -0400 |
parents | 659820e2aa61 |
children |
line wrap: on
line source
#!/usr/bin/env Rscript #Read csv - return tabular #2 Options for now : sep an header args = commandArgs(trailingOnly=TRUE) if(args[3]=="TRUE"){ tabular<-read.table(args[1],sep="\t",header=TRUE) write.table(tabular,"out.csv",sep=args[2],row.names=FALSE) }else{ tabular<-read.table(args[1],sep="\t",header=FALSE) write.table(tabular,"out.csv",sep=args[2],col.names=FALSE,row.names=FALSE) }