Learn R Programming

expss (version 0.5.5)

as.labelled: Recode vector into integer vector with value labels

Description

Recode vector into integer vector with value labels

Usage

as.labelled(x, label = NULL)

Arguments

x
numeric vector/character vector/factor
label
optional variable label

Value

integer vector with labels

Examples

Run this code
character_vector = c("one", "two",  "two", "three")
as.labelled(character_vector, label = "Numbers")


Run the code above in your browser using DataLab