On 12/06/2017 12:02 PM, Doug Stewart
wrote:
On Wed, Dec 6, 2017 at 8:30 AM, Jean-Etienne Verrot
<address@hidden>
wrote:
This of course doesn't work, but Octave can read some non-numerical
values like
NaN (not-a-number) and Inf. so you can replace NA with NAN and
#VALUE! with either NaN or Inf, whichever seems more appropriate:
perl -i.bak -pe 's/NA/NaN/g; s/#VALUE!/Inf/g' trainsetdata.txt
It's also possible to use textread() which is not fazed by
non-numeric values, but it requires more decisions and processing of
the result.
|