I am working on converting an R package into Javascript for a side project. The R code uses the R stats function optimize, documentation here.
I've tried googling quite a bit but the word optimize really pollutes the search results unfortunately. Any help would be much appreciated.
I'm not a stats / math whiz, so it's difficult for me to independently implement or evaluate other implementations. I'm looking for an easily used, pre-built function from a respected / well-maintained library, ideally.