Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mrset

Create multiple response set/multiple dichotomy set from variables


Description

These functions are intended for usage with tables - tables, cro, cro_fun. Result of mrset is considered as muliple-response set with category encoding and result of mdset is considered as multiple response set with dichotomy (dummy) encoding e. g. with 0 or 1 in the each column. Each column in the dichotomy is indicator of absence or presence of particular feature. Both functions don't convert its arguments to anything - it is supposed that arguments already have appropriate encoding. For conversation see as.dichotomy or as.category.

  • mrset_f and mdset_f select variables by fixed pattern. Fixed pattern can be unquoted. For details see ..f.

  • mrset_p and mdset_p select variables for multiple-responses by perl-style regular expresssion. For details see ..p.

  • mrset_t and mdset_t select variables by expanding text arguments. For details see ..t and text_expand.

Usage

mrset(..., label = NULL)

mdset(..., label = NULL)

mrset_f(..., label = NULL)

mdset_f(..., label = NULL)

mrset_p(..., label = NULL)

mdset_p(..., label = NULL)

mrset_t(..., label = NULL)

mdset_t(..., label = NULL)

Arguments

...

variables

label

character optional label for multiple response set

Value

data.frame of class category/dichotomy

See Also

Examples

data(product_test)

calc_cro_cpct(product_test, mrset(a1_1 %to% a1_6))

# same result
calc_cro_cpct(product_test, mrset_f(a1_))

# same result
calc_cro_cpct(product_test, mrset_p("a1_"))

# same result
calc_cro_cpct(product_test, mrset_t("a1_{1:6}"))

expss

Tables, Labels and Some Useful Functions from Spreadsheets and 'SPSS' Statistics

v0.10.7
GPL (>= 2)
Authors
Gregory Demin [aut, cre], Sebastian Jeworutzki [ctb] (<https://orcid.org/0000-0002-2671-5253>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.