I have the following string and I need to have this characters without "\" and an extra pair of "".
So every element of this string looks like "\"USD:US dollar\"", while I should have "USD:US dollar".
This below is the string.
string = c("\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"TO1:Total (all currencies)\"", "\"TO1:Total (all currencies)\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"", "\"USD:US dollar\"", "\"USD:US dollar\"",
"\"USD:US dollar\"")
How can I have clean character elements?
\character in the strings, as far as I can see. Instead you’re seeing"characters, which are shown as escaped, i.e. as\". This doesn’t cause problems when actually handling or displaying the strings, it’s merely shown when the strings are displayed via (implicit)print.