Parsemixed: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Chuck
imported>Chuck
No edit summary
Line 22: Line 22:


* delim = passed in place of (b), this will be a delimiter to use to parse plain text of (a). If omitted, (a) will be searched for a common delimiter in nearly all lines.
* delim = passed in place of (b), this will be a delimiter to use to parse plain text of (a). If omitted, (a) will be searched for a common delimiter in nearly all lines.
====Optional Inputs====
*'''''options''''' =  discussed below.


====Outputs====
====Outputs====

Revision as of 11:29, 8 October 2008

Purpose

Parse numerical and text data into a DataSet Object.

Synopsis

data = parsemixed(a,b,options);
data = parsemixed(a,delim,options);
data = parsemixed(a,options);

Description

Given two inputs containing a numerical array a and a matching cell array containing text b, PARSEMIXED outputs a DataSet object with a "logical" interpretation of the numerical and text data. It identifies contiguous block of numbers and then attempts to interpret text as labels and label names for that block of data.

Inputs

  • a =
  • a numerical array containing the numerical portion of the data to parse (NOTE: NaN's are OK), OR
  • a text or cell array of data to parse (see (delim) below)
  • b = a cell array of the same size as (a) but containing any strings which were not interpretable as numbers.
  • delim = passed in place of (b), this will be a delimiter to use to parse plain text of (a). If omitted, (a) will be searched for a common delimiter in nearly all lines.

Optional Inputs

  • options = discussed below.

Outputs

  • data = a DataSet object formed from the parsing of the input data.

Options

options = a structure array with the following fields:

  • labelcols: [] specifies one or more columns of the file which should be interpreted as text labels for rows even if parsable as numbers,
  • labelrows: [] specifies one or more rows of the file which should be interpreted as text labels for columns even if parsable as numbers,
  • includecols: [] Specifies one or more columns of the file which should be interpreted as the "include" field for ROWS of the matrix (i.e. this column specifies which rows should be included). Multiple items in this list will be combined using a logical "and" (all must be "1" to include field.
  • includerows: [] Specifies one or more rows of the file which should be interpreted as the "include" field for COLUMNS of the matrix (see above notes about includecols).
  • classcols: [] Specifies one or more columns of the file which should be interpreted as classes for rows of the data.
  • classrows: [] Specifies one or more rows of the file which should be interpreted as classes for columns of the data.
  • axisscalecols: [] Specifies one or more columns of the file which should be interpreted as axisscales for rows of the data.
  • axisscalerows: [] Specifies one or more rows of the file which should be interpreted as axisscales for columns of the data.
  • compactdata: [ 'no' | {'yes'} ] Specifies if columns and rows which are entirely excluded should be permanently removed from the table.
  • waitbar: [ 'off' | {'on'} ] Specifies whether waitbars should be shown while the data is being processed.

See Also

areadr, dataset, xclreadr, xlsreadr