comparison xlsx2tab.R @ 9:74d5dc8f7465 draft

Uploaded
author ylebras
date Wed, 05 Dec 2018 15:30:12 -0500
parents 0dc610053f6d
children 6faa8b922ac4
comparison
equal deleted inserted replaced
8:0dc610053f6d 9:74d5dc8f7465
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 newname<-paste(args[1], "xlsx", sep=".") 7 #newname<-paste(args[1], "xlsx", sep=".")
8 file.copy(args[1],newname, overwrite=TRUE) 8 #file.copy(args[1],newname, overwrite=TRUE)
9 sheet<-read_excel(newname,sheet=args[2]) 9 #sheet<-read_excel(newname,sheet=args[2])
10 sheet<-read_excel(args[1],sheet=args[2])
10 write.table(sheet,"out.tabular",sep="\t",row.names=FALSE) 11 write.table(sheet,"out.tabular",sep="\t",row.names=FALSE)
11 12
12 } 13 }
13 14