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

bookChallenge: Apply Function Selector

Opgave

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.

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 6
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

close

bookChallenge: Apply Function Selector

Stryg for at vise menuen

Opgave

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.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 6
single

single

some-alt