print_help: Printing an usage message from an OptionParser object

Description Usage Arguments Examples

View source: R/cli.R

Description

Modifed from print_help

Usage

1
2
print_help(object, help_order = c("description", "usage", "options",
  "subcmds", "epilogue"))

Arguments

object

A opt_parser instance.

help_order

The order to print the help message ['description', 'usage', 'options', 'subcmds', 'epilogue']

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
option_list <- list(
  make_option(c('-l', '--list-all-subcmds'), action = 'store_true', 
  default = FALSE, help = 'Print all supported subcmds of ngsjs.')
)
subcmds_list <- list(subcmd1 = 'Use method 1 to plot boxplot', 
                     subcmd2 = 'Use method 2 to plot boxplot')
description <- 'Method to plot boxplot'
usage <- 'usage: %prog [options] [params]'
opt_parser_obj <- opt_parser(subcmds_list = subcmds_list, 
                            option_list = option_list,
                            description = description,
                            usage = usage)
print_help(opt_parser_obj)

JhuangLab/ngstk documentation built on May 28, 2019, 12:43 p.m.