xpssString: Creates string variables

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

View source: R/xpssString.R

Description

R implementation of the SPSS STRING function. Creates new string variables, which get appended at the end of the dataset.

Usage

1
xpssString(x, varname = NULL, fill = NA)

Arguments

x

a (non-empty) data.frame or input data of class "xpssFrame".

varname

atomic character or character vector with the names of the variables which should be created.

fill

atomic numeric or atomic character values to fill the variables. By default the value is NA for all new variables. It is possible to assign each new variable an own value to fill with.

Details

xpssString creates new string variables, which get appended at the end of the dataset. The new variables are as long as the selected dataset. By default the new variables are blank and get filled with NA, otherwise every case for the selected variable gets filled with the filled value.

Value

Returns the input data extended by the new variables

Author(s)

Andreas Wygrabek

See Also

xpssNumeric

Examples

1
2
data(fromXPSS)
xpssString(fromXPSS, varname = c("D","E"), fill = c("placeholder",NA))

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