From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Maks Romih Newsgroups: gmane.emacs.help Subject: Re: Importing tab-delimited text files or connecting to ODBC Date: 17 Feb 2006 13:19:05 +0100 Organization: Slovenija OnLine - SiOL Message-ID: References: <43f50bd4$0$12642$3b214f66@tunews.univie.ac.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1140229042 9915 80.91.229.2 (18 Feb 2006 02:17:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 18 Feb 2006 02:17:22 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 18 03:17:22 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FAHey-0006Jr-KN for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Feb 2006 03:17:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FAHew-0001NW-Ni for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Feb 2006 21:17:18 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!newsfeed00.sul.t-online.de!t-online.de!newsfeed.t-com.hr!news-hub.siol.net!news.siol.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Original-NNTP-Posting-Host: 193.189.170.154 Original-X-Complaints-To: abuse@siol.net Original-X-Trace: news.siol.net 1140178745 193.189.170.154 (Fri, 17 Feb 2006 13:19:05 MET) Original-NNTP-Posting-Date: Fri, 17 Feb 2006 13:19:05 MET Original-Xref: shelby.stanford.edu gnu.emacs.help:137636 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:33261 Archived-At: Markus Triska writes: > Hi! > > Maks Romih wrote: > > > What would be the best way to import some tables, like a tab delimited > > copy-paste chunk from excel. I would like to get the table into Emacs > > Lisp so that a table would be a big list of rows, where a row would be > > a list of atoms, either raw strings or, when possible, converted to > > Lisp numbers and symbols. > > You can use R (www.r-project.org) to handle a number of different > table formats uniformly. For example, given test.txt like this: > > # directory size unit > /home/tester1 200 MB > /home/tester2 3000 KB > /home/tester3 250 MB > > you can read it as a data frame: > > > data <- read.table("test.txt", as.is=c(T,F,T), skip=1) > > . . . > > All the best, > Markus. Thank you for the reply. But I see I would need to specify the column types for every file I want to load. This I don't like. The program should infer the types of the columns automatically, either from the data itself or from the data dictionary over ODBC. Maks.