powered by
Split a string based on whitespace ignore single- and double quoted entries
str_to_opts(x = character())
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.
A character array that could be similar to that provided by commandArgs.
commandArgs
base::commandArgs()
# NOT RUN { # } # NOT RUN { str <- 'cmd -t "Say Anything" --character \'Lloyd Dobler\'' str_to_opts(str) split_ws_nonquote(str) # } # NOT RUN { # }
Run the code above in your browser using DataLab