Mercurial > repos > ylebras > xls2tabular
annotate xlsx2tab.R @ 8:0dc610053f6d draft
Uploaded
author | ylebras |
---|---|
date | Tue, 04 Dec 2018 20:26:44 -0500 |
parents | 25b2fb62d16a |
children | 74d5dc8f7465 |
rev | line source |
---|---|
1 | 1 #!/usr/bin/env Rscript |
2 #Read Xlsx sheets - return tabular | |
3 library(readxl) | |
4 | |
5 args = commandArgs(trailingOnly=TRUE) | |
6 | |
7 | 7 newname<-paste(args[1], "xlsx", sep=".") |
8 | 8 file.copy(args[1],newname, overwrite=TRUE) |
6 | 9 sheet<-read_excel(newname,sheet=args[2]) |
1 | 10 write.table(sheet,"out.tabular",sep="\t",row.names=FALSE) |
11 | |
12 } | |
13 |