Learn R Programming

translateSPSS2R (version 1.0.0)

xpssVarsToCases: Transforms variables to cases

Description

Creates a transfromed xpssFrame.

Usage

xpssVarsToCases(x, from, idVar = NULL, indexVar = NULL, nullArg = "keep", countVar = NULL, varLabels = list(id = NULL, index = NULL, count = NULL))

Arguments

x
as a (non-empty) data.frame or input data of class "xpssFrame".
from
variable that opens the span.
idVar
determines whether an id-variable should be created.
indexVar
determines whether an index-variable should be created.
nullArg
Can be either "keep" or "drop".
countVar
determines whether a counter should be created?
varLabels
determines whether labels for id-, index- and count variables are set.

Value

Returns the transformed xpssFrame.

Examples

Run this code
data(fromXPSS)

xpssVarsToCases(fromXPSS, from = list(c("newVar", "V7_1, V7_2")),
idVar = "myID", indexVar = "myIndex", nullArg = "drop", countVar = "Counter")

Run the code above in your browser using DataLab