comparison xlsx2tab.R @ 6:aa529f924b86 draft

Uploaded
author ylebras
date Tue, 04 Dec 2018 20:15:41 -0500
parents 97c4e2e4f07e
children 25b2fb62d16a
comparison
equal deleted inserted replaced
5:5251f7e929a6 6:aa529f924b86
2 #Read Xlsx sheets - return tabular 2 #Read Xlsx sheets - return tabular
3 library(readxl) 3 library(readxl)
4 4
5 args = commandArgs(trailingOnly=TRUE) 5 args = commandArgs(trailingOnly=TRUE)
6 6
7 file.rename(args[1],"input.xlsx") 7 newname<-args[1]+".xlsx"
8 sheet<-read_excel("input.xlsx",sheet=args[2]) 8 file.rename(args[1],newname)
9 sheet<-read_excel(newname,sheet=args[2])
9 write.table(sheet,"out.tabular",sep="\t",row.names=FALSE) 10 write.table(sheet,"out.tabular",sep="\t",row.names=FALSE)
10 11
11 } 12 }
12 13