optimize() or optimise() function in R Language is used to search the interval from lower to upper for a minimum or maximum of the function f with respect to its first argument.
Syntax: optimize(f, interval, maximum)
f: the function to be optimized. The function is either minimized or maximized over its first argument depending on the value of maximum.
interval: a vector containing the end-points of the interval to be searched for the minimum.
maximum: the logical value says to maximize or minimize. Its default value is minimize.
$minimum  1.2 $objective  9.8
$maximum  -4.999944 $objective  201.9965
- Calculate the Root of a Equation within an interval in R Programming - uniroot() Function
- Bootstrap Confidence Interval with R Programming
- Search and Return an Object with the specified name in R Programming - get() Function
- Get the Minimum and Maximum element of a Vector in R Programming - range() Function
- Get a List of all the Attached Packages in R Programming - search() Function
- Get the Minimum element of an Object in R Programming - min() Function
- Return the Index of the First Minimum Value of a Numeric Vector in R Programming - which.min() Function
- Get the Maximum element of an Object in R Programming - max() Function
- Get the position of the maximum element in each Row of a Matrix in R Programming - max.col() Function
- Return the Index of the First Maximum Value of a Numeric Vector in R Programming - which.max() Function
- Compute Variance and Standard Deviation of a value in R Programming - var() and sd() Function
- Calculate the Floor and Ceiling values in R Programming - floor() and ceiling() Function
- Naming Rows and Columns of a Matrix in R Programming - rownames() and colnames() Function
- Get Date and Time in different Formats in R Programming - date(), Sys.Date(), Sys.time() and Sys.timezone() Function
- Check if a Function is a Primitive Function in R Programming - is.primitive() Function
- Compute the Parallel Minima and Maxima between Vectors in R Programming - pmin() and pmax() Functions
- Add Leading Zeros to the Elements of a Vector in R Programming - Using paste0() and sprintf() Function
- Getting and Setting Length of the Vectors in R Programming - length() Function
- Accessing variables of a data frame in R Programming - attach() and detach() function
- Check if values in a vector are True or not in R Programming - all() and any() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.