1. VREF(Column_Number)
VRef(column_number): Convert the numeric argument to a variable reference with value of that variable in the current row.
Example use case:
- VREF(1): Equivalent to variable V1 with the value of V1 in the current row.
- VREF(2): Equivalent to variable V2 with the value of V2 in the current row.
- VREF(V1): However is NOT equivalent to variable V1. Instead, it takes the value of V1 in the current row and refer to the specific variable with variable index/reference number as the value of V1.
For example: VREF(V1)
- The value of V1 in 1st row is 1, so 1st row of VREF(V1) = VREF(1) = V1 = the value of variable V1 in 1st row = 1
- The value of V1 in 2nd row is 4, so 2nd row of VREF(V1) = VREF(4) = V4 = the value of variable V4 in 2nd row
- The value of V1 in 3rd row is 9, so 3rd row of VREF(V1) = VREF(9) = V9 = the value of variable V9 in 3rd row
2. VCUR
VCUR: Refers to the current variable and returns the values of the current variable, e.g., in a spreadsheet formula for variable 3, VCUR is equivalent to V3.
The VCUR function is to manipulate the existing current variable, do some calculations based on current variable, and replace the old values with the newly calculated values. It is in someway similar to "Recode" and "Transform" functions in Statistica.
One can use VCUR to write various formula expressions flexibly, for example,
- recode a current continuous variable to categorical based on the values of the current variable (e.g. =iif(VCUR<16, 1, 0))
- do some mathematical calculations of the current variable, such as,
- take square root of the current variable (= sqrt(VCUR)
- add numbers to the current variable (e.g. = VCUR + 1)
VCUR is an additional function which can help user to write spreadsheet formula expressions more flexibly.