Challenge: Work with Factors and Characters
Task
Swipe to start coding
Convert a character vector of product categories to a factor. Using factors for categorical data can improve efficiency and provide better support for statistical analysis.
- Return a factor variable that represents the categories in the input vector.
- Ensure the result contains the unique levels present in the input.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 16
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 5.56
Challenge: Work with Factors and Characters
Swipe to show menu
Task
Swipe to start coding
Convert a character vector of product categories to a factor. Using factors for categorical data can improve efficiency and provide better support for statistical analysis.
- Return a factor variable that represents the categories in the input vector.
- Ensure the result contains the unique levels present in the input.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 16
single