Date: Tue, 7 Aug 2007 21:14:54 -0700 (PDT)
From: address@hidden
Subject: Re: Reading tab-delimited ASCII files
To: "James Sherman Jr." <address@hidden>
Cc: Matthias Brennwald <address@hidden>,
address@hidden
Message-ID:
<address@hidden>
Content-Type: text/plain;charset=iso-8859-1
Hi all,
maybe you can strip your data from the first 2 columns, substitute the N/A for
NaN, save the result in a temp file and load that temp file? As in the
following code (for unix system)
## Make data octave-readable
system (["perl -w -p -e 's/.*?\t.*?\t//; s|N/A||ig' < ",your_file_name, ">
/tmp/some_safe_temp_file_name.txt"]);
## Read it
your_data = load ("/tmp/some_safe_temp_file_name.txt")
## let's be good and clean up
unlink ("/tmp/some_safe_temp_file_name.txt")
(in production code, you'd want to use a temp name returned by tmpnam()).
Hth,
Etienne