comparison xlsx2tab.R @ 16:ca89facf5125 draft

Uploaded
author ylebras
date Wed, 05 Dec 2018 15:56:48 -0500
parents 6faa8b922ac4
children
comparison
equal deleted inserted replaced
15:80cce9439f6e 16:ca89facf5125
1 #!/usr/bin/env Rscript 1 #!/usr/bin/env Rscript
2 #Read Xlsx sheets - return tabular 2 #Read xls sheets - return tabular
3 library(readxl) 3 library(readxl)
4 4
5 args = commandArgs(trailingOnly=TRUE) 5 args = commandArgs(trailingOnly=TRUE)
6 6
7 #nfile.copy(args[1],newname, overwrite=TRUE)
8 #sheet<-read_excel(newname,sheet=args[2])
9 sheet<-read_excel(args[1],sheet=args[2]) 7 sheet<-read_excel(args[1],sheet=args[2])
10 write.table(sheet,"out.tabular",sep="\t",row.names=FALSE) 8 write.table(sheet,"out.tabular",sep="\t",row.names=FALSE)
11
12 }
13