Skip to contents

Each segment is represented by its midpoint.

Usage

partition_0_1(S = 1000)

Arguments

S

An integer >= 1. The number of segments to partition [0,1] into.

Value

The vector of segment midpoints, c((1-0.5)/S, (2-0.5)/S, ... (S-0.5)/S).

Examples

  # Returns the vector c(0.1, 0.3, 0.5, 0.7, 0.9).
  partition_0_1(S = 5)
#> [1] 0.1 0.3 0.5 0.7 0.9