Debian Codegraph @

man/glance_optim.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/list-optim.R
3 \name{glance_optim}
4 \alias{glance_optim}
5 \alias{glance.optim}
6 \title{Tidy a(n) optim object masquerading as list}
7 \usage{
8 glance_optim(x, ...)
9 }
10 \arguments{
11 \item{x}{A list returned from \code{\link[stats:optim]{stats::optim()}}.}
12
13 \item{...}{Additional arguments. Not used. Needed to match generic
14 signature only. \strong{Cautionary note:} Misspelled arguments will be
15 absorbed in \code{...}, where they will be ignored. If the misspelled
16 argument has a default value, the default value will be used.
17 For example, if you pass \code{conf.lvel = 0.9}, all computation will
18 proceed using \code{conf.level = 0.95}. Two exceptions here are:
19 \itemize{
20 \item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if
21 it will be ignored.
22 \item \code{augment()} methods will warn when supplied a \code{newdata} argument if it
23 will be ignored.
24 }}
25 }
26 \description{
27 Broom tidies a number of lists that are effectively S3
28 objects without a class attribute. For example, \code{\link[stats:optim]{stats::optim()}},
29 \link[base:svd]{svd()} and \code{\link[interp:interp]{interp::interp()}} produce consistent output, but
30 because they do not have a class attribute, they cannot be handled by S3
31 dispatch.
32
33 These functions look at the elements of a list and determine if there is
34 an appropriate tidying method to apply to the list. Those tidiers are
35 implemented as functions of the form \verb{tidy_<function>} or
36 \verb{glance_<function>} and are not exported (but they are documented!).
37
38 If no appropriate tidying method is found, they throw an error.
39 }
40 \examples{
41
42 f <- function(x) (x[1] - 2)^2 + (x[2] - 3)^2 + (x[3] - 8)^2
43 o <- optim(c(1, 1, 1), f)
44
45 }
46 \seealso{
47 \code{\link[=glance]{glance()}}, \code{\link[stats:optim]{stats::optim()}}
48
49 Other list tidiers:
50 \code{\link{list_tidiers}},
51 \code{\link{tidy_irlba}()},
52 \code{\link{tidy_optim}()},
53 \code{\link{tidy_svd}()},
54 \code{\link{tidy_xyz}()}
55 }
56 \concept{list tidiers}
57 \value{
58 A \code{\link[tibble:tibble]{tibble::tibble()}} with exactly one row and columns:
59 \item{convergence}{Convergence code.}
60 \item{function.count}{Number of calls to `fn`.}
61 \item{gradient.count}{Number of calls to `gr`.}
62 \item{value}{Minimized or maximized output value.}
63
64 }