ExamVeda
Login
Home
41
Which function helps you perform sorting in R language?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
42
What will be the output of the following R code?
> f <- function(num) {
+ for(i in seq_len(num)) {
+               cat("Hello, world!\n")
+ }
+ }
> f(3)
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
43
. . . . . . . . is used to apply a function over subsets of a vector.
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
44
Which of the variable in the following R code is variable?
> f <- function(x, y) {
+            x^2 + y / z
+ }
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
45
What will be the output of the following R code?
function(p) {
          params[!fixed] <- p
          mu <- params[1]
          sigma <- params[2]
## Calculate the Normal density
          a <- -0.5*length(data)*log(2*pi*sigma^2)
          b <- -0.5*sum((data-mu)^2) / (sigma^2)
          -(a + b)
}
> ls(environment(nLL))
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
46
. . . . . . . . initiates an infinite loop right from the start.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
47
What will be the output of runif()?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
48
What will be the output of the following R code snippet?
> g <- function(x) {
+             a <- 3
+             x+a+y
+          ## 'y' is a free variable
+ }
> g(2)
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
49
. . . . . . . . will produce a sequential vector c( (1,2,3,4,5,6,7,8,9)).
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
50
What are the different types of sorting algorithms available in R language?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board