Professional Documents
Culture Documents
DM File - Merged
DM File - Merged
DM File - Merged
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
Pandas- Pandas is a Python library used for working with data sets. It has
functions for analyzing, cleaning, exploring, and manipulating data. Pandas allows us
to analyze big data and make conclusions based on statistical theories. Pandas can
clean messy data sets, and make them readable and relevant.
Scikit-learn- Scikit-learn is the most useful and robust library for machine
learning in Python. It provides a selection of efficient tools for machine learning and
statistical modeling including classification, regression, clustering and dimensionality
reduction via a consistence interface in Python. This library, which is largely written in
Python, is built upon NumPy, SciPy and Matplotlib.
Fibonacci
Array insertion
Linear search
Sorting array
Sum of elements of array
Indexing
Mean, median, standard deviation, min, max of
an arrray
Line graph
Bar Graph
Scatter Graph
Creating 2 tables S1, S2
Mean ()
Apriori
Read data
Grouping
Transaction encoder
Apriori
Sorting
ECLAT
Read dataset
Shape of data
Scatter plot
KMeans
Clustering
Scatter graph
Line graph
R LAB STATISTICS
PRACTICAL FILE
Name : Vinay
Roll No : 21001016070
Branch : Btech CS (with specialization
in Data Science)
Year : 2nd
s.no. Content