@convert |

Syntax: @convert(o, smp)

Argument 1: series or group, o

Argument 2: (optional) sample, smp

Return: vector or matrix

If o is a series, @convert returns a vector from the values of o using the optional sample smp or the current workfile sample. If any observation has the value “NA”, the observation will be omitted from the vector. Examples:

vector v2 = @convert(ser1)

vector v3 = @convert(ser2, smp1)

If o is a group, @convert returns a matrix from the values of o using the optional sample object smp or the current workfile sample. The series in o are placed in the columns of the resulting matrix in the order they appear in the group spreadsheet. If any of the series for a given observation has the value “NA”, the observation will be omitted for all series. For example:

matrix m1 = @convert(grp1)

matrix m2 = @convert(grp1, smp1)

For a conversion method that preserves NAs, see stomna.