wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

R Prog Quiz - 2

Total questions: 60

Worksheet time: 30mins

Name
Class
Date
1.
Data analytics encompasses which of the following processes?
a)
Collecting, cleansing, organizing, and analyzing data
b)
Only analyzing data using tools
c)
Storing and governing data only
d)
None of the above
2.
What year was R programming language first introduced?
a)
1995
b)
2000
c)
2005
d)
2010
3.
What is the primary goal of data analytics?
a)
Storing data securely
b)
Analyzing data using tools
c)
Extracting meaningful insights from data
d)
Governing data effectively
4.
Which phase of the data lifecycle involves ensuring data quality and consistency?
a)
Collecting
b)
Cleansing
c)
Organizing
d)
Storing
5.
What term describes the process of focusing on more detailed data from summarized data?
a)
Drill Down
b)
Drill Up
c)
Filter
d)
Sort
6.
Which of the following is NOT a characteristic of data?
a)
Flexibility
b)
Completeness
c)
Consistency
d)
Uniqueness
7.
What does "timeliness" refer to in the context of data characteristics?
a)
The speed at which data is analyzed
b)
The accuracy of data
c)
The consistency of data over time
d)
The availability of data when needed
8.
What type of data is characterized by its organization into rows and columns with a clear schema?
a)
Semi-structured data
b)
Unstructured data
c)
Structured data
d)
Dynamic data
9.
Which type of analytics focuses on explaining why a particular event happened?
a)
Descriptive analytics
b)
Diagnostic analytics
c)
Predictive analytics
d)
Prescriptive analytics
10.
In which type of analytics is historical data used to make predictions about future events?
a)
Descriptive analytics
b)
Diagnostic analytics
c)
Predictive analytics
d)
Prescriptive analytics
11.
Which term refers to the process of recommending actions based on data insights?
a)
Descriptive analytics
b)
Predictive analytics
c)
Prescriptive analytics
d)
Diagnostic analytics
12.
Which application of data analytics involves analyzing customer behavior to provide personalized recommendations?
a)
Internet search
b)
Digital advertisements
c)
Recommender systems
d)
Delivery logistics
13.
Who are the creators of the R programming language?
a)
John Chambers
b)
Ross Ihaka and Robert Gentleman
c)
Guido van Rossum
d)
Larry Wall
14.
What language served as an inspiration for the creation of R's lexical scoping semantics?
a)
Python
b)
S
c)
C++
d)
Java
15.
Who created the S programming language, which heavily influenced the development of R?
a)
Ross Ihaka
b)
Robert Gentleman
c)
John Chambers
d)
Larry Wall
16.
What function is used to concatenate objects in R?
a)
concat()
b)
combine()
c)
c()
d)
concatObjects()
17.
What function is used to get the current working directory in R?
a)
currentdir()
b)
getwd()
c)
cwd()
d)
currentdirpath()
18.
Which of the following is NOT a data type in R?
a)
Integer
b)
String
c)
Float
d)
Double
19.
Which operator is used for exponentiation in R?
a)
^
b)
**
c)
*
d)
v
20.
What function is used to list files in the current working directory in R?
a)
listfiles()
b)
ls()
c)
dir()
d)
filelist()
21.
What function is used to sort values in R?
a)
order()
b)
sort()
c)
arrange()
d)
orderValues()
22.
In R, what is the scope of a variable defined inside a function?
a)
Local to the function
b)
Global to the script
c)
Global to the function
d)
Local to the script
23.
What happens if you attempt to access a variable outside its scope in R?
a)
Error: Variable not defined
b)
Error: Variable out of scope
c)
No error, the variable is automatically made global
d)
No error, the variable retains its original scope
24.
Which of the following is a complex data type in R?
a)
Integer
b)
Float
c)
Character
d)
Complex
25.
How can you take input from the user in R?
a)
input()
b)
read()
c)
scan()
d)
readline()
26.
Which function is used for output in R?
a)
print()
b)
display()
c)
show()
d)
output()
27.
Which looping statement is used to iterate over a sequence of values in R?
a)
for()
b)
while()
c)
repeat()
d)
until()
28.
What statement is used to exit a loop prematurely in R?
a)
end()
b)
terminate()
c)
stop()
d)
break()
29.
What statement is used for multi-way decision making in R?
a)
ifelse()
b)
for()
c)
switch()
d)
while()
30.
Which data structure in R is one-dimensional and homogeneous?
a)
Lists
b)
Data frames
c)
Matrices
d)
Arrays
31.
Which data structure in R is used for tabular data?
a)
Vectors
b)
Lists
c)
Data frames
d)
Matrices
32.
What function is used to create a vector in R?
a)
list()
b)
array()
c)
vector()
d)
c()
33.
Which function in R is used to create a character vector by formatting elements according to a specified format?
a)
print()
b)
sprintf()
c)
cat()
d)
write()
34.
Which loop in R is typically used for iterating over a sequence of elements and executing a block of code a fixed number of times?
a)
while loop
b)
repeat loop
c)
for loop
d)
do-while loop
35.
What is the syntax for a nested for loop in R?
a)
for (i in 1:10) { for (j in 1:5) { } }
b)
for (i = 1 to 10) { for (j = 1 to 5) { } }
c)
for (i = 1:10) { for (j = 1:5) { } }
d)
for (i from 1 to 10) { for (j from 1 to 5) { } }
36.
What is the primary difference between a while loop and a repeat loop in R?
a)
There is no difference; they serve the same purpose.
b)
A while loop checks the condition before each iteration, while a repeat loop checks the condition after each iteration.
c)
A while loop can only execute a block of code once, while a repeat loop can execute it multiple times.
d)
A repeat loop always executes at least once, while a while loop may not execute at all.
37.
Which function is used in R to read data from a CSV file?
a)
read.csv()
b)
read.csv2()
c)
read.table()
d)
read.xlsx()
38.
Which function is used to fetch data from a web URL in R?
a)
read.csv()
b)
read.table()
c)
readLines()
d)
read_html()
39.
Which function is used to read JSON files into R?
a)
read.json()
b)
fromJSON()
c)
readLines()
d)
read.jsonfile()
40.
Which package in R is commonly used to work with Excel files?
a)
xlsx
b)
readxl
c)
read.xlsx
d)
jsonlite
41.
To read data from an Excel file in R, which function is used?
a)
read.xlsx()
b)
read.csv()
c)
read_excel()
d)
read.table()
42.
Which package is commonly used to read data from JSON files in R?
a)
jsonlite
b)
readxl
c)
xml2
d)
httr
43.
Which R function is commonly used to create a bar chart?
a)
plot()
b)
hist()
c)
barplot()
d)
boxplot()
44.
Which type of graph is most suitable for showing the relationship between two continuous variables?
a)
Bar chart
b)
Line graph
c)
Scatterplot
d)
Pie chart
45.
In R, what function is used to create a line graph?
a)
plot()
b)
lines()
c)
lineplot()
d)
linegraph()
46.
What function in R is used to create a pie chart?
a)
pie()
b)
plot()
c)
barplot()
d)
hist()
47.
Which type of graph is useful for comparing categories by their frequencies or counts?
a)
Boxplot
b)
Histogram
c)
Scatterplot
d)
Line graph
48.
In R, what function is commonly used to create a histogram?
a)
plot()
b)
hist()
c)
barplot()
d)
pie()
49.
Which function in R is used to calculate the variance of a dataset?
a)
var()
b)
sd()
c)
mean()
d)
median()
50.
Which function in R provides a summary of descriptive statistics for a dataset?
a)
describe()
b)
summary()
c)
stats()
d)
analyze()
51.
The binomial distribution is used to model the number of:
a)
Continuous outcomes
b)
Categorical outcomes
c)
Successes in a fixed number of trials
d)
Failures in a fixed number of trials
52.
ANOVA stands for:
a)
Analysis of Variance
b)
Analysis of Variables
c)
Association of Numbers
d)
Assessment of Variables
53.
Multiple linear regression involves:
a)
Only one independent variable
b)
More than one independent variable
c)
Only one dependent variable
d)
No independent variables
54.
Time series analysis is used to analyze data collected:
a)
At random intervals
b)
Over consecutive time intervals
c)
Without any time component
d)
In a single time point
55.
Which function in R is used to calculate the mean of a dataset?
a)
mean()
b)
median()
c)
mode()
d)
avg()
56.
Mode in R represents:
a)
The most frequently occurring value in a dataset
b)
The least frequently occurring value in a dataset
c)
The central tendency of a dataset
d)
The spread of a dataset
57.
In a binomial distribution, the outcomes of each trial are:
a)
Dependent on each other
b)
Independent of each other
c)
Affected by previous trials
d)
Randomly generated
58.
One-Way ANOVA is used to compare:
a)
Two groups
b)
Three or more groups
c)
Continuous and categorical variables
d)
Independent and dependent variables
59.
Logistic regression is used when the dependent variable is:
a)
Continuous
b)
Categorical
c)
Discrete
d)
Binary
60.
Which of the following is NOT a component of time series data?
a)
Trend
b)
Seasonality
c)
Randomness
d)
Mean