セクション 2. 章 4
single
Challenge: Inline Functions with apply
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
Use your understanding of anonymous functions and the apply family to classify each element in a numeric vector as "positive", "negative", or "zero".
- Create function
determine_signthat take a list. - Use
sapplywith an anonymous function to process each element of the input vector. - The function must return a character vector of the same length as the input, with each element classified as "positive", "negative", or "zero".
The result for (3, -2, 0, 7, -5) should look like:
"positive" "negative" "zero" "positive" "negative"
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 2. 章 4
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください