i have the flowing text string:
string <- "['CBOE SHORT-TERM VIX FUTURE DEC 2016', 81.64],\n\n ['CBOE SHORT-TERM VIX FUTURE JAN 2017', 18.36]"
is there a simple way of extracting numerical elements from text without having to use:
string_table <- strsplit(string, " ")
and then select n-th element and continue to strsplit
until i have what i need.
the result should be:
result <- c(2016, 81, 64, 2017, 18, 36)
thank you.