Matchrows

From Eigenvector Research Documentation Wiki
Revision as of 14:19, 7 October 2008 by imported>Scott
Jump to navigation Jump to search

Purpose

Matches up rows from two DataSet objects using labels or sizes.

Synopsis

[x,y] = matchrows(x,y)

Description

Given two input DataSet objects (x) and (y), MATCHROWS locates rows of (y) which match rows of (x) based on the labels in both objects and re-orders (y) to match (x). If (y) contains additional rows which match no rows of (x), they are dropped completely from the data. If some rows of (x) do not have matching (y) rows, the labels are not considered valid.

If no matching row labels are found, MATCHROWS searches other modes of x and y for matching labels. If no matching labels are found in any mode, sizes of the inputs are used to attempt a match.

The order of tests is:

  • All label sets on mode 1 of both x and y
  • All label sets on modes 2-k of y vs. mode 1 of x (transpose y)
  • All label sets on modes 2-k of y vs. modes 2-k of x (transpose x and y)
  • Number of y rows vs. number of x rows (no change)
  • Number of y columns vs. number of x rows (transpose y)
  • Number of y columns vs. number of x columns (transpose x and y) (where k is the number of modes of x or y) Multi-dimensional x and y are supported by all tests.

Outputs

Output DSOs are aligned (and possibly transposed) input DataSets.

alignmat, editsds, matchvars, shuffle