-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlab4.R
50 lines (37 loc) · 895 Bytes
/
lab4.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
getwd()
setwd("E:\\1.SLIIT\\YEAR 2\\SEM 2\\STATS\\RCollab")
data<-read.table("DATA 4.txt",header=TRUE,sep="")
data
fix(data)
names(data)<-c(
"Team",
"Attendence",
"Salary",
"Years"
)
data
attach(data)
Attendence
boxplot(Attendence,main="Boxplot For Attendence",outline=TRUE,xlab="attendence",horizontal = TRUE)
boxplot(Salary,main="Boxplot For Salary",outline=TRUE,xlab="Salary",horizontal=TRUE)
boxplot(Years,main="Boxplot For Years",outline=TRUE,xlab='Years',horizontal = TRUE)
hist(Attendence,main="For Attendence0",ylab="Frequency")
abline(h=0)
hist(Salary,main="For Salary",ylab="Frequency")
abline(h=0)
stem(Attendence)
stem(Salary)
stem(Years)
mean(Attendence)
mean(Salary)
mean(Years)
median(Attendence)
median(Salary)
median(Years)
sd(Years)
summary(Attendence)
geta<-function(y){
counts<-table(y)
names(counts)[counts==max(counts)]
}
geta(Years)