From vdergachev at rcgardis.com  Tue May 22 22:01:25 2007
From: vdergachev at rcgardis.com (Vladimir Dergachev)
Date: Tue, 22 May 2007 16:01:25 -0400
Subject: [Rd] inline C/C++ in R: question and suggestion
In-Reply-To: <46534A0A.6050508@stats.uwo.ca>
References: <46532F64.9030203@ebi.ac.uk> <46534A0A.6050508@stats.uwo.ca>
Message-ID: <200705221601.25573.vdergachev@rcgardis.com>

On Tuesday 22 May 2007 3:52 pm, Duncan Murdoch wrote:
> On 5/22/2007 1:59 PM, Oleg Sklyar wrote:
>
> One suggestion that probably doesn't affect your package:  It would be
> even nicer if R incorporated something that Duncan Temple Lang suggested
> last year, namely a new kind of quoting that didn't need escapes in the
> string.  He suggested borrowing triple quotes from Python; I suggested
> something more like heredocs as in shells or Perl, or like \verb in TeX,
> in case you wanted triple quotes in your C function.  It would be nice
> to settle on something, so that instead of
>

I second that. My favorite implementation of this is in Tcl, where curly 
braces {} mean that the text they enclose is unmodified. Since language 
constructs using them are normally balanced this is not an impediment.

One extremely useful application of this (aside from long strings) is 
specifying inline data frames - I don't know how to do this otherwise.

I.e. something like:

A<- scan.string({#
Id Value Mark
1	a	3
2	b	4
#	})

                          best

                              Vladimir Dergachev



[Rd] inline C/C++ in R: question and suggestion
Vladimir Dergachev