Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Apply Function Selector | Apply Family Functions in R
Control Flow in R

bookChallenge: Apply Function Selector

Tâche

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

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 6
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

close

bookChallenge: Apply Function Selector

Glissez pour afficher le menu

Tâche

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 desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 6
single

single

some-alt