File: approxExtrap.Rd

package info (click to toggle)
hmisc 4.2-0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 3,332 kB
  • sloc: asm: 27,116; fortran: 606; ansic: 411; xml: 160; makefile: 2
file content (38 lines) | stat: -rw-r--r-- 964 bytes parent folder | download | duplicates (3)
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
\name{approxExtrap}
\alias{approxExtrap}
\title{Linear Extrapolation}
\description{
  Works in conjunction with the \code{\link{approx}} function to do linear
  extrapolation.  \code{\link{approx}} in R does not support extrapolation at
  all, and it is buggy in S-Plus 6. 
}
\usage{
approxExtrap(x, y, xout, method = "linear", n = 50, rule = 2, f = 0,
             ties = "ordered", na.rm = FALSE)
}
\arguments{
  \item{x,y,xout,method,n,rule,f}{
    see \code{\link{approx}}
  }
  \item{ties}{
    applies only to R.  See \code{\link{approx}}
  }
  \item{na.rm}{
    set to \code{TRUE} to remove \code{NA}s in \code{x} and
    \code{y} before proceeding
  }
}
\details{
  Duplicates in \code{x} (and corresponding \code{y} elements) are removed
  before using \code{approx}.
}
\value{
  a vector the same length as \code{xout}
}
\author{Frank Harrell}
\seealso{\code{\link{approx}}}
\examples{
approxExtrap(1:3,1:3,xout=c(0,4))
}
\keyword{arith}
\keyword{dplot}