[R] separate commands by semicolon

Adrian Dușa dusa.adrian at unibuc.ro
Thu Sep 15 21:08:41 CEST 2016


Dear R-helpers,

When parsing a text, I would like to separate commands written on the same
line, by a semicolon.
Something like:

x <- "foo <- '3;4'; bar <- \"don't ; use semicolons\""

Ideally, that would translate to these two commands in a character vector
of length 2:
foo <- '3;4'
bar <- "don't ; use semicolons"

It's probably a regexp magic, but I just can't find it.

Any hint is highly appreciated,
Adrian

-- 
Adrian Dusa
University of Bucharest
Romanian Social Data Archive
Soseaua Panduri nr.90
050663 Bucharest sector 5
Romania

	[[alternative HTML version deleted]]



More information about the R-help mailing list