Description
Loadtxt
reads an array, which will typically represent data. Often a data file will have have column labels on the first line. I suggest adding an optional nskip_lines
argument so that loadtxt
can handle such a file by calling it with nskip_lines = 1
. One could also add an optional col_labels(:)
character array argument, such that
size(col_labels) == size(d,2)
. Adding these features would allow loadtxt
to handle a wider range of data files that people have and give it some of the functionality of read.table()
in R. The functions to read data frames in R and Python pandas allow columns to be of different types, which I do not expect loadtxt
to handle.
To speed up a program during development one may read only a subset of the data. To accommodate this optional arguments max_rows
and max_col
could be added. Read.table()
in R has an nrows
argument, the maximum number of rows to read in.