This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base curly brackets adapted from https://stackoverflow.com/a/9310002/5213091 | |
CurlyBraces <- function(x, y, min.val,max.val, pos = 1, direction = 1 ,b=c(0,.2,.28,.7,.8),a=c(1,2,3,48,50)) { | |
# a set flexion point for spline | |
# b set depth for spline flexion point | |
curve = spline(a, b, n = 50, method = "natural")$y / 2 | |
curve = c(curve,rev(curve)) | |
a_sequence = rep(x,100) |