R_DataPreprocessing
R_DataPreprocessing
2
Stock Data
3
Apply()
4
Mean()
5
Contd...
6
Contd...
7
Contd...
8
Contd...
9
Contd...
10
Contd...
11
Contd...
12
tApply()
• we will learn how to use the "tapply()" function in R, to apply a
function to subsets of a variable or vector. The tapply function
essentially is a specialized loop/subsetting function, although it
is more efficient than simple use of sure brackets or a "subset"
command. The tapply function allows the user to divide a
variable into multiple groups based on another variable(s) used
to define the groups/subsets, and then apply a function to each
of the groups/subsets.
13
tApply()
14
Contd...
15
Contd...
16
Contd...
17
Contd...
18
Contd...
19
Contd...
20
Contd...
• Please refer to the uploaded r file
• The dataset also uploaded in LMS
21
Any
Queries?
Thank you