TkSpline(x, y, method='natural', snap.to.x=FALSE, digits=4,
col=c('blue','#009900','red','black'),
xlab=deparse(substitute(x)), ylab=deparse(substitute(y)),
hscale=1.5, vscale=1.5, wait=TRUE,
...)
splinefun
x
format
plot
plot
tkrplot
tkrplot
plot
wait
is FALSE then an invisible NULL is returned, if
wait
is TRUE then an invisible list with the x and y values and
derivatives is returned.splinefun
is used to
make the predictions.
The x-value of the reference line can be changed by clicking and
dragging the line to a new position. The x and y values are shown in
the margins of the graph. Below the graph is a table with the
y-value and derivatives.splinefun
, TkApprox
if(interactive()) {
x <- 1:10
y <- sin(x)
TkSpline(x,y, xlim=c(0,11))
}
Run the code above in your browser using DataLab