Learn R Programming

translateSPSS2R (version 1.0.0)

xpssCount: Counts frequencies of specific observations

Description

R implementation of the SPSS $COUNT system variable.

Usage

xpssCount(x, variables, count)

Arguments

x
a (non-empty) data.frame or input data of class xpssFrame.
variables
atomic character or character vector with the name of the variables.
count
atomic character or atomic numeric pattern.

Value

A vector of the same length as x.

Details

Count displays the frequencies of observations matching the count statement.

See Also

Related Functions xpssAny %in% is.element

Examples

Run this code
data(fromXPSS)

xpssCount(x=fromXPSS,
   variables = "V1", count=list(exact="Nissan"))

xpssCount(x=fromXPSS,
   variables = "V5", count=list(exact=2))

xpssCount(fromXPSS,
   variables = span(fromXPSS, from = "V5",
                             to = "V7_2"),
                   count = list(from = "lo",
                                  to = 100))

Run the code above in your browser using DataLab