Téléverser les fichiers vers "/"
This commit is contained in:
21
script_tp4.R
Normal file
21
script_tp4.R
Normal file
@ -0,0 +1,21 @@
|
||||
elements = runif(1000)
|
||||
|
||||
effectifs = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
keys = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
|
||||
for (i in 0:9) {
|
||||
borne_min = i/ 10
|
||||
borne_max = (i + 1) / 10
|
||||
|
||||
for (e in elements) {
|
||||
if (e >= borne_min && e <= borne_max) {
|
||||
effectifs[i + 1] = effectifs[i + 1] + 1
|
||||
}
|
||||
}
|
||||
|
||||
keys[i + 1] = i + 0.5
|
||||
}
|
||||
|
||||
df = data.frame(keys, effectifs)
|
||||
|
||||
print(df)
|
||||
Reference in New Issue
Block a user