Challenge: Apply Function Selector
Task
Swipe to start coding
Given a list of numeric vectors, write a function that returns the sum of each vector as a simple numeric vector using the appropriate apply family function.
- Use the correct apply family function to iterate over each element in
lstand calculate its sum. - Return a numeric vector containing the sum of each input vector.
Solution
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 6
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: Apply Function Selector
Swipe to show menu
Task
Swipe to start coding
Given a list of numeric vectors, write a function that returns the sum of each vector as a simple numeric vector using the appropriate apply family function.
- Use the correct apply family function to iterate over each element in
lstand calculate its sum. - Return a numeric vector containing the sum of each input vector.
Solution
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 6
single