File: gapMiss.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 (39 lines) | stat: -rw-r--r-- 849 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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gapMiss.R
\name{gapMiss}
\alias{gapMiss}
\title{Missing value gap statistics}
\usage{
gapMiss(x, what = mean)
}
\arguments{
\item{x}{a numeric vector}

\item{what}{default is the arithmetic mean.
One can include an own function that returns a vector of lenght 1 (e.g. median)}
}
\value{
The gap statistics
}
\description{
Computes the average missing value gap of a vector.
}
\details{
The length of each sequence of missing values (gap) in a vector is calculated and the
mean gap is reported
}
\examples{
v <- rnorm(20)
v[3] <- NA
v[6:9] <- NA
v[13:17] <- NA
v
gapMiss(v)
gapMiss(v, what = median)
gapMiss(v, what = function(x) mean(x, trim = 0.1))
gapMiss(v, what = var)
}
\author{
Matthias Templ based on a suggestion and draft from Huang Tian Yuan.
}
\keyword{manip}