0% found this document useful (0 votes)
7 views3 pages

Introduction to R Programming Basics

The document introduces R programming, highlighting its use in statistical computing, data analysis, and graphical representation. It outlines the advantages of R, including its statistical capabilities, open-source nature, powerful data visualization tools, and extensive library support. Additionally, it includes programming exercises related to checking number properties, eligibility to vote, and determining leap years.

Uploaded by

Desmond Krej
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Introduction to R Programming Basics

The document introduces R programming, highlighting its use in statistical computing, data analysis, and graphical representation. It outlines the advantages of R, including its statistical capabilities, open-source nature, powerful data visualization tools, and extensive library support. Additionally, it includes programming exercises related to checking number properties, eligibility to vote, and determining leap years.

Uploaded by

Desmond Krej
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Practical – 1

Objective: Introduction to “R”


What is R Programming?
R is an open-source programming language and software environment used primarily for
statistical computing, data analysis, and graphical representation. It was developed by Ross
Ihaka and Robert Gentleman in the early 1990s and is widely used in data science, machine
learning, bioinformatics, and finance.
Advantages of R Programming

1. Statistical & Data Analysis Capabilities.

R is specifically designed for statistical computing and data analysis. It has built-in
functions for performing a wide range of statistical tests, regression models, and
hypothesis testing, making it ideal for data-driven decision-making. Its comprehensive
functionality supports various complex data analyses, including linear and nonlinear
modeling, time-series analysis, and classification.

2. Open-Source & Free

R is an open-source programming language, meaning it is free to use, modify, and


distribute. This makes R an affordable option for individuals, students, and
organizations. The large and active community around R continually contributes to its
development, ensuring frequent updates, bug fixes, and new features.

3. Powerful Data Visualization

R provides powerful visualization tools, allowing users to create high-quality plots and
interactive charts. Libraries like ggplot2 offer advanced and customizable
visualizations, while plotly and shiny support the creation of interactive charts and web
applications. This makes R a preferred choice for presenting complex data and insights
in an easily interpretable format.

4. Extensive Library Support

R boasts an extensive ecosystem of packages available through CRAN


(Comprehensive R Archive Network). These packages cover various areas such as
tidyverse for data wrangling, caret for machine learning, and Shiny for building
interactive web applications. This vast library support makes R highly adaptable and
suitable for a wide range of applications, from statistical analysis to web development.
Q1. Write a program to check whether a given input number is positive negative or zero.

Input : Output:

Q2. Write a program to check given input number is positive even or negative even number.

Output:
Input :
Q3. Write a program to take input as name and age of a person and check whether he/she is
eligible to vote or not.

Input : Output:

Q4. Write a program to check weather the year is leap year or not.

Input:

Output:

You might also like