BCA 6th Semester – R Language UNIT – I Full Length
Notes (14 Marks Pattern) According to GJU University
These notes are specially prepared for BCA 6th Semester students according to Guru Jambheshwar University
(GJU) syllabus. All topics of UNIT-I are covered in detailed university-answer format suitable for 14-mark
questions.
1. Introduction to R Programming
R Programming Language is an open-source programming language mainly used for
statistical computing, data analytics, machine learning, and graphical representation.
It was developed by Ross Ihaka and Robert Gentleman.
R is widely used by:
• Data Scientists
• Researchers
• Business Analysts
• Statisticians
• Machine Learning Engineers
R helps in handling large amounts of data and generating useful reports and charts.
Today many companies like Google, Facebook, Amazon, and Microsoft use R for data analysis.
2. Features of R Programming
(i) Open Source
R is completely free to use and download.
(ii) Platform Independent
R works on Windows, Linux, and Mac operating systems.
(iii) Strong Graphical Support
R provides excellent charts, graphs, and visualizations.
(iv) Large Collection of Packages
Thousands of packages are available through CRAN repository.
(v) Statistical Analysis
R supports advanced statistical and mathematical calculations.
(vi) Data Handling
Large datasets can be managed efficiently.
(vii) Machine Learning Support
R provides machine learning libraries like caret and randomForest.
(viii) Easy Reporting
R can generate automatic reports and visual dashboards.
3. Advantages of R Programming
• Easy to learn
• Free of cost
• Better visualization
• Strong community support
• Excellent statistical capabilities
• Supports machine learning
• Efficient data processing
4. Applications of R Programming
(i) Business Analytics
Used for sales prediction and market analysis.
(ii) Healthcare Industry
Used for disease analysis and medical research.
(iii) Banking Sector
Used for fraud detection and financial forecasting.
(iv) Education Sector
Used for research and statistical projects.
(v) Artificial Intelligence
Used in machine learning and AI models.
(vi) Scientific Research
Used by researchers for experiments and calculations.
5. Installation of R and RStudio
Step 1:
Visit the official CRAN website.
Step 2:
Download R according to your operating system.
Step 3:
Install the software by following installation steps.
Step 4:
Download and install RStudio IDE.
Advantages of RStudio:
• Easy coding environment
• Better interface
• Debugging support
• Visualization support
6. Basic Commands in R
Print Command:
print("Hello World")
Variable Assignment:
a <- 10
b <- 20
Addition:
sum <- a + b
Input Function:
readline()
Output Function:
cat()
Comments:
# This is a comment
7. Data Types in R
Data types define the type of values stored in variables.
(i) Numeric Data Type
Stores decimal values.
Example:
x <- 10.5
(ii) Integer Data Type
Stores whole numbers.
Example:
y <- 20L
(iii) Character Data Type
Stores text values.
Example:
name <- "Deepak"
(iv) Logical Data Type
Stores TRUE or FALSE values.
Example:
status <- TRUE
(v) Complex Data Type
Stores complex numbers.
Example:
z <- 2+3i
8. Variables in R
Variables are memory locations used to store data values.
Example:
a <- 100
b <- 200
Rules for Naming Variables:
• Cannot start with numbers
• No spaces allowed
• Must start with alphabet or dot
Advantages of Variables:
• Simplifies calculations
• Reusability
• Better data management
9. Operators in R
Operators are symbols used to perform operations.
(i) Arithmetic Operators
+ , - , * , / , %%
(ii) Relational Operators
> , < , >= , <= , ==
(iii) Logical Operators
AND, OR, NOT
(iv) Assignment Operators
<- , =
10. Difference between R and Other Languages
R vs Python:
• R is mainly for statistics and analytics.
• Python is general-purpose programming language.
R vs C:
• R is easier for data analysis.
• C is faster for system programming.
11. Limitations of R
• Slow with very large datasets
• Memory usage is high
• Security issues
• Difficult for beginners in advanced analytics
12. Conclusion
R Programming Language is one of the most important tools in data science and analytics.
Its powerful statistical capabilities, visualization support, and machine learning libraries
make it highly useful in modern industries. Due to its simplicity and flexibility,
R is widely used in education, business, healthcare, and scientific research.
Important University Questions
Important 14 Marks Questions from UNIT-I
1. Explain R Programming Language with features and applications.
2. Explain installation process of R and RStudio.
3. Explain data types and variables in R.
4. Explain operators in R with examples.
5. Write advantages and limitations of R programming.
6. Explain applications of R in different industries.