Debian Codegraph @

man/tidy_optim.Rd

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