Description Usage Arguments Value Author(s) Examples
Function constituting a membership matrix.
(Fonction constituant une matrice des effectifs.)
1 | constituerMatriceEffectifs(vLigneObservation, vColonneObservation)
|
vLigneObservation |
A (Un |
vColonneObservation |
A (Un |
Returns a matrix
with the number of observations for each cell.
(Retourne une matrix
avec le nombre d'observations pour chaque cellule.)
Psar Analyse Urbaine Insee - Arlindo Dos Santos and Francois Semecurbe
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | dfObservations <- data.frame(x = c(15, 35, 15, 25, 35, 55, 45, 45, 55, 65, 70, 75, 85, 90,
65, 75, 85, 65, 70, 75, 85, 90, 65, 70, 75)
, y = c(10, 10, 30, 30, 35, 35, 45, 55, 55, 65, 65, 65, 65, 65,
70, 70, 70, 75, 75, 75, 75, 75, 85, 85, 85)
)
cellSize <- 20L
# calcul de l'indice des observations
# on prend le rectangle englobant
# et on positionne le debut de la numérotation sur la première observation
dfObservations$col <- as.integer(floor((dfObservations$x) / cellSize)
- floor(min(dfObservations$x / cellSize)) + 1)
dfObservations$row <- as.integer(floor((dfObservations$y) / cellSize)
- floor(min(dfObservations$y / cellSize)) + 1)
mEffectifs <- constituerMatriceEffectifs(dfObservations$row - 1, dfObservations$col - 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.