-
Notifications
You must be signed in to change notification settings - Fork 0
/
R4.R
60 lines (36 loc) · 886 Bytes
/
R4.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
50
51
52
53
54
55
56
57
58
59
60
file1<-read.csv(file.choose())
file1
A1<-subset(abc, abc$year of release="2007")
A1
B1<-subset(abc, abc$film="127 hours")
B1
abc.mean(me<-mean(abc$budget..million))
me
maximum<-max(abc$budget..million)
maximum
manimum<-min(abc$budget..million)
minimum
name_of_the_movie3<-subset(abc,abc$flim="Eagle Eye")
name_of_the_movie3
name_of_the_movie4<-subset(abc,abc$genre="comedy" & abc$year of release="2009")
name_of_the_movie4
#====================================
factorail<-function(n)
{
p=1
for( i in 1:n){
p=P*i
print(p)
}
}
factorail(10)
#==========================================
list<-list(c(1:20),matrix(nrow=3,ncol=3, byrow=TRUE, C(1,9),"HELLO WORLD")
list
names(list[1])<-("number")
list
names(list[2])<-("matrix")
list
names(list[3])<-("string")
list
#===========================