[R] Sweave rendering of simple character
Duncan Murdoch
murdoch at stats.uwo.ca
Sat Sep 1 01:34:01 CEST 2007
Deepayan Sarkar wrote:
> On 8/31/07, Ken Knoblauch <knoblauch at lyon.inserm.fr> wrote:
>
>> Hi,
>>
>> When I compile the construction
>>
>> \begin{Scode}{eval=FALSE}
>> ?HSP
>> \end{Scode}
>>
>> with Sweave and latex, it outputs in the pdf as,
>>
>> > `?` (HSP)
>>
>> which is not incorrect but a bit more formal than I wanted
>> for demonstrating the use of the help shortcut.
>> I would like the output to look like,
>>
>>
>>> ?HSP
>>>
>> but I can't seem to make this work.
>>
>
> I'm not familiar with the Scode environment, but
>
>
> <<eval=FALSE,keep.source=TRUE>>=
> ?HSP
> @
>
>
> does what you want.
>
Like Deepayan, I also use <<>>= notation, but this probably works
anywhere: put keep.source=TRUE in your \SweaveOpts{} at the start of
the file.
Duncan Murdoch
More information about the R-help
mailing list