Challenge: Real-World Anonymous Functions
Swipe to start coding
Use your knowledge of anonymous functions and lapply to solve a practical data transformation problem.
Write a function capitalize_first that takes a list of names and returns a new list where each name has its first letter capitalized.
- Use
lapplyto apply an anonymous function to each element ofnames_list. - The anonymous function should capitalize only the first letter of each name, leaving the rest unchanged.
- The function must return a list with the transformed names.
Рішення
Дякуємо за ваш відгук!
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Can you explain that in more detail?
What are the main benefits or drawbacks?
Can you give me an example?
Чудово!
Completion показник покращився до 5.56
Challenge: Real-World Anonymous Functions
Свайпніть щоб показати меню
Swipe to start coding
Use your knowledge of anonymous functions and lapply to solve a practical data transformation problem.
Write a function capitalize_first that takes a list of names and returns a new list where each name has its first letter capitalized.
- Use
lapplyto apply an anonymous function to each element ofnames_list. - The anonymous function should capitalize only the first letter of each name, leaving the rest unchanged.
- The function must return a list with the transformed names.
Рішення
Дякуємо за ваш відгук!
single