R Practical Report
R Practical Report
PRACTICALS
NAME:
ROLL NO:
COURSE: BBA
YEAR: 2nd
ABOUT R :
HOW TO INSTALL R:
Download R Software: Visit the official R Project
website (https://www.r-project.org/) and locate the
"Download R" link. Choose a CRAN mirror (a download
server) that is geographically close to your location.
Select Your Operating System: Depending on your
operating system (Windows, macOS, Linux), select the
appropriate version of R to download.
Download Installer: Click on the link to download the
installer for your chosen operating system. The
installer package will typically have a file name like "R-
x.x.x.pkg" (for macOS), "Rx.x.x-win.exe" (for Windows),
or "R-x.x.x.tar.gz" (for Linux).
Run Installer: Locate the downloaded installer file and
run it by double-clicking on it. Follow the on-screen
instructions to start the installation process.
Choose Installation Options: During the installation
process, you might be presented with various options.
Generally, the default options are suitable for most
users. However, you can customize the installation
location and create shortcuts if needed.
Accept License Terms: You'll likely need to read and
accept the terms and conditions of the software's
license agreement before proceeding with the
installation.
Select Components: Depending on the installer, you
might be asked to select components to install. For
most users, installing the "Core Files" is sufficient.
Advanced users might choose to install additional
components.
Start Installation: Proceed with the installation process
by clicking "Next" or a similar button. The installer will
copy files and set up the necessary directories.
Create Shortcuts (Optional): If prompted, you can
choose to create shortcuts on your desktop or in the
Start menu for easy access to R.
Finish Installation: Once the installation is complete,
you'll receive a notification or see a completion screen.
You can now launch R by finding the installed program
(usually named "R" or "R x.x.x") and starting it.
HOW TO INSTALL RSTUDIO:
Install R: Before installing RStudio, you need to have R
installed on your system. R is the programming
language and environment that RStudio works with.
You can download R from the official CRAN
(Comprehensive R Archive Network) website:
https://cran.r-project.org/mirrors.html Choose the
appropriate mirror based on your location, download
the installer, and follow the installation instructions for
your operating system.
Download RStudio: Once you have R installed, you can
proceed to download RStudio. RStudio offers both free
and paid versions, but for most users, the free version
(RStudio Desktop) is sufficient. Go to the RStudio
download page: https://
www.rstudio.com/products/rstudio/download/ Under
"RStudio Desktop," select the appropriate installer for
your operating system (Windows, macOS, or Linux).
Install RStudio: Here are the installation steps for each
operating system:
Windows: Run the downloaded RStudio installer
executable. Follow the installation wizard's
instructions. Once the installation is complete, you can
launch RStudio from the Start menu or desktop
shortcut.
macOS: Open the downloaded disk image (.dmg) file.
Drag the RStudio application icon into your
Applications folder. You can now find and open RStudio
from your Applications folder.
Launch RStudio: After installation, launch RStudio:
Double-click the RStudio icon on your desktop
(Windows/macOS). Search for "RStudio" in your
applications menu and click to launch (Linux).
Start Using RStudio: Once RStudio is open, you can
start using it to write, run, and manage R code. It
provides a user-friendly interface with features like a
code editor, console, plots, data viewer, and more.
DESCRIBE RSTUDIO :
RStudio is an integrated development environment
(IDE) specifically designed for the R programming
language. R is a popular open-source programming
language and environment used for statistical
computing, data analysis, and graphical representation.
RStudio provides a user-friendly interface that
facilitates coding, data manipulation, visualization, and
project management, making it a powerful tool for
both novice and experienced R users.
PROGRAM 1 :
Statistical funtions :
PROGRAM 2 :
Data structure functions :(my_vector)
PROGRAM 3 :
creating a list :
PROGRAM 4 :
creating a data frame :
PROGRAM 5 :
creating a matrix :
PROGRAM 6 :
creating a array :
PROGRAM 7 :
creating a table :
PROGRAM 8 :
length :
PROGRAM 9 :
Numeric vector and Character vector :
PROGRAM 10 :
Summary of data :
PROGRAM 11 :
Data manipulation function (head) :
PROGRAM 12 :
Data manipulation function(tail) :
PROGRAM 13 :
Subset :
PROGRAM 14 :
Merged :
PROGRAM 15 :
r - bind :
PROGRAM 16 :
c - bind :
PROGRAM 17 :
Aggregate :
PROGRAM 18 :
Build-in data set :
PROGRAM 19 :(Graphs)
plot :
PROGRAM 20 :
Histogram (equal class interval) :
PROGRAM 21 :
Histogram (unequal class interval) :
PROGRAM 22 :
Box plot :
PROGRAM 23 :
Stem-and- leaf graph :
PROGRAM 24 :
Frequency polygon graph :
PROGRAM 25 :
pie chart :
PROGRAM 26 :
Ogive graph :
PROGRAM 27 :
Random permutation:
PROGRAM 28 :
Random intergers :
PROGRAM 29 :
Random Seed :
PROGRAM 30 :
Cluster Sample :
PROGRAM 31 :
Random Sample :
PROGRAM 32 :
Stratum Sample :
PROGRAM 33 :
Systematic Sample :
PROGRAM 34 :
Arthematic operation :
PROGRAM 35 :
Creating a list :
PROGRAM 36 :
Logical vector :
PROGRAM 37 :
Matrix :
PROGRAM 38 :
Data frame :
PROGRAM 39 :
Cluster Sample with dplyr :
PROGRAM 40 :
ggplot2 :
PROGRAM 41 :
vector functions :
PROGRAM 42 :
Line graph :
PROGRAM 43 :
data frame :
PROGRAM 44 :
List :
PROGRAM 45 :
Matrix :