Skip to content

Sweave

5 messages · Kjetil Halvorsen, Cameron Bracken, Duncan Murdoch +1 more

1 day later
#
Kjetil Halvorsen wrote:
You may have to escape the # character (i.e. put \# instead).  I know this
must be done for backslashes.
#
cameron.bracken wrote:
That shouldn't be a problem in Sweave, and in fact "\#" will give a 
warning. I missed the start of the thread, but if the problem is about 
how some editor handles Sweave, then that's a bug in the editor.

Duncan Murdoch
#
On Wed, 4 Feb 2009, Duncan Murdoch wrote:

            
Indeed.

Looking back at the original post:

-----quote----
\begin{figure}
   \centering
   <<label=fig1,fig=TRUE,echo=TRUE>>=
  bubble(NURE.orig, "ppm", col = c("#00ff0088", "#00ff0088"))
@
\caption{Contenido de uranio (ppm)}

-----end quote-----

The user's editor indented the line that would have begun the code chunk 
had it not been indented.

"Code chunks start with <<name >>= at the beginning of a line..." - Sweave 
manual.

So, the supposed code chunk is treated as LaTeX.

Chuck
Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901