Correct Answer:
Empty vectors can be created with the vector() function
Note: This Question is unanswered, help us to find answer for this one
What can a factor hold?
Correct Answer:
Both strings and integers
Note: This Question is unanswered, help us to find answer for this one
Identify which of the following expressions will give an error in R:
Correct Answer:
_abc <- 1
Note: This Question is unanswered, help us to find answer for this one
Which of the following is an invalid assignment ?
Correct Answer:
> name(x) <- c("New York", "Seattle", "Los Angeles")
Note: This Question is unanswered, help us to find answer for this one
____ loops over a list and evaluate a function on each element.
Correct Answer:
apply()
Note: This Question is unanswered, help us to find answer for this one
Which of the following is a valid body of split function ?
Correct Answer:
function (x, f, drop = FALSE, …)
Note: This Question is unanswered, help us to find answer for this one
Lst <- list(name="Fred", wife="Mary", no.children=3, child.ages=c(4,7,9)) What is the value of length(Lst)?
Correct Answer:
4
Note: This Question is unanswered, help us to find answer for this one
What is the use of the doBY package?
Correct Answer:
defines the desired table using function and model formula
Note: This Question is unanswered, help us to find answer for this one
Which statement changes the column name to h and f of a matrix m?
Correct Answer:
colnames(m) <- c("h", "f")
Note: This Question is unanswered, help us to find answer for this one
What is the difference between seq(4) and seq_along(4)?
Correct Answer:
seq(4) produces a vector from 1 to 4 (c(1, 2, 3, 4)), and seq_along(4) produces a vector of length(4), or 1 (c(1))
Note: This Question is unanswered, help us to find answer for this one
Which package in R supports the exploratory analysis of genomic data?
Correct Answer:
adegenet
Note: This Question is unanswered, help us to find answer for this one
What is the result of the following R code? > x <- 0:6 > y <- x[2 * 1:3] > length(y) <- 2 > y
Correct Answer:
[1] 1 3
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following expression? > c(0, FALSE)
Correct Answer:
[1] 0 0
Note: This Question is unanswered, help us to find answer for this one
What is the result of the following code? > x <- 0:3 > y <- as.character(x) > z <- as.integer(y) > z
Correct Answer:
[1] 0 1 2 3
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following commands? > x <- paste(c("X", "Y"), 1:2, sep='') > x
Correct Answer:
[1] "X1" "Y2"
Note: This Question is unanswered, help us to find answer for this one
In an R list, '[[...]]' is ......
Correct Answer:
the operator used to select a single element.
Note: This Question is unanswered, help us to find answer for this one
What are the different types of sorting algorithms available in R?
Correct Answer:
All of the above
Note: This Question is unanswered, help us to find answer for this one
_____ function removes predictors that are sparse and highly unbalanced?
Correct Answer:
nearZeroVar
Note: This Question is unanswered, help us to find answer for this one
What is returned by the following code? x <- 0 y <- 10 f <- function() { x <- 1 g() } g <- function() { x <- 2 h() } h <- function() { x <- 3 x + y } f()
Correct Answer:
[1] 13
Note: This Question is unanswered, help us to find answer for this one
Does the following expression throw an error? f2 <- function(a, b) { a * 10 } f2(10, stop("This is not an error!"))
Correct Answer:
No
Note: This Question is unanswered, help us to find answer for this one
Which of the expressions below result in the following output?
> [1] "a b"
Correct Answer:
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following code? > y <- 5; f <- function(x) { y <-2; y^2 + g(x)}; g <- function(x) { x + y } > f(4)
Correct Answer:
13
Note: This Question is unanswered, help us to find answer for this one
Point out the wrong statement.
Correct Answer:
A formal argument can be a symbol, a statement of the form ‘symbol = expression’, or the special formal argument
Note: This Question is unanswered, help us to find answer for this one
What will be the output of the following code ? > f <- function() { + ## This is an empty function + } > f()
Correct Answer:
NULL
Note: This Question is unanswered, help us to find answer for this one
M2 performs class prediction based on ___ data and clinical parameters?
Correct Answer:
microarray
Note: This Question is unanswered, help us to find answer for this one
Data frames in R language can be merged manually using? Check all that apply.
Correct Answer:
cbind ()
merge ()
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
What would be the output of the following code ? > x <- 1:4 > x > 2
Correct Answer:
FALSE FALSE TRUE TRUE
Note: This Question is unanswered, help us to find answer for this one
fun1 <- function(a, b, c, ... ) { ans <- 2; ans} s <- fun1(1, 2, 3, 4, 5, 6, 7, 8) What is the value contained by s?
Correct Answer:
2
3
7
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following commands? > x <- c(1, 2) > y <- c(x, 0, x) > z <- 2*x + y + 1 > z
Correct Answer:
Error
Note: This Question is unanswered, help us to find answer for this one
What does the following code return? x <- 5 f1 <- function(x) { function() { x + 6 } } f1(3)()
Correct Answer:
9
Note: This Question is unanswered, help us to find answer for this one
fun1 <- function(data, data.frame, graph=TRUE, limit=20) { ... [ function body omitted] ... } Which of the following does NOT involve a valid invocation of this function?
Correct Answer:
ans <- fun1(d)
Note: This Question is unanswered, help us to find answer for this one
Which code can be used for converting all variables?
Correct Answer:
col_names <- names(mydata) mydata[,col_names] <- lapply(mydata[,col_names] , factor)
col_names <- names(mydata) mydata[,col_names] <- lapply(mydata[,col_names] , factor)
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following commands?
> x <- c(1, 2)
> y <- c(x, 0, x)
> prod(y)
Correct Answer:
[1] 1 2 0 1 2
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following commands? > x <- c(-1, 0, 1, 2, NA) > (x+1)[(!is.na(x)) & x>0]
Correct Answer:
[1] 2 3
Note: This Question is unanswered, help us to find answer for this one
What are the column names of the dataset?
Correct Answer:
names(dataset)
colnames(dataset)
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
"%UpWork%" <- function(x, y) {upw <- x + y; upw} ans <- c(1,2)%UpWork%c(2,3) What is value of ans?
Correct Answer:
(3, 5)
Note: This Question is unanswered, help us to find answer for this one
Which function performs classical multidimensional scaling?
Correct Answer:
cmdscale() function
Note: This Question is unanswered, help us to find answer for this one
You can check to see whether an R object is NULL with the _____ function.
Correct Answer:
is.null()
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following expression? num <- 5; res <- 1; for (i in 1:num) { if (i%%2 == 0) {res <- res * i}}; res
Correct Answer:
8
Note: This Question is unanswered, help us to find answer for this one
__ prints out the function call stack after an error occurs?
Correct Answer:
traceback()
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following expression? > x <- c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) > x[-(1:3)]
Correct Answer:
[1] 3 4 5 6 7 8 9
Note: This Question is unanswered, help us to find answer for this one
Which code will rename the field old_name to new_name in the data frame called data?
Correct Answer:
colnames(data)[colnames(data)=="old_name"] <- "new_name"
Note: This Question is unanswered, help us to find answer for this one
What would the following code print ? > x <- data.frame(foo = 1:4, bar = c(T, T, F, F)) > ncol(x)
Correct Answer:
2
Note: This Question is unanswered, help us to find answer for this one
In which of the following is HousePrice a data frame? (1) HousePrice <- data.frame(home=statef, postCode=zip, price=fee) (2) HousePrice <- read.table("house.data") (3) HousePrice <- scan("house.data", list("", 0, 0)
Correct Answer:
1 and 2
Note: This Question is unanswered, help us to find answer for this one
___ function returns a vector of the same size as x with the elements arranged in increasing order.
Correct Answer:
orderasc()
Note: This Question is unanswered, help us to find answer for this one
Consider the following code output? x = "I love R Programming" library(stringr) str_to_title(x)
Correct Answer:
I LOVE R PROGRAMMING
Note: This Question is unanswered, help us to find answer for this one
Which function is used to generate factor levels?
Correct Answer:
gl()
Note: This Question is unanswered, help us to find answer for this one
___regression is used to predict the binary outcome from the given set of continuous predictor variables?
Correct Answer:
Logistic
Note: This Question is unanswered, help us to find answer for this one
How can you merge two data frames in R?
Correct Answer:
Using combine() function
Note: This Question is unanswered, help us to find answer for this one
What are the row names of the data frame?
Correct Answer:
row.names(dataset)
rownames(dataset)
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Which statement makes a mosaic plot ?
Correct Answer:
mosaicplot()
Note: This Question is unanswered, help us to find answer for this one
What is the factor variable in R language?
Correct Answer:
Both 1 and 2
Note: This Question is unanswered, help us to find answer for this one
How do you create log linear models in R language?
Correct Answer:
loglm () function
Note: This Question is unanswered, help us to find answer for this one
R is easily extensible through functions and ____?
Correct Answer:
Extensions
Note: This Question is unanswered, help us to find answer for this one
What is the difference between matrix and dataframe?
Correct Answer:
Dataframe can contain different types of data but matrix can contain only similar type of data.
Note: This Question is unanswered, help us to find answer for this one
Which of the following determines the least-squares regression line ?
Correct Answer:
lm
Note: This Question is unanswered, help us to find answer for this one
Let v be a vector. What is the correct way of creating a factor from v?
Correct Answer:
factor(v)
Note: This Question is unanswered, help us to find answer for this one
What is the result of the following R code? > x <- c(0, 1, 2, 3, 4, 5, 6, 7) > dim(x) <- c(2,2,2) > x[,2,]
Correct Answer:
[,1] [,2] [1,] 2 6 [2,] 3 7
Note: This Question is unanswered, help us to find answer for this one
What is the result of the following code? > a <- array(c(0:1, 1:0), dim=c(2,2)) > a %*% a
Correct Answer:
[,1] [,2] [1,] 1 0 [2,] 0 1
Note: This Question is unanswered, help us to find answer for this one
What is the result of the following R code? > x <- array(0:7, dim=c(2,4)) > i <- array(c(1:2, 4:3), dim=c(2,2)) > x[i]
Correct Answer:
[1] 6 5
Note: This Question is unanswered, help us to find answer for this one
How can you create scatterplot matrices?
Correct Answer:
Both 1 and 2
Note: This Question is unanswered, help us to find answer for this one
Data frames can be converted to a matrix by calling data.__
Correct Answer:
matrix()
Note: This Question is unanswered, help us to find answer for this one
What is the result of the following R code? > x <- array(0:7, dim=c(2,2,2)) > i <- array(c(1:2, 4:3), dim=c(2,2)) > x[i]
Correct Answer:
[1] 0 1 3 2
Note: This Question is unanswered, help us to find answer for this one
How do you obtain the transpose of a matrix m in R?
Correct Answer:
t(m)
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following code? > x <- c(0, 1, 2, 3, 4, 5, 6, 7) > dim(x) <- c(2,2,2) > x[1,1,2]
Correct Answer:
[1] 4
Note: This Question is unanswered, help us to find answer for this one
Which of the following is lattice command for producing boxplots ?
Correct Answer:
bwplot()
Note: This Question is unanswered, help us to find answer for this one
Point out the correct statement.
Correct Answer:
Matrices are vectors with a dimension attribute
Note: This Question is unanswered, help us to find answer for this one
Error is an indication that a fatal problem has occurred and __ of the function stops?
Correct Answer:
execution
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following code? > x <- outer(1:2, 1:2, FUN = "*") > x
Correct Answer:
[,1] [,2] [1,] 1 2 [2,] 2 4
Note: This Question is unanswered, help us to find answer for this one
What is the result of the following R code? > a <- array(0:7, dim=c(2,2,2)) > b<-a%*%a > b[1]
Correct Answer:
140
Note: This Question is unanswered, help us to find answer for this one
While creating a data frame, the variables must have __ length?
Correct Answer:
Same
Note: This Question is unanswered, help us to find answer for this one
uniPlot uniforms and customizes plots of packages _ , __ and lattice?
Correct Answer:
ggplot2, graphics
Note: This Question is unanswered, help us to find answer for this one
What would be the output of the following code ? > m <- matrix(1:4, nrow = 2, ncol = 2) > dimnames(m) <- list(c("a", "b"), c("c", "d")) > m
Correct Answer:
c d a 1 3 b 2 4
Note: This Question is unanswered, help us to find answer for this one
The following vector represents the country of each of 10 freelancers on UpWork: > country <- c("UK", "Vietnam", "USA", "Russia", "Russia", "Egypt", "UK", "Vietnam", "Egypt", "USA") The following vector represents the hourly rate of the same 10 freelancers: > hourlyRate <- c(10, 20, 30, 40, 50, 50 ,40 ,30 ,20 ,10) Which R command will show the average rate for each country?
Correct Answer:
tapply(hourlyRate, country, mean)
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following expression? > c(list(1), "1")
Correct Answer:
[[1]] [1] 1 [[2]] [1] "1"
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following commands? > x <- c(0, 1, 2) > y <- x != 0 > y
Correct Answer:
[1] FALSE TRUE TRUE
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following commands? > x <- c(1, 2) > y <- c(4, 5) > pmax(x, y)
Correct Answer:
[1] 4 5
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following commands? > x <- c(1, 2) > y <- c(4, 5) > pmax(x, y)
Correct Answer:
[1] 0 1 2 3 4 5 6 7 8 9
Note: This Question is unanswered, help us to find answer for this one
The ____ function takes an arbitrary number of arguments and concatenates them one by one into character strings?
Correct Answer:
copy()
Note: This Question is unanswered, help us to find answer for this one
Functions are defined using the _____ directive and are stored as R objects.
Correct Answer:
function()
Note: This Question is unanswered, help us to find answer for this one
Which function gives the structure of a data frame “df”?
Correct Answer:
str(df)
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following command? > 2*1:10
Correct Answer:
[1] 2 4 6 8 10 12 14 16 18 20
Note: This Question is unanswered, help us to find answer for this one
Which of the following is lattice command for producing a scatterplot ?
Correct Answer:
xyplot()
Note: This Question is unanswered, help us to find answer for this one
Point out the correct statement.
Correct Answer:
Sequence of operations is sometimes referred to as “map-reduce”
Note: This Question is unanswered, help us to find answer for this one
What is the correct way of converting a factor to integer in R?
Correct Answer:
a2 = as.numeric(as.character(a)) str(a2)
Note: This Question is unanswered, help us to find answer for this one
What is the output of the following commands? > x <- c(1:3, NA) > y <- is.na(x) > y
Correct Answer:
[1] FALSE FALSE FALSE TRUE
Note: This Question is unanswered, help us to find answer for this one
Point out the correct statement.
Correct Answer:
None of the mentioned
Note: This Question is unanswered, help us to find answer for this one
Melt is used to convert wide data to _____ data?
Correct Answer:
long
Note: This Question is unanswered, help us to find answer for this one
gzfile opens a connection to a file compressed with _____?
Correct Answer:
gzip
Note: This Question is unanswered, help us to find answer for this one
Which function is used to convert a list ‘a’ to a vector?
Correct Answer:
unlist(a)
Note: This Question is unanswered, help us to find answer for this one
What would be the output of the following code ? > x <- 1:3 > names(x)
Correct Answer:
NULL
Note: This Question is unanswered, help us to find answer for this one
Using the __ the BY variable should be in the list?
Correct Answer:
aggregate() function
Note: This Question is unanswered, help us to find answer for this one
Lst <- list(name="Fred", wife="Mary", no.children=3, child.ages=c(4,7,9)) What is the value of Lst[[4]][2]?
Correct Answer:
7
Note: This Question is unanswered, help us to find answer for this one
Lst <- list(name="Fred", wife="Mary", no.children=3, child.ages=c(4,7,9)) What is Lst[[1]]?
Correct Answer:
Fred
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
library('xlsx')
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
getwd
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
repeat
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
break
next
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
What will be the output of the following program on R interpreter?
tempString <- "Hello.World!"
print (tempString)
tempString
Correct Answer:
[1] "Hello,World!" [1] "Hello,World!"
Note: This Question is unanswered, help us to find answer for this one
What will be the output of the following program on R interpreter?
foo <- 'red'
switch(foo, fruit = "apple", vegetable = “chilli‘. "Exception')
Correct Answer:
Exception
Note: This Question is unanswered, help us to find answer for this one
What will be the output of the following program on R interpreter?
custom_cub_function <- function()
i
for(i in 1:4)
{
i
cubeoutput <- i"3
print[cubeoutput)
}
Correct Answer:
No output.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
formula, which is a symbol. presenting the relation between x and y.
data. which is the vector on which the formula will be applied.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
will load add-on packages
Note: This Question is unanswered, help us to find answer for this one
You have an Excel workbook with the name "data.xlsx". it has 3 sheets. Which of the following options will load the Excel workbook and read the second sheet?
Correct Answer:
data <~ read.xlsx(‘data.xlsx', sheetlndex = 2)
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
1 1 123
2 999
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
R has four in-built functions to generate a normal distribution. Which of the following functions gives the height of the probability distribution at each point for a given mean and standard deviation?
Correct Answer:
dnorm(x, mean, sd)
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
grep(pattern.x)
match(x,table)
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
in R language, in order to calculate the mean of a given set of values, the mean() function is used. Following is the basic syntax for the same:
mean(x, trim = O, na.rm = FALSE, ...)
Which of the following parameters is used to remove the missing values from the input vector?
Correct Answer:
na.rm
Note: This Question is unanswered, help us to find answer for this one
R has four in-built functlons to generate a normal distributlon. Which of the following functions takes the probability value and gives a number. whose cumulative value matches the probability value?
Correct Answer:
qnorm(p.mean. sd)
Note: This Question is unanswered, help us to find answer for this one
The middle-most value in a data series is called the median. The median() function is used. in R. to calculate this value. Which of the following are the valid parameters in the median() function?
Correct Answer:
x, which is the input vector. na.rm, which is used to remove the missing values from the input vector.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
What will be the output of the following R code?
car_colors <~ ci‘black',‘red','blue'.'blue'.'-.vltite'.‘metallic',‘red')
tactor_cars <~ Iactor(car_colors)
Print (factor_cars)
print(nlevels(factot_cats))
Correct Answer:
[1] black red blue blue White metallic red Levels: black blue metallic red white [1] 5
Note: This Question is unanswered, help us to find answer for this one
What will be the output ofthe following program on R interpreter?
foo <- C("Testing","loop")
count <— 5
repeat {
print(foo)
count <- count +1
if(count > 8.34)[
break
}
]
Correct Answer:
[1]"Testing""loop" [1] "Testing""loop" [1] "Testing""loop" [1] "Testing""loop"
Note: This Question is unanswered, help us to find answer for this one
What will be the output of the following program on R Interpreter?
foo <- c(‘Testing‘.’while statement‘)
cnt <- 7
while [cnt<11.64)
[
printltoo)
cnt = count + 1
]
Correct Answer:
[1] 'Testlng’”while statement’ [1] "Testing‘'while statement' [1] “Testing“while statement‘ [1] "Testing"‘while statement' [1] "Testing”while statement‘
Note: This Question is unanswered, help us to find answer for this one
Following is a function definition in R programming language:
foo.function <- function(a =1, b = 2. c = 3)
{result <- a ’ b+ c
print(result)
}
Correct Answer:
foo.functlon() foo.functlon(8,6,4) foo.functlon(b=10,a=9)
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
print(rootnode[[1]]11]]) will get the first element of the second node
printfrootnodeflimm) will get the first element of the first node.
xmlToDataFrarnefinputxml
xmlSize(rootnode) will find the number of child nodes under the root node.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Following is a code snippet executed on R interpreter:
sales <- c(10,20.30.40.50)
months <- c{"JAN".“FEB"."MARCH"."APRIL"."MAY")
png(file = "months_sales.png")
barplot(sales,names.arg = months.xlab = "Month".ylab = "Sales",col = "Red",main = "Sales Chart“,border =
"Black")
What does this code do?
Correct Answer:
It creates the vector data for the bar chart. It gives a name to the chart file. It plots the bar chart.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Find the error in following code snippet
foodata <- data.frame(
empid = C(11:15),
empname = c("EMP2"."EMP3"."EMP4","EMP5"),
"" = c(100,200,300,400,500},
empjoindate = asDatetcf'2017—01-01", '2017~02~01", '2017-03-01‘, "2017-0401”,"2017~05-01‘)),
stringsAsFactors = FALSE
)
print(foo.data)
Correct Answer:
One of the column names has a zero-length variable name. The column
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
as.array
Note: This Question is unanswered, help us to find answer for this one
What wlll be the Output of the following program on R Interpreter?
v <- LETTERS[5:1]
{or (i in v)
{
print(i)
}
Correct Answer:
[1] “E” [1] "D" [1] “C” [1] "B" [1] "A.”
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
choose(n. K)
Note: This Question is unanswered, help us to find answer for this one
Following is a code snippet to be used to draw a boxplot in R:
boxplot(mpg "‘ Cyl, data = mtcars,
xiab = "Number of Cylinders",
ylab = Miles Per Gallon“,
main = "Mileage Data",
notch = TRUE,
varwldth = FALSE.
col = ched","Biue","Green"],
names = c("High","Medium","Low")
Which of the following options is NOT correct?
Correct Answer:
It will draw a box with the width proportionate to the sample (data inputted) size.
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
labels
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
any(grepl(‘x|sx',instalIed.packages()))
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
output <- read.csv('data.csv')
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Switch
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
foo <. c[10. 10. 10. 70)
foo <- c[0. 10. 10. 90)
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
operator creates the series of numbers in sequence for a vector.
Note: This Question is unanswered, help us to find answer for this one
What will be the output of the following program on R interpreter?
temp <- c("Comp|ex","Simple")
cnt <- 10
repeat
[
print(temp)
cnt <— cnt-1
if(cnt < 6.5) {
break
1
}
Correct Answer:
[1]"Complex""Simple" [1] "Complex""Simple" [1] "Complex""Simple" [1] "Complex""Simple"
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
print(24)
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
main
Note: This Question is unanswered, help us to find answer for this one
Following Is a function definition in R programming language:
foo.function <- function(a,b)
{
print{a)
print{b‘b)
}
Which of the following function calls will give an error?
Correct Answer:
foo.functlon(9)
Note: This Question is unanswered, help us to find answer for this one
What will be the output of the following program on R interpreter?
OUTPUTMATRIX = matrix( c("1","2"."3"."4"."5"."6"."7"."8"."9"."10"."11","12"). nrow = 4, ncol = 3. byrow = FALSE)
print(OUTPUTMATRlX)
Correct Answer:
[.1] [.2] [.3] [1.] '1' ' 5' '9' [2.] '2' '6' '10' [3.] '3' '7' '11' [4.] '4' '8' '12'
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
13 4L
0L
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Following is a function definition in R programming language:
dummy.function <- function(a.b.c) [
result -=- a ‘+ b ' c
print(result)
]
Which of the following function calls will give the output: 41895?
Correct Answer:
dummy.function(200.1345.31) dumnly.function(b=1345.a=200.c=31]
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
What will be the output of the following code on the R Interpreter?
print(seq(7,12. by = 0.68))
Correct Answer:
[1] 7.00 7.68 8.36 9.04 9.7210.4011.0811.76
Note: This Question is unanswered, help us to find answer for this one
In R programming language. the arguments of a function can be partially matched using the following checks:
Check for a partial match.
Check for a positional match.
Check for exact match for a named argument
Which of the following Is the correct sequence of checks followed by the function to partially match the supplied arguments?
Correct Answer:
CAB
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
file
header
sep
quote
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
What will be the output of the following program on R Interpreter?
v <- 3+16i
printiclass()
v <— 3"46
print[class[v])
v <~ 3l+16
printiclassMJ
v <- 316
print(class[v))
Correct Answer:
[[1] 'complex' [1] 'numeric' [1] 'complex' [1] 'numeric'
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
[1] TESTOUTPUT
Note: This Question is unanswered, help us to find answer for this one
What will be the output of the following program on R interpreter?
v <- LETTERS[9.55:15.86]
for ( i in v)
{
if (i = "0")(
next
]
print(i)
}
Correct Answer:
[1]'1' [1] 'J' [1]'k' [1] 'L' [1]M' [1] 'N' [1] '0'
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
Xllnil
['1'] xfl'name
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
print(2+3i)
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
get elements from n+1 to the end.
Note: This Question is unanswered, help us to find answer for this one
Which of the given tasks are performed by the following code?
library("rjso")
result <- fromJSON(lile = '"data.json"]
print(result)
Correct Answer:
I It loads the package required to read JSON files. It reads the file It prints the contents of the [son file.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
R uses the function. barplotii. to create bar charts. The basic syntax to create a bar chart In R is:
barplot(H. xlab. yiab. main. namesarg. col)
Which of the following options are correct?
Correct Answer:
namesarg is a vector of names appearing under each bar. col is used to give colors to the bars in the graph.
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
cbind()
Note: This Question is unanswered, help us to find answer for this one
Correct Answer:
break
Note: This Question is unanswered, help us to find answer for this one
Find the output of the following code on the R Interpreter.
months <- c{"JAN"."FEB"."MARCH"."APRIL"."MAY"."JUNE"."JULY")
output <- months[c(1.TRUE.4.TRUE.5)]
print(output)
Correct Answer:
[1]'JAN' 'JAN' 'APRIL' 'JAN' 'MAY' [1]' JAN' 'FEB' 'MARCH' 'APRIL' 'MAY'
Note: This question has more than 1 correct answers
Note: This Question is unanswered, help us to find answer for this one
R Programming MCQs | Topic-wise