Question Bank: R Programming.
Chapter 1. Introduction to Data
Science.
Section
1: Introduction & Fundamentals
1.
Explain the primary differences between Data Science and Big Data.
2.
Differentiate
between Data Science and Big Data. Provide
at least two practical examples where they overlap.
3.
Define
Data Science. Explain why it is considered an
interdisciplinary field involving statistics, computer science, and domain
expertise.
4.
Explain
the "Facets of Data." Describe the differences between
Structured, Unstructured, and Semi-structured data with one example for each.
5.
Discuss
the "5 Vs" of Big Data. Briefly explain how Volume, Velocity, Variety, Veracity, and Value
define the nature of modern data.
6.
Define Data Science and list
the fundamental steps involved in a data science project.
7.
Describe the different "facets of data" that are encountered in the
data science process.
Section
2: The Data Science Process
5.
Outline
the Data Science Process. List the six standard stages of
the data science life cycle in their correct order.
6.
Describe
the "Discovery" phase. Why is
it critical to understand the business requirements before starting any data
analysis?
7.
Explain
"Data Preparation." Why do data scientists spend
nearly 80% of their time on cleaning and transforming raw data?
8.
What is
Exploratory Data Analysis? Discuss its role in finding
patterns and anomalies in a dataset before building a model.
9.
Describe
the "Model Building" phase. Explain
the difference between training a model and testing a model.
10.
Discuss
the importance of "Communicating Results." Why is data visualization (like charts and graphs) essential when
presenting findings to stakeholders?
Section
3: Skills & Applications
11.
Identify
the "Technical Skills" needed for Data Science. List at least four skills (e.g., Programming in R/Python, Statistics,
SQL, Machine Learning).
12.
Explain
the importance of "Soft Skills" in Data Science. How do curiosity, critical thinking, and storytelling help a data
scientist succeed?
13.
Discuss
the use of Data Science in the Healthcare industry. Give examples of how it helps in disease prediction or drug discovery.
14.
How do
E-commerce companies use Big Data? Explain
how recommendation engines (like "Customers who bought this also
bought…") work to increase sales.
15.
Explain
the role of a "Data Engineer" vs. a "Data Scientist." How do their responsibilities differ within the data science process?
Chapter 2 – Getting Started with R
Section
1: Introduction, Features, and History
1.
Explain basic data types in R with examples.
2.
What is
R and why is it popular in Data Science? Explain
its primary purpose in statistical computing and data analysis.
3.
List
and explain five key features of R. Discuss
how it handles data and its graphical capabilities.
4.
Briefly
describe the history and origin of R. Mention
the creators and its relationship to the S language.
5.
What is
the Comprehensive R Archive Network? Explain
its role in the R ecosystem and how it supports users worldwide.
6.
Explain
the difference between a Package and a Library in R. How do these two terms relate to one another?
7.
Demonstrate the use of a "for loop" in R with a simple programming
example.
8.
Outline the
history of R and list four key features that make it popular for data analysis.
Section
2: Data Types, Variables, and Operators
6.
List
and briefly explain the five basic data types in R. Provide a simple example for each (e.g., Numeric, Logical, Character).
7.
What is
the difference between the ‘Numeric’ and ‘Integer’ data types in R? Show how to explicitly define an integer using the L suffix.
8.
Discuss
the rules for naming variables in R. Mention at least three valid and invalid naming conventions
(e.g., use of dots, underscores, and numbers).
9.
Explain
the different Assignment Operators in R. Compare
the use of the leftward assignment (<-), equal
sign (=), and rightward assignment (->).
10.
Describe
the Arithmetic Operators available in R. Provide
examples of addition, subtraction, multiplication, division, and the modulus
operator (%%).
11.
Explain
Relational Operators in R. Show how operators like ==, !=, <, and > are used to compare values.
12.
Explain
Arithmetic and Logical operators in R with a table of symbols and their
functions.
13.
Discuss
Logical Operators in R. Explain the use of "AND"
(&), "OR" (|), and "NOT" (!) with a simple truth-table
example.
Section
3: Decision Making and Loops
13.
Demonstrate the
use of the if…else statement for decision-making in
R.
14.
Explain
the if-else
statement in R. Provide a simple code snippet
that checks if a number is positive or negative.
15.
What is
the switch
function in R? Describe how it works as an
alternative to multiple if-else
statements with an example.
16.
Compare
the for
loop and the while loop
in R. Explain when a programmer would choose one over
the other for a repetitive task.
Chapter
3 – Functions and R Objects
Section 1: Functions and Strings
1.
Explain how to create a Vector and demonstrate how to access its specific
elements.
2.
How are
Strings handled in R? Explain the difference between
the paste and paste0 functions with an example for each.
3.
Discuss
the use of the nchar and toupper/tolower functions. Explain
why these functions are important when working with character data.
4.
Distinguish between a Matrix and a Dataframe in terms of
their structure and use.
5.
Explain
the use of Arguments in a function. Discuss
how to provide a default value to an argument with a simple example.
6.
Define a function in R and show
the syntax for creating a user-defined function.
7.
What is
a Function in R? Explain the basic syntax for
creating a user-defined function and show how to call it.
Section
2: Basic R Objects
5.
Define
a Vector in R. Explain how to create a vector
using the c function and how to access its
elements.
6.
Discuss
Vector Arithmetic. Explain with an example how R
performs operations (like addition) on two vectors of the same length.
7.
What is
a List in R? Explain how a List differs from
a Vector and show how to create a list that contains different data types.
8.
Explain how to
create a List in R that contains different types of data elements.
9.
Describe
how to access elements in a List. Show the
difference between using single brackets “ and double brackets [].
Section
3: Matrices and Arrays
9.
Demonstrate how
to create a Matrix and perform a simple addition operation on two matrices.
10.
What is
a Matrix in R? Explain the parameters data, nrow, and ncol inside the matrix function.
11.
Explain
Indexing in Matrices. Show how to access a specific
row, a specific column, and a single element from a 3×3 matrix.
12.
Define
an Array in R. How does an Array differ from a
Matrix? Explain the dim parameter used when creating an
array.
Section
4: Factors and Data Frames
12.
What
are Factors in R? Explain why factors are useful
for storing categorical data and how the levels function
is used.
13.
Define
a Data Frame. Why is it the most commonly used
object for data analysis? Explain how it differs from a Matrix.
14.
How do
you manipulate a Data Frame? Show how to add a new column to
an existing data frame and how to filter rows based on a condition.
15.
Discuss
Object Inspection. Explain how the functions str, class, and summary help a programmer understand the
structure of an R object.
Chapter
4 – Data Interface & Visualization
Section 1: Data Import and Export
1.
Demonstrate the command used to import a CSV file into the R environment.
2.
Explain
the process of exporting a Data Frame to a CSV file. Describe the write.csv function
and how to prevent R from saving row names.
3.
How can
you read Excel files in R? Name the common library used
(like readxl) and
explain the read_excel
function.
4.
Describe
the method to read a plain Text (.txt) file. Explain
the read.table function
and the importance of the sep (separator) argument.
5.
What is
the difference between read.csv and read.csv2? Explain when a developer would
use one over the other based on the decimal separator used in different
regions.
6. Illustrate how to
create a Pie Chart using the pie function with a basic dataset.
7.
Explain the purpose of a Scatter Plot and provide the syntax to generate one in
R.
8.
How do
you import a CSV file into R? Explain the read.csv function and mention the purpose of the header
argument.
Section
2: Data Processing Techniques
6.
Explain
how to subset a dataset in R. Provide a simple example of how
to extract specific rows and columns from a large data frame.
7.
How do
you handle missing values in a dataset? Explain
the use of functions like is.na or na.omit to clean data before analysis.
8.
Discuss
the process of sorting data in R. Explain
how the order function is used to arrange a
data frame based on a specific column.
Section
3: Charts and Graphs
9.
What is
a Pie Chart? Explain the pie function and how to add custom labels and colors
to represent different categories.
10.
Describe
the Bar Chart in R. Explain the barplot function and show how to create
a horizontal bar chart instead of a vertical one.
11.
Explain
the purpose of a Boxplot. What are the five key
statistical values it visualizes? Show the basic syntax of the boxplot function.
12.
Define
a Histogram. How is it different from a Bar
Chart? Explain the hist
function and the use of the breaks
argument.
13.
How do
you create a Line Graph in R? Explain the plot function and how the type argument
(like "l" or "o") changes the visualization.
14.
What is
a Scatter Plot? Explain how it helps in
visualizing the relationship between two variables using the plot function.
15.
How do
you add titles and labels to a chart? Explain
the use of parameters like main, xlab, ylab, and col within any R plotting function.