R Commander is used to . . . . . . . . in R.
A. Export data
B. Import data
C. Use data
D. Work on data
Select an option to see the answer and solution.
R has . . . . . . . . basic indexing operators.
Select an option to see the answer and solution.
Which of the following code skips the first 20 iterations?
Options are not available for this question.
Select an option to see the answer and solution.
If the function in a console is.matrix(X) returns true then X can be considered as a . . . . . . . .
A. Matrix object
B. Matrix data object
C. Matrix vector
D. Vector
Select an option to see the answer and solution.
How is a Data object represented internally in R language?
A. unclass (as.time ("2018-12-28"))
B. unclass (as.dat ("2018-12-28"))
C. unclass (as.D (2018-12-28))
D. unclass (as.Date ("2018-12-28"))
Select an option to see the answer and solution.
Point out the wrong statement?
A. for will execute a loop a fixed number of times
B. break will execute a loop while a condition is true
C. if and else tests a condition and acting on it
D. break is used to break the execution of a loop
Select an option to see the answer and solution.
Point out the wrong statement?
A. A formal argument can be a symbol, a statement of the form 'symbol = expression', or the special formal argument
B. The first component of the function declaration is the keyword function
C. The value returned by the call to function is not a function
D. Functions are also often written when code must be shared with others or the public
Select an option to see the answer and solution.
Point out the correct statement?
A. Blocks are evaluated until a new line is entered after the closing brace
B. Single statements are evaluated when a new line is typed at the start of the syntactically complete statement
C. The if/else statement conditionally evaluates two statements
D. Break will execute a loop while a condition is true
Select an option to see the answer and solution.
. . . . . . . . function can be used to add datasets in R provided with the columns in the datasets should be the same.
A. rbind()
B. bbind()
C. jbind()
D. hbind()
Select an option to see the answer and solution.
If the programmers want the output to be a data frame or a vector, then . . . . . . . . function is used.
A. Lapply
B. Sapply
C. Vapply
D. Zapply
Select an option to see the answer and solution.
. . . . . . . . loop over a list and evaluate a function on each element.
A. apply()
B. lapply()
C. sapply()
D. mapply()
Select an option to see the answer and solution.
Point out the correct statement?
A. The next statement causes an exit from the innermost loop that is currently being executed
B. There are two statements that can be used to explicitly control looping
C. The break statement immediately causes control to return to the start of the loop
D. Computation in R consists of sequentially evaluating statements
Select an option to see the answer and solution.
Point out the correct statement?
A. Statements, such as x<-1:10 or mean(y), can be separated by either a semicolon or a new line
B. Whenever the evaluator is presented with a syntactically complete statement that statement is evaluated and the value returned
C. Computation in R consists of sequentially evaluating statements
D. All of the mentioned
Select an option to see the answer and solution.
What will be the output of the following R code?
> printmessage <- function(x) {
+ if(x > 0)
+ print("x is greater than zero")
+ else
+ print("x is less than or equal to zero")
+ invisible(x)
+ }
> printmessage(NA)A. Error
B. Warning
C. Messages
D. Null
Select an option to see the answer and solution.
Point out the wrong statement?
A. The sapply() function behaves similarly to lapply()
B. With multiple factors and many levels, creating an interaction can result in many levels that are empty
C. apply() can be thought of as a combination of split() and sapply() for vectors only
D. You can use tsplit() to evaluate a function single time each with a same argument
Select an option to see the answer and solution.
What is the command used to store R objects in a file?
A. save (x, file="x.Rdata")
B. save (x, file=x.Rdata)
C. save (x, file="x.Rdata");
D. save (x, file="x.data")
Select an option to see the answer and solution.
Which of the following R code will print "Neither"?
A. > y <- "meat"
> switch(y, fruit = "banana", vegetable = "broccoli", "Neither")
B. > y <- "brocolli"
> switch(y, fruit = "banana", vegetable = "broccoli", "Neither")
C. > y <- "banana"
> switch(y, fruit = "banana", vegetable = "broccoli", "Neither")
D. > y >- "banana"
> y(y, fruit = "banana", vegetable = "broccoli", "Neither")
Select an option to see the answer and solution.
. . . . . . . . function generates "n" normal random numbers based on the mean and standard deviation arguments passed to the function.
A. rnorm
B. vnorm
C. knorm
D. lnorm
Select an option to see the answer and solution.
What will be the output of the following R code?
> x <- list(a = matrix(1:4, 2, 2), b = matrix(1:6, 3, 2))
> lapply(x, function(elt) { elt[,1] })A. $a
[1] 1 2
$b
[1] 1 2 3
B. $a
[1] 1 2 3
$b
[1] 1 2 3
C. $a
[1] 1 2 3
$b
[1] 1 2
D. Error
Select an option to see the answer and solution.
. . . . . . . . is the easiest method for reshaping the data before analysis.
A. Transpose()
B. Structure()
C. Package
D. Function
Select an option to see the answer and solution.