Skip to content

Commit

Permalink
Tweaks.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@85828 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
hornik committed Jan 26, 2024
1 parent c3781e8 commit cdc7298
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
5 changes: 3 additions & 2 deletions src/library/grid/vignettes/frame.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
\newcommand{\pkg}[1]{{\normalfont\fontseries{b}\selectfont #1}}
\newcommand{\grid}{\pkg{grid}}
\newcommand{\R}{{\sffamily R}}
\newcommand{\I}[1]{#1}
\setlength{\parindent}{0in}
\setlength{\parskip}{.1in}
\setlength{\textwidth}{140mm}
Expand Down Expand Up @@ -207,10 +208,10 @@ the parent automatically leaves enough room for the child.
Another useful pair of examples are those for \code{"rect"} grobs.
These methods make use of the \code{absolute.size} function.
When a grob is asked to specify its size, it makes sense to respond
with the grob's width and height if the grob has an ``absolute'' size
with the \I{grob}'s width and height if the grob has an ``absolute'' size
(e.g., \code{"inches"}, \code{"cm"}, \code{"lines"}, etc;
i.e., the grob knows exactly how big itself is).
On the other hand, it does not make sense to respond with the grob's
On the other hand, it does not make sense to respond with the \I{grob}'s
width and height if the grob has a ``relative'' size (e.g., \code{"npc"} or
\code{"native"}; i.e.,
the grob needs to know about it's parent's size before it can figure
Expand Down
8 changes: 5 additions & 3 deletions src/library/grid/vignettes/grid.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
\newcommand{\grid}{\pkg{grid}}
\newcommand{\lattice}{\CRANpkg{lattice}}

\newcommand{\I}[1]{#1}

\setlength{\parindent}{0in}
\setlength{\parskip}{.1in}
\setlength{\textwidth}{140mm}
Expand Down Expand Up @@ -227,9 +229,9 @@ centimetres.} \\
\code{"mm"} & \parbox[t]{3in}{Millimetres.} \\
\code{"points"} & \parbox[t]{3in}{Points. There are 72.27 points per inch.} \\
\code{"bigpts"} & \parbox[t]{3in}{Big points. There are 72 big points per inch.} \\
\code{"picas"} & \parbox[t]{3in}{Picas. There are 12 points per pica.} \\
\code{"dida"} & \parbox[t]{3in}{Dida. 1157 dida equals 1238 points. } \\
\code{"cicero"} & \parbox[t]{3in}{Cicero. There are 12 dida per cicero. } \\
\code{"picas"} & \parbox[t]{3in}{\I{Picas}. There are 12 points per pica.} \\
\code{"dida"} & \parbox[t]{3in}{\I{Dida}. 1157 \I{dida} equals 1238 points. } \\
\code{"cicero"} & \parbox[t]{3in}{Cicero. There are 12 \I{dida} per \I{cicero}. } \\
\code{"scaledpts"} & \parbox[t]{3in}{Scaled points. There are 65536 scaled
points per point. } \\
\code{"char"} & \parbox[t]{3in}{Locations and sizes are specified in
Expand Down
3 changes: 2 additions & 1 deletion src/library/grid/vignettes/plotexample.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
\newcommand{\grob}{\code{grob}}
\newcommand{\gTree}{\code{gTree}}
\newcommand{\R}{{\sffamily R}}
\newcommand{\I}[1]{#1}
\setlength{\parindent}{0in}
\setlength{\parskip}{.1in}
\setlength{\textwidth}{140mm}
Expand Down Expand Up @@ -582,6 +583,6 @@ grid.draw(date)

All of this may seem a bit irrelevant to interactive use, but it does
provide a basis for creating an editable plot interface as used in
M.~Kondrin's \pkg{Rgrace} package (available on CRAN 2005--7).
\I{M.~Kondrin}'s \pkg{Rgrace} package (available on CRAN 2005--7).

\end{document}
10 changes: 6 additions & 4 deletions src/library/parallel/vignettes/parallel.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ pdftitle={Package `parallel'}% Could also have pdfusetitle
%\VignetteIndexEntry{Package 'parallel'}
%\VignettePackage{parallel}

\newcommand{\I}[1]{#1}

\title{Package `parallel'}
\author{R Core Team}

Expand All @@ -49,7 +51,7 @@ basic operations simultaneously (e.g.{} integer and floating-point
arithmetic), and several implementations of external \abbr{BLAS} libraries
use multiple threads to do parts of basic vector/matrix operations in
parallel. Several contributed \R{} packages use multiple threads at C
level \emph{via} \abbr{OpenMP} or pthreads.
level \emph{via} \abbr{OpenMP} or \I{pthreads}.

This package handles running much larger chunks of computations in
parallel. A typical example is to evaluate the same \R{} function on
Expand Down Expand Up @@ -139,8 +141,8 @@ processes. They can be created in one of three ways:
computers with high-speed interconnects.

CRAN packages following this approach include \CRANpkg{GridR} (using
Condor or Globus) and \CRANpkg{Rsge} (using SGE, currently called
`Oracle Grid Engine').
\I{Condor} or \I{Globus}) and \CRANpkg{Rsge} (using \I{SGE}, currently
called `Oracle Grid Engine').

It will not be considered further in this vignette, but those parts
of \pkg{parallel} which provide \CRANpkg{snow}-like functions will
Expand Down Expand Up @@ -219,7 +221,7 @@ arguments discussed on its help page. They differ slightly in
philosophy: \code{mclapply} sets up a pool of \code{mc.cores} workers
just for this computation, whereas \code{parLapply} uses a less
ephemeral pool specified by the object \code{cl} created by a call to
\code{makeCluster} (which \emph{inter alia} specifies the size of the
\code{makeCluster} (which \emph{\I{inter alia}} specifies the size of the
pool). So the workflow is
\begin{verbatim}
cl <- makeCluster(<size of pool>)
Expand Down

0 comments on commit cdc7298

Please sign in to comment.