Академический Документы
Профессиональный Документы
Культура Документы
> Dah=3
> Millogo=5
> Nana=Dah+Millogo
> Dah
[1] 3
> Millogo
[1] 5
> Nana
[1] 8
> data (iris)
> data (sing)
Warning message:
In data(sing) : jeu de données ‘sing’ introuvable
> data(sing)
Warning message:
In data(sing) : jeu de données ‘sing’ introuvable
> data(TPsing)
Warning message:
In data(TPsing) : jeu de données ‘TPsing’ introuvable
> iris
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.1 3.5 1.4 0.2 setosa
2 4.9 3.0 1.4 0.2 setosa
3 4.7 3.2 1.3 0.2 setosa
4 4.6 3.1 1.5 0.2 setosa
5 5.0 3.6 1.4 0.2 setosa
6 5.4 3.9 1.7 0.4 setosa
7 4.6 3.4 1.4 0.3 setosa
8 5.0 3.4 1.5 0.2 setosa
9 4.4 2.9 1.4 0.2 setosa
10 4.9 3.1 1.5 0.1 setosa
11 5.4 3.7 1.5 0.2 setosa
12 4.8 3.4 1.6 0.2 setosa
13 4.8 3.0 1.4 0.1 setosa
14 4.3 3.0 1.1 0.1 setosa
15 5.8 4.0 1.2 0.2 setosa
16 5.7 4.4 1.5 0.4 setosa
17 5.4 3.9 1.3 0.4 setosa
18 5.1 3.5 1.4 0.3 setosa
19 5.7 3.8 1.7 0.3 setosa
20 5.1 3.8 1.5 0.3 setosa
21 5.4 3.4 1.7 0.2 setosa
22 5.1 3.7 1.5 0.4 setosa
23 4.6 3.6 1.0 0.2 setosa
24 5.1 3.3 1.7 0.5 setosa
25 4.8 3.4 1.9 0.2 setosa
26 5.0 3.0 1.6 0.2 setosa
27 5.0 3.4 1.6 0.4 setosa
28 5.2 3.5 1.5 0.2 setosa
29 5.2 3.4 1.4 0.2 setosa
30 4.7 3.2 1.6 0.2 setosa
31 4.8 3.1 1.6 0.2 setosa
32 5.4 3.4 1.5 0.4 setosa
33 5.2 4.1 1.5 0.1 setosa
34 5.5 4.2 1.4 0.2 setosa
R Console Page 2
> Dah=c(1,6,0,1.4,7,2)
> Dah
[1] 1.0 6.0 0.0 1.4 7.0 2.0
> Dah=c(Dah,3,5,c(7,8))
> Dah
[1] 1.0 6.0 0.0 1.4 7.0 2.0 3.0 5.0 7.0 8.0
> 1:5
[1] 1 2 3 4 5
> seq(1,6,by=0.5)
[1] 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0
> seq(1,6,length=5)
[1] 1.00 2.25 3.50 4.75 6.00
> rep(5,4)
[1] 5 5 5 5
> Nana=c("Papa","Maman")
> Nana
[1] "Papa" "Maman"
> rep(c(3,7),each=5)
[1] 3 3 3 3 3 7 7 7 7 7
> rep(c(3,7),5)
[1] 3 7 3 7 3 7 3 7 3 7
> note=scan(n=15)
1: note=scan(n=3)
1: 10
Error in scan(n = 15) :
scan() attendait 'a real' et a reçu 'note=scan(n=3)'
> 12
[1] 12
> note=scan(n=3)
1: 17
2: 18
3: 16
Read 3 items
> note
[1] 17 18 16
> dah=c("x","y","z")
> Dah=c("x","y","z")
> Dah
[1] "x" "y" "z"
> paste("x",1:10)
[1] "x 1" "x 2" "x 3" "x 4" "x 5" "x 6" "x 7" "x 8" "x 9" "x 10"
> paste("x",1:10,sep="-")
[1] "x-1" "x-2" "x-3" "x-4" "x-5" "x-6" "x-7" "x-8" "x-9" "x-10"
> paste(c("x","y"),1:10,"txt",sep=".")
[1] "x.1.txt" "y.2.txt" "x.3.txt" "y.4.txt" "x.5.txt" "y.6.txt"
[7] "x.7.txt" "y.8.txt" "x.9.txt" "y.10.txt"
> paste(c("x","y"),1:10,"txt",sep=".",collapse="+")
[1] "x.1.txt+y.2.txt+x.3.txt+y.4.txt+x.5.txt+y.6.txt+x.7.txt+y.8.txt+x.9.txt+y.10.txt"
> substr("Millogo,4,7)
+ substr("Millogo",4,7)
Erreur : unexpected symbol in:
"substr("Millogo,4,7)
substr("Millogo"
> substr("Millogo",4,7)
[1] "logo"
> substr("Millogo",1,3)
[1] "Mil"
> 3>4
[1] FALSE
> Dah>13
[1] TRUE TRUE TRUE
> x=c(-1,3,5)
> test=x>1
> (1+x^2)*(x>1)
[1] 0 10 26
> all(x>1)
[1] FALSE
> any(x>1)
[1] TRUE
> v1:10
Erreur : objet 'v1' introuvable
> v=1:10
> v
[1] 1 2 3 4 5 6 7 8 9 10
R Console Page 5
> v[6]
[1] 6
> v=1:100
> v
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
[19] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
[37] 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
[55] 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
[73] 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
[91] 91 92 93 94 95 96 97 98 99 100
> v[6]
[1] 6
> v[6:8]
[1] 6 7 8
> v[10:1]
[1] 10 9 8 7 6 5 4 3 2 1
> v[c(6,6,1:5)]
[1] 6 6 1 2 3 4 5
> v[-c(4:7)]
[1] 1 2 3 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
[20] 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
[39] 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
[58] 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
[77] 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
[96] 100
> v[-c(4,7,20)]
[1] 1 2 3 5 6 8 9 10 11 12 13 14 15 16 17 18 19 21 22
[20] 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
[39] 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
[58] 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
[77] 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
[96] 99 100
> save.image("C:\\Users\\LENOVO\\Desktop\\DOC DEA MASTER PTCI\\STATISTIQUES-Pr C.P. NITIEMA\\T
P R\\TP lundi")
>