The R Project SVN R

Rev

Rev 84327 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 84327 Rev 87144
Line 28... Line 28...
28
  \item{x}{x coordinates, rounded and sorted.}
28
  \item{x}{x coordinates, rounded and sorted.}
29
  \item{y}{y coordinates, rounded (and sorted within \code{x}).}
29
  \item{y}{y coordinates, rounded (and sorted within \code{x}).}
30
  \item{number}{multiplicities (positive integers); i.e.,
30
  \item{number}{multiplicities (positive integers); i.e.,
31
    \code{number[i]} is the multiplicity of \code{(x[i], y[i])}.}
31
    \code{number[i]} is the multiplicity of \code{(x[i], y[i])}.}
32
}
32
}
-
 
33
\note{
-
 
34
  Missing values in the coordinates are counted towards the multiplicities. The
-
 
35
  sum of the multiplicities will equal the number of coordinates.
-
 
36
}
33
\seealso{\code{\link{sunflowerplot}} which typically uses
37
\seealso{\code{\link{sunflowerplot}} which typically uses
34
  \code{xyTable()}; \code{\link{signif}}.
38
  \code{xyTable()}; \code{\link{signif}}.
35
}
39
}
36
\examples{
40
\examples{
37
xyTable(iris[, 3:4], digits = 6)
41
xyTable(iris[, 3:4], digits = 6)
38
 
42
 
-
 
43
## If missing coordinates exist, they are also counted
-
 
44
iris2 <- iris[1:10, 3:4]
-
 
45
iris2[4, 2] <- NA
-
 
46
iris2[c(3, 5), ] <- NA
-
 
47
xyTable(iris2)
-
 
48
 
39
## Discretized uncorrelated Gaussian:
49
## Discretized uncorrelated Gaussian:
40
\dontshow{set.seed(1)}
50
\dontshow{set.seed(1)}
41
xy <- data.frame(x = round(sort(stats::rnorm(100))), y = stats::rnorm(100))
51
xy <- data.frame(x = round(sort(stats::rnorm(100))), y = stats::rnorm(100))
42
xyTable(xy, digits = 1)
52
xyTable(xy, digits = 1)
43
}
53
}