powered by
find_segment is a function to classify theta values into segments based on supplied cutpoints.
find_segment
find_segment(x, segment)
the theta value. This can be a vector.
segment cutpoints.
# NOT RUN { cuts <- c(-Inf, -2, 0, 2, Inf) find_segment(-3, cuts) find_segment(-1, cuts) find_segment(1, cuts) find_segment(3, cuts) find_segment(seq(-3, 3, 2), cuts) # }
Run the code above in your browser using DataLab