Re: Lyx file format for tables

2019-05-22 Thread Paul Smith
On Wed, May 22, 2019 at 7:13 PM Rich Shepard  wrote:
>
> > Thanks, Rich and Jean-Marc. I am feelling, from what you both say, that I
> > need to study better knitr, and I am going to do so.
>
> Docs I have sent off the mail list.

Got them. Awesome! Thanks, Rich!

Paul


Re: Lyx file format for tables

2019-05-22 Thread Rich Shepard

On Wed, 22 May 2019, Paul Smith wrote:


Thanks, Rich and Jean-Marc. I am feelling, from what you both say, that I
need to study better knitr, and I am going to do so.


Paul,

Docs I have sent off the mail list.

Rich



Re: Lyx file format for tables

2019-05-22 Thread Paul Smith
On Wed, May 22, 2019 at 6:08 PM Jean-Marc Lasgouttes  wrote:
>
> > Where can one find the specifications of the LyX file format for tables?
> >
> > The reason why I am asking that is because I have a bunch of tables
> > that I want to export from R to a single LyX document, and the
> > approach I am considering is to produce in R a text file in LyX format
> > with all my tables inserted.
>
> An approach would be to use Sweave or knitr to include R code in your
> document that will be replaced by the nice tables you need.

Thanks, Rich and Jean-Marc. I am feelling, from what you both say,
that I need to study better knitr, and I am going to do so.

Paul


Re: Lyx file format for tables

2019-05-22 Thread Rich Shepard

On Wed, 22 May 2019, Paul Smith wrote:


Regarding your other idea -- using xtable() or ktable -- I guess it is not
very practical in my case, as I have too many table (about 50 tables), and
therefore I would like to insert all of them in their right place in the
LyX document, to avoid the work of copying and pasting 50 times!


Paul,

Will writing the document in LyX with the knitr package produce the tables
as well as desired code and figures?

Rich



Re: Lyx file format for tables

2019-05-22 Thread Paul Smith
On Wed, May 22, 2019 at 4:28 PM Paul A. Rubin  wrote:
>
> > Where can one find the specifications of the LyX file format for tables?
> >
> > The reason why I am asking that is because I have a bunch of tables
> > that I want to export from R to a single LyX document, and the
> > approach I am considering is to produce in R a text file in LyX format
> > with all my tables inserted.
> >
> I'm not sure if there is explicit documentation of the syntax for tables
> in LyX. You can create a small sample table with the desired format in
> LyX, open the code pane (View > Code Preview Pane) and set the format
> for the pane to LyX. That will show you what your sample table would
> look like in a LyX source file.
>
> I wonder if there might not be an easier way, though. There are several
> functions/packages in R that are designed for producing nice looking
> tables (including xtable and the kable() function from knitr), and a
> number of them have the option of generating LaTeX output. So you could
> have your R script generate the desired tables with the desired format
> and write them all to a LaTeX text file, then import that into LyX (File
>  > Import > LaTeX (plain), and copy/paste them where they are needed in
> your actual document.

Thanks, Paul. I imagined your "View > Code Preview Pane" idea, but I
though it would be easier to read the documentation, if there is some.
(The file format of tables in LyX does not appear to be simple.)

Regarding your other idea -- using xtable() or ktable -- I guess it is
not very practical in my case, as I have too many table (about 50
tables), and therefore I would like to insert all of them in their
right place in the LyX document, to avoid the work of copying and
pasting 50 times!

Paul


Re: Lyx file format for tables

2019-05-22 Thread Jean-Marc Lasgouttes

Le 22/05/2019 à 16:51, Paul Smith a écrit :

Dear All,

Where can one find the specifications of the LyX file format for tables?

The reason why I am asking that is because I have a bunch of tables
that I want to export from R to a single LyX document, and the
approach I am considering is to produce in R a text file in LyX format
with all my tables inserted.


An approach would be to use Sweave or knitr to include R code in your 
document that will be replaced by the nice tables you need.


JMarc


Re: Lyx file format for tables

2019-05-22 Thread Paul A. Rubin

On 5/22/19 10:51 AM, Paul Smith wrote:

Dear All,

Where can one find the specifications of the LyX file format for tables?

The reason why I am asking that is because I have a bunch of tables
that I want to export from R to a single LyX document, and the
approach I am considering is to produce in R a text file in LyX format
with all my tables inserted.

Thanks in advance,

Paul
I'm not sure if there is explicit documentation of the syntax for tables 
in LyX. You can create a small sample table with the desired format in 
LyX, open the code pane (View > Code Preview Pane) and set the format 
for the pane to LyX. That will show you what your sample table would 
look like in a LyX source file.


I wonder if there might not be an easier way, though. There are several 
functions/packages in R that are designed for producing nice looking 
tables (including xtable and the kable() function from knitr), and a 
number of them have the option of generating LaTeX output. So you could 
have your R script generate the desired tables with the desired format 
and write them all to a LaTeX text file, then import that into LyX (File 
> Import > LaTeX (plain), and copy/paste them where they are needed in 
your actual document.


Paul



Lyx file format for tables

2019-05-22 Thread Paul Smith
Dear All,

Where can one find the specifications of the LyX file format for tables?

The reason why I am asking that is because I have a bunch of tables
that I want to export from R to a single LyX document, and the
approach I am considering is to produce in R a text file in LyX format
with all my tables inserted.

Thanks in advance,

Paul