binBreaks computes the breaks of tiled windows over a range.
It is equal to the base function seq().
binCenters computes the centre of tiled windows over a range.
binBreaks(from, to, width) binCenters(from, to, width)
| from | Start coordinate of the windows. |
|---|---|
| to | End coordinate of the windows. |
| width | Width of the windows. |
For n bins:
binBreaksA numeric vector of length n+1 representing the breaks between bins.
binCentersA numeric vector of length n representing the center of each bin.
binBreaks(-500, 500, 10)#> [1] -500 -490 -480 -470 -460 -450 -440 -430 -420 -410 -400 -390 -380 -370 -360 #> [16] -350 -340 -330 -320 -310 -300 -290 -280 -270 -260 -250 -240 -230 -220 -210 #> [31] -200 -190 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -70 -60 #> [46] -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 #> [61] 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 #> [76] 250 260 270 280 290 300 310 320 330 340 350 360 370 380 390 #> [91] 400 410 420 430 440 450 460 470 480 490 500binCenters(-500, 500, 10)#> [1] -495 -485 -475 -465 -455 -445 -435 -425 -415 -405 -395 -385 -375 -365 -355 #> [16] -345 -335 -325 -315 -305 -295 -285 -275 -265 -255 -245 -235 -225 -215 -205 #> [31] -195 -185 -175 -165 -155 -145 -135 -125 -115 -105 -95 -85 -75 -65 -55 #> [46] -45 -35 -25 -15 -5 5 15 25 35 45 55 65 75 85 95 #> [61] 105 115 125 135 145 155 165 175 185 195 205 215 225 235 245 #> [76] 255 265 275 285 295 305 315 325 335 345 355 365 375 385 395 #> [91] 405 415 425 435 445 455 465 475 485 495