Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Apply Function Selector | Apply Family Functions in R
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Control Flow in R

bookChallenge: 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 lst and calculate its sum.
  • Return a numeric vector containing the sum of each input vector.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 6
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

close

bookChallenge: 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 lst and calculate its sum.
  • Return a numeric vector containing the sum of each input vector.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 3. Chapter 6
single

single

some-alt