2.2.3.60 wreducerows

Menu Information

Reduce Rows

Brief Information

Reduce worksheet by merging or deleting rows

Additional Information

Minimum Origin Version Required: 9.1 SR0

Command Line Usage

wreducerows method:=merge nrows:=3 merge:=ave start:=2;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input irng

Input

Range

<active>
Specifies the input data range.
Reduce Method method

Input

int

0
Specifies the reduce method.

Option list:

  • del:Delete N rows, then skip M rows
Delete N rows, then skip M rows
  • missing:Delete rows with missing values
Delete the rows with missing values
  • mask:Delete rows with masked values
Delete the rows with masked values
  • merge:Reduce N rows with merged values
Merge every N data points into one data point with specified value.
Merge/Delete Rows nrows

Input

int

2
Specifies how many rows to merge or delete. This option is only available when selecting Delete N rows, then skip M rows or Reduce N rows with merged values as Reduce Method.
Skip Rows skip

Input

int

1
Specifies how many rows to skip. This option is only available when selecting Delete N rows, then skip M rows as Reduce Method.
Merge by merge

Input

int

0
Specifies the value to replace the merged data points. This option is only available when selecting Reduce N rows with merged values as Reduce Method.

Option list:

  • first:First Point
Replaces N data points with the first value of these datapoints.
  • last:Last Point
Replaces N data points with the last value of these datapoints.
  • ave:Average
Replaces N data points with the average value of these data points.
  • min:Min
Replaces N data points with the minimum value of these data points.
  • max:Max
Replaces N data points with the maximum value of these data points.
  • sum:Sum
Replaces N data points with the sum of these data points.
  • sd:SD
Replaces N data points with the standard deviation of these data points.
Starting Row to Merge/Delete start

Input

int

1
Specifies the starting row to merge/delete.
End Row to Merge/Delete end

Input

int

-1
Specifies the end row to merge/delete. Script accessible only.
Output orng

Output

Range

<input>
Specifies the output range.

Description

This X-Function is used to delete rows or merge rows with specified statistics data.

Example

  1. Create a new workbook and import the Origin sample data Gaussian Envelope.DAT which is located in <Origin Program Folder> \Samples\Signal Processing.
  2. Highlight all columns, select menu item Worksheet: Reduce Rows to open wreducerows X-Function dialog. Set the options as below:
    Reduce Method: Reduce N rows with merged values
    Merge Rows: 10
    Merge by: First Point
    Starting Row to Merge: 1
    Output: <new>
  3. Click OK to merge the rows.

Related X-Functions

reducerows, wdelrows


Keywords:data reduction