Learn R Programming

translateSPSS2R (version 1.0.0)

xpssList: Displays the content of variables.

Description

R implementation of the SPSS LIST Function

Usage

xpssList(x, variables = colnames(x), cases = list(from = 1, to = nrow(x), by = 1))

Arguments

x
a (non-empty) data.frame or input data of class xpssFrame.
variables
atomic character or character vector with the names of the variables.
cases
list containing the arguments from, to, by. All parameters are atomic numerics. See Details for more.

Value

A data.frame with case values for specified variables in the dataset. If cases and variables are not specified, List return the complete dataset. If cases are specified the output is a user-defined sequence.

Details

LIST displays the content of selected variables. It is possible to display a sequence with the cases argument.from determine the begin of the sequence, to determine the end of the sequence. by determine the increment of the sequence.

Examples

Run this code
data(fromXPSS)

xpssList(x=fromXPSS)

xpssList(x=fromXPSS,
   variables = "V1")

xpssList(x=fromXPSS,
   variables = c("V1","V2"))


xpssList(x=fromXPSS,
   variables = span(fromXPSS,
                 from="V1",
                 to="V4"),
   cases =list(from=2,
               to=18,
               by=2))

Run the code above in your browser using DataLab