Skip to content

Commit

Permalink
add help pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ajrgodfrey committed Aug 31, 2023
1 parent 03d48cc commit 37a490d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/RSprint2023.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


# to be named more helpfully
summarizeDL <- function()
wtf <- function()
{
recordedPlot <- recordPlot()
summary(recordedPlot)
Expand Down
2 changes: 2 additions & 0 deletions man/WTF.Rd
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
\name{WTF}
\alias{WTF}
\alias{wtf}
\title{What's this figure?}
\usage{
WTF()
wtf()
}
\description{
Determine what the current graphics device has on it so the blind user can be sure they have something they want, or find out what it might be that is contained in a graphics device.
Expand Down
30 changes: 30 additions & 0 deletions man/summary.recordedplot.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
\name{summary.recordedplot}
\alias{summary.recordedplot}
\title{Summarise the display list for a graphics device}
\description{Base graphics are created using a series of calls to C routines. This function gathers the names of these calls and the values of the arguments as supplied. Names of the arguments are then added. The display list must be retrived before the graphics device is closed, but this could be stored for later summarisation.}
\usage{
summary.recordedplot(object, ...)
}
\arguments{
\item{object}{the display list created by recordPlot().}
\item{\dots}{nenessary argument for the method; currently ignored}
}
\details{
The outcome of this command must be further processed to give it context.
}
\value{
A named list of named vectors. Names of list elements are the C function calls used in plotting the graph on the graphics device; the names for the vectors are dependent on which C functions are called, but are the argument names as per the R function most closely associated with that C call.
}
\author{Deepayan Sarkar with minor edits from A. Jonathan R. Godfrey
}
\seealso{
%% ~~objects to See Also as \code{\link{help}}, ~~~
}
\examples{
plot(x=1:20, y=x^2)
abline(h=100)

p = recordPlot()
summary(p)
rm(p)
}

0 comments on commit 37a490d

Please sign in to comment.