# NOT RUN {
plot(function(x) triangle(x, -1, 0, 1), from=-2, to=3)
plot(function(x) triangle(x, -1, 0, 2), from=-2, to=3)
plot(function(x) triangle(x, -Inf, 0, 1), from=-2, to=3)
plot(function(x) triangle(x, -1, 0, Inf), from=-2, to=3)
plot(function(x) raisedcos(x, -1, 0, 1), from=-2, to=3)
plot(function(x) raisedcos(x, -1, 0, 2), from=-2, to=3)
plot(function(x) raisedcos(x, -Inf, 0, 1), from=-2, to=3)
plot(function(x) raisedcos(x, -1, 0, Inf), from=-2, to=3)
# }
Run the code above in your browser using DataLab