comparison tab2csv.R @ 1:f1b7d0032530 draft default tip

Uploaded
author ylebras
date Tue, 11 Sep 2018 10:37:13 -0400
parents 659820e2aa61
children
comparison
equal deleted inserted replaced
0:659820e2aa61 1:f1b7d0032530
4 4
5 args = commandArgs(trailingOnly=TRUE) 5 args = commandArgs(trailingOnly=TRUE)
6 6
7 if(args[3]=="TRUE"){ 7 if(args[3]=="TRUE"){
8 tabular<-read.table(args[1],sep="\t",header=TRUE) 8 tabular<-read.table(args[1],sep="\t",header=TRUE)
9 write.tale(tabular,"out.csv",sep=args[2],row.names=FALSE) 9 write.table(tabular,"out.csv",sep=args[2],row.names=FALSE)
10 }else{ 10 }else{
11 tabular<-read.table(args[1],sep="\t",header=FALSE) 11 tabular<-read.table(args[1],sep="\t",header=FALSE)
12 write.table(tabular,"out.csv",sep=args[2],col.names=FALSE,row.names=FALSE) 12 write.table(tabular,"out.csv",sep=args[2],col.names=FALSE,row.names=FALSE)
13 } 13 }
14 14