Creates numeric variables

Description

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

Usage

1
xpssNumeric(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 name of the variables which should be created.

fill

atomic numeric or atomic character values, which 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

xpssNumeric creates new numeric 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 get filled with the speficied value.

Value

Returns the input data extended by the new variables.

Author(s)

Andreas Wygrabek

See Also

xpssString

Examples

1
2
3
4
## Not run: 
xpssNumeric(fromXPSS, varname = c("A"), fill = c(NA))

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.