str_to_opts: Split a string bases on whitespace

Description Usage Arguments Value Note See Also Examples

View source: R/str_to_opts.R

Description

Split a string based on whitespace ignore single- and double quoted entries

Usage

1

Arguments

x

character; string to parse as if it is a command line

This is an internal function used predominantly for testing. It might be deprecated in the near future.

Value

A character array that could be similar to that provided by commandArgs.

Note

not-exported, by design

See Also

base::commandArgs()

Examples

1
2
3
4
5
6
7
  ## Not run:  
    str <- 'cmd -t "Say Anything" --character \'Lloyd Dobler\''
    str_to_opts(str)
    split_ws_nonquote(str)
  
## End(Not run)
  

decisionpatterns/optigrab documentation built on Jan. 8, 2019, 3:28 a.m.