computeChar_lpad: Expand strings on the left

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/xpssComputeStrings.R

Description

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

Usage

1

Arguments

x

atomic character or character vector.

length

atomic numeric. Number of characters x is to be filled on the left.

fill

atomic character. String which should be append on the left side.

Details

The value of length represents the number of characters and must be a positive integer. If the optional argument fill is not specified, x is padded with blank spaces.

Value

String, left-padded by length lengthpa.

Author(s)

Bastian Wiessner

See Also

paste0

Examples

1
2
3
xpssCompute(x="My Friend",fun="computeChar_lpad",length=15)

xpssCompute(x="My Friend",fun="computeChar_lpad",length=15, fill="Hello ")

translateSPSS2R documentation built on May 30, 2017, 4:31 a.m.

Search within the translateSPSS2R package
Search all R packages, documentation and source code