diaporamaMiscDM
 
◃  Ch. 7 Intro à R  ▹
 

Générer des séquences

> 1:5
[1] 1 2 3 4 5
> seq(1,2,0.25)
[1] 1.00 1.25 1.50 1.75 2.00
> c(1, 1.2, 4.5, -1, 3.2)
[1]  1.0  1.2  4.5 -1.0  3.2
> scan()
1: 1
2: 2
3: 3
4: 
Read 3 items
[1] 1 2 3
>rep(1, 10)
 [1] 1 1 1 1 1 1 1 1 1 1