From: Duncan Murdoch <murdoch.duncan at gmail.com>
To: Felipe Carrillo <mazatlanmexico at yahoo.com>
Cc: r-help at stat.math.ethz.ch
Sent: Mon, July 12, 2010 2:18:15 PM
Subject: Re: [R] How to select the column header with \Sexpr{}
On 12/07/2010 5:10 PM, Felipe Carrillo wrote:
Hi:
Since I work with a few different fish runs my column headers change
I start a new Year. I have been using \Sexpr{} for my row and columns and now
I am trying to use with my report column headers. \Sexpr{1,1} is row 1 column 1,
what can I use for headers? I tried \Sexpr{0,1} but sweave didn't like
\Sexpr takes an R expression, and inserts the first element of the result into
your text.? Using just "0,1" (not including the quotes) is not a valid R
expression.
You need to use paste() or some other function to construct the label you want
to put in place, e.g. \Sexpr{paste(0,1,sep=",")} will give you "0,1".
Duncan Murdoch