Mercurial > repos > ylebras > xls2tabular
annotate xlsx2tab.R @ 11:a2192c7dba81 draft
Uploaded
| author | ylebras |
|---|---|
| date | Wed, 05 Dec 2018 15:33:36 -0500 |
| parents | 74d5dc8f7465 |
| children | 6faa8b922ac4 |
| 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 | |
| 9 | 7 #newname<-paste(args[1], "xlsx", sep=".") |
| 8 #file.copy(args[1],newname, overwrite=TRUE) | |
| 9 #sheet<-read_excel(newname,sheet=args[2]) | |
| 10 sheet<-read_excel(args[1],sheet=args[2]) | |
| 1 | 11 write.table(sheet,"out.tabular",sep="\t",row.names=FALSE) |
| 12 | |
| 13 } | |
| 14 |
