Could you tell me please, why there is an empty element in the vector after parsing a string?
What I enter:
a <- "--key1 = value1 --key2 = value2 --key3 = value3 --switch.1 --switch.2"
unlist(strsplit(a, split = "--"))
What I get:
[1] "" "key1 = value1 " "key2 = value2 " "key3 = value3 "
[5] "switch.1 " "switch.2"
And one more question: is it posible to choose only those elements from the vector, that have "=" (any certain letter) in them?
Thank you in advance!