Q81: The___in R is a vector
- A. Basic data structure
- B. Basic datatypes
- C. Both
Answer
Answer B. Basic datatypes
Q82: R is an interpreted language so it can access through___?
- A. Disk operating system
- B. User interface operating system
- C. Operating system
- D. Command line interpreter
Answer
Answer C. Operating system
Q83: Vectors come in two parts___and___
- A. Atomic vectors and matrix
- B. Atomic vectors and array
- C. Atomic vectors and list
Answer
Answer A. Atomic vectors and matrix
Q84: How many types of atomic vectors are present?
- A. 3
- B. 4
- C. 5
- D. 6
Answer
Answer C. 5
Q85: How many types of vertices functions are peresent?
- A. 1
- B. 2
- C. 3
- D. 4
Answer
Answer B. 2
Q86: ___and___are types of matrices functions?
- A. Apply and sapply
- B. Apply and lapply
- C. Both
Answer
Answer C. Both
Q87: How many control statements are present in R?
- A. 6
- B. 7
- C. 8
- D. 9
Answer
Answer A. 6
Q88: Which of the following finds the maximum value in the vector x, exclude missing values
- A. rm(x)
- B. all(x)
- C. max(x, na.rm=TRUE)
- D. x%in%y
Answer
Answer B. all(x)
Q89: Which of the following sort dataframe by the order of the elements in B
- A. a.x[rev(order(x$B)),]
- B. b.x[ordersort(x$B)
- C. c.x[order(x$B),]
Answer
Answer A. a.x[rev(order(x$B)),]
Q90: ___initiates an infinite loop right from the start
- A. Never
- B. Repeat
- C. Break
- D. Set
Answer
Answer B. Repeat
Q91: ___is used to skip an iteration of a loop
- A. Next
- B. Skip
- C. Group
Answer
Answer A. Next
Q92: Finally, in___R version 1.0.0 was released to the public
- A. 2000
- B. 2005
- C. 2010
- D. 2012
Answer
Answer D. 2012
Q93: R is technically much closer to the Scheme language than it is to the original___language
- A. B
- B. S
- C. C
- D. C++
Answer
Answer C. C
Q94: They primary R system is available from the___
- A. CRAN
- B. CRWO
- C. GNU
- D. CRDO
Answer
Answer C. GNU
Q95: Point out the wrong statement?
- A. Key feature of R was that its syntax is very similar to S
- B. R runs only on Windows computing platform and operating system
- C. R has been reported to be running on modern tablets, phones, PDAs, and game consoles
- D. R functionality is divided into a number of Packages
Answer
Answer D. R functionality is divided into a number of Packages
Q96: Which Package contains most fundamental functions to run R?
- A. root
- B. child
- C. base
- D. parent
Answer
Answer A. root
Q97: Which language is best for the statistical environment?
- A. C
- B. R
- C. Java
- D. Python
Answer
Answer B. R
Q98: In order to use the R-related functionality in Dundas BI, you must have access to an existing___
- A. Console
- B. Terminal
- C. Packages
- D. R serve
Answer
Answer D. R serve
Q99: The open source___software is available for Unix, Linux, and Windows platforms
- A. Rserve
- B. BServe
- C. CServe
- D. Dserve
Answer
Answer A. Rserve
Q100: Modification in Dundas BI is done___
- A. Directly
- B. Indirectly
- C. Need access to Server
- D. Not known
Answer
Answer A. Directly
Q101: Is It possible to inspect the source code of R?
- A. Yes
- B. No
- C. Can’t say
- D. Some times
Answer
Answer A. Yes
Q102: ___function is used to watch for all available packages in library
- A. lib()
- B. fun.lib()
- C. libr()
- D. library()
Answer
Answer D. library()
Q103: The longer programs are called___
- A. Files
- B. Structures
- C. Scripts
- D. Data
Answer
Answer D. Data
Q104: Scripts will run on___
- A. Script Editors
- B. Console
- C. Terminal
- D. GCC Compiler
Answer
Answer A. Script Editors
Q105: What will be the output of the following R function?
ab <- list(1, 2, 3, “X”, “Y”, “Z”)
dim(ab) <- c(3,2)
print(ab)
a)
1 “X”
2 “Y”
3 “Z”
b)
1 “X”
2 “Y”
3 “Y”
c)
1 “W”
2 “Y”
3 “Z”
d)
Error
Answer
Answer A
Q106: What is the meaning of the following R function?
x <- c(4, 5, 1, 2, 3, 3, 4, 4, 5, 6)
x <- as.factor(x)
A. x becomes a factor
B. x is a factor
C. x does not exist
D. x is not a vector
Answer
Answer A. x becomes a factor
Q107: What is the meaning of the following R function?
print( sqrt(2) )
A. 1.414314
B. 1.414214
C. Error
D. 14.1414
Answer
Answer B. 1.414214
Q108: What will be the output of the following R function?
d <- date()
A. Prints todays date
B. Prints some date
C. Prints exact present time and date
D. Error
Answer
Answer C. Prints exact present time and date
Q109: Which of the following commands will correctly read the above csv file with 5 rows in a dataframe?
- A. csv(‘Dataframe.csv’)
- B. csv(‘Dataframe.csv’,header=TRUE)
- C. dataframe(‘Dataframe.csv’)
- D. csv2(‘Dataframe.csv’,header=FALSE,sep=’,’)
Answer
Answer B. csv(‘Dataframe.csv’,header=TRUE)
Q110: Consider the following function
f <- function(x) {
g <- function(y) {
y + z
}
z <- 4
x + g(x)
}
If we execute following commands (written below), what will be the output?
z <- 10
f(4)
A. 12
B. 7
C. 4
D. 16
Answer
Answer A. 12
Q111: Excel file format is one of the most common formats used to store datasets. It is important to know how to import an excel file into R. Below is an excel file in which data has been entered in the third sheet
Alpha 125.5 0
Beta 235.6 1
Beta 212.03 0
Beta 211.30 0
Alpha 265.46 1
File Name – Dataframe.xlsx
Which of the following codes will read the above data in the third sheet into a dataframe in R?
A. Openxlsx::read.xlsx(“Dataframe.xlsx”,sheet=3,colNames=FALSE)
B. Xlsx::read.xlsx(“Dataframe.xlsx”,sheetIndex=3,header=FALSE)
C. XLConnect::readWorksheetFromFile(“Dataframe.xlsx”,sheet=3,header=FALSE)
D. All of the above
Answer
Answer D. All of the above
Q112: One of the important phase in a Data Analytics pipeline is univariate analysis of the features which includes checking for the missing values and the distribution, etc. Below is a dataset and we wish to plot histogram for “Value” variable
Parameter State Value Dependents
Alpha Active 50 2
Beta Active 45 5
Beta Passive 25 0
Alpha Passive 21 0
Alpha Passive 26 1
Beta Active 30 2
Beta Passive 18 0
dataframed
Which of the following commands will help us perform that task?
A. hist(dataframed$Value)
B. ggplot2::qplot(dataframed$Value,geom=”Histogram”)
C. ggplot2::ggplot(data=dataframed,aes(dataframe$Value))+geom_histogram()
D. All of the above
Answer
Answer D. All of the above
Q113: Which of the following function is used to view the dataset in spreadsheet like format?
- A. disp()
- B. View()
- C. seq()
- D. All of the Above
Answer
Answer B. View()
Q114: R has how many atomic classes of objects?
- A. 1
- B. 2
- C. 3
- D. 5
Answer
Answer C. 3
Q115: find the output
varx<-23, 34->vary
print(varx == vary)
A. True
B. False
C. None of the above
D. Error
Answer
Answer B. False
Q116: Which of the following is a possible value for the median of the below distribution?
- A. 32
- B. 26
- C. 17
- D. 40
Answer
Answer B. 26
Q117: If the variance of a dataset is correctly computed with the formula using (n – 1) in the denominator, which of the following option is true?
- A. Dataset is a sample
- B. Dataset is a population
- C. Dataset could be either a sample or a population
- D. Dataset is from a census
- E. None of the above
Answer
Answer A. Dataset is a sample
Q118: What would be the critical values of Z for 98% confidence interval for a two-tailed test?
- A. +/- 2.33
- B. +/- 1.96
- C. +/- 1.64
- D. +/- 2.55
Answer
Answer A. +/- 2.33
Q119: Studies show that listening to music while studying can improve your memory. To demonstrate this, a researcher obtains a sample of 36 college students and gives them a standard memory test while they listen to some background music. Under normal circumstances (without music), the mean score obtained was 25 and standard deviation is 6. The mean score for the sample after the experiment (i.e With music) is
What is the null hypothesis in this case?
- A. Listening to music while studying will not impact memory
- B. Listening to music while studying may worsen memory
- C. Listening to music while studying may improve memory
- D. Listening to music while studying will not improve memory but can make it worse
Answer
Answer D. Listening to music while studying will not improve memory but can make it worse
Q120: ___is function in R to get number of observation in a data frame
- A. n( )
- B. ncol( )
- C. nobs( )
- D. nrow( )
Answer
Answer D. nrow( )