Skip to contents

Create Dummy Variables

Usage

dummy(
  x,
  subset = rep(TRUE, length(x)),
  reference = sort(unique(x[!is.na(x)])),
  includeAll = FALSE
)

Arguments

x

y variable used to create the dummy variables.

subset

cluster a subset of the data, if desired.

reference

the reference value for the dummy variables to compare to.

includeAll

logical value indicating whether all of the dummy variables should be returned (including the reference).

Value

A matrix containing the dummy variables.

Examples


data(mri)

# Create a dummy variable for chd
dummy(mri$chd)
#>        1 vs 0 2 vs 0
#>   [1,]      1      0
#>   [2,]      0      0
#>   [3,]      0      0
#>   [4,]      0      0
#>   [5,]      0      0
#>   [6,]      0      0
#>   [7,]      0      0
#>   [8,]      0      0
#>   [9,]      0      0
#>  [10,]      0      0
#>  [11,]      0      0
#>  [12,]      1      0
#>  [13,]      0      0
#>  [14,]      0      0
#>  [15,]      0      0
#>  [16,]      0      0
#>  [17,]      1      0
#>  [18,]      0      0
#>  [19,]      0      0
#>  [20,]      0      0
#>  [21,]      0      0
#>  [22,]      0      0
#>  [23,]      0      0
#>  [24,]      0      0
#>  [25,]      0      0
#>  [26,]      0      0
#>  [27,]      0      0
#>  [28,]      0      0
#>  [29,]      0      0
#>  [30,]      0      0
#>  [31,]      0      0
#>  [32,]      0      0
#>  [33,]      0      0
#>  [34,]      0      0
#>  [35,]      0      0
#>  [36,]      0      0
#>  [37,]      0      0
#>  [38,]      0      0
#>  [39,]      0      0
#>  [40,]      0      0
#>  [41,]      0      0
#>  [42,]      0      0
#>  [43,]      0      0
#>  [44,]      0      1
#>  [45,]      0      0
#>  [46,]      0      0
#>  [47,]      0      0
#>  [48,]      0      0
#>  [49,]      0      0
#>  [50,]      0      0
#>  [51,]      0      0
#>  [52,]      0      1
#>  [53,]      0      0
#>  [54,]      0      0
#>  [55,]      0      0
#>  [56,]      0      0
#>  [57,]      1      0
#>  [58,]      0      0
#>  [59,]      0      0
#>  [60,]      0      1
#>  [61,]      0      0
#>  [62,]      0      0
#>  [63,]      0      0
#>  [64,]      0      0
#>  [65,]      0      0
#>  [66,]      0      0
#>  [67,]      0      0
#>  [68,]      0      0
#>  [69,]      1      0
#>  [70,]      0      0
#>  [71,]      0      0
#>  [72,]      0      0
#>  [73,]      0      0
#>  [74,]      0      0
#>  [75,]      0      0
#>  [76,]      0      1
#>  [77,]      0      0
#>  [78,]      0      0
#>  [79,]      1      0
#>  [80,]      0      0
#>  [81,]      0      0
#>  [82,]      0      0
#>  [83,]      0      0
#>  [84,]      0      0
#>  [85,]      0      0
#>  [86,]      0      0
#>  [87,]      0      0
#>  [88,]      0      0
#>  [89,]      0      0
#>  [90,]      0      0
#>  [91,]      0      0
#>  [92,]      1      0
#>  [93,]      0      0
#>  [94,]      0      0
#>  [95,]      0      0
#>  [96,]      0      1
#>  [97,]      0      0
#>  [98,]      0      0
#>  [99,]      0      0
#> [100,]      1      0
#> [101,]      0      0
#> [102,]      0      0
#> [103,]      0      0
#> [104,]      0      0
#> [105,]      0      0
#> [106,]      1      0
#> [107,]      0      0
#> [108,]      0      0
#> [109,]      0      1
#> [110,]      0      0
#> [111,]      1      0
#> [112,]      0      0
#> [113,]      0      0
#> [114,]      0      0
#> [115,]      0      0
#> [116,]      0      0
#> [117,]      0      0
#> [118,]      0      1
#> [119,]      0      0
#> [120,]      0      0
#> [121,]      0      1
#> [122,]      0      0
#> [123,]      0      0
#> [124,]      0      0
#> [125,]      0      0
#> [126,]      0      0
#> [127,]      0      1
#> [128,]      0      0
#> [129,]      1      0
#> [130,]      0      0
#> [131,]      0      0
#> [132,]      0      1
#> [133,]      0      0
#> [134,]      0      0
#> [135,]      0      0
#> [136,]      0      0
#> [137,]      0      0
#> [138,]      0      0
#> [139,]      0      1
#> [140,]      0      0
#> [141,]      0      0
#> [142,]      0      0
#> [143,]      0      0
#> [144,]      0      0
#> [145,]      0      0
#> [146,]      0      0
#> [147,]      0      0
#> [148,]      0      0
#> [149,]      0      1
#> [150,]      0      0
#> [151,]      0      0
#> [152,]      0      0
#> [153,]      0      0
#> [154,]      0      0
#> [155,]      0      0
#> [156,]      0      0
#> [157,]      0      0
#> [158,]      0      0
#> [159,]      0      0
#> [160,]      0      0
#> [161,]      0      0
#> [162,]      0      0
#> [163,]      0      0
#> [164,]      0      0
#> [165,]      0      0
#> [166,]      0      0
#> [167,]      0      0
#> [168,]      0      0
#> [169,]      0      0
#> [170,]      0      0
#> [171,]      0      0
#> [172,]      1      0
#> [173,]      0      0
#> [174,]      0      0
#> [175,]      1      0
#> [176,]      0      0
#> [177,]      0      0
#> [178,]      0      0
#> [179,]      0      1
#> [180,]      0      0
#> [181,]      0      0
#> [182,]      0      0
#> [183,]      0      0
#> [184,]      0      0
#> [185,]      0      0
#> [186,]      0      0
#> [187,]      0      1
#> [188,]      1      0
#> [189,]      0      0
#> [190,]      0      1
#> [191,]      0      0
#> [192,]      0      0
#> [193,]      0      0
#> [194,]      0      0
#> [195,]      0      0
#> [196,]      1      0
#> [197,]      0      0
#> [198,]      0      0
#> [199,]      0      0
#> [200,]      0      0
#> [201,]      0      0
#> [202,]      0      0
#> [203,]      0      0
#> [204,]      0      1
#> [205,]      1      0
#> [206,]      0      0
#> [207,]      1      0
#> [208,]      0      0
#> [209,]      0      0
#> [210,]      0      0
#> [211,]      0      1
#> [212,]      1      0
#> [213,]      0      0
#> [214,]      0      0
#> [215,]      0      0
#> [216,]      0      1
#> [217,]      0      0
#> [218,]      0      0
#> [219,]      0      0
#> [220,]      0      0
#> [221,]      0      1
#> [222,]      0      0
#> [223,]      0      0
#> [224,]      0      0
#> [225,]      0      1
#> [226,]      0      0
#> [227,]      0      0
#> [228,]      0      1
#> [229,]      0      0
#> [230,]      0      0
#> [231,]      0      0
#> [232,]      0      0
#> [233,]      0      0
#> [234,]      0      0
#> [235,]      1      0
#> [236,]      0      0
#> [237,]      0      0
#> [238,]      0      0
#> [239,]      0      0
#> [240,]      0      0
#> [241,]      0      0
#> [242,]      0      0
#> [243,]      0      1
#> [244,]      0      0
#> [245,]      0      1
#> [246,]      0      0
#> [247,]      0      0
#> [248,]      0      0
#> [249,]      0      1
#> [250,]      0      1
#> [251,]      0      0
#> [252,]      0      1
#> [253,]      0      0
#> [254,]      0      0
#> [255,]      0      0
#> [256,]      0      0
#> [257,]      0      0
#> [258,]      0      0
#> [259,]      0      0
#> [260,]      0      0
#> [261,]      0      0
#> [262,]      0      1
#> [263,]      0      1
#> [264,]      0      0
#> [265,]      0      0
#> [266,]      0      0
#> [267,]      1      0
#> [268,]      0      0
#> [269,]      0      0
#> [270,]      0      0
#> [271,]      0      0
#> [272,]      0      0
#> [273,]      0      0
#> [274,]      0      0
#> [275,]      0      1
#> [276,]      0      0
#> [277,]      1      0
#> [278,]      0      0
#> [279,]      0      0
#> [280,]      0      0
#> [281,]      0      0
#> [282,]      0      0
#> [283,]      0      0
#> [284,]      0      0
#> [285,]      0      0
#> [286,]      0      0
#> [287,]      0      1
#> [288,]      0      0
#> [289,]      0      1
#> [290,]      0      0
#> [291,]      0      0
#> [292,]      0      0
#> [293,]      0      0
#> [294,]      0      0
#> [295,]      0      0
#> [296,]      1      0
#> [297,]      0      0
#> [298,]      0      0
#> [299,]      0      0
#> [300,]      0      1
#> [301,]      0      0
#> [302,]      0      0
#> [303,]      1      0
#> [304,]      0      0
#> [305,]      0      0
#> [306,]      0      0
#> [307,]      0      0
#> [308,]      0      0
#> [309,]      0      0
#> [310,]      0      0
#> [311,]      0      1
#> [312,]      0      0
#> [313,]      0      0
#> [314,]      0      0
#> [315,]      0      0
#> [316,]      0      1
#> [317,]      0      0
#> [318,]      0      0
#> [319,]      0      0
#> [320,]      0      0
#> [321,]      0      0
#> [322,]      0      1
#> [323,]      0      0
#> [324,]      0      0
#> [325,]      0      1
#> [326,]      0      0
#> [327,]      0      0
#> [328,]      0      0
#> [329,]      0      1
#> [330,]      1      0
#> [331,]      1      0
#> [332,]      0      0
#> [333,]      0      0
#> [334,]      0      0
#> [335,]      0      0
#> [336,]      0      0
#> [337,]      0      1
#> [338,]      0      0
#> [339,]      0      0
#> [340,]      0      0
#> [341,]      0      0
#> [342,]      0      0
#> [343,]      1      0
#> [344,]      0      0
#> [345,]      0      0
#> [346,]      0      0
#> [347,]      0      0
#> [348,]      0      0
#> [349,]      0      0
#> [350,]      0      0
#> [351,]      0      1
#> [352,]      0      0
#> [353,]      0      1
#> [354,]      0      0
#> [355,]      0      0
#> [356,]      0      0
#> [357,]      0      0
#> [358,]      0      0
#> [359,]      0      0
#> [360,]      0      0
#> [361,]      0      0
#> [362,]      0      0
#> [363,]      0      0
#> [364,]      0      0
#> [365,]      0      0
#> [366,]      0      0
#> [367,]      1      0
#> [368,]      0      1
#> [369,]      0      0
#> [370,]      0      0
#> [371,]      0      0
#> [372,]      0      0
#> [373,]      0      0
#> [374,]      0      0
#> [375,]      0      0
#> [376,]      0      0
#> [377,]      0      0
#> [378,]      0      0
#> [379,]      0      0
#> [380,]      0      0
#> [381,]      0      1
#> [382,]      0      1
#> [383,]      0      0
#> [384,]      0      0
#> [385,]      0      0
#> [386,]      0      0
#> [387,]      0      0
#> [388,]      0      0
#> [389,]      0      0
#> [390,]      0      0
#> [391,]      0      0
#> [392,]      0      0
#> [393,]      0      0
#> [394,]      0      0
#> [395,]      0      0
#> [396,]      0      0
#> [397,]      0      0
#> [398,]      0      0
#> [399,]      0      0
#> [400,]      0      0
#> [401,]      0      0
#> [402,]      0      0
#> [403,]      0      0
#> [404,]      0      0
#> [405,]      0      0
#> [406,]      0      1
#> [407,]      0      0
#> [408,]      0      0
#> [409,]      0      0
#> [410,]      0      1
#> [411,]      0      0
#> [412,]      0      0
#> [413,]      0      0
#> [414,]      0      0
#> [415,]      0      0
#> [416,]      0      1
#> [417,]      0      0
#> [418,]      0      0
#> [419,]      0      0
#> [420,]      0      1
#> [421,]      0      0
#> [422,]      0      0
#> [423,]      1      0
#> [424,]      0      0
#> [425,]      0      0
#> [426,]      0      0
#> [427,]      0      1
#> [428,]      1      0
#> [429,]      0      1
#> [430,]      0      0
#> [431,]      0      0
#> [432,]      0      0
#> [433,]      1      0
#> [434,]      0      0
#> [435,]      1      0
#> [436,]      0      0
#> [437,]      0      0
#> [438,]      1      0
#> [439,]      0      0
#> [440,]      0      0
#> [441,]      0      0
#> [442,]      0      0
#> [443,]      0      0
#> [444,]      0      1
#> [445,]      1      0
#> [446,]      0      0
#> [447,]      0      0
#> [448,]      0      0
#> [449,]      0      0
#> [450,]      1      0
#> [451,]      0      0
#> [452,]      0      0
#> [453,]      0      1
#> [454,]      0      1
#> [455,]      0      0
#> [456,]      0      0
#> [457,]      0      0
#> [458,]      1      0
#> [459,]      0      0
#> [460,]      1      0
#> [461,]      1      0
#> [462,]      0      0
#> [463,]      0      0
#> [464,]      0      0
#> [465,]      0      0
#> [466,]      0      0
#> [467,]      0      0
#> [468,]      0      0
#> [469,]      0      0
#> [470,]      1      0
#> [471,]      0      0
#> [472,]      0      1
#> [473,]      0      1
#> [474,]      0      1
#> [475,]      0      0
#> [476,]      0      0
#> [477,]      0      0
#> [478,]      0      0
#> [479,]      1      0
#> [480,]      0      0
#> [481,]      1      0
#> [482,]      1      0
#> [483,]      0      0
#> [484,]      0      0
#> [485,]      0      1
#> [486,]      1      0
#> [487,]      0      0
#> [488,]      0      0
#> [489,]      0      0
#> [490,]      0      1
#> [491,]      0      0
#> [492,]      1      0
#> [493,]      0      0
#> [494,]      1      0
#> [495,]      0      1
#> [496,]      0      0
#> [497,]      0      0
#> [498,]      0      0
#> [499,]      0      0
#> [500,]      0      0
#> [501,]      0      0
#> [502,]      0      1
#> [503,]      0      0
#> [504,]      0      1
#> [505,]      0      1
#> [506,]      0      0
#> [507,]      0      0
#> [508,]      0      1
#> [509,]      0      1
#> [510,]      0      0
#> [511,]      0      0
#> [512,]      0      0
#> [513,]      0      1
#> [514,]      0      0
#> [515,]      0      0
#> [516,]      1      0
#> [517,]      0      0
#> [518,]      0      0
#> [519,]      0      0
#> [520,]      0      0
#> [521,]      0      0
#> [522,]      0      0
#> [523,]      1      0
#> [524,]      1      0
#> [525,]      0      0
#> [526,]      0      1
#> [527,]      0      0
#> [528,]      1      0
#> [529,]      0      0
#> [530,]      0      0
#> [531,]      0      0
#> [532,]      0      0
#> [533,]      0      0
#> [534,]      0      0
#> [535,]      0      0
#> [536,]      0      0
#> [537,]      0      1
#> [538,]      0      1
#> [539,]      0      0
#> [540,]      0      0
#> [541,]      1      0
#> [542,]      0      0
#> [543,]      0      0
#> [544,]      0      0
#> [545,]      0      1
#> [546,]      0      0
#> [547,]      1      0
#> [548,]      1      0
#> [549,]      1      0
#> [550,]      0      0
#> [551,]      0      0
#> [552,]      0      0
#> [553,]      0      0
#> [554,]      0      0
#> [555,]      0      0
#> [556,]      0      0
#> [557,]      0      0
#> [558,]      0      1
#> [559,]      0      1
#> [560,]      0      0
#> [561,]      0      1
#> [562,]      0      0
#> [563,]      0      0
#> [564,]      0      0
#> [565,]      0      1
#> [566,]      0      1
#> [567,]      0      0
#> [568,]      0      1
#> [569,]      0      0
#> [570,]      0      1
#> [571,]      0      0
#> [572,]      1      0
#> [573,]      0      0
#> [574,]      0      0
#> [575,]      0      0
#> [576,]      0      0
#> [577,]      0      0
#> [578,]      0      0
#> [579,]      0      1
#> [580,]      0      0
#> [581,]      1      0
#> [582,]      0      0
#> [583,]      1      0
#> [584,]      0      0
#> [585,]      0      1
#> [586,]      0      0
#> [587,]      0      0
#> [588,]      0      0
#> [589,]      0      0
#> [590,]      0      0
#> [591,]      0      0
#> [592,]      0      0
#> [593,]      0      0
#> [594,]      0      1
#> [595,]      1      0
#> [596,]      0      0
#> [597,]      0      0
#> [598,]      0      0
#> [599,]      0      0
#> [600,]      0      0
#> [601,]      0      0
#> [602,]      0      0
#> [603,]      1      0
#> [604,]      0      1
#> [605,]      0      0
#> [606,]      0      0
#> [607,]      0      0
#> [608,]      0      0
#> [609,]      0      1
#> [610,]      0      0
#> [611,]      0      0
#> [612,]      0      0
#> [613,]      0      0
#> [614,]      0      0
#> [615,]      0      0
#> [616,]      0      0
#> [617,]      0      0
#> [618,]      0      0
#> [619,]      0      0
#> [620,]      0      0
#> [621,]      0      1
#> [622,]      0      0
#> [623,]      0      0
#> [624,]      0      0
#> [625,]      0      0
#> [626,]      0      0
#> [627,]      0      0
#> [628,]      0      0
#> [629,]      0      0
#> [630,]      0      0
#> [631,]      0      1
#> [632,]      0      0
#> [633,]      0      0
#> [634,]      0      1
#> [635,]      0      0
#> [636,]      0      0
#> [637,]      0      0
#> [638,]      0      0
#> [639,]      0      0
#> [640,]      0      0
#> [641,]      0      0
#> [642,]      0      1
#> [643,]      0      0
#> [644,]      0      0
#> [645,]      0      0
#> [646,]      0      0
#> [647,]      0      0
#> [648,]      0      0
#> [649,]      0      0
#> [650,]      0      1
#> [651,]      0      0
#> [652,]      0      0
#> [653,]      0      0
#> [654,]      0      0
#> [655,]      0      0
#> [656,]      0      0
#> [657,]      0      1
#> [658,]      0      0
#> [659,]      0      0
#> [660,]      0      0
#> [661,]      0      0
#> [662,]      0      0
#> [663,]      0      0
#> [664,]      0      0
#> [665,]      0      0
#> [666,]      0      0
#> [667,]      0      0
#> [668,]      1      0
#> [669,]      0      0
#> [670,]      0      0
#> [671,]      0      0
#> [672,]      1      0
#> [673,]      0      0
#> [674,]      0      0
#> [675,]      0      0
#> [676,]      0      0
#> [677,]      0      0
#> [678,]      0      0
#> [679,]      0      0
#> [680,]      0      0
#> [681,]      1      0
#> [682,]      0      0
#> [683,]      0      0
#> [684,]      1      0
#> [685,]      0      0
#> [686,]      0      0
#> [687,]      0      1
#> [688,]      0      0
#> [689,]      0      0
#> [690,]      1      0
#> [691,]      1      0
#> [692,]      0      0
#> [693,]      0      0
#> [694,]      0      0
#> [695,]      0      0
#> [696,]      0      0
#> [697,]      0      0
#> [698,]      0      0
#> [699,]      0      0
#> [700,]      0      1
#> [701,]      0      0
#> [702,]      0      0
#> [703,]      0      0
#> [704,]      0      0
#> [705,]      0      0
#> [706,]      0      0
#> [707,]      0      0
#> [708,]      0      0
#> [709,]      0      0
#> [710,]      0      0
#> [711,]      0      0
#> [712,]      0      0
#> [713,]      0      0
#> [714,]      0      0
#> [715,]      0      0
#> [716,]      0      0
#> [717,]      1      0
#> [718,]      0      1
#> [719,]      0      0
#> [720,]      0      0
#> [721,]      0      1
#> [722,]      0      0
#> [723,]      0      0
#> [724,]      0      0
#> [725,]      0      0
#> [726,]      0      0
#> [727,]      0      0
#> [728,]      0      0
#> [729,]      0      1
#> [730,]      0      0
#> [731,]      0      0
#> [732,]      0      0
#> [733,]      0      0
#> [734,]      0      0
#> [735,]      0      0
#> attr(,"transformation")
#> [1] "dummy"
#> attr(,"reference")
#> [1] 0 1 2
#> attr(,"name")
#> [1] "dummy(mri$chd)"
#> attr(,"prnm")
#> [1] "mri$chd"
#> attr(,"original")
#>   [1] 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#>  [38] 0 0 0 0 0 0 2 0 0 0 0 0 0 0 2 0 0 0 0 1 0 0 2 0 0 0 0 0 0 0 0 1 0 0 0 0 0
#>  [75] 0 2 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 2 0 0 0 1 0 0 0 0 0 1 0 0 2 0 1
#> [112] 0 0 0 0 0 0 2 0 0 2 0 0 0 0 0 2 0 1 0 0 2 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0
#> [149] 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 2 0 0 0 0 0 0
#> [186] 0 2 1 0 2 0 0 0 0 0 1 0 0 0 0 0 0 0 2 1 0 1 0 0 0 2 1 0 0 0 2 0 0 0 0 2 0
#> [223] 0 0 2 0 0 2 0 0 0 0 0 0 1 0 0 0 0 0 0 0 2 0 2 0 0 0 2 2 0 2 0 0 0 0 0 0 0
#> [260] 0 0 2 2 0 0 0 1 0 0 0 0 0 0 0 2 0 1 0 0 0 0 0 0 0 0 0 2 0 2 0 0 0 0 0 0 1
#> [297] 0 0 0 2 0 0 1 0 0 0 0 0 0 0 2 0 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