[R] How do I parse embedded quotes?

Andre Mikulec andre_mikulec at hotmail.com
Tue Jan 26 16:44:12 CET 2016


I want embedded quotes to be parsed.  I can not figure out hot to do that.   I want to this to be parsable.

"'"a"'"

In a simpler case, "'a'" is parsable.

> eval(parse(text="\"'a'\""))
[1] "'a'"


But I want to parse embedded quotes
So, I want to parse '"a"' and not just 'a'

> eval(parse(text="\"'\"a\"'\""))
Error in parse(text = "\"'\"a\"'\"") : <text>:1:4: unexpected symbol
1: "'"a


I keep getting that(above) error.
Any ideas would much be appreciated.


Thanks,
Andre Mikulec
Andre_Mikulec at Hotmail.com 		 	   		  


More information about the R-help mailing list