What does the following R function do?

R Function Quiz

Quiz
•
Computers
•
University
•
Medium
Kundan Kumar
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
5
Error
15
Nothing
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does the ... (ellipsis) represent in an R function?
A placeholder for arguments that will be passed explicitly
The function will return an error
The function can accept a variable number of arguments
A default argument
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following functions is used to apply a function to each element of a list and returns a list?
apply()
sapply()
lapply()
mapply()
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What will the following code return?
15
13
5
10
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the purpose of sapply() in R?
Apply a function to each element of a list and return a vector or matrix
Apply a function to each element of a list and return a list
Apply a function to rows/columns of a matrix
Apply a function to multiple arguments
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is a key feature of lapply in R?
Returns a data frame.
Applies a function to elements of a list and returns a list.
Applies a function to a data frame column-wise.
Applies a function to each element of a vector and returns a matrix.
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which function would you use to apply a function to rows or columns of a matrix?
mapply
lapply
apply
sapply
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
PROBLEM SOLVING USING R - UNIT II - TEST 2 - MCQS

Quiz
•
University
12 questions
Web Apps 03 - MongoDB

Quiz
•
University
7 questions
Final Practice

Quiz
•
University
10 questions
Microsoft Excel (Range)

Quiz
•
University
10 questions
Lists in python

Quiz
•
University
10 questions
Introduction to Deep Learning

Quiz
•
University
10 questions
Weekly Contest #10 - TechXNinjas

Quiz
•
University
15 questions
Linux Tools for Developers

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade