powered by
retrieve lines of text between '@examples' and matching curly braces
balanceCurly(v)
returns lines of text between '@examples' and matching curly braces
character vector
v<-c("@examples{","xxx","}","{","{") x<-balanceCurly(v) cat(x,sep="\n")
Run the code above in your browser using DataLab