Learn R Programming

translateSPSS2R (version 1.0.0)

computeChar_substr: creates a substring

Description

Helper Function for xpssCompute. R Implementation of the SPSS CHAR.SUBSTR Function.

Usage

computeChar_substr (x,pos = NULL, length= NULL)

Arguments

x
input character vector.
pos
atomic numeric. Indicates the start of the substring.
length
atomic numeric. Specifies the length of the substring.

Value

String. Returns an shortened string.

See Also

substr

Examples

Run this code
xpssCompute(x=fromXPSS, variables="V1", fun="computeChar_substr", pos = 2, length=3)

Run the code above in your browser using DataLab