Software, Data Editing: Experiment 1: Basic Fundamentals, Installation and Use of
Software, Data Editing: Experiment 1: Basic Fundamentals, Installation and Use of
Data operators:
• Arithmetic operators
• Assignment operators
• Relational operators
• Logical operators
• Special operators
AIM: Applications of R
• Statistical research
• Machine learning
• Deep learning
• Finding genetic anomalies and patterns
• Perform various statistical computations and analysis
• Clustering
• Used by universities like Cornell University and UCLA
• Used by top IT companies- Accenture, IBM, TCS, Paytm, Wipro,
Google, Microsoft
AIM: R as Function
Built-in
print(mean(22:80))
51
print(sum(41:70))
1665
User defined
my_function <- function(x) {
return (5 * x)
}
print(my_function(3))
15
AIM: R as Assignment
x <- 3
x <<- 3
3 -> x
3 ->> x
y=5
print(x)
print(y)
3
5
AIM: If-else
a <- 33
b <- 20
if (b > a) {
print("b is greater than a")
}else {
print("b is not greater than a")
}
"b is not greater than a"
AIM: Switch
x <- switch(
3,
"a",
"b",
"c",
"d"
)
print(x)
“c”
AIM: Sequences
seq (10)
1 2 3 4 5 6 7 8 9 10
Sys.Date ( )
"2023-04-15"
AIM: Repeats
rep (3.5, times = 4)
3.5 3.5 3.5 3.5
rep ( 1 :4, 2)
12341234
AIM: Sorting
y <- c(8,5,7,6)
sort (y)
5678
sort (y , decreasing = TRUE)
8765
AIM: Ordering
y <- c(8,5,7,6)
order(y)
2431
AIM: Lists
x <- list("apple", "banana", "cherry")
print(x)
[[1]]
[1] "apple"
[[2]]
[1] "banana"
[[3]]
[1] "cherry"
AIM: Factors
genre <- factor(c("Jazz", "Rock", "Classic", "Classic", "Pop", "Jazz", "Rock",
"Jazz"))
print(genre)
Jazz Rock Classic Classic Pop Jazz Rock Jazz
Levels: Classic Jazz Pop Rock
Apriori
Read data
Grouping
Transaction encoder
Apriori
Sorting
ECLAT
Read dataset
Shape of data
Scatter plot
KMeans
Clustering
Scatter graph
Line graph
INDEX
s.no. Content
R LAB STATISTICS
PRACTICAL FILE
Name : Vinay
Roll No : 21001016070
Branch : Btech CS (with specialization
in Data Science)
Year : 2nd