https://github.com/madhurimarawat/r-for-datascience
This repository contains Programs in the R programming language.
https://github.com/madhurimarawat/r-for-datascience
basic-programs conditional-statements csv-files data-types data-visualization dataframe dot-functions functions ggplot2 iris-dataset lists non-numeric-values pattern-printing r user-input vectors
Last synced: 2 days ago
JSON representation
This repository contains Programs in the R programming language.
- Host: GitHub
- URL: https://github.com/madhurimarawat/r-for-datascience
- Owner: madhurimarawat
- Created: 2023-08-06T18:10:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-28T16:56:42.000Z (over 2 years ago)
- Last Synced: 2025-11-07T13:02:49.440Z (6 months ago)
- Topics: basic-programs, conditional-statements, csv-files, data-types, data-visualization, dataframe, dot-functions, functions, ggplot2, iris-dataset, lists, non-numeric-values, pattern-printing, r, user-input, vectors
- Language: Jupyter Notebook
- Homepage:
- Size: 387 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# R-for-Datascience
This repository contains Programs in the R Programming Language.

# About R Programming
--> R is an open-source programming language that is widely used as a statistical software and data analysis tool.
--> R generally comes with the Command-line interface.
--> R is available across widely used platforms like Windows, Linux, and macOS.
--> R also provides rich Library support.
---
# Modes of Executions
Rprogramming language can be executed in the following two modes:
1. Interactive mode
a) R Studio
R can also be run on the R Studio IDLE. It is an acronym of "Integrated DeveLopment Environment".
b) Google Colab
Colaboratory, or “Colab” for short, is a product from Google Research which allows anybody to write and execute r code in Jupyter notebook through the browser.
2. Script mode
R programs are written in editors and saved as the file with the .r extension which can be executed further.
---
# Basic Datatypes

R data types are the essential features that accept and store various data types.
Some of the most common data types in R are:
- Numeric: Decimal numbers like 10.5, 55, 787.
- Integer: Whole numbers like 1L, 55L, and 100L (the letter “L” declares this as an integer).
- Character: Strings of text like “hello”, “R”, and “data”.
- Logical: Boolean values like TRUE or FALSE.
- Factor: Categorical variables like “red”, “green”, and “blue”.
- Vector: A collection of elements of the same data type like c(1,2,3) or c(“a”,“b”,“c”).
Vectors are of two types
- Atomic Vectors-Sequence of same data type that share the same data type.
- List- Lists are a "recursive" type (of vector), i.e list can hold non-homogeneous data type.
- Matrix: A two-dimensional array of elements of the same data type like matrix(1:9,nrow=3).
- Data frame: A table-like structure with rows and columns that can have different data types like data.frame(name=c(“Alice”,“Bob”),age=c(25,30)).
- List: It is a collection of elements that can have different data types like list(name=“Alice”,age=25,scores=c(90,80,70)).
- Array: It is a list or vector with two or more dimensions. An array is like a stacked matrix; a matrix is a two-dimensional array.
---
# Features of R

---
# Mode of Execution Used:
R
--> Visit the official website:
--> Download according to the platform that will be used like Linux, Macos or Windows.
--> Follow the setup wizard.
R Studio
--> Visit the official website:
--> Download according to the platform that will be used like Linux, Macos or Windows.
--> Follow the setup wizard.
--> Create a new file with the extention of .r and then this file can be executed in the console.
---
# Dataset Used
Iris Dataset
--> Iris has 4 numerical features and a tri class target variable.
--> This dataset can be used for classification as well as clustering.
--> In this dataset, there are 4 features sepal length, sepal width, petal length and petal width and the target variable has 3 classes namely ‘setosa’, ‘versicolor’, and ‘virginica’.
--> Dataset is already cleaned,no preprocessing required.
--> This dataset is simply used for understanding CSV features and data Visualization.
Automobile Dataset
--> Dataset is taken from: 🔗
--> This contains data about various automobile in Comma Separated Value (CSV) format.
--> CSV file contains the details of automobile-mileage,length,body-style among other attributes.
--> It contains the following dimensions-[60 rows X 6 columns].
--> The csv file is already preprocessed ,thus their is no need for data cleaning.
NBA Players Dataset
--> Dataset is taken from: 🔗
--> This contains data about various NBA Players in Comma Separated Value (CSV) format.
--> CSV file contains the details of players-height,weight,team,position among other attributes.
--> It contains the following dimensions-[457 rows X 9 columns].
--> The csv file is already preprocessed ,thus their is no need for data cleaning.
---
# Libraries of R
To install R library this command is used-
```
install.packages(library_name)
```

---
## Thanks for Visiting 😄
Drop a 🌟 if you find this repository useful.
If you have any doubts or suggestions, feel free to reach me.
📫 How to reach me: [](https://www.linkedin.com/in/madhurima-rawat/)