seq_knots(0, 1, N = 5)
seq_knots(0, 1, N = 5, endpoints = TRUE)
# Trivial case: make endpoints for just one interval
seq_knots(0, 1, N = 1)
seq_knots(0, 1, N = 1, endpoints = TRUE)
# The following calls throw errors
tryCatch({
seq_knots(0, 1, N = 0)
}, error = function(e) { print(e) })
tryCatch({
seq_knots(0, Inf, N = 5)
}, error = function(e) { print(e) })
tryCatch({
seq_knots(-Inf, 1, N = 5)
}, error = function(e) { print(e) })
Run the code above in your browser using DataLab