美文网首页
2020-07-06 R命令行参数解析

2020-07-06 R命令行参数解析

作者: YPCHEN1992 | 来源:发表于2020-07-06 13:22 被阅读0次
#!/psd/biosoft/anaconda/envs/CNEr/bin/Rscript

suppressMessages(library("poweRlaw"))
suppressMessages(library("getopt"))

spec <- matrix(c("help"  , "h", 0, "logical"  , "print help messages",
                 "input" , "i", 1, "character", "input file in TSV format with header",
                 "title" , "t", 2, "character", "set figure title",
                 "output", "o", 2, "character", "set output pdf name"),
                 byrow = TRUE, ncol = 5)

usage <- function(x) {
        cat("\nA Script ....\n")
        cat("Author:#############\n")
        cat("Date  : 2019-12-14\n")
        cat("Required Packages: poweRlaw, getopt\n\n")
        cat(getopt(x, usage = TRUE))
        q(status = 1)
}
opt = getopt(spec)

相关文章

网友评论

      本文标题:2020-07-06 R命令行参数解析

      本文链接:https://www.haomeiwen.com/subject/llpwqktx.html