encode: Encode variables in a data frame

View source: R/encode_decode.R

encodeR Documentation

Encode variables in a data frame

Description

The encode() function encodes selected variables in a data frame. It converts the variables to numeric type, sets labels from the original data, and returns the modified data frame.

Usage

encode(.data, ...)

Arguments

.data

The input data frame.

...

The variables to be encoded.

Value

A modified data frame with the selected variables encoded.

Examples

# Encode selected variables in the `mtcars` data frame
encode(mtcars, mpg, cyl)


myominnoo/mStats documentation built on Nov. 29, 2023, 2:36 a.m.