Debian Codegraph @

man/tidy_xyz.Rd

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