File: print.ggproto.Rd

package info (click to toggle)
r-cran-ggplot2 3.4.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,748 kB
  • sloc: sh: 15; makefile: 5
file content (34 lines) | stat: -rw-r--r-- 954 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggproto.r
\name{print.ggproto}
\alias{print.ggproto}
\alias{format.ggproto}
\title{Format or print a ggproto object}
\usage{
\method{print}{ggproto}(x, ..., flat = TRUE)

\method{format}{ggproto}(x, ..., flat = TRUE)
}
\arguments{
\item{x}{A ggproto object to print.}

\item{...}{If the ggproto object has a \code{print} method, further arguments
will be passed to it. Otherwise, these arguments are unused.}

\item{flat}{If \code{TRUE} (the default), show a flattened list of all local
and inherited members. If \code{FALSE}, show the inheritance hierarchy.}
}
\description{
If a ggproto object has a \verb{$print} method, this will call that method.
Otherwise, it will print out the members of the object, and optionally, the
members of the inherited objects.
}
\examples{
Dog <- ggproto(
  print = function(self, n) {
    cat("Woof!\n")
  }
 )
Dog
cat(format(Dog), "\n")
}