Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

# copies fields 1, 5, 9, 13, 17 of x into y
Y = X[1,20,4]

 

Excerpt
vector abs( vector )

Returns the vector of the absolute value of the input vector at each element. Missing values are retained, unaltered by the calculation.

 

Excerpt
vector acos( vector )
vector asin( vector )
vector atan( vector )

Return the vector of the arc trigonometric function of the input vector at each element. Result is in radians. Missing values are retained, unaltered by the calculation.

 

Excerpt
vector bitmap (vector,number)

Returns a copy of the input vector (first argument) with zero or more of its values replaced with missing value indicators. The second argument is a number - any value equal to that number in the input vector is replaced with the missing value indicator. See also nobitmap.

 

Excerpt
vector cos( vector )

Returns the vector of the cosine of the input vector at each element. Input values must be in radians. Missing values are retained, unaltered by the calculation.

 

Excerpt
number count( vector )

Returns the number of elements in a vector.

 

Excerpt
vector div( vector,vector )

Returns a vector with as many elements as the input vectors; the elements of the output vector are the integer part of the division of the first vector by the second vector. A missing value in either input vector will result in a missing value in the corresponding place in the output vector.

 

Excerpt
vector exp( vector )

Returns the vector of the exponential of the input vector at each element. Missing values are retained, unaltered by the calculation.

 

Excerpt
vector filter( vector,vector )

Takes two vectors, and returns a new vector containing only the values of the first vector where the second vector's values are non-zero and non-missing. Examples:

...

v1 = filter(v, v>273.15) # returns only the values above 273.15
v2 = filter(v, v <> vector_missing_value) # returns only the non-missing values

 

Excerpt
vector int( vector )

Returns the vector of the integer part of the input vector at each element. Missing values are retained, unaltered by the calculation.

 

Excerpt
vector log( vector )

Returns the vector of the natural log of the input vector at each element. Missing values are retained, unaltered by the calculation.

 

Excerpt
vector log10( vector )

Returns the vector of the log base 10 of the input vector at each element. Missing values are retained, unaltered by the calculation.

 

 

Excerpt

vector max( vector,vector )

vector min( vector,vector )

 

Returns the vector of maximum (minimum) value of the two input vectors at each element. A missing value in either input vectors will result in a missing value in the corresponding place in the output vectors.

 

 

Excerpt

vector max( vector,number )

vector min( vector,number )

 

Returns the vector of the maximum (minimum) of the number and the vector value at each element. Missing values in the input vector are transferred to the output vector.

 

 

Excerpt

number maxvalue( vector )

number minvalue( vector )

 

Returns the vector (minimum) value of all the values of the vector. Only non-missing values are considered in the calculation. If there are no valid values, the function returns the missing value indicator.

 

Excerpt
number mean( vector )

Returns the mean of all non-missing values in the input vector. If there are no valid input values, then nil is returned.

 

Excerpt
vector merge( vector,vector,... )

Merge several vectors. The same as the operator &. The output is a vector with as many elements as the total number of elements in all merged vectors. Merging with the value nil does nothing, and is used to initialise when building a vector from nothing.

 

Excerpt
vector mod( vector,vector )

Returns a vector where the elements are the remainder of the division of the first vector by the second vector. A missing value in either input vector will result in a missing value in the corresponding place in the output vector. Note that only the integer parts of the inputs are considered in the calculation, meaning that a second parameter of 0.5 would cause a division by zero.

 

Excerpt
vector neg( vector )

Returns the vector of the negative of the input vector at each element. The same as (-vector). Missing values are retained, unaltered by the calculation.

 

Excerpt
vector nobitmap ( vector,number )

Returns a copy of the input vector (first argument) with all of its missing values replaced with the number specified by the second argument. See also bitmap.

 

Excerpt
vector sgn( vector )

Returns the vector of the sign of the values of the input vector at each element-1 for negative values, 1 for positive and 0 for null values. Missing values are retained, unaltered by the calculation.

 

Excerpt
vector sin( vector )

Returns the vector of the sine of the input vector at each element. Input vector must have values in radians. Missing values are retained, unaltered by the calculation.

 

Excerpt
vector sort( vector )
vector sort( vector,string )

Returns a sorted version of the given vector. If no second argument is given, the result will be sorted in ascending order; otherwise, a second argument consisting of a string can be given: '<' for ascending, '>' for descending order.

 

Excerpt
vector sqrt( vector )

Returns the vector of the square root of the input vector at each element. Missing values are retained, unaltered by the calculation.

 

Excerpt
number sum( vector )

Returns the sum of all non-missing values in the input vector. If there are no valid input values, then nil is returned.

 

Excerpt
vector tan( vector )

Return the tangent of the input vector at each element. Input vector must have values in radians. Missing values are retained, unaltered by the calculation.