Split character string in two parts
splitin2.Rd
splitin2
splints a character
string into a two-element data.frame
containing a number and a string, in this order.
Details
Function splitin2
has been written to allow splitting string from CENTURY files into
two parts. Input 'x' must be a single character
string containing either a number and a
text (e.g. "45 dd")
Examples
# See the difference when 'input_type' changes value.
str(splitin2("4.5 'This'", "data"))
#> Error in splitin2("4.5 'This'", "data"): could not find function "splitin2"
str(splitin2("45 'This'", "title"))
#> Error in splitin2("45 'This'", "title"): could not find function "splitin2"
# We set 'remove_quotes' to FALSE.
str(splitin2("4.5 'This'", "data", FALSE))
#> Error in splitin2("4.5 'This'", "data", FALSE): could not find function "splitin2"
str(splitin2("45 'This'", "title", FALSE))
#> Error in splitin2("45 'This'", "title", FALSE): could not find function "splitin2"