getUDummyMatForOneVec: Get U-dummy matrix for one-dimensional vector

Description Usage Arguments Value

View source: R/get-dummies.R

Description

Get U-dummy matrix for one-dimensional vector

Usage

1
2
getUDummyMatForOneVec(x_vec, levels = NULL, drop_last = TRUE,
  only_info = FALSE)

Arguments

x_vec

A non-numeric vector to be converted into dummy matrix.

levels

A character vector indicates unique set of possible values. If NULL, all the unique values of x_vec are used.

drop_last

A boolean value. If TRUE, the last column of dummy matrix is dropped to avoid colinear

only_info

A bboolean value. If TRUE, actual creation of dummy matrix is omitted.

Value

a list with two members levels and dummy_mat.


kazuzowo/aglm-LVar documentation built on Dec. 10, 2019, 12:13 a.m.