Answers for "How to Convert a Factor in R"

R
1

How to Convert a Factor in R

> directions <- c("North", "East", "South", "South")
> directions.factor <- factor(directions)
> directions.factor
[1] North East South South
Levels: East North South
Posted by: Guest on December-21-2020

Code answers related to "How to Convert a Factor in R"

Browse Popular Code Answers by Language