Re: Problem using R's table package with knitr.

2013-06-04 Thread Liviu Andronic
On Mon, Jun 3, 2013 at 10:45 PM, Yihui Xie x...@yihui.name wrote: You should not print booktabs() in a chunk with results='asis', because that will generate invalid LaTeX code in the output. You can use invisible(booktabs()) or foo - booktabs() to avoid printing. Or request Duncan (the

Re: Problem using R's table package with knitr.

2013-06-04 Thread Yihui Xie
But John needs the LaTeX table output in the next line of R code; include=FALSE will exclude everything in that chunk. Moving booktabs() to the previous chunk and using include=FALSE there will be fine. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name

Re: Problem using R's table package with knitr.

2013-06-04 Thread John Kane
Thanks Yihui.  I understood the invisible(booktabs()) after a bit of thought, but not Liviu's comment.  Using his approach,  could I run booktabs ina earlier chunk? From: Yihui Xie x...@yihui.name To: Liviu Andronic landronim...@gmail.com Cc: John Kane

Re: Problem using R's table package with knitr.

2013-06-04 Thread Liviu Andronic
On Tue, Jun 4, 2013 at 5:33 PM, John Kane jrkrid...@yahoo.ca wrote: Thanks Yihui. I understood the invisible(booktabs()) after a bit of thought, but not Liviu's comment. Using his approach, could I run booktabs ina earlier chunk? Yes. You can do: include=F= booktabs() @ Then

Re: Problem using R's table package with knitr.

2013-06-04 Thread Yihui Xie
That is right. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Jun 4, 2013 at 8:49 AM, Liviu Andronic landronim...@gmail.com wrote: On Tue, Jun 4, 2013 at 5:33 PM,

Re: Problem using R's table package with knitr.

2013-06-04 Thread John Kane
Thanks.  I may be getting some glimmer of how all this holds together.  Now if I could just figure out what a chunk_option does I'm almost ready for kniter nursery school. From: Liviu Andronic landronim...@gmail.com To: John Kane jrkrid...@yahoo.ca Cc:

Re: Problem using R's table package with knitr.

2013-06-04 Thread Scott Kostyshak
On Tue, Jun 4, 2013 at 1:25 PM, John Kane jrkrid...@yahoo.ca wrote: Thanks. I may be getting some glimmer of how all this holds together. Now if I could just figure out what a chunk_option does I'm almost ready for kniter nursery school. See here: http://yihui.name/knitr/options And once

Re: Problem using R's table package with knitr.

2013-06-04 Thread Liviu Andronic
On Mon, Jun 3, 2013 at 10:45 PM, Yihui Xie x...@yihui.name wrote: You should not print booktabs() in a chunk with results='asis', because that will generate invalid LaTeX code in the output. You can use invisible(booktabs()) or foo - booktabs() to avoid printing. Or request Duncan (the

Re: Problem using R's table package with knitr.

2013-06-04 Thread Yihui Xie
But John needs the LaTeX table output in the next line of R code; include=FALSE will exclude everything in that chunk. Moving booktabs() to the previous chunk and using include=FALSE there will be fine. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name

Re: Problem using R's table package with knitr.

2013-06-04 Thread John Kane
Thanks Yihui.  I understood the invisible(booktabs()) after a bit of thought, but not Liviu's comment.  Using his approach,  could I run booktabs ina earlier chunk? From: Yihui Xie x...@yihui.name To: Liviu Andronic landronim...@gmail.com Cc: John Kane

Re: Problem using R's table package with knitr.

2013-06-04 Thread Liviu Andronic
On Tue, Jun 4, 2013 at 5:33 PM, John Kane jrkrid...@yahoo.ca wrote: Thanks Yihui. I understood the invisible(booktabs()) after a bit of thought, but not Liviu's comment. Using his approach, could I run booktabs ina earlier chunk? Yes. You can do: include=F= booktabs() @ Then

Re: Problem using R's table package with knitr.

2013-06-04 Thread Yihui Xie
That is right. Regards, Yihui -- Yihui Xie xieyi...@gmail.com Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Jun 4, 2013 at 8:49 AM, Liviu Andronic landronim...@gmail.com wrote: On Tue, Jun 4, 2013 at 5:33 PM,

Re: Problem using R's table package with knitr.

2013-06-04 Thread John Kane
Thanks.  I may be getting some glimmer of how all this holds together.  Now if I could just figure out what a chunk_option does I'm almost ready for kniter nursery school. From: Liviu Andronic landronim...@gmail.com To: John Kane jrkrid...@yahoo.ca Cc:

Re: Problem using R's table package with knitr.

2013-06-04 Thread Scott Kostyshak
On Tue, Jun 4, 2013 at 1:25 PM, John Kane jrkrid...@yahoo.ca wrote: Thanks. I may be getting some glimmer of how all this holds together. Now if I could just figure out what a chunk_option does I'm almost ready for kniter nursery school. See here: http://yihui.name/knitr/options And once

Re: Problem using R's table package with knitr.

2013-06-04 Thread Liviu Andronic
On Mon, Jun 3, 2013 at 10:45 PM, Yihui Xie wrote: > You should not print booktabs() in a chunk with results='asis', > because that will generate invalid LaTeX code in the output. You can > use invisible(booktabs()) or foo <- booktabs() to avoid printing. > > Or request Duncan

Re: Problem using R's table package with knitr.

2013-06-04 Thread Yihui Xie
But John needs the LaTeX table output in the next line of R code; include=FALSE will exclude everything in that chunk. Moving booktabs() to the previous chunk and using include=FALSE there will be fine. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name

Re: Problem using R's table package with knitr.

2013-06-04 Thread John Kane
Thanks Yihui.  I understood the invisible(booktabs()) after a bit of thought, but not Liviu's comment.  Using his approach,  could I run booktabs ina earlier chunk? From: Yihui Xie To: Liviu Andronic Cc: John Kane

Re: Problem using R's table package with knitr.

2013-06-04 Thread Liviu Andronic
On Tue, Jun 4, 2013 at 5:33 PM, John Kane wrote: > Thanks Yihui. I understood the invisible(booktabs()) after a bit of > thought, but not Liviu's comment. Using his approach, could I run booktabs > ina earlier chunk? > Yes. You can do:

Re: Problem using R's table package with knitr.

2013-06-04 Thread Yihui Xie
That is right. Regards, Yihui -- Yihui Xie Phone: 515-294-2465 Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Tue, Jun 4, 2013 at 8:49 AM, Liviu Andronic wrote: > On Tue, Jun 4, 2013 at 5:33

Re: Problem using R's table package with knitr.

2013-06-04 Thread John Kane
Thanks.  I may be getting some glimmer of how all this holds together.  Now if I could just figure out what a chunk_option does I'm almost ready for kniter nursery school. From: Liviu Andronic To: John Kane

Re: Problem using R's table package with knitr.

2013-06-04 Thread Scott Kostyshak
On Tue, Jun 4, 2013 at 1:25 PM, John Kane wrote: > Thanks. I may be getting some glimmer of how all this holds together. Now > if I could just figure out what a chunk_option does I'm almost ready for > kniter nursery school. See here: http://yihui.name/knitr/options And