2

I have a .dat file that is space/tab delimited with 1 line of headers. There are about 60 columns of data in this file. There are others with other numbers of columns.

How can I read in the headers (as a vector, perhaps?) such that I can index into the appropriate column of the data-matrix without having to count my way manually to the correct column?

I seem to recall Matlab being able to create cell-arrays with headers as indexes. Is anything like that remotely possible in Octave?

So far, all I can get is the actual data according to this:

a = dlmread('Core.dat'," ",r0=1,c0=0);

Any and all help is much appreciated! Thanks!

1 Answer 1

0

I've been looking for an easy way to do this using just the standard packages, also, but there doesn't seem to be one.

However, it does look like the dataframe package, might let you do this sort of thing.

It does seem like something simpler should be built into the language, though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.