Versions Compared

Key

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

...

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 dtype( vector )

Returns a string describing the data type of the elements of the given vector, either 'float32' or 'float64'.


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.

...

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

number or vector find( vector,number )
number or vector find( vector,number,string )


Searches the given vector for a number and returns the index of the first occurrence of it. If an optional third argument is given as the string 'all', then a vector of the indexes of all occurrences of the number is returned. In both cases, if the number is not contained in the vector, nil is returned.

...

Converts the input vector to a list. Missing values are converted to nil.

 

Excerpt

vector unique( vector )


Returns a vector of the unique elements in the input vector.

 

Excerpt

vector vector_set_default_type( string )

Sets the default type of new vectors to the type specified by the input string, either 'float32' or 'float64'. The initial default type is float64. After changing the default type, all subsequently created vectors, including the results of operations on existing vectors, will have the new default data type.