Challenge: Avoid Factor Pitfalls
Tarefa
Swipe to start coding
Convert a factor of survey ratings to numeric values and ensure the levels are ordered from lowest to highest satisfaction.
- Create a new factor from
ratings_factorwith levels ordered as "Poor", "Fair", "Good", "Excellent". - Convert the ordered factor to numeric values, where "Poor" is 1 and "Excellent" is 4.
- Return the resulting numeric vector.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 6
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Suggested prompts:
Can you explain this in simpler terms?
What are the main takeaways from this?
Can you give me a real-world example?
Incrível!
Completion taxa melhorada para 5.56
Challenge: Avoid Factor Pitfalls
Deslize para mostrar o menu
Tarefa
Swipe to start coding
Convert a factor of survey ratings to numeric values and ensure the levels are ordered from lowest to highest satisfaction.
- Create a new factor from
ratings_factorwith levels ordered as "Poor", "Fair", "Good", "Excellent". - Convert the ordered factor to numeric values, where "Poor" is 1 and "Excellent" is 4.
- Return the resulting numeric vector.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 6
single