Re: Most efficient way to import wide, long table

2018-11-04 Thread Rich Shepard
On Sun, 4 Nov 2018, Dr Eberhard Lisse wrote: obviously s/MySQL/PostgreSQL/g would do the trick. ... All of the above I still find easier than something like psql -P format=latex | supertabfiler > psqltable.tex Eberhard, What I did in the postgres shell (psql) was:

Re: Most efficient way to import wide, long table

2018-11-04 Thread Dr Eberhard Lisse
Rich obviously s/MySQL/PostgreSQL/g would do the trick. There is also, of course, luarocks install luasql-postgres and then the SQLite3 example from https://tex.stackexchange.com/questions/48193/reading-data-from-a-relational-database-into-a-latex-table which is

Re: Most efficient way to import wide, long table

2018-11-02 Thread Rich Shepard
On Fri, 2 Nov 2018, Dr Eberhard Lisse wrote: Somehow my reply from the iPad Newsreader got lost. It's a long way from southwestern Africa. :-) Why not include R Chunks generating tables and/or graphics at PDF generation in the LyX file using the knitr module? Two reasons: 1) It's a

Re: Most efficient way to import wide, long table

2018-11-02 Thread Dr Eberhard Lisse
Somehow my reply from the iPad Newsreader got lost. Why not include R Chunks generating tables and/or graphics at PDF generation in the LyX file using the knitr module? After a chunk with something like (for MySQL/MariaDB) suppressPackageStartupMessages(library(RMySQL))

Re: Most efficient way to import wide, long table

2018-11-01 Thread Paul A. Rubin
On 10/30/18 11:50 AM, Rich Shepard wrote: I have an 82-line text file which has 5 columns separated by pipes. '|', and a wide column with location names. Text file format examples:  10775    | Santiam R. at Jefferson Bridge  | 1979-11-06 | 2011-01-06 |    67  

Re: Most efficient way to import wide, long table

2018-10-30 Thread Benedict Holland
For automation, I include a tex file within Lyx. I then create all of my latex tables using python or whatever. It produces valid latex. This is very hard to do without a heavy level of conformity. For example, I can write a quick script that will take 95 rows of 4 column data quite quickly. I

Re: Most efficient way to import wide, long table

2018-10-30 Thread Rich Shepard
On Tue, 30 Oct 2018, Baris Erkus wrote: Just a minor fix: 1. Replace all the "|" with the tab character with a text editor. 2. Select the portion you want to paste. 2a. Copy to clipboard. 3. Go to the first cell in Lyx. 4. Edit > Paste Special > Plain Text. 5. Table row and columns numbers

Re: Most efficient way to import wide, long table

2018-10-30 Thread Baris Erkus
On 10/31/2018 12:48 AM, Rich Shepard wrote: > On Tue, 30 Oct 2018, Dr Eberhard Lisse wrote: > >> it depends entirely on what you mean by efficient. > > el: > >   If I can highlight the entire file in emacs, use M-w to copy it, then > paste it in a blank LyX table that's efficient: 10 seconds or

Re: Most efficient way to import wide, long table

2018-10-30 Thread Rich Shepard
On Tue, 30 Oct 2018, Dr Eberhard Lisse wrote: it depends entirely on what you mean by efficient. el: If I can highlight the entire file in emacs, use M-w to copy it, then paste it in a blank LyX table that's efficient: 10 seconds or less. Thanks, Rich

Re: Most efficient way to import wide, long table

2018-10-30 Thread Dr Eberhard Lisse
Rich, it depends entirely on what you mean by efficient. There are a number of hits on https://www.google.de/search?q=csv2lyx If you wanted a command line workflow there are number of tools to convert CSV into LaTeX, which you can import easily. Some can use '|' as separator directly, some

Re: Most efficient way to import wide, long table

2018-10-30 Thread Baris Erkus
On 10/30/2018 11:23 PM, Rich Shepard wrote: > On Tue, 30 Oct 2018, Baris Erkus wrote: > >> I have done this, seems to work: >> >> 1. Replace all the "|" with the tab character with a text editor. >> 2. Select the portion you want to paste. >> 3. Go to the first cell in Lyx. >> 4. Edit > Paste

Re: Most efficient way to import wide, long table

2018-10-30 Thread Rich Shepard
On Tue, 30 Oct 2018, Baris Erkus wrote: I have done this, seems to work: 1. Replace all the "|" with the tab character with a text editor. 2. Select the portion you want to paste. 3. Go to the first cell in Lyx. 4. Edit > Paste Special > Plain Text. 5. Table row and columns numbers should be

Re: Most efficient way to import wide, long table

2018-10-30 Thread Benedict Holland
Oh. My apologies. LibreOffice or Excel can split text based on a character. In this case, I would bring your text into excel, split to columns on | and copy it into a defined table within Lyx. Lyx accepts Excel "copy and paste" as long as you have the table already defined. You would want Excel to

Re: Most efficient way to import wide, long table

2018-10-30 Thread Baris Erkus
On 10/30/2018 6:50 PM, Rich Shepard wrote: > I have an 82-line text file which has 5 columns separated by pipes. '|', > and a wide column with location names. Text file format examples: > >  10775    | Santiam R. at Jefferson > Bridge  | 1979-11-06 | 2011-01-06 |   

Re: Most efficient way to import wide, long table

2018-10-30 Thread John White
On Tuesday, October 30, 2018 11:09:39 AM PDT Rich Shepard wrote: > On Tue, 30 Oct 2018, Benedict Holland wrote: > > Create a table that is 5 columns and 84 rows (assuming you want a header). > > Copy from excel into the table. You can specify rows and columns of your > > table. > > Ben, > >

Re: Most efficient way to import wide, long table

2018-10-30 Thread Rich Shepard
On Tue, 30 Oct 2018, Benedict Holland wrote: Create a table that is 5 columns and 84 rows (assuming you want a header). Copy from excel into the table. You can specify rows and columns of your table. Ben, A) The table is 82 rows long so a header row makes a total of 83 rows. B) I don't

Re: Most efficient way to import wide, long table

2018-10-30 Thread Benedict Holland
Create a table that is 5 columns and 84 rows (assuming you want a header). Copy from excel into the table. You can specify rows and columns of your table. Next comes orientation. From the table, select properties and I would chose fancy table options, long table, and then orient the page as

Most efficient way to import wide, long table

2018-10-30 Thread Rich Shepard
I have an 82-line text file which has 5 columns separated by pipes. '|', and a wide column with location names. Text file format examples: 10775| Santiam R. at Jefferson Bridge | 1979-11-06 | 2011-01-06 |67 10386| Middle Fork Willamette R. at