Q1
Q1 What type of programming language is R?
Statistical
General-purpose
Scripting
Object-oriented
Q2
Q2 Which of the following is a core feature of R?
GUI development
Web programming
Statistical computing
Mobile development
Q3
Q3 R is part of the software environment for which kind of computing?
Quantum
Statistical
Cloud
Distributed
Q4
Q4 Which IDE is most commonly used with R for data analysis?
Visual Studio Code
Jupyter Notebook
RStudio
Atom
Q5
Q5 R is part of which project that aims to provide software for statistical analysis?
The R Foundation
The R Project for Statistical Computing
Open Source Project
GNU Project
Q6
Q6 What was R based on?
C++
S
Java
Python
Q7
Q7 What type of data analysis is R particularly well-suited for?
Real-time
Exploratory
Big Data
Operational
Q8
Q8 What function in R can be used to generate a sequence of numbers?
seq()
gen()
createSequence()
listNumbers()
Q9
Q9 What symbol is used in R for commenting out a line of code?
#
//
--
%
Q10
Q10 Which data type in R is used to store true or false values?
integer
logical
character
double
Q11
Q11 In R, which function is used to check the data type of a variable?
type()
typeof()
datatype()
varType()
Q12
Q12 Which operator is used to assign values in R?
<-
=
=>
:=
Q13
Q13 What is the default data type of a number in R, like 42?
integer
logical
numeric
character
Q14
Q14 How do you declare a constant in R?
Using the const keyword
By assigning a value once
Using the define keyword
By using the constant() function
Q15
Q15 Which function would you use to convert a character string to uppercase in R?
toUpper()
toUpperCase()
upperCase()
toupper()
Q16
Q16 Which function in R can be used to create a vector of consecutive integers from 1 to 10?
c(1:10)
seq(1, 10)
vector(1, 10)
range(1, 10)
Q17
Q17 How do you start an R script file?
With a function declaration
With libraries loading
With any code
With a shebang line
Q18
Q18 Which symbol in R is used to end a line of code?
;
.
,
|
Q19
Q19 What function is used to check whether a variable is a matrix in R?
is.matrix()
is.array()
is.vector()
is.frame()
Q20
Q20 What is a common reason for the error message "unexpected symbol" in R?
Missing comma
Incorrect function name
Syntax error in code
Unquoted string
Q21
Q21 If an R script is not executing as expected and there is no error message, what might be the issue?
The script is saved in the wrong format
There is an infinite loop
The code is commented out
All libraries are not loaded
Q22
Q22 What type of data structure is a vector in R?
Single-element
Homogeneous
Heterogeneous
Multi-dimensional
Q23
Q23 Which function is used to combine elements into a list in R?
combine()
list()
merge()
collect()
Q24
Q24 In R, what is a data frame?
A special type of list
A special type of matrix
A low-level data structure
A non-relational database
Q25
Q25 How do you access the 3rd element of a vector named 'vec' in R?
vec[3]
vec(3)
vec{3}
vec<3>
Q26
Q26 What is the main difference between a list and a vector in R?
Lists can only contain numeric data
Vectors can contain mixed data types
Lists are 1-dimensional
Lists can contain elements of different types
Q27
Q27 Which function would you use to check if an object is a data frame in R?
is.data.frame()
is.list()
is.vector()
is.frame()
Q28
Q28 What function would you use to create a vector of all even numbers from 2 to 20 in R?
seq(2, 20, by=2)
even(2, 20)
range(2, 20, step=2)
vec_even(2, 20)
Q29
Q29 How do you convert a vector to a list in R?
as.list()
to.list()
convert.list()
make.list()
Q30
Q30 To create a data frame in R, which function should you use?
data.frame()
createDataFrame()
new.data.frame()
df()