Optional arguments for loadtxt #512
Labels
API
Discussion on a specific API for a proposal (exploratory)
in progress
This proposal is being worked on
topic: IO
Common input/output related features
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 optionalnskip_lines
argument so thatloadtxt
can handle such a file by calling it withnskip_lines = 1
. One could also add an optionalcol_labels(:)
character array argument, such thatsize(col_labels) == size(d,2)
. Adding these features would allowloadtxt
to handle a wider range of data files that people have and give it some of the functionality ofread.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 expectloadtxt
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
andmax_col
could be added.Read.table()
in R has annrows
argument, the maximum number of rows to read in.The text was updated successfully, but these errors were encountered: