File: rugNA.Rd

package info (click to toggle)
r-cran-vim 6.2.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,556 kB
  • sloc: cpp: 141; sh: 12; makefile: 2
file content (75 lines) | stat: -rw-r--r-- 1,938 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rugNA.R
\name{rugNA}
\alias{rugNA}
\title{Rug representation of missing/imputed values}
\usage{
rugNA(
  x,
  y,
  ticksize = NULL,
  side = 1,
  col = "red",
  alpha = NULL,
  miss = NULL,
  lwd = 0.5,
  ...
)
}
\arguments{
\item{x, y}{numeric vectors.}

\item{ticksize}{the length of the ticks.  Positive lengths give inward
ticks.}

\item{side}{an integer giving the side of the plot to draw the rug
representation.}

\item{col}{the color to be used for the ticks.}

\item{alpha}{the alpha value (between 0 and 1).}

\item{miss}{a \code{data.frame} or \code{matrix} with two columns and
logical values. If \code{NULL}, \code{x} and \code{y} are searched for
missing values, otherwise, the first column of \code{miss} is used to
determine the imputed values in \code{x} and the second one for the imputed
values in \code{y}.}

\item{lwd}{the line width to be used for the ticks.}

\item{\dots}{further arguments to be passed to \code{\link[graphics:zAxis]{graphics::Axis()}}.}
}
\description{
Add a rug representation of missing/imputed values in only one of the
variables to scatterplots.
}
\details{
If \code{side} is 1 or 3, the rug representation consists of values
available in \code{x} but missing/imputed in \code{y}.  Else if \code{side}
is 2 or 4, it consists of values available in \code{y} but missing/imputed
in \code{x}.
}
\examples{

data(tao, package = "VIM")
## for missing values
x <- tao[, "Air.Temp"]
y <- tao[, "Humidity"]
plot(x, y)
rugNA(x, y, side = 1)
rugNA(x, y, side = 2)

## for imputed values
x_imp <- kNN(tao[, c("Air.Temp","Humidity")])
x <- x_imp[, "Air.Temp"]
y <- x_imp[, "Humidity"]
miss <- x_imp[, c("Air.Temp_imp","Humidity_imp")]
plot(x, y)
rugNA(x, y, side = 1, col = "orange", miss = miss)
rugNA(x, y, side = 2, col = "orange", miss = miss)

}
\author{
Andreas Alfons, modifications by Bernd Prantner
}
\keyword{color}