ExamVeda
Login
Home
31
Which function calculates the count of each category of a categorical variable?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
32
. . . . . . . . applies a function over the margins of an array.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
33
The syntax of the for loop is?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
34
What will be the output of the following R code?
> printmessage2 <- function(x) {
+     if(is.na(x))
+             print("x is a missing value!")
+     else if(x > 0)
+             print("x is greater than zero")
+     else
+             print("x is less than or equal to zero")
+     invisible(x)
+ }
> printmessage2(NA)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
35
. . . . . . . . require you to pass a function whose argument is a vector of parameters.
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
36
Which of the following is valid syntax for if else statement in R?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
37
What will be the class of the vector if you concatenate a number and NA?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
38
What will be the output of the following R code snippet?
> f <- function(a, b) {
+       a^2
+ }
> f(2)
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
39
. . . . . . . . function is preferred over sapply as vapply allows the programmer to specific the output type.
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
40
The line of code in R language should begin with a . . . . . . . .
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board