set_variable_format {dataSDA}R Documentation

Set Variable Format

Description

This function changes the format of the set variables in the data to conform to the RSDA format.

Usage

set_variable_format(data, location, var)

Arguments

data

A conventional data.

location

The location of the set variable in the data.

var

The name of the set variable in the data.

Value

Return a dataframe in which a set variable is converted to one-hot encoding.

Examples

data("mushroom")
mushroom.set <- set_variable_format(data = mushroom, location = 8, var = "Species")

[Package dataSDA version 0.1.0 Index]