xpssCount: Counts frequencies of specific observations

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

View source: R/xpssCount.R

Description

R implementation of the SPSS $COUNT system variable.

Usage

1
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.

Details

Count displays the frequencies of observations matching the count statement.

Value

A vector of the same length as x.

Author(s)

Bastian Wiessner

See Also

Related Functions xpssAny %in% is.element

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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))

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