Skip to content
Browse files

clarifications, missing xref

git-svn-id: https://svn.r-project.org/R/trunk@60892 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information...
1 parent 5e9a424 commit 2911cd2a6eab81591868ed104bdadd52b9e8285b ripley committed Oct 7, 2012
Showing with 26 additions and 19 deletions.
  1. +21 −14 src/library/base/man/merge.Rd
  2. +5 −5 src/library/stats/man/dendrogram.Rd
View
35 src/library/base/man/merge.Rd
@@ -26,27 +26,33 @@ merge(x, y, \dots)
}
\arguments{
\item{x, y}{data frames, or objects to be coerced to one.}
- \item{by, by.x, by.y}{specifications of the common columns. See
- \sQuote{Details}.}
+ \item{by, by.x, by.y}{specifications of the columns used for merging.
+ See \sQuote{Details}.}
\item{all}{logical; \code{all = L} is shorthand for \code{all.x = L} and
- \code{all.y = L}, where \code{L} is either \code{\link{TRUE}} or \code{FALSE}.}
+ \code{all.y = L}, where \code{L} is either \code{\link{TRUE}} or
+ \code{FALSE}.}
\item{all.x}{logical; if \code{TRUE}, then extra rows will be added to
the output, one for each row in \code{x} that has no matching row in
\code{y}. These rows will have \code{NA}s in those columns that are
usually filled with values from \code{y}. The default is
\code{FALSE}, so that only rows with data from both \code{x} and
\code{y} are included in the output.}
- \item{all.y}{logical; analogous to \code{all.x} above.}
- \item{sort}{logical. Should the results be sorted on the \code{by}
+ \item{all.y}{logical; analogous to \code{all.x}.}
+ \item{sort}{logical. Should the result be sorted on the \code{by}
columns?}
- \item{suffixes}{character(2) specifying the suffixes to be used for
- making non-\code{by} \code{names()} unique.}
+ \item{suffixes}{a character vector of length 2 specifying the suffixes
+ to be used for making unique the names of columns in the result
+ which not used for merging (appearing in \code{by} etc).}
\item{incomparables}{values which cannot be matched. See
\code{\link{match}}.}
\item{\dots}{arguments to be passed to or from methods.}
}
\details{
- By default the data frames are merged on the columns with names they
+ \code{merge} is a generic function whose principal method is for data
+ frames: the default method coerces its arguments to data frames and
+ calls the \code{"data.frame"} method.
+
+ By default the data frames are merged on the columns with names they
both have, but separate specifications of the columns can be given by
\code{by.x} and \code{by.y}. The rows in the two data frames that
match on the specified columns are extracted, and joined together. If
@@ -68,10 +74,10 @@ merge(x, y, \dots)
appended to the result as well, with \code{NA} filled in the
corresponding columns of \code{y}; analogously for \code{all.y}.
- If the remaining columns in the data frames have any common names,
- these have \code{suffixes} (\code{".x"} and \code{".y"} by default)
- appended to try to make the names of the result unique. If this is
- not possible, an error is thrown.
+ If the columns in the data frames not used in merging have any common
+ names, these have \code{suffixes} (\code{".x"} and \code{".y"} by
+ default) appended to try to make the names of the result unique. If
+ this is not possible, an error is thrown.
The complexity of the algorithm used is proportional to the length of
the answer.
@@ -88,7 +94,6 @@ merge(x, y, \dots)
\note{
This is intended to work with data frames with vector-like columns:
some aspects work with data frames containing matrices, but not all.
-
}
\value{
@@ -103,7 +108,9 @@ merge(x, y, \dots)
\seealso{
\code{\link{data.frame}},
\code{\link{by}},
- \code{\link{cbind}}
+ \code{\link{cbind}}.
+
+ \code{\link{dendrogram}} for a class which has a \code{merge} method.
}
\examples{
View
10 src/library/stats/man/dendrogram.Rd
@@ -59,7 +59,7 @@ is.leaf(object)
\arguments{
\item{object}{any \R object that can be made into one of class
\code{"dendrogram"}.}
- \item{x,y}{object(s) of class \code{"dendrogram"}.}
+ \item{x, y}{object(s) of class \code{"dendrogram"}.}
\item{hang}{numeric scalar indicating how the \emph{height} of leaves
should be computed from the heights of their parents; see
\code{\link{plot.hclust}}.}
@@ -169,12 +169,13 @@ is.leaf(object)
\code{rev.dendrogram} simply returns the dendrogram \code{x} with
reversed nodes, see also \code{\link{reorder.dendrogram}}.
- The \code{\link{merge}(x,y, ...)} method allows to join two (or more!)
+ The \code{\link{merge}(x, y, ...)} method which merges two or more
dendrograms into a new one which has \code{x} and \code{y} (and
optional further arguments) as branches.
- \code{is.leaf(object)} is logical indicating if \code{object} is a
+ \code{is.leaf(object)} returns logical indicating if \code{object} is a
leaf (the most simple dendrogram).
+
\code{plotNode()} and \code{plotNodeLimit()} are helper functions.
}
\note{
@@ -189,8 +190,7 @@ is.leaf(object)
Some operations on dendrograms (including plotting) make use of
recursion. For very deep trees It may be necessary to increase
\code{\link{options}("expressions")}: if you do you are likely to need
- to set the C stack size larger than the OS default if possible
- (which it is not on Windows).
+ to set the C stack size larger than the default where possible.
}
\seealso{
\code{\link{dendrapply}} for applying a function to \emph{each} node.

0 comments on commit 2911cd2

Please sign in to comment.
Something went wrong with that request. Please try again.